From 4a2ecc56b26ec00f20e137da22f74a3936a44483 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 29 Jul 2024 16:18:22 +0800 Subject: [PATCH 01/83] Upgrade to the latest tcgc --- common/config/rush/pnpm-lock.yaml | 22 ++++++++++++---------- packages/typespec-test/package.json | 2 +- packages/typespec-ts/package.json | 6 +++--- packages/typespec-ts/src/index.ts | 8 ++++---- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7d142a86b0..c67fdd0086 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -194,7 +194,7 @@ importers: '@azure-tools/typespec-autorest': '>=0.44.0 <1.0.0' '@azure-tools/typespec-azure-core': '>=0.44.0 <1.0.0' '@azure-tools/typespec-azure-resource-manager': '>=0.44.0 <1.0.0' - '@azure-tools/typespec-client-generator-core': '>=0.44.1 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.44.2 <1.0.0' '@azure-tools/typespec-ts': workspace:^0.31.0 '@types/mocha': ^5.2.7 '@types/node': ^18.0.0 @@ -208,10 +208,10 @@ importers: ts-node: ^8.5.2 typescript: ~5.5.3 dependencies: - '@azure-tools/typespec-autorest': 0.44.0_timngmzobtudd6hqmfxz372sfm + '@azure-tools/typespec-autorest': 0.44.0_syu7k2sryd2jl3ny56cdkq4td4 '@azure-tools/typespec-azure-core': 0.44.0_y4fdrj4fubdsawzpd3lzclh3gu '@azure-tools/typespec-azure-resource-manager': 0.44.0_6vgvco73pbyzlhtjupx3yiv7nu - '@azure-tools/typespec-client-generator-core': 0.44.1_rzfynd42omfd3ted4n3n2pp2kq + '@azure-tools/typespec-client-generator-core': 0.44.2_6vgvco73pbyzlhtjupx3yiv7nu '@azure-tools/typespec-ts': link:../typespec-ts '@typespec/compiler': 0.58.1 '@typespec/http': 0.58.0_@typespec+compiler@0.58.1 @@ -236,7 +236,7 @@ importers: '@azure-tools/typespec-autorest': '>=0.44.0 <1.0.0' '@azure-tools/typespec-azure-core': '>=0.44.0 <1.0.0' '@azure-tools/typespec-azure-resource-manager': '>=0.44.0 <1.0.0' - '@azure-tools/typespec-client-generator-core': '>=0.44.1 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.44.2 <1.0.0' '@azure/abort-controller': ^2.1.2 '@azure/core-auth': ^1.6.0 '@azure/core-lro': ^3.0.0 @@ -288,10 +288,10 @@ importers: '@azure-tools/cadl-ranch': 0.13.4_erzegljlzqjfevgnc7y3ko52aq '@azure-tools/cadl-ranch-expect': 0.14.1_xh3ux2bdr4ico2ttepwgig7vam '@azure-tools/cadl-ranch-specs': 0.34.7_psfe3gh3g46dy4q5vvlmtrffdu - '@azure-tools/typespec-autorest': 0.44.0_timngmzobtudd6hqmfxz372sfm + '@azure-tools/typespec-autorest': 0.44.0_syu7k2sryd2jl3ny56cdkq4td4 '@azure-tools/typespec-azure-core': 0.44.0_y4fdrj4fubdsawzpd3lzclh3gu '@azure-tools/typespec-azure-resource-manager': 0.44.0_6vgvco73pbyzlhtjupx3yiv7nu - '@azure-tools/typespec-client-generator-core': 0.44.1_rzfynd42omfd3ted4n3n2pp2kq + '@azure-tools/typespec-client-generator-core': 0.44.2_6vgvco73pbyzlhtjupx3yiv7nu '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.6.0 '@azure/core-lro': 3.0.0 @@ -535,7 +535,7 @@ packages: - supports-color dev: true - /@azure-tools/typespec-autorest/0.44.0_timngmzobtudd6hqmfxz372sfm: + /@azure-tools/typespec-autorest/0.44.0_syu7k2sryd2jl3ny56cdkq4td4: resolution: {integrity: sha512-GlIQayA6HfKndq1T2qHBXtL6n8gTiShUEhi30zncoBaIUnwumkXSnx18uCQl0EzFmvAqLYt3kbHqQNzZIdGaeQ==} engines: {node: '>=18.0.0'} peerDependencies: @@ -550,7 +550,7 @@ packages: dependencies: '@azure-tools/typespec-azure-core': 0.44.0_y4fdrj4fubdsawzpd3lzclh3gu '@azure-tools/typespec-azure-resource-manager': 0.44.0_6vgvco73pbyzlhtjupx3yiv7nu - '@azure-tools/typespec-client-generator-core': 0.44.1_rzfynd42omfd3ted4n3n2pp2kq + '@azure-tools/typespec-client-generator-core': 0.44.2_6vgvco73pbyzlhtjupx3yiv7nu '@typespec/compiler': 0.58.1 '@typespec/http': 0.58.0_@typespec+compiler@0.58.1 '@typespec/openapi': 0.58.0_f4whyvgt2lnkl2m35qxa7f2b4e @@ -589,19 +589,21 @@ packages: change-case: 5.4.4 pluralize: 8.0.0 - /@azure-tools/typespec-client-generator-core/0.44.1_rzfynd42omfd3ted4n3n2pp2kq: - resolution: {integrity: sha512-hpDYS4J329kPnXMAndburITh81jgOloxLrv6QXJadurnFhxFHb8AycGO8VWgFYTf04cWd7yDx7HutzGSN9C7TQ==} + /@azure-tools/typespec-client-generator-core/0.44.2_6vgvco73pbyzlhtjupx3yiv7nu: + resolution: {integrity: sha512-eIClpMxjMYxNeyYpdnD3BfWbPiDP0e7waTvBc5V1JQmFGKvh8H9dNeO4IaBqJ/O7WSDtuxweDmSUviZdBvuYNA==} engines: {node: '>=18.0.0'} peerDependencies: '@azure-tools/typespec-azure-core': ~0.44.0 '@typespec/compiler': ~0.58.0 '@typespec/http': ~0.58.0 + '@typespec/openapi': ~0.58.0 '@typespec/rest': ~0.58.0 '@typespec/versioning': ~0.58.0 dependencies: '@azure-tools/typespec-azure-core': 0.44.0_y4fdrj4fubdsawzpd3lzclh3gu '@typespec/compiler': 0.58.1 '@typespec/http': 0.58.0_@typespec+compiler@0.58.1 + '@typespec/openapi': 0.58.0_f4whyvgt2lnkl2m35qxa7f2b4e '@typespec/rest': 0.58.0_f4whyvgt2lnkl2m35qxa7f2b4e '@typespec/versioning': 0.58.0_@typespec+compiler@0.58.1 change-case: 5.4.4 diff --git a/packages/typespec-test/package.json b/packages/typespec-test/package.json index 57aa2fcb27..9d66919e79 100644 --- a/packages/typespec-test/package.json +++ b/packages/typespec-test/package.json @@ -8,7 +8,7 @@ "@azure-tools/typespec-autorest": ">=0.44.0 <1.0.0", "@typespec/openapi3": ">=0.58.0 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.44.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.44.1 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.44.2 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.44.0 <1.0.0", "@typespec/compiler": ">=0.58.1 <1.0.0", "@typespec/http": ">=0.58.0 <1.0.0", diff --git a/packages/typespec-ts/package.json b/packages/typespec-ts/package.json index c76e38042d..719e8fa0e5 100644 --- a/packages/typespec-ts/package.json +++ b/packages/typespec-ts/package.json @@ -69,7 +69,7 @@ "@azure-tools/typespec-autorest": ">=0.44.0 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.44.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.44.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.44.1 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.44.2 <1.0.0", "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.6.0", "@azure/core-lro": "^3.0.0", @@ -108,7 +108,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.44.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.44.1 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.44.2 <1.0.0", "@typespec/compiler": ">=0.58.1 <1.0.0", "@typespec/http": ">=0.58.0 <1.0.0", "@typespec/rest": ">=0.58.0 <1.0.0", @@ -139,4 +139,4 @@ "url": "https://github.com/Azure/autorest.typescript/issues" }, "homepage": "https://github.com/Azure/autorest.typescript/tree/main/packages/typespec-ts/" -} \ No newline at end of file +} diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index e84aece7c3..dd394e6a8e 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -75,7 +75,7 @@ export async function $onEmit(context: EmitContext) { /** Shared status */ const program: Program = context.program; const emitterOptions: EmitterOptions = context.options; - const dpgContext = createContextWithDefaultOptions(context); + const dpgContext = await createContextWithDefaultOptions(context); const needUnexpectedHelper: Map = new Map(); const serviceNameToRlcModelsMap: Map = new Map< string, @@ -335,9 +335,9 @@ export async function $onEmit(context: EmitContext) { } } -export function createContextWithDefaultOptions( +export async function createContextWithDefaultOptions( context: EmitContext> -): SdkContext { +): Promise { const tcgcSettings = { "generate-protocol-methods": true, "generate-convenience-methods": true, @@ -354,5 +354,5 @@ export function createContextWithDefaultOptions( ...tcgcSettings }; - return createSdkContext(context) as SdkContext; + return (await createSdkContext(context)) as SdkContext; } From 03abd99f593f24323321e872d3b8909aac5e96c4 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 29 Jul 2024 20:59:21 +0800 Subject: [PATCH 02/83] Update the fixes --- .../typespec-ts/src/modular/buildCodeModel.ts | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/packages/typespec-ts/src/modular/buildCodeModel.ts b/packages/typespec-ts/src/modular/buildCodeModel.ts index 5b3fb48fd8..1a14d8e1c7 100644 --- a/packages/typespec-ts/src/modular/buildCodeModel.ts +++ b/packages/typespec-ts/src/modular/buildCodeModel.ts @@ -16,7 +16,6 @@ import { getDefaultApiVersion, getHttpOperationWithCache, getLibraryName, - getSdkBuiltInType, getSdkUnion, getWireName, isApiVersion, @@ -45,7 +44,6 @@ import { getSummary, getVisibility, IntrinsicScalarName, - IntrinsicType, isErrorModel, isNeverType, isNullType, @@ -1418,7 +1416,7 @@ function emitUnion( description: sdkType.description || `Type of ${typeName}`, internal: true, type: sdkType.kind, - valueType: emitSimpleType(context, sdkType.valueType as SdkBuiltInType), + valueType: emitSimpleType(sdkType.valueType), values: sdkType.values.map((x) => emitEnumMember(context, x)), isFixed: sdkType.isFixed, isNonExhaustive: context.rlcOptions?.experimentalExtensibleEnums ?? false, @@ -1458,20 +1456,10 @@ function emitEnumMember(context: SdkContext, member: any): Record { }; } -function emitSimpleType( - context: SdkContext, - type: Scalar | IntrinsicType | SdkBuiltInType -): Record { - let sdkType: SdkBuiltInType; - if (type.kind === "Scalar" || type.kind === "Intrinsic") { - sdkType = getSdkBuiltInType(context, type); - } else { - sdkType = type; - } - +function emitSimpleType(type: SdkBuiltInType): Record { return { - nullable: isNullType(sdkType.__raw!), - type: sdkType.kind === "string" ? "string" : "number", // TODO: handle other types + nullable: isNullType(type.__raw!), + type: type.kind === "string" ? "string" : "number", // TODO: handle other types doc: "", apiVersions: [], sdkDefaultValue: undefined, From abbad792384f04be90e445c91d700383af52b65c Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 29 Jul 2024 21:07:12 +0800 Subject: [PATCH 03/83] Init sample generation --- packages/typespec-ts/src/next/buildSamples.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 packages/typespec-ts/src/next/buildSamples.ts diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts new file mode 100644 index 0000000000..e69de29bb2 From e9ed6329471ca18a78e3524f7fff22ebbd81a10e Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 29 Jul 2024 21:17:18 +0800 Subject: [PATCH 04/83] Fix testing issues --- .../test-next/integration/test-hots.ts | 26 ++++++++++------- packages/typespec-ts/test/util/emitUtil.ts | 28 +++++++++---------- packages/typespec-ts/test/util/testUtil.ts | 6 ++-- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/packages/typespec-ts/test-next/integration/test-hots.ts b/packages/typespec-ts/test-next/integration/test-hots.ts index 38321d88c0..16c4eaadec 100644 --- a/packages/typespec-ts/test-next/integration/test-hots.ts +++ b/packages/typespec-ts/test-next/integration/test-hots.ts @@ -3,11 +3,15 @@ import { SdkEmitterOptions, SdkHttpOperation, SdkServiceOperation, - createSdkContext, + createSdkContext } from "@azure-tools/typespec-client-generator-core"; import { SdkTestLibrary } from "@azure-tools/typespec-client-generator-core/testing"; import { EmitContext, Program } from "@typespec/compiler"; -import { createTestHost, createTestWrapper, TypeSpecTestLibrary } from "@typespec/compiler/testing"; +import { + createTestHost, + createTestWrapper, + TypeSpecTestLibrary +} from "@typespec/compiler/testing"; import { HttpTestLibrary } from "@typespec/http/testing"; export async function createMyTestHost() { @@ -23,29 +27,31 @@ export interface CreateSdkTestRunnerOptions extends SdkEmitterOptions { packageName?: string; } -export async function createSdkContextFromTypespec(code: string, options: CreateSdkTestRunnerOptions = {}): Promise>{ +export async function createSdkContextFromTypespec( + code: string, + options: CreateSdkTestRunnerOptions = {} +): Promise> { const runner = await createMyTestRunner(); await runner.compile(code); - return createSdkContextTestHelper(runner.program, options); + return await createSdkContextTestHelper(runner.program, options); } - -export function createSdkContextTestHelper< +export async function createSdkContextTestHelper< TOptions extends Record = CreateSdkTestRunnerOptions, - TServiceOperation extends SdkServiceOperation = SdkHttpOperation, + TServiceOperation extends SdkServiceOperation = SdkHttpOperation >( program: Program, options: TOptions, sdkContextOption?: any -): SdkContext { +): Promise> { const emitContext: EmitContext = { program: program, emitterOutputDir: "dummy", options: options, - getAssetEmitter: null as any, + getAssetEmitter: null as any }; - return createSdkContext( + return await createSdkContext( emitContext, options.emitterName ?? "@azure-tools/typespec-csharp", sdkContextOption diff --git a/packages/typespec-ts/test/util/emitUtil.ts b/packages/typespec-ts/test/util/emitUtil.ts index 8c0e03dab7..4ad612f1b9 100644 --- a/packages/typespec-ts/test/util/emitUtil.ts +++ b/packages/typespec-ts/test/util/emitUtil.ts @@ -46,7 +46,7 @@ export async function emitPageHelperFromTypeSpec( needTCGC ); const program = context.program; - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const clients = getRLCClients(dpgContext); let helperDetail; if (clients && clients[0]) { @@ -82,7 +82,7 @@ export async function emitSchemasFromTypeSpec( needTCGC ); const program = context.program; - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const clients = getRLCClients(dpgContext); let rlcSchemas: Schema[] = []; if (clients && clients[0]) { @@ -107,7 +107,7 @@ export async function emitModelsFromTypeSpec( needTCGC, withRawContent ); - const dpgContext = createDpgContextTestHelper( + const dpgContext = await createDpgContextTestHelper( context.program, enableModelNamespace ); @@ -147,7 +147,7 @@ export async function emitParameterFromTypeSpec( withRawContent, withVersionedApiVersion ); - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const clients = getRLCClients(dpgContext); const importSet = initInternalImports(); let parameters; @@ -181,7 +181,7 @@ export async function emitClientDefinitionFromTypeSpec( needAzureCore: boolean = false ) { const context = await rlcEmitterFor(tspContent, true, needAzureCore); - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const clients = getRLCClients(dpgContext); const internalImports = initInternalImports(); let paths = {}; @@ -216,7 +216,7 @@ export async function emitClientFactoryFromTypeSpec( withRawContent ); const program = context.program; - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const clients = getRLCClients(dpgContext); const importSet = initInternalImports(); @@ -269,7 +269,7 @@ export async function emitResponsesFromTypeSpec( withVersionedApiVersion, needArmTemplate ); - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const importSet = initInternalImports(); const clients = getRLCClients(dpgContext); let responses; @@ -292,7 +292,7 @@ export async function emitResponsesFromTypeSpec( export async function getRLCClientsFromTypeSpec(tspContent: string) { const context = await rlcEmitterFor(tspContent, true, false, true, true); - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const clients = getRLCClients(dpgContext); expectDiagnosticEmpty(dpgContext.program.diagnostics); return clients; @@ -314,7 +314,7 @@ export async function emitModularModelsFromTypeSpec( false, withRawContent ); - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const serviceNameToRlcModelsMap: Map = new Map< string, RLCModel @@ -364,7 +364,7 @@ export async function emitModularSerializeUtilsFromTypeSpec( tspContent: string ) { const context = await rlcEmitterFor(tspContent); - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const serviceNameToRlcModelsMap: Map = new Map< string, RLCModel @@ -413,7 +413,7 @@ export async function emitModularOperationsFromTypeSpec( withRawContent, withVersionedApiVersion ); - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const serviceNameToRlcModelsMap: Map = new Map< string, RLCModel @@ -443,7 +443,7 @@ export async function emitModularOperationsFromTypeSpec( modularCodeModel.clients[0], dpgContext, modularCodeModel, - false, + false ); if (mustEmptyDiagnostic && dpgContext.program.diagnostics.length > 0) { throw dpgContext.program.diagnostics; @@ -467,7 +467,7 @@ export async function emitModularClientContextFromTypeSpec( withRawContent, withVersionedApiVersion ); - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const serviceNameToRlcModelsMap: Map = new Map< string, RLCModel @@ -517,7 +517,7 @@ export async function emitModularClientFromTypeSpec( withRawContent, withVersionedApiVersion ); - const dpgContext = createDpgContextTestHelper(context.program); + const dpgContext = await createDpgContextTestHelper(context.program); const serviceNameToRlcModelsMap: Map = new Map< string, RLCModel diff --git a/packages/typespec-ts/test/util/testUtil.ts b/packages/typespec-ts/test/util/testUtil.ts index 817be68f4c..f00be395cf 100644 --- a/packages/typespec-ts/test/util/testUtil.ts +++ b/packages/typespec-ts/test/util/testUtil.ts @@ -88,16 +88,16 @@ ${code} return host; } -export function createDpgContextTestHelper( +export async function createDpgContextTestHelper( program: Program, enableModelNamespace = false -): SdkContext { +): Promise { provideContext("rlcMetaTree", new Map()); provideContext("modularMetaTree", new Map()); provideContext("symbolMap", new Map()); provideContext("outputProject", new Project()); - const context = createContextWithDefaultOptions({ + const context = await createContextWithDefaultOptions({ program } as EmitContext); From 61d796452f684296a117adc2757025ddd9981ddc Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 29 Jul 2024 22:39:59 +0800 Subject: [PATCH 05/83] Init sample gen --- packages/typespec-ts/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index dd394e6a8e..66c9db581d 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -68,6 +68,7 @@ import { GenerationDirDetail, SdkContext } from "./utils/interfaces.js"; import { provideContext, useContext } from "./contextManager.js"; import { emitSerializerHelpersFile } from "./modular/buildHelperSerializers.js"; import { provideSdkTypes } from "./framework/hooks/sdkTypes.js"; +import { buildSamples as buildModularSamples } from "./next/buildSamples.js"; export * from "./lib.js"; @@ -181,6 +182,7 @@ export async function $onEmit(context: EmitContext) { } async function generateModularSources() { + buildModularSamples(dpgContext); if (emitterOptions.isModularLibrary) { // TODO: Emit modular parts of the library const modularSourcesRoot = From 5a2a2375fa0d0d40da718ff19720435d3fb58f40 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 29 Jul 2024 22:40:14 +0800 Subject: [PATCH 06/83] Init sample gen --- packages/typespec-ts/src/next/buildSamples.ts | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index e69de29bb2..4ba24aa4fd 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -0,0 +1,107 @@ +import { + Project, + StructureKind, + InterfaceDeclarationStructure, + FunctionDeclarationStructure +} from "ts-morph"; +import { useBinder } from "../framework/hooks/binder.js"; +import { addDeclaration } from "../framework/declaration.js"; +import { resolveReference } from "../framework/reference.js"; +import { SdkContext } from "../utils/interfaces.js"; +import { SdkHttpOperationExample } from "@azure-tools/typespec-client-generator-core"; + +// async function getASingleSubscription() { +// const subscriptionId = "291bba3f-e0a5-47bc-a099-3bdcb2a50a05"; +// const credential = new DefaultAzureCredential(); +// const client = new SubscriptionClient(credential); +// const result = await client.subscriptions.get(subscriptionId); +// console.log(result); +// } + +export function buildSamples(dpgContext: SdkContext) { + const example = dpgContext.__httpOperationExamples?.entries().next() + .value as SdkHttpOperationExample[]; + // Create a new ts-morph project + const project = new Project(); + // Create a source file + const sourceFile = project.createSourceFile("test.ts", "", { + overwrite: true + }); + + // Initialize the binder + const binder = useBinder(); + + // Define an interface model. In practice this would be a type object (e.g. from TypeSpec, TCGC, modelerfour, etc.) + // At this framework level, we're just using a simple object, there is no coupling with the actual type system, but this is flexible so any object can be used. + const modelType = { + name: "MyInterface", + properties: [{ name: "id", type: "number" }] + }; + + // Define a function model + const functionType = { + name: "MyFunction", + returnType: "void", + body: `console.log("Hello World");` + }; + + // Create an interface declaration structure. This illustrates a similar pattern to the one used in the emitter. Transorming a model into a structure for ts-morph. + const interfaceDeclaration: InterfaceDeclarationStructure = { + kind: StructureKind.Interface, + name: modelType.name, + properties: modelType.properties.map((p) => ({ + name: p.name, + type: p.type + })) + }; + + // Create a function declaration structure + const functionDeclaration: FunctionDeclarationStructure = { + kind: StructureKind.Function, + name: functionType.name, + returnType: functionType.returnType, + statements: functionType.body + }; + + // Helper functions to add the declarations to the source file. These are needed to be able to leverage the binder to track the declarations. + // We'll be moving from sourceFile.addInterface(interfaceDeclaration) to addDeclaration(sourceFile, interfaceDeclaration, interfaceModel) + addDeclaration(sourceFile, interfaceDeclaration, modelType); + addDeclaration(sourceFile, functionDeclaration, functionType); + + // Create another source file + const sourceFile2 = project.createSourceFile("test2.ts", "", { + overwrite: true + }); + + // Add statements referencing the tracked declarations + const functionReference = resolveReference(functionType); + const modelReference = resolveReference(modelType); + + sourceFile2.addStatements(`${functionReference}();`); + sourceFile2.addStatements(`let obj: ${modelReference} = { id: 1 };`); + + // Apply imports to ensure correct references + binder.resolveAllReferences(); + + // Output the generated files + console.log("// test.ts"); + console.log(sourceFile.getFullText()); + console.log("// test2.ts"); + console.log(sourceFile2.getFullText()); + + // Output + // test.ts + // interface MyInterface { + // id: number; + // } + + // function MyFunction(): void { + // console.log("Hello World"); + // } + + // // test2.ts + // import { MyFunction, MyInterface } from "./test"; + + // MyFunction(); + // let obj: MyInterface = { id: 1 }; +} From 71e8cd95aff79b3bc86b514bb4422fa47837f85f Mon Sep 17 00:00:00 2001 From: "Jiao Di (MSFT)" <80496810+v-jiaodi@users.noreply.github.com> Date: Tue, 30 Jul 2024 11:22:11 +0800 Subject: [PATCH 07/83] Upgrade tcgc to v44.3 --- common/config/rush/pnpm-lock.yaml | 20 ++++++++++---------- packages/typespec-test/package.json | 2 +- packages/typespec-ts/package.json | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c67fdd0086..70ecccd125 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -194,7 +194,7 @@ importers: '@azure-tools/typespec-autorest': '>=0.44.0 <1.0.0' '@azure-tools/typespec-azure-core': '>=0.44.0 <1.0.0' '@azure-tools/typespec-azure-resource-manager': '>=0.44.0 <1.0.0' - '@azure-tools/typespec-client-generator-core': '>=0.44.2 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.44.3 <1.0.0' '@azure-tools/typespec-ts': workspace:^0.31.0 '@types/mocha': ^5.2.7 '@types/node': ^18.0.0 @@ -208,10 +208,10 @@ importers: ts-node: ^8.5.2 typescript: ~5.5.3 dependencies: - '@azure-tools/typespec-autorest': 0.44.0_syu7k2sryd2jl3ny56cdkq4td4 + '@azure-tools/typespec-autorest': 0.44.0_rndu5eczu7xjaaqulsy4oc2cim '@azure-tools/typespec-azure-core': 0.44.0_y4fdrj4fubdsawzpd3lzclh3gu '@azure-tools/typespec-azure-resource-manager': 0.44.0_6vgvco73pbyzlhtjupx3yiv7nu - '@azure-tools/typespec-client-generator-core': 0.44.2_6vgvco73pbyzlhtjupx3yiv7nu + '@azure-tools/typespec-client-generator-core': 0.44.3_6vgvco73pbyzlhtjupx3yiv7nu '@azure-tools/typespec-ts': link:../typespec-ts '@typespec/compiler': 0.58.1 '@typespec/http': 0.58.0_@typespec+compiler@0.58.1 @@ -236,7 +236,7 @@ importers: '@azure-tools/typespec-autorest': '>=0.44.0 <1.0.0' '@azure-tools/typespec-azure-core': '>=0.44.0 <1.0.0' '@azure-tools/typespec-azure-resource-manager': '>=0.44.0 <1.0.0' - '@azure-tools/typespec-client-generator-core': '>=0.44.2 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.44.3 <1.0.0' '@azure/abort-controller': ^2.1.2 '@azure/core-auth': ^1.6.0 '@azure/core-lro': ^3.0.0 @@ -288,10 +288,10 @@ importers: '@azure-tools/cadl-ranch': 0.13.4_erzegljlzqjfevgnc7y3ko52aq '@azure-tools/cadl-ranch-expect': 0.14.1_xh3ux2bdr4ico2ttepwgig7vam '@azure-tools/cadl-ranch-specs': 0.34.7_psfe3gh3g46dy4q5vvlmtrffdu - '@azure-tools/typespec-autorest': 0.44.0_syu7k2sryd2jl3ny56cdkq4td4 + '@azure-tools/typespec-autorest': 0.44.0_rndu5eczu7xjaaqulsy4oc2cim '@azure-tools/typespec-azure-core': 0.44.0_y4fdrj4fubdsawzpd3lzclh3gu '@azure-tools/typespec-azure-resource-manager': 0.44.0_6vgvco73pbyzlhtjupx3yiv7nu - '@azure-tools/typespec-client-generator-core': 0.44.2_6vgvco73pbyzlhtjupx3yiv7nu + '@azure-tools/typespec-client-generator-core': 0.44.3_6vgvco73pbyzlhtjupx3yiv7nu '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.6.0 '@azure/core-lro': 3.0.0 @@ -535,7 +535,7 @@ packages: - supports-color dev: true - /@azure-tools/typespec-autorest/0.44.0_syu7k2sryd2jl3ny56cdkq4td4: + /@azure-tools/typespec-autorest/0.44.0_rndu5eczu7xjaaqulsy4oc2cim: resolution: {integrity: sha512-GlIQayA6HfKndq1T2qHBXtL6n8gTiShUEhi30zncoBaIUnwumkXSnx18uCQl0EzFmvAqLYt3kbHqQNzZIdGaeQ==} engines: {node: '>=18.0.0'} peerDependencies: @@ -550,7 +550,7 @@ packages: dependencies: '@azure-tools/typespec-azure-core': 0.44.0_y4fdrj4fubdsawzpd3lzclh3gu '@azure-tools/typespec-azure-resource-manager': 0.44.0_6vgvco73pbyzlhtjupx3yiv7nu - '@azure-tools/typespec-client-generator-core': 0.44.2_6vgvco73pbyzlhtjupx3yiv7nu + '@azure-tools/typespec-client-generator-core': 0.44.3_6vgvco73pbyzlhtjupx3yiv7nu '@typespec/compiler': 0.58.1 '@typespec/http': 0.58.0_@typespec+compiler@0.58.1 '@typespec/openapi': 0.58.0_f4whyvgt2lnkl2m35qxa7f2b4e @@ -589,8 +589,8 @@ packages: change-case: 5.4.4 pluralize: 8.0.0 - /@azure-tools/typespec-client-generator-core/0.44.2_6vgvco73pbyzlhtjupx3yiv7nu: - resolution: {integrity: sha512-eIClpMxjMYxNeyYpdnD3BfWbPiDP0e7waTvBc5V1JQmFGKvh8H9dNeO4IaBqJ/O7WSDtuxweDmSUviZdBvuYNA==} + /@azure-tools/typespec-client-generator-core/0.44.3_6vgvco73pbyzlhtjupx3yiv7nu: + resolution: {integrity: sha512-HXjxQs7ELrTuIDqOjlYhP4rM4AXb143klbiM8dkEGtqNBRCk77gVCGYVH1M3kWKAEs0dQKhzoUukscqRsfELuw==} engines: {node: '>=18.0.0'} peerDependencies: '@azure-tools/typespec-azure-core': ~0.44.0 diff --git a/packages/typespec-test/package.json b/packages/typespec-test/package.json index 9d66919e79..c4e18841b7 100644 --- a/packages/typespec-test/package.json +++ b/packages/typespec-test/package.json @@ -8,7 +8,7 @@ "@azure-tools/typespec-autorest": ">=0.44.0 <1.0.0", "@typespec/openapi3": ">=0.58.0 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.44.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.44.2 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.44.3 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.44.0 <1.0.0", "@typespec/compiler": ">=0.58.1 <1.0.0", "@typespec/http": ">=0.58.0 <1.0.0", diff --git a/packages/typespec-ts/package.json b/packages/typespec-ts/package.json index 719e8fa0e5..66270bc83b 100644 --- a/packages/typespec-ts/package.json +++ b/packages/typespec-ts/package.json @@ -69,7 +69,7 @@ "@azure-tools/typespec-autorest": ">=0.44.0 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.44.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.44.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.44.2 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.44.3 <1.0.0", "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.6.0", "@azure/core-lro": "^3.0.0", @@ -108,7 +108,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.44.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.44.2 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.44.3 <1.0.0", "@typespec/compiler": ">=0.58.1 <1.0.0", "@typespec/http": ">=0.58.0 <1.0.0", "@typespec/rest": ">=0.58.0 <1.0.0", From fdece2ed1e37a65723d5aced295c127f97228b93 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 30 Jul 2024 15:24:25 +0800 Subject: [PATCH 08/83] Generate the first sample gen --- .vscode/launch.json | 2 +- .../generated/typespec-ts/package.json | 168 +----------- ...taProductsCatalogs_Get_MaximumSet_Gen.json | 45 ++++ ...taProductsCatalogs_Get_MinimumSet_Gen.json | 16 ++ ...gs_ListByResourceGroup_MaximumSet_Gen.json | 50 ++++ ...gs_ListByResourceGroup_MinimumSet_Gen.json | 20 ++ ...ogs_ListBySubscription_MaximumSet_Gen.json | 49 ++++ ...ogs_ListBySubscription_MinimumSet_Gen.json | 19 ++ ...taProducts_AddUserRole_MaximumSet_Gen.json | 35 +++ ...taProducts_AddUserRole_MinimumSet_Gen.json | 35 +++ .../DataProducts_Create_MaximumSet_Gen.json | 252 ++++++++++++++++++ .../DataProducts_Create_MinimumSet_Gen.json | 38 +++ .../DataProducts_Delete_MaximumSet_Gen.json | 18 ++ .../DataProducts_Delete_MinimumSet_Gen.json | 18 ++ ...StorageAccountSasToken_MaximumSet_Gen.json | 22 ++ ...StorageAccountSasToken_MinimumSet_Gen.json | 22 ++ .../DataProducts_Get_MaximumSet_Gen.json | 102 +++++++ .../DataProducts_Get_MinimumSet_Gen.json | 18 ++ ...ts_ListByResourceGroup_MaximumSet_Gen.json | 106 ++++++++ ...ts_ListByResourceGroup_MinimumSet_Gen.json | 21 ++ ...cts_ListBySubscription_MaximumSet_Gen.json | 105 ++++++++ ...cts_ListBySubscription_MinimumSet_Gen.json | 20 ++ ...s_ListRolesAssignments_MaximumSet_Gen.json | 31 +++ ...s_ListRolesAssignments_MinimumSet_Gen.json | 31 +++ ...roducts_RemoveUserRole_MaximumSet_Gen.json | 24 ++ ...roducts_RemoveUserRole_MinimumSet_Gen.json | 24 ++ ...DataProducts_RotateKey_MaximumSet_Gen.json | 16 ++ ...DataProducts_RotateKey_MinimumSet_Gen.json | 16 ++ .../DataProducts_Update_MaximumSet_Gen.json | 129 +++++++++ .../DataProducts_Update_MinimumSet_Gen.json | 23 ++ .../DataTypes_Create_MaximumSet_Gen.json | 73 +++++ .../DataTypes_Create_MinimumSet_Gen.json | 23 ++ .../DataTypes_DeleteData_MaximumSet_Gen.json | 20 ++ .../DataTypes_DeleteData_MinimumSet_Gen.json | 20 ++ .../DataTypes_Delete_MaximumSet_Gen.json | 19 ++ .../DataTypes_Delete_MinimumSet_Gen.json | 19 ++ ...orageContainerSasToken_MaximumSet_Gen.json | 23 ++ ...orageContainerSasToken_MinimumSet_Gen.json | 23 ++ .../DataTypes_Get_MaximumSet_Gen.json | 37 +++ .../DataTypes_Get_MinimumSet_Gen.json | 18 ++ ...ypes_ListByDataProduct_MaximumSet_Gen.json | 41 +++ ...ypes_ListByDataProduct_MinimumSet_Gen.json | 21 ++ .../DataTypes_Update_MaximumSet_Gen.json | 50 ++++ .../DataTypes_Update_MinimumSet_Gen.json | 22 ++ .../Operations_List_MaximumSet_Gen.json | 28 ++ .../Operations_List_MinimumSet_Gen.json | 12 + .../tspconfig.yaml | 7 +- packages/typespec-ts/src/next/buildSamples.ts | 154 ++++++----- .../typespec-ts/src/next/emitCredential.ts | 17 ++ 49 files changed, 1867 insertions(+), 235 deletions(-) create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MinimumSet_Gen.json create mode 100644 packages/typespec-ts/src/next/emitCredential.ts diff --git a/.vscode/launch.json b/.vscode/launch.json index 1f6a0fe332..a1980d5bd5 100755 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -112,7 +112,7 @@ { "name": "[TypeSpec] Smoke Test Debug", "request": "launch", - "cwd": "${workspaceFolder}/packages/typespec-test/test/customWrapper", + "cwd": "${workspaceFolder}/packages/typespec-test/test/NetworkAnalytics.Management", "runtimeArgs": ["tsp", "compile", "./spec"], "runtimeExecutable": "npx", "skipFiles": ["/**"], diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json index 162add7567..84eed05abb 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json @@ -13,39 +13,20 @@ ".": "./src/index.ts", "./api": "./src/api/index.ts", "./models": "./src/models/index.ts", - "./api/operations": "./src/api/operations/index.ts", - "./api/dataProductsCatalogs": "./src/api/dataProductsCatalogs/index.ts", - "./api/dataTypes": "./src/api/dataTypes/index.ts", - "./api/dataProducts": "./src/api/dataProducts/index.ts" + "./api/operations": "src/api/operations/index.ts", + "./api/dataProductsCatalogs": "src/api/dataProductsCatalogs/index.ts", + "./api/dataTypes": "src/api/dataTypes/index.ts", + "./api/dataProducts": "src/api/dataProducts/index.ts" }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], + "dialects": ["esm", "commonjs"], + "esmDialects": ["browser", "react-native"], "selfLink": false }, "type": "module", - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], + "keywords": ["node", "azure", "cloud", "typescript", "browser", "isomorphic"], "author": "Microsoft Corporation", "license": "MIT", - "files": [ - "dist", - "README.md", - "LICENSE", - "review/*", - "CHANGELOG.md" - ], + "files": ["dist", "README.md", "LICENSE", "review/*", "CHANGELOG.md"], "dependencies": { "@azure-rest/core-client": "^2.1.0", "@azure/core-auth": "^1.6.0", @@ -93,136 +74,5 @@ "test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node", "test": "npm run clean && tshy && npm run unit-test:node && npm run unit-test:browser && npm run integration-test", "build": "npm run clean && tshy && npm run extract-api" - }, - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "react-native": { - "types": "./dist/react-native/index.d.ts", - "default": "./dist/react-native/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - }, - "./api": { - "browser": { - "types": "./dist/browser/api/index.d.ts", - "default": "./dist/browser/api/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/index.d.ts", - "default": "./dist/react-native/api/index.js" - }, - "import": { - "types": "./dist/esm/api/index.d.ts", - "default": "./dist/esm/api/index.js" - }, - "require": { - "types": "./dist/commonjs/api/index.d.ts", - "default": "./dist/commonjs/api/index.js" - } - }, - "./models": { - "browser": { - "types": "./dist/browser/models/index.d.ts", - "default": "./dist/browser/models/index.js" - }, - "react-native": { - "types": "./dist/react-native/models/index.d.ts", - "default": "./dist/react-native/models/index.js" - }, - "import": { - "types": "./dist/esm/models/index.d.ts", - "default": "./dist/esm/models/index.js" - }, - "require": { - "types": "./dist/commonjs/models/index.d.ts", - "default": "./dist/commonjs/models/index.js" - } - }, - "./api/operations": { - "browser": { - "types": "./dist/browser/api/operations/index.d.ts", - "default": "./dist/browser/api/operations/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/operations/index.d.ts", - "default": "./dist/react-native/api/operations/index.js" - }, - "import": { - "types": "./dist/esm/api/operations/index.d.ts", - "default": "./dist/esm/api/operations/index.js" - }, - "require": { - "types": "./dist/commonjs/api/operations/index.d.ts", - "default": "./dist/commonjs/api/operations/index.js" - } - }, - "./api/dataProductsCatalogs": { - "browser": { - "types": "./dist/browser/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/browser/api/dataProductsCatalogs/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/react-native/api/dataProductsCatalogs/index.js" - }, - "import": { - "types": "./dist/esm/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/esm/api/dataProductsCatalogs/index.js" - }, - "require": { - "types": "./dist/commonjs/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/commonjs/api/dataProductsCatalogs/index.js" - } - }, - "./api/dataTypes": { - "browser": { - "types": "./dist/browser/api/dataTypes/index.d.ts", - "default": "./dist/browser/api/dataTypes/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/dataTypes/index.d.ts", - "default": "./dist/react-native/api/dataTypes/index.js" - }, - "import": { - "types": "./dist/esm/api/dataTypes/index.d.ts", - "default": "./dist/esm/api/dataTypes/index.js" - }, - "require": { - "types": "./dist/commonjs/api/dataTypes/index.d.ts", - "default": "./dist/commonjs/api/dataTypes/index.js" - } - }, - "./api/dataProducts": { - "browser": { - "types": "./dist/browser/api/dataProducts/index.d.ts", - "default": "./dist/browser/api/dataProducts/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/dataProducts/index.d.ts", - "default": "./dist/react-native/api/dataProducts/index.js" - }, - "import": { - "types": "./dist/esm/api/dataProducts/index.d.ts", - "default": "./dist/esm/api/dataProducts/index.js" - }, - "require": { - "types": "./dist/commonjs/api/dataProducts/index.d.ts", - "default": "./dist/commonjs/api/dataProducts/index.js" - } - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts" + } } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..c125a194c5 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json @@ -0,0 +1,45 @@ +{ + "title": "DataProductsCatalogs_Get_MaximumSet_Gen", + "operationId": "DataProductsCatalogs_Get", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName" + }, + "responses": { + "200": { + "body": { + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "publisherName": "Microsoft", + "dataProducts": [ + { + "dataProductName": "MCC", + "description": "Official data product for Mobile Content Cloud.", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ] + } + ] + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MinimumSet_Gen.json new file mode 100644 index 0000000000..64d882b9f8 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MinimumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "title": "DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProductsCatalogs_Get", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..4618600508 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1,50 @@ +{ + "title": "DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen", + "operationId": "DataProductsCatalogs_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "publisherName": "Microsoft", + "dataProducts": [ + { + "dataProductName": "MCC", + "description": "Official data product for Mobile Content Cloud.", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ] + } + ] + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json new file mode 100644 index 0000000000..dc5c9007ff --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen", + "operationId": "DataProductsCatalogs_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + ] + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json new file mode 100644 index 0000000000..335ca166b4 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json @@ -0,0 +1,49 @@ +{ + "title": "DataProductsCatalogs_ListBySubscription_MaximumSet_Gen", + "operationId": "DataProductsCatalogs_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "publisherName": "Microsoft", + "dataProducts": [ + { + "dataProductName": "MCC", + "description": "Official data product for Mobile Content Cloud.", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ] + } + ] + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json new file mode 100644 index 0000000000..8d464345fe --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "DataProductsCatalogs_ListBySubscription_MinimumSet_Gen", + "operationId": "DataProductsCatalogs_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + ] + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json new file mode 100644 index 0000000000..98b687ed20 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "title": "DataProducts_AddUserRole_MaximumSet_Gen", + "operationId": "DataProducts_AddUserRole", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": [ + "scope" + ], + "principalType": "User", + "role": "Reader" + } + }, + "responses": { + "200": { + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": [ + "scope" + ], + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MinimumSet_Gen.json new file mode 100644 index 0000000000..06b08f2d27 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MinimumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "title": "DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_AddUserRole", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "userName", + "dataTypeScope": [ + "scope" + ], + "principalType": "User", + "role": "Reader" + } + }, + "responses": { + "200": { + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "userName", + "dataTypeScope": [ + "scope" + ], + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen.json new file mode 100644 index 0000000000..547af9ceb2 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen.json @@ -0,0 +1,252 @@ +{ + "title": "DataProducts_Create_MaximumSet_Gen", + "operationId": "DataProducts_Create", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "resource": { + "properties": { + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "currentMinorVersion": "1.0.1", + "consumptionEndpoints": {} + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "location": "eastus" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "Succeeded" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "currentMinorVersion": "1.0.1", + "documentation": "https://learn.microsoft.com/", + "consumptionEndpoints": { + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" + }, + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "IdentityType", + "userAssignedIdentities": { + "key8474": { + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "location": "eastus", + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + }, + "body": { + "properties": { + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "Succeeded" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "currentMinorVersion": "1.0.1", + "documentation": "https://learn.microsoft.com/", + "consumptionEndpoints": { + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" + }, + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "IdentityType", + "userAssignedIdentities": { + "key8474": { + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "location": "eastus", + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MinimumSet_Gen.json new file mode 100644 index 0000000000..59af0c6292 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MinimumSet_Gen.json @@ -0,0 +1,38 @@ +{ + "title": "DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_Create", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "resource": { + "location": "eastus", + "properties": { + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + }, + "responses": { + "200": { + "body": { + "location": "eastus", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + }, + "body": { + "location": "eastus", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..9723fd225e --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "DataProducts_Delete_MaximumSet_Gen", + "operationId": "DataProducts_Delete", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MinimumSet_Gen.json new file mode 100644 index 0000000000..77c64c727c --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_Delete", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json new file mode 100644 index 0000000000..12fc2e4a3d --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen", + "operationId": "DataProducts_GenerateStorageAccountSasToken", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "startTimeStamp": "2023-08-24T05:34:58.151Z", + "expiryTimeStamp": "2023-08-24T05:34:58.151Z", + "ipAddress": "1.1.1.1" + } + }, + "responses": { + "200": { + "body": { + "storageAccountSasToken": "storageAccountSasToken" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json new file mode 100644 index 0000000000..eec1c1acf7 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_GenerateStorageAccountSasToken", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "startTimeStamp": "2023-08-24T05:35:17.051Z", + "expiryTimeStamp": "2023-08-24T05:35:17.051Z", + "ipAddress": "1.1.1.1" + } + }, + "responses": { + "200": { + "body": { + "storageAccountSasToken": "storageAccountSasToken" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..13bfa83591 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen.json @@ -0,0 +1,102 @@ +{ + "title": "DataProducts_Get_MaximumSet_Gen", + "operationId": "DataProducts_Get", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01" + }, + "responses": { + "200": { + "body": { + "properties": { + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "Succeeded" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "currentMinorVersion": "1.0.1", + "documentation": "https://learn.microsoft.com/", + "consumptionEndpoints": { + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" + }, + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "IdentityType", + "userAssignedIdentities": { + "key8474": { + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "location": "eastus", + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MinimumSet_Gen.json new file mode 100644 index 0000000000..29f68292fc --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_Get", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01" + }, + "responses": { + "200": { + "body": { + "location": "eastus", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..82de6e9ece --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1,106 @@ +{ + "title": "DataProducts_ListByResourceGroup_MaximumSet_Gen", + "operationId": "DataProducts_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "Succeeded" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "currentMinorVersion": "1.0.1", + "documentation": "https://learn.microsoft.com/", + "consumptionEndpoints": { + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" + }, + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "IdentityType", + "userAssignedIdentities": { + "key8474": { + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "location": "eastus", + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json new file mode 100644 index 0000000000..1f203c3641 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + ] + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json new file mode 100644 index 0000000000..16534d88e5 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json @@ -0,0 +1,105 @@ +{ + "title": "DataProducts_ListBySubscription_MaximumSet_Gen", + "operationId": "DataProducts_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "Succeeded" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "currentMinorVersion": "1.0.1", + "documentation": "https://learn.microsoft.com/", + "consumptionEndpoints": { + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" + }, + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "IdentityType", + "userAssignedIdentities": { + "key8474": { + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "location": "eastus", + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetworkAnalytics/DataProducts?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json new file mode 100644 index 0000000000..f1e77fc230 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + ] + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json new file mode 100644 index 0000000000..774159728d --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json @@ -0,0 +1,31 @@ +{ + "title": "DataProducts_ListRolesAssignments_MaximumSet_Gen", + "operationId": "DataProducts_ListRolesAssignments", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": {} + }, + "responses": { + "200": { + "body": { + "count": 1, + "roleAssignmentResponse": [ + { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": [ + "scope" + ], + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000" + } + ] + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MinimumSet_Gen.json new file mode 100644 index 0000000000..68360878ce --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MinimumSet_Gen.json @@ -0,0 +1,31 @@ +{ + "title": "DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_ListRolesAssignments", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": {} + }, + "responses": { + "200": { + "body": { + "count": 1, + "roleAssignmentResponse": [ + { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": [ + "scope" + ], + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000" + } + ] + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json new file mode 100644 index 0000000000..1771cd0f71 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "DataProducts_RemoveUserRole_MaximumSet_Gen", + "operationId": "DataProducts_RemoveUserRole", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": [ + "scope" + ], + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000" + } + }, + "responses": { + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MinimumSet_Gen.json new file mode 100644 index 0000000000..8b8bbe3306 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MinimumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_RemoveUserRole", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": [ + "scope" + ], + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000" + } + }, + "responses": { + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json new file mode 100644 index 0000000000..d34d4fff9e --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "title": "DataProducts_RotateKey_MaximumSet_Gen", + "operationId": "DataProducts_RotateKey", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + } + }, + "responses": { + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MinimumSet_Gen.json new file mode 100644 index 0000000000..c24a79ba5f --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MinimumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "title": "DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_RotateKey", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + } + }, + "responses": { + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen.json new file mode 100644 index 0000000000..e2e0b84ff4 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen.json @@ -0,0 +1,129 @@ +{ + "title": "DataProducts_Update_MaximumSet_Gen", + "operationId": "DataProducts_Update", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "properties": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "properties": { + "owners": [ + "abc@micros.com", + "def@micros.com" + ], + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "currentMinorVersion": "1.0.1" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com", + "def@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "Succeeded" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "currentMinorVersion": "1.0.1", + "documentation": "https://learn.microsoft.com/", + "consumptionEndpoints": { + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" + }, + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "IdentityType", + "userAssignedIdentities": { + "key8474": { + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "location": "eastus", + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MinimumSet_Gen.json new file mode 100644 index 0000000000..7e457f7c07 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_Update", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "properties": {} + }, + "responses": { + "200": { + "body": { + "location": "jwlerdaudgxff" + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen.json new file mode 100644 index 0000000000..8fac29e573 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen.json @@ -0,0 +1,73 @@ +{ + "title": "DataTypes_Create_MaximumSet_Gen", + "operationId": "DataTypes_Create", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resource": { + "properties": { + "provisioningState": "Succeeded", + "state": "STARTED", + "storageOutputRetention": 27, + "databaseCacheRetention": 23, + "databaseRetention": 6 + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 27, + "databaseCacheRetention": 23, + "databaseRetention": 6, + "visualizationUrl": "visualizationUrl" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "name": "datatypeName", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + }, + "body": { + "properties": { + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 27, + "databaseCacheRetention": 23, + "databaseRetention": 6, + "visualizationUrl": "visualizationUrl" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MinimumSet_Gen.json new file mode 100644 index 0000000000..0f3a573ce6 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataTypes_Create", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resource": {} + }, + "responses": { + "200": { + "body": {} + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + }, + "body": {} + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json new file mode 100644 index 0000000000..642dc86756 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "DataTypes_DeleteData_MaximumSet_Gen", + "operationId": "DataTypes_DeleteData", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "body": {} + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json new file mode 100644 index 0000000000..3034e317eb --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "DataTypes_DeleteData_MinimumSet_Gen", + "operationId": "DataTypes_DeleteData", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "body": {} + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..408d593545 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "DataTypes_Delete_MaximumSet_Gen", + "operationId": "DataTypes_Delete", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MinimumSet_Gen.json new file mode 100644 index 0000000000..a6c944e733 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataTypes_Delete", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json new file mode 100644 index 0000000000..e7294dedde --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen", + "operationId": "DataTypes_GenerateStorageContainerSasToken", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "body": { + "startTimeStamp": "2023-08-24T05:34:58.039Z", + "expiryTimeStamp": "2023-08-24T05:34:58.039Z", + "ipAddress": "1.1.1.1" + } + }, + "responses": { + "200": { + "body": { + "storageContainerSasToken": "storageContainerSasToken" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json new file mode 100644 index 0000000000..8ccc4e1b48 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataTypes_GenerateStorageContainerSasToken", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "body": { + "startTimeStamp": "2023-08-24T05:35:16.887Z", + "expiryTimeStamp": "2023-08-24T05:35:16.887Z", + "ipAddress": "1.1.1.1" + } + }, + "responses": { + "200": { + "body": { + "storageContainerSasToken": "storageContainerSasToken" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..0db40711ab --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen.json @@ -0,0 +1,37 @@ +{ + "title": "DataTypes_Get_MaximumSet_Gen", + "operationId": "DataTypes_Get", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename" + }, + "responses": { + "200": { + "body": { + "properties": { + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "state Reason", + "storageOutputRetention": 27, + "databaseCacheRetention": 23, + "databaseRetention": 6, + "visualizationUrl": "visualizationUrl" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MinimumSet_Gen.json new file mode 100644 index 0000000000..3ad5f936e6 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataTypes_Get", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json new file mode 100644 index 0000000000..67ffeb98c0 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json @@ -0,0 +1,41 @@ +{ + "title": "DataTypes_ListByDataProduct_MaximumSet_Gen", + "operationId": "DataTypes_ListByDataProduct", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "state Reason", + "storageOutputRetention": 27, + "databaseCacheRetention": 23, + "databaseRetention": 6, + "visualizationUrl": "visualizationUrl" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01/dataTypes?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MinimumSet_Gen.json new file mode 100644 index 0000000000..894493ae61 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataTypes_ListByDataProduct", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename" + } + ] + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen.json new file mode 100644 index 0000000000..61dc8bd10c --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen.json @@ -0,0 +1,50 @@ +{ + "title": "DataTypes_Update_MaximumSet_Gen", + "operationId": "DataTypes_Update", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "properties": { + "properties": { + "state": "STARTED", + "storageOutputRetention": 30, + "databaseCacheRetention": 16, + "databaseRetention": 9 + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 30, + "databaseCacheRetention": 16, + "databaseRetention": 9, + "visualizationUrl": "visualizationUrl" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MinimumSet_Gen.json new file mode 100644 index 0000000000..4e03ae4c7e --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataTypes_Update", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "properties": {} + }, + "responses": { + "200": { + "body": {} + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MaximumSet_Gen.json new file mode 100644 index 0000000000..b5d4bfbb70 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MaximumSet_Gen.json @@ -0,0 +1,28 @@ +{ + "title": "Operations_List_MaximumSet_Gen", + "operationId": "Operations_List", + "parameters": { + "api-version": "2023-11-15" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.NetworkAnalytics/resourceName/operationName", + "isDataAction": false, + "display": { + "provider": "Microsoft.NetworkAnalytics", + "resource": "ResourceName", + "operation": "OperationName", + "description": "Description of the operation" + }, + "origin": "user", + "actionType": "Internal" + } + ], + "nextLink": "https://fully.qualified.hyperlink" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MinimumSet_Gen.json new file mode 100644 index 0000000000..1cb2610d6b --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "title": "Operations_List_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "Operations_List", + "parameters": { + "api-version": "2023-11-15" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml b/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml index dd3b9ae633..9815130afb 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml +++ b/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml @@ -1,8 +1,7 @@ -emit: [ - "@azure-tools/typespec-ts", - ] +emit: ["@azure-tools/typespec-ts"] options: "@azure-tools/typespec-ts": + examples-directory: "{project-root}/spec/examples" generateMetadata: true generateTest: true generateSample: true @@ -11,4 +10,4 @@ options: experimentalExtensibleEnums: true "emitter-output-dir": "{project-root}/generated/typespec-ts" packageDetails: - name: "@azure/arm-networkanalytics" \ No newline at end of file + name: "@azure/arm-networkanalytics" diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index 4ba24aa4fd..f1b77ba957 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -1,26 +1,41 @@ -import { - Project, - StructureKind, - InterfaceDeclarationStructure, - FunctionDeclarationStructure -} from "ts-morph"; -import { useBinder } from "../framework/hooks/binder.js"; +import { Project, StructureKind, FunctionDeclarationStructure } from "ts-morph"; +import { provideBinder, useBinder } from "../framework/hooks/binder.js"; import { addDeclaration } from "../framework/declaration.js"; import { resolveReference } from "../framework/reference.js"; import { SdkContext } from "../utils/interfaces.js"; -import { SdkHttpOperationExample } from "@azure-tools/typespec-client-generator-core"; - -// async function getASingleSubscription() { -// const subscriptionId = "291bba3f-e0a5-47bc-a099-3bdcb2a50a05"; -// const credential = new DefaultAzureCredential(); -// const client = new SubscriptionClient(credential); -// const result = await client.subscriptions.get(subscriptionId); -// console.log(result); -// } +import { + SdkBasicServiceMethod, + SdkClientAccessor, + SdkClientType, + SdkInitializationType, + SdkServiceOperation +} from "@azure-tools/typespec-client-generator-core"; +import { emitCredential } from "./emitCredential.js"; +import { NameType, normalizeName } from "@azure-tools/rlc-common"; + +function getFirstOperation(dpgContext: SdkContext) { + const client = dpgContext.sdkPackage + .clients[0]! as SdkClientType; + const operationGroup = client + .methods[0]! as SdkClientAccessor; + const operation = operationGroup.response + .methods[0]! as SdkBasicServiceMethod; + return [client, operationGroup, operation]; +} export function buildSamples(dpgContext: SdkContext) { - const example = dpgContext.__httpOperationExamples?.entries().next() - .value as SdkHttpOperationExample[]; + const [client, operationGroup, operation] = getFirstOperation(dpgContext)!; + const initialization = (client as SdkClientType) + .initialization; + const example = (operation as any).operation!.examples[0]!; + const credentialParam = getCredentialType(initialization); + const subscriptionIdParam = getSubscriptionId(initialization); + const operationGroupName = getOperationGroupName( + operationGroup as SdkClientAccessor + ); + const methodName = (operation as SdkBasicServiceMethod) + .name; + const exampleName = normalizeName(example.name, NameType.Method); // Create a new ts-morph project const project = new Project(); // Create a source file @@ -28,57 +43,51 @@ export function buildSamples(dpgContext: SdkContext) { overwrite: true }); + provideBinder(project); // Initialize the binder const binder = useBinder(); - // Define an interface model. In practice this would be a type object (e.g. from TypeSpec, TCGC, modelerfour, etc.) - // At this framework level, we're just using a simple object, there is no coupling with the actual type system, but this is flexible so any object can be used. - const modelType = { - name: "MyInterface", - properties: [{ name: "id", type: "number" }] - }; - // Define a function model - const functionType = { - name: "MyFunction", + const functionBody = []; + const clientParams = []; + if (credentialParam) { + functionBody.push(`const credential = new ${credentialParam}();`); + clientParams.push("credential"); + } + if (subscriptionIdParam) { + functionBody.push(`const subscriptionId = "${subscriptionIdParam}";`); + clientParams.push("subscriptionId"); + } + functionBody.push( + `const client = new ${(client as any).name}(${clientParams.join(", ")});` + ); + functionBody.push( + `const result = await client.${operationGroupName}.${methodName}();` + ); + functionBody.push(`console.log(result);`); + const sampleFunctionType = { + name: exampleName, returnType: "void", - body: `console.log("Hello World");` - }; - - // Create an interface declaration structure. This illustrates a similar pattern to the one used in the emitter. Transorming a model into a structure for ts-morph. - const interfaceDeclaration: InterfaceDeclarationStructure = { - kind: StructureKind.Interface, - name: modelType.name, - properties: modelType.properties.map((p) => ({ - name: p.name, - type: p.type - })) + body: functionBody }; // Create a function declaration structure const functionDeclaration: FunctionDeclarationStructure = { kind: StructureKind.Function, - name: functionType.name, - returnType: functionType.returnType, - statements: functionType.body + isAsync: true, + name: sampleFunctionType.name, + returnType: sampleFunctionType.returnType, + statements: sampleFunctionType.body }; - - // Helper functions to add the declarations to the source file. These are needed to be able to leverage the binder to track the declarations. - // We'll be moving from sourceFile.addInterface(interfaceDeclaration) to addDeclaration(sourceFile, interfaceDeclaration, interfaceModel) - addDeclaration(sourceFile, interfaceDeclaration, modelType); - addDeclaration(sourceFile, functionDeclaration, functionType); - - // Create another source file - const sourceFile2 = project.createSourceFile("test2.ts", "", { - overwrite: true - }); - + addDeclaration(sourceFile, functionDeclaration, sampleFunctionType); // Add statements referencing the tracked declarations - const functionReference = resolveReference(functionType); - const modelReference = resolveReference(modelType); + const functionReference = resolveReference(sampleFunctionType); + sourceFile.addStatements(` +async function main() { + ${functionReference}(); +} - sourceFile2.addStatements(`${functionReference}();`); - sourceFile2.addStatements(`let obj: ${modelReference} = { id: 1 };`); +main().catch(console.error);`); // Apply imports to ensure correct references binder.resolveAllReferences(); @@ -86,22 +95,25 @@ export function buildSamples(dpgContext: SdkContext) { // Output the generated files console.log("// test.ts"); console.log(sourceFile.getFullText()); - console.log("// test2.ts"); - console.log(sourceFile2.getFullText()); - - // Output - // test.ts - // interface MyInterface { - // id: number; - // } +} - // function MyFunction(): void { - // console.log("Hello World"); - // } +function getCredentialType(initialization: SdkInitializationType) { + const param = initialization.properties.find((p) => p.kind === "credential"); + if (!param) return; + if (param.type.kind === "union") { + // TODO: support union types + return; + } + const type = emitCredential(param.type); + return ["KeyCredential", "TokenCredential"].includes(type) + ? "DefaultAzureCredential" + : undefined; +} - // // test2.ts - // import { MyFunction, MyInterface } from "./test"; +function getSubscriptionId(_initialization: SdkInitializationType) { + return "00000000-0000-0000-0000-000000000000"; +} - // MyFunction(); - // let obj: MyInterface = { id: 1 }; +function getOperationGroupName(op: SdkClientAccessor) { + return op.name.toLowerCase(); } diff --git a/packages/typespec-ts/src/next/emitCredential.ts b/packages/typespec-ts/src/next/emitCredential.ts new file mode 100644 index 0000000000..b80110ac6e --- /dev/null +++ b/packages/typespec-ts/src/next/emitCredential.ts @@ -0,0 +1,17 @@ +import { SdkCredentialType } from "@azure-tools/typespec-client-generator-core"; + +export function emitCredential(type: SdkCredentialType): string { + // TODO: How to handle this for 3p? + // TODO: Handle "external" dependencies + switch (type.scheme.type) { + case "apiKey": + case "http": + return `KeyCredential`; + case "oauth2": + case "openIdConnect": + return "TokenCredential"; + default: + // TODO: Add diagnostics about unknown credential type + return "any"; + } +} From 6fc0f2937753a7bc6e94bd43bba9bf33f5e5b88e Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 30 Jul 2024 18:20:30 +0800 Subject: [PATCH 09/83] Update the dependencies --- packages/typespec-ts/src/azure/dependency.ts | 5 +++++ .../typespec-ts/src/framework/dependency.ts | 10 ++++++++++ packages/typespec-ts/src/next/buildSamples.ts | 18 ++++++++++++++++-- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/packages/typespec-ts/src/azure/dependency.ts b/packages/typespec-ts/src/azure/dependency.ts index 07f568eb09..f615c8e1ce 100644 --- a/packages/typespec-ts/src/azure/dependency.ts +++ b/packages/typespec-ts/src/azure/dependency.ts @@ -55,5 +55,10 @@ export const AzureCoreDependencies: CoreDependencies = { kind: "externalDependency", module: "@azure/core-util", name: "uint8ArrayToString" + }, + DefaultAzureCredential: { + kind: "externalDependency", + module: "@azure/identity", + name: "DefaultAzureCredential" } }; diff --git a/packages/typespec-ts/src/framework/dependency.ts b/packages/typespec-ts/src/framework/dependency.ts index fcb685bda6..19dd73bd01 100644 --- a/packages/typespec-ts/src/framework/dependency.ts +++ b/packages/typespec-ts/src/framework/dependency.ts @@ -50,6 +50,11 @@ export interface CoreDependencies extends Record { name: "uint8ArrayToString"; module: string; }; + DefaultAzureCredential: { + kind: "externalDependency"; + name: "DefaultAzureCredential"; + module: string; + }; } const _CoreDependencies: CoreDependencies = { @@ -107,6 +112,11 @@ const _CoreDependencies: CoreDependencies = { kind: "externalDependency", name: "uint8ArrayToString", module: "@typespec/ts-http-runtime" + }, + DefaultAzureCredential: { + kind: "externalDependency", + name: "DefaultAzureCredential", + module: "@azure/identity" } } as const; diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index f1b77ba957..b0d42f7cc7 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -12,6 +12,7 @@ import { } from "@azure-tools/typespec-client-generator-core"; import { emitCredential } from "./emitCredential.js"; import { NameType, normalizeName } from "@azure-tools/rlc-common"; +import { useDependencies } from "../framework/hooks/useDependencies.js"; function getFirstOperation(dpgContext: SdkContext) { const client = dpgContext.sdkPackage @@ -24,6 +25,14 @@ function getFirstOperation(dpgContext: SdkContext) { } export function buildSamples(dpgContext: SdkContext) { + const customDependencies = { + DefaultAzureCredential: { + kind: "externalDependency", + name: "DefaultAzureCredential", + module: "@azure/identity" + } + }; + const [client, operationGroup, operation] = getFirstOperation(dpgContext)!; const initialization = (client as SdkClientType) .initialization; @@ -43,7 +52,8 @@ export function buildSamples(dpgContext: SdkContext) { overwrite: true }); - provideBinder(project); + provideBinder(project, { dependencies: customDependencies }); + const Dependencies = useDependencies(); // Initialize the binder const binder = useBinder(); @@ -51,7 +61,11 @@ export function buildSamples(dpgContext: SdkContext) { const functionBody = []; const clientParams = []; if (credentialParam) { - functionBody.push(`const credential = new ${credentialParam}();`); + functionBody.push( + `const credential = new ${resolveReference( + Dependencies.DefaultAzureCredential + )}();` + ); clientParams.push("credential"); } if (subscriptionIdParam) { From 7d2ad503a7493351467d56d8593934424ebe15a7 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 12 Aug 2024 12:47:54 +0800 Subject: [PATCH 10/83] Update the samples --- .../typespec-ts/src/framework/dependency.ts | 10 - packages/typespec-ts/src/next/buildSamples.ts | 241 +++++++++++------- 2 files changed, 146 insertions(+), 105 deletions(-) diff --git a/packages/typespec-ts/src/framework/dependency.ts b/packages/typespec-ts/src/framework/dependency.ts index e8864857c0..b25a6f2a55 100644 --- a/packages/typespec-ts/src/framework/dependency.ts +++ b/packages/typespec-ts/src/framework/dependency.ts @@ -51,16 +51,6 @@ export interface CoreDependencies extends Record { name: "uint8ArrayToString"; module: string; }; - DefaultAzureCredential: { - kind: "externalDependency"; - name: "DefaultAzureCredential"; - module: string; - }; } - }, - DefaultAzureCredential: { - kind: "externalDependency", - name: "DefaultAzureCredential", - module: "@azure/identity" export type CoreDependency = keyof CoreDependencies; diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index b0d42f7cc7..d51faa01d8 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -4,111 +4,170 @@ import { addDeclaration } from "../framework/declaration.js"; import { resolveReference } from "../framework/reference.js"; import { SdkContext } from "../utils/interfaces.js"; import { - SdkBasicServiceMethod, - SdkClientAccessor, SdkClientType, SdkInitializationType, + SdkServiceMethod, SdkServiceOperation } from "@azure-tools/typespec-client-generator-core"; import { emitCredential } from "./emitCredential.js"; import { NameType, normalizeName } from "@azure-tools/rlc-common"; -import { useDependencies } from "../framework/hooks/useDependencies.js"; - -function getFirstOperation(dpgContext: SdkContext) { - const client = dpgContext.sdkPackage - .clients[0]! as SdkClientType; - const operationGroup = client - .methods[0]! as SdkClientAccessor; - const operation = operationGroup.response - .methods[0]! as SdkBasicServiceMethod; - return [client, operationGroup, operation]; -} +import { join } from "path"; export function buildSamples(dpgContext: SdkContext) { - const customDependencies = { - DefaultAzureCredential: { - kind: "externalDependency", - name: "DefaultAzureCredential", - module: "@azure/identity" - } - }; - - const [client, operationGroup, operation] = getFirstOperation(dpgContext)!; - const initialization = (client as SdkClientType) - .initialization; - const example = (operation as any).operation!.examples[0]!; - const credentialParam = getCredentialType(initialization); - const subscriptionIdParam = getSubscriptionId(initialization); - const operationGroupName = getOperationGroupName( - operationGroup as SdkClientAccessor - ); - const methodName = (operation as SdkBasicServiceMethod) - .name; - const exampleName = normalizeName(example.name, NameType.Method); // Create a new ts-morph project const project = new Project(); - // Create a source file - const sourceFile = project.createSourceFile("test.ts", "", { - overwrite: true - }); - - provideBinder(project, { dependencies: customDependencies }); - const Dependencies = useDependencies(); + provideBinder(project); // Initialize the binder const binder = useBinder(); - - // Define a function model - const functionBody = []; - const clientParams = []; - if (credentialParam) { - functionBody.push( - `const credential = new ${resolveReference( - Dependencies.DefaultAzureCredential - )}();` - ); - clientParams.push("credential"); + for (const client of dpgContext.sdkPackage.clients) { + buildClassicalClientSample(dpgContext, project, client); } - if (subscriptionIdParam) { - functionBody.push(`const subscriptionId = "${subscriptionIdParam}";`); - clientParams.push("subscriptionId"); - } - functionBody.push( - `const client = new ${(client as any).name}(${clientParams.join(", ")});` - ); - functionBody.push( - `const result = await client.${operationGroupName}.${methodName}();` - ); - functionBody.push(`console.log(result);`); - const sampleFunctionType = { - name: exampleName, - returnType: "void", - body: functionBody - }; - // Create a function declaration structure - const functionDeclaration: FunctionDeclarationStructure = { - kind: StructureKind.Function, - isAsync: true, - name: sampleFunctionType.name, - returnType: sampleFunctionType.returnType, - statements: sampleFunctionType.body - }; - addDeclaration(sourceFile, functionDeclaration, sampleFunctionType); - // Add statements referencing the tracked declarations - const functionReference = resolveReference(sampleFunctionType); - sourceFile.addStatements(` -async function main() { - ${functionReference}(); + // Apply imports to ensure correct references + binder.resolveAllReferences(); + for (const sourceFile of project.getSourceFiles()) { + console.log(sourceFile.getFilePath()); + console.log(sourceFile.getFullText()); + } } -main().catch(console.error);`); +// importing the necessary modules - // Apply imports to ensure correct references - binder.resolveAllReferences(); +// async function getASingleSubscription() { +// const subscriptionId = "291bba3f-e0a5-47bc-a099-3bdcb2a50a05"; +// const credential = new DefaultAzureCredential(); +// const client = new SubscriptionClient(credential); +// const result = await client.subscriptions.get(subscriptionId); +// console.log(result); +// } - // Output the generated files - console.log("// test.ts"); - console.log(sourceFile.getFullText()); +// async function main() { +// getASingleSubscription(); +// } + +// main().catch(console.error); + +function buildClassicalClientSample( + _dpgContext: SdkContext, + project: Project, + client: SdkClientType +) { + // build client-level parameters + const clientName = client.name; + const credentialType = getCredentialType(client.initialization); + for (const operationOrGroup of client.methods) { + if (operationOrGroup.kind === "clientaccessor") { + for (const operation of operationOrGroup.response.methods) { + // TODO: support nested operation groups + if (operation.kind === "clientaccessor") { + continue; + } + // this is an operation + buildExamplesForMethod(project, operation, { + clientName, + credentialType, + operationGroupPrefix: operationOrGroup.name.toLowerCase() + }); + } + } else { + buildExamplesForMethod(project, operationOrGroup, { + clientName, + credentialType + }); + } + } +} + +function buildExamplesForMethod( + project: Project, + method: SdkServiceMethod, + options: { + clientName: string; + credentialType?: string; + operationGroupPrefix?: string; + } +) { + // const dependencies = useDependencies(); + for (const example of method.operation.examples ?? []) { + const arr = example.filePath.split("/"); + const sourceFile = project.createSourceFile( + join(...arr.slice(-2, arr.length)), + "", + { + overwrite: true + } + ); + // build example + const exampleFunctionBody: string[] = []; + const clientParams = []; + const methodParams = []; + const exampleName = normalizeName(example.name, NameType.Method); + const exampleFunctionType = { + name: exampleName, + returnType: "void", + body: exampleFunctionBody + }; + // prepare client-level parameters + if (options.credentialType) { + exampleFunctionBody.push( + `const credential = new ${options.credentialType}();` + ); + clientParams.push("credential"); + } + for (const param of example.parameters) { + if ( + param.parameter.type.kind === "constant" || + param.parameter.onClient === false + ) { + continue; + } + const paramName = param.parameter.name; + // TODO: handle values that are not strings + const paramValue = param.value; + exampleFunctionBody.push( + `const ${paramName} = ${JSON.stringify(paramValue)};` + ); + clientParams.push(paramName); + } + exampleFunctionBody.push( + `const client = new ${options.clientName}(${clientParams.join(", ")});` + ); + // prepare operation-level parameters + for (const param of example.parameters) { + if (param.parameter.onClient === true) { + continue; + } + // TODO: handle values that are not strings + const paramValue = param.value; + methodParams.push(paramValue); + } + const prefix = options.operationGroupPrefix + ? `${options.operationGroupPrefix}.` + : ""; + exampleFunctionBody.push( + `const result = await client.${prefix}${method.name}(${methodParams.join( + ", " + )});` + ); + exampleFunctionBody.push(`console.log(result);`); + // Create a function declaration structure + const functionDeclaration: FunctionDeclarationStructure = { + kind: StructureKind.Function, + isAsync: true, + name: exampleFunctionType.name, + returnType: exampleFunctionType.returnType, + statements: exampleFunctionType.body + }; + addDeclaration(sourceFile, functionDeclaration, exampleFunctionType); + // Add statements referencing the tracked declarations + const functionReference = resolveReference(exampleFunctionType); + sourceFile.addStatements(` + async function main() { + ${functionReference}(); + } + + main().catch(console.error);`); + } } function getCredentialType(initialization: SdkInitializationType) { @@ -123,11 +182,3 @@ function getCredentialType(initialization: SdkInitializationType) { ? "DefaultAzureCredential" : undefined; } - -function getSubscriptionId(_initialization: SdkInitializationType) { - return "00000000-0000-0000-0000-000000000000"; -} - -function getOperationGroupName(op: SdkClientAccessor) { - return op.name.toLowerCase(); -} From 6897a9e25105afd81416ad02780d94a5e1d43cec Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 12 Aug 2024 15:08:18 +0800 Subject: [PATCH 11/83] Update the sample gen for network anayltisc --- .../dataproductsAddUserRoleSample.ts | 40 ++++++ .../samples-dev/dataproductsCreateSample.ts | 40 ++++++ .../samples-dev/dataproductsDeleteSample.ts | 38 ++++++ ...ctsGenerateStorageAccountSasTokenSample.ts | 40 ++++++ .../samples-dev/dataproductsGetSample.ts | 38 ++++++ .../dataproductsListByResourceGroupSample.ts | 36 ++++++ .../dataproductsListBySubscriptionSample.ts | 32 +++++ .../dataproductsListRolesAssignmentsSample.ts | 40 ++++++ .../dataproductsRemoveUserRoleSample.ts | 40 ++++++ .../dataproductsRotateKeySample.ts | 40 ++++++ .../samples-dev/dataproductsUpdateSample.ts | 40 ++++++ .../dataproductscatalogsGetSample.ts | 32 +++++ ...oductscatalogsListByResourceGroupSample.ts | 36 ++++++ ...roductscatalogsListBySubscriptionSample.ts | 32 +++++ .../samples-dev/datatypesCreateSample.ts | 42 +++++++ .../samples-dev/datatypesDeleteDataSample.ts | 42 +++++++ .../samples-dev/datatypesDeleteSample.ts | 40 ++++++ ...sGenerateStorageContainerSasTokenSample.ts | 42 +++++++ .../samples-dev/datatypesGetSample.ts | 40 ++++++ .../datatypesListByDataProductSample.ts | 38 ++++++ .../samples-dev/datatypesUpdateSample.ts | 42 +++++++ .../samples-dev/operationsListSample.ts | 30 +++++ packages/typespec-ts/src/next/buildSamples.ts | 114 ++++++++++++------ 23 files changed, 917 insertions(+), 37 deletions(-) create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts new file mode 100644 index 0000000000..c25834916a --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsAddUserRoleMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.addUserRole( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsAddUserRoleMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.addUserRole( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts new file mode 100644 index 0000000000..6ceb9e4268 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsCreateMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.create( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsCreateMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.create( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts new file mode 100644 index 0000000000..cbac1d69ba --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsDeleteMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.delete( + "aoiresourceGroupName", + "dataproduct01", + ); + console.log(result); +} + +async function main() { + dataProductsDeleteMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.delete( + "aoiresourceGroupName", + "dataproduct01", + ); + console.log(result); +} + +async function main() { + dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts new file mode 100644 index 0000000000..7451e3da92 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsGenerateStorageAccountSasTokenMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.generateStorageAccountSasToken( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsGenerateStorageAccountSasTokenMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.generateStorageAccountSasToken( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts new file mode 100644 index 0000000000..f1037feb4d --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsGetMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.get( + "aoiresourceGroupName", + "dataproduct01", + ); + console.log(result); +} + +async function main() { + dataProductsGetMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.get( + "aoiresourceGroupName", + "dataproduct01", + ); + console.log(result); +} + +async function main() { + dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts new file mode 100644 index 0000000000..25d5776523 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsListByResourceGroupMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.listByResourceGroup( + "aoiresourceGroupName", + ); + console.log(result); +} + +async function main() { + dataProductsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.listByResourceGroup( + "aoiresourceGroupName", + ); + console.log(result); +} + +async function main() { + dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts new file mode 100644 index 0000000000..4993800090 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsListBySubscriptionMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.listBySubscription(); + console.log(result); +} + +async function main() { + dataProductsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.listBySubscription(); + console.log(result); +} + +async function main() { + dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts new file mode 100644 index 0000000000..519ae588df --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsListRolesAssignmentsMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.listRolesAssignments( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsListRolesAssignmentsMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.listRolesAssignments( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts new file mode 100644 index 0000000000..3c0eb5cbe7 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsRemoveUserRoleMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.removeUserRole( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsRemoveUserRoleMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.removeUserRole( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts new file mode 100644 index 0000000000..c52b19e92a --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsRotateKeyMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.rotateKey( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsRotateKeyMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.rotateKey( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts new file mode 100644 index 0000000000..89342c6d86 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsUpdateMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.update( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsUpdateMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproducts.update( + "aoiresourceGroupName", + "dataproduct01", + {} as any, + ); + console.log(result); +} + +async function main() { + dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts new file mode 100644 index 0000000000..033b144b89 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsCatalogsGetMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproductscatalogs.get("aoiresourceGroupName"); + console.log(result); +} + +async function main() { + dataProductsCatalogsGetMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproductscatalogs.get("aoiresourceGroupName"); + console.log(result); +} + +async function main() { + dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts new file mode 100644 index 0000000000..82e8e5bcaa --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsCatalogsListByResourceGroupMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproductscatalogs.listByResourceGroup( + "aoiresourceGroupName", + ); + console.log(result); +} + +async function main() { + dataProductsCatalogsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsCatalogsListByResourceGroupMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproductscatalogs.listByResourceGroup( + "aoiresourceGroupName", + ); + console.log(result); +} + +async function main() { + dataProductsCatalogsListByResourceGroupMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts new file mode 100644 index 0000000000..ee31311ed3 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataProductsCatalogsListBySubscriptionMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproductscatalogs.listBySubscription(); + console.log(result); +} + +async function main() { + dataProductsCatalogsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); + +async function dataProductsCatalogsListBySubscriptionMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataproductscatalogs.listBySubscription(); + console.log(result); +} + +async function main() { + dataProductsCatalogsListBySubscriptionMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts new file mode 100644 index 0000000000..b1235827db --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataTypesCreateMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.create( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + {} as any, + ); + console.log(result); +} + +async function main() { + dataTypesCreateMaximumSetGen(); +} + +main().catch(console.error); + +async function dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.create( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + {} as any, + ); + console.log(result); +} + +async function main() { + dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts new file mode 100644 index 0000000000..e0a143782b --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataTypesDeleteDataMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.deleteData( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + {} as any, + ); + console.log(result); +} + +async function main() { + dataTypesDeleteDataMaximumSetGen(); +} + +main().catch(console.error); + +async function dataTypesDeleteDataMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.deleteData( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + {} as any, + ); + console.log(result); +} + +async function main() { + dataTypesDeleteDataMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts new file mode 100644 index 0000000000..43b3f42910 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataTypesDeleteMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.delete( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + ); + console.log(result); +} + +async function main() { + dataTypesDeleteMaximumSetGen(); +} + +main().catch(console.error); + +async function dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.delete( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + ); + console.log(result); +} + +async function main() { + dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts new file mode 100644 index 0000000000..24e9a1917b --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataTypesGenerateStorageContainerSasTokenMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.generateStorageContainerSasToken( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + {} as any, + ); + console.log(result); +} + +async function main() { + dataTypesGenerateStorageContainerSasTokenMaximumSetGen(); +} + +main().catch(console.error); + +async function dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.generateStorageContainerSasToken( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + {} as any, + ); + console.log(result); +} + +async function main() { + dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts new file mode 100644 index 0000000000..322e15e7b5 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataTypesGetMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.get( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + ); + console.log(result); +} + +async function main() { + dataTypesGetMaximumSetGen(); +} + +main().catch(console.error); + +async function dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.get( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + ); + console.log(result); +} + +async function main() { + dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts new file mode 100644 index 0000000000..06100e2c2e --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataTypesListByDataProductMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.listByDataProduct( + "aoiresourceGroupName", + "dataproduct01", + ); + console.log(result); +} + +async function main() { + dataTypesListByDataProductMaximumSetGen(); +} + +main().catch(console.error); + +async function dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.listByDataProduct( + "aoiresourceGroupName", + "dataproduct01", + ); + console.log(result); +} + +async function main() { + dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts new file mode 100644 index 0000000000..e2e954a6d1 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function dataTypesUpdateMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.update( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + {} as any, + ); + console.log(result); +} + +async function main() { + dataTypesUpdateMaximumSetGen(); +} + +main().catch(console.error); + +async function dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.datatypes.update( + "aoiresourceGroupName", + "dataproduct01", + "datatypename", + {} as any, + ); + console.log(result); +} + +async function main() { + dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts new file mode 100644 index 0000000000..3c71276ef3 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; + +async function operationsListMaximumSetGen(): void { + const credential = new DefaultAzureCredential(); + const client = new NetworkAnalyticsClient(credential); + const result = await client.operations.list(); + console.log(result); +} + +async function main() { + operationsListMaximumSetGen(); +} + +main().catch(console.error); + +async function operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { + const credential = new DefaultAzureCredential(); + const client = new NetworkAnalyticsClient(credential); + const result = await client.operations.list(); + console.log(result); +} + +async function main() { + operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index d51faa01d8..5a0085bced 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -1,33 +1,23 @@ -import { Project, StructureKind, FunctionDeclarationStructure } from "ts-morph"; -import { provideBinder, useBinder } from "../framework/hooks/binder.js"; +import { StructureKind, FunctionDeclarationStructure } from "ts-morph"; import { addDeclaration } from "../framework/declaration.js"; import { resolveReference } from "../framework/reference.js"; import { SdkContext } from "../utils/interfaces.js"; import { SdkClientType, + SdkHttpParameterExample, SdkInitializationType, SdkServiceMethod, SdkServiceOperation } from "@azure-tools/typespec-client-generator-core"; import { emitCredential } from "./emitCredential.js"; import { NameType, normalizeName } from "@azure-tools/rlc-common"; +import { useContext } from "../contextManager.js"; import { join } from "path"; export function buildSamples(dpgContext: SdkContext) { // Create a new ts-morph project - const project = new Project(); - provideBinder(project); - // Initialize the binder - const binder = useBinder(); for (const client of dpgContext.sdkPackage.clients) { - buildClassicalClientSample(dpgContext, project, client); - } - - // Apply imports to ensure correct references - binder.resolveAllReferences(); - for (const sourceFile of project.getSourceFiles()) { - console.log(sourceFile.getFilePath()); - console.log(sourceFile.getFullText()); + buildClassicalClientSample(dpgContext, client); } } @@ -48,8 +38,7 @@ export function buildSamples(dpgContext: SdkContext) { // main().catch(console.error); function buildClassicalClientSample( - _dpgContext: SdkContext, - project: Project, + dpgContext: SdkContext, client: SdkClientType ) { // build client-level parameters @@ -63,14 +52,14 @@ function buildClassicalClientSample( continue; } // this is an operation - buildExamplesForMethod(project, operation, { + buildExamplesForMethod(dpgContext, operation, { clientName, credentialType, - operationGroupPrefix: operationOrGroup.name.toLowerCase() + operationGroupPrefix: operationOrGroup.response.name.toLowerCase() }); } } else { - buildExamplesForMethod(project, operationOrGroup, { + buildExamplesForMethod(dpgContext, operationOrGroup, { clientName, credentialType }); @@ -79,7 +68,7 @@ function buildClassicalClientSample( } function buildExamplesForMethod( - project: Project, + dpgContext: SdkContext, method: SdkServiceMethod, options: { clientName: string; @@ -87,21 +76,32 @@ function buildExamplesForMethod( operationGroupPrefix?: string; } ) { + const project = useContext("outputProject"); + const operationPrefix = `${options.operationGroupPrefix ?? ""} ${ + method.name + }`; + const sampleFolder = join( + dpgContext.generationPathDetail?.rootDir ?? "", + "samples-dev" + ); + const fileName = normalizeName(`${operationPrefix} Sample`, NameType.File); + const sourceFile = project.createSourceFile( + join(sampleFolder, `${fileName}.ts`), + "", + { + overwrite: true + } + ); // const dependencies = useDependencies(); for (const example of method.operation.examples ?? []) { - const arr = example.filePath.split("/"); - const sourceFile = project.createSourceFile( - join(...arr.slice(-2, arr.length)), - "", - { - overwrite: true - } - ); // build example - const exampleFunctionBody: string[] = []; - const clientParams = []; - const methodParams = []; - const exampleName = normalizeName(example.name, NameType.Method); + const exampleFunctionBody: string[] = [], + clientParams = [], + methodParams = []; + const exampleName = normalizeName( + transformSpecialLetterToSpace(example.name), + NameType.Method + ); const exampleFunctionType = { name: exampleName, returnType: "void", @@ -122,10 +122,8 @@ function buildExamplesForMethod( continue; } const paramName = param.parameter.name; - // TODO: handle values that are not strings - const paramValue = param.value; exampleFunctionBody.push( - `const ${paramName} = ${JSON.stringify(paramValue)};` + `const ${paramName} = ${getParameterValue(param)};` ); clientParams.push(paramName); } @@ -137,8 +135,7 @@ function buildExamplesForMethod( if (param.parameter.onClient === true) { continue; } - // TODO: handle values that are not strings - const paramValue = param.value; + const paramValue = `${getParameterValue(param)}`; methodParams.push(paramValue); } const prefix = options.operationGroupPrefix @@ -167,6 +164,7 @@ function buildExamplesForMethod( } main().catch(console.error);`); + console.log(sourceFile.getFilePath(), sourceFile.getFullText()); } } @@ -182,3 +180,45 @@ function getCredentialType(initialization: SdkInitializationType) { ? "DefaultAzureCredential" : undefined; } + +// TODO: handle values that are not strings +function getParameterValue(parameter: SdkHttpParameterExample) { + const example = parameter.value; + let retValue = example.value; + switch (example.kind) { + case "string": { + switch (example.type.kind) { + case "utcDateTime": + case "offsetDateTime": + retValue = `new Date("${example.value}")`; + break; + default: + retValue = `"${example.value}"`; + break; + } + break; + } + case "boolean": + case "number": + case "null": + retValue = `${example.value}`; + break; + default: + retValue = "{} as any"; + break; + } + return retValue; +} + +function transformSpecialLetterToSpace(str: string) { + if (!str) { + return str; + } + return str + .replace(/_/g, " ") + .replace(/\//g, " Or ") + .replace(/,|\.|\(|\)/g, " ") + .replace("'s ", " ") + .replace(/\[/g, " ") + .replace(/\]/g, " "); +} From c0f2514b4e6065e02115166a99cfb5b99ba49534 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 12 Aug 2024 15:53:32 +0800 Subject: [PATCH 12/83] Build samples with multiple examples for one operations --- .../dataproductsAddUserRoleSample.ts | 7 +----- .../samples-dev/dataproductsCreateSample.ts | 7 +----- .../samples-dev/dataproductsDeleteSample.ts | 7 +----- ...ctsGenerateStorageAccountSasTokenSample.ts | 7 +----- .../samples-dev/dataproductsGetSample.ts | 7 +----- .../dataproductsListByResourceGroupSample.ts | 7 +----- .../dataproductsListBySubscriptionSample.ts | 7 +----- .../dataproductsListRolesAssignmentsSample.ts | 7 +----- .../dataproductsRemoveUserRoleSample.ts | 7 +----- .../dataproductsRotateKeySample.ts | 7 +----- .../samples-dev/dataproductsUpdateSample.ts | 7 +----- .../dataproductscatalogsGetSample.ts | 7 +----- ...oductscatalogsListByResourceGroupSample.ts | 7 +----- ...roductscatalogsListBySubscriptionSample.ts | 7 +----- .../samples-dev/datatypesCreateSample.ts | 7 +----- .../samples-dev/datatypesDeleteDataSample.ts | 7 +----- .../samples-dev/datatypesDeleteSample.ts | 7 +----- ...sGenerateStorageContainerSasTokenSample.ts | 7 +----- .../samples-dev/datatypesGetSample.ts | 7 +----- .../datatypesListByDataProductSample.ts | 7 +----- .../samples-dev/datatypesUpdateSample.ts | 7 +----- .../samples-dev/operationsListSample.ts | 7 +----- .../typespec-ts/src/api/dataProducts/index.ts | 2 +- .../typespec-ts/src/api/dataTypes/index.ts | 2 +- packages/typespec-ts/src/next/buildSamples.ts | 23 +++++++++++-------- 25 files changed, 38 insertions(+), 143 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts index c25834916a..68534e947a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts @@ -15,12 +15,6 @@ async function dataProductsAddUserRoleMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsAddUserRoleMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -34,6 +28,7 @@ async function dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMini } async function main() { + dataProductsAddUserRoleMaximumSetGen(); dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts index 6ceb9e4268..a108257638 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts @@ -15,12 +15,6 @@ async function dataProductsCreateMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsCreateMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -34,6 +28,7 @@ async function dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSe } async function main() { + dataProductsCreateMaximumSetGen(); dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts index cbac1d69ba..e8fffc5329 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts @@ -14,12 +14,6 @@ async function dataProductsDeleteMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsDeleteMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -32,6 +26,7 @@ async function dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSe } async function main() { + dataProductsDeleteMaximumSetGen(); dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts index 7451e3da92..5e263d1fcf 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts @@ -15,12 +15,6 @@ async function dataProductsGenerateStorageAccountSasTokenMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsGenerateStorageAccountSasTokenMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -34,6 +28,7 @@ async function dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedB } async function main() { + dataProductsGenerateStorageAccountSasTokenMaximumSetGen(); dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts index f1037feb4d..7d0f4340bd 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts @@ -14,12 +14,6 @@ async function dataProductsGetMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsGetMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -32,6 +26,7 @@ async function dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGe } async function main() { + dataProductsGetMaximumSetGen(); dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts index 25d5776523..c73205a0b4 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts @@ -13,12 +13,6 @@ async function dataProductsListByResourceGroupMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsListByResourceGroupMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -30,6 +24,7 @@ async function dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSet } async function main() { + dataProductsListByResourceGroupMaximumSetGen(); dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts index 4993800090..088ea846a4 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts @@ -11,12 +11,6 @@ async function dataProductsListBySubscriptionMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsListBySubscriptionMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -26,6 +20,7 @@ async function dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetR } async function main() { + dataProductsListBySubscriptionMaximumSetGen(); dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts index 519ae588df..db2f8e758f 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts @@ -15,12 +15,6 @@ async function dataProductsListRolesAssignmentsMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsListRolesAssignmentsMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -34,6 +28,7 @@ async function dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSe } async function main() { + dataProductsListRolesAssignmentsMaximumSetGen(); dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts index 3c0eb5cbe7..2292fcd7ab 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts @@ -15,12 +15,6 @@ async function dataProductsRemoveUserRoleMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsRemoveUserRoleMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -34,6 +28,7 @@ async function dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleM } async function main() { + dataProductsRemoveUserRoleMaximumSetGen(); dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts index c52b19e92a..19a98921b7 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts @@ -15,12 +15,6 @@ async function dataProductsRotateKeyMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsRotateKeyMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -34,6 +28,7 @@ async function dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimu } async function main() { + dataProductsRotateKeyMaximumSetGen(); dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts index 89342c6d86..19db4307bf 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts @@ -15,12 +15,6 @@ async function dataProductsUpdateMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsUpdateMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -34,6 +28,7 @@ async function dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSe } async function main() { + dataProductsUpdateMaximumSetGen(); dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts index 033b144b89..a7d561840f 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts @@ -11,12 +11,6 @@ async function dataProductsCatalogsGetMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsCatalogsGetMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -26,6 +20,7 @@ async function dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMini } async function main() { + dataProductsCatalogsGetMaximumSetGen(); dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts index 82e8e5bcaa..7cf553e2f1 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts @@ -13,12 +13,6 @@ async function dataProductsCatalogsListByResourceGroupMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsCatalogsListByResourceGroupMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsCatalogsListByResourceGroupMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -30,6 +24,7 @@ async function dataProductsCatalogsListByResourceGroupMinimumSetGen(): void { } async function main() { + dataProductsCatalogsListByResourceGroupMaximumSetGen(); dataProductsCatalogsListByResourceGroupMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts index ee31311ed3..da2b03018c 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts @@ -11,12 +11,6 @@ async function dataProductsCatalogsListBySubscriptionMaximumSetGen(): void { console.log(result); } -async function main() { - dataProductsCatalogsListBySubscriptionMaximumSetGen(); -} - -main().catch(console.error); - async function dataProductsCatalogsListBySubscriptionMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -26,6 +20,7 @@ async function dataProductsCatalogsListBySubscriptionMinimumSetGen(): void { } async function main() { + dataProductsCatalogsListBySubscriptionMaximumSetGen(); dataProductsCatalogsListBySubscriptionMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts index b1235827db..5bf76468e1 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts @@ -16,12 +16,6 @@ async function dataTypesCreateMaximumSetGen(): void { console.log(result); } -async function main() { - dataTypesCreateMaximumSetGen(); -} - -main().catch(console.error); - async function dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -36,6 +30,7 @@ async function dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGe } async function main() { + dataTypesCreateMaximumSetGen(); dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts index e0a143782b..24d63fa127 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts @@ -16,12 +16,6 @@ async function dataTypesDeleteDataMaximumSetGen(): void { console.log(result); } -async function main() { - dataTypesDeleteDataMaximumSetGen(); -} - -main().catch(console.error); - async function dataTypesDeleteDataMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -36,6 +30,7 @@ async function dataTypesDeleteDataMinimumSetGen(): void { } async function main() { + dataTypesDeleteDataMaximumSetGen(); dataTypesDeleteDataMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts index 43b3f42910..0877b45e8b 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts @@ -15,12 +15,6 @@ async function dataTypesDeleteMaximumSetGen(): void { console.log(result); } -async function main() { - dataTypesDeleteMaximumSetGen(); -} - -main().catch(console.error); - async function dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -34,6 +28,7 @@ async function dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGe } async function main() { + dataTypesDeleteMaximumSetGen(); dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts index 24e9a1917b..984b56a77b 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts @@ -16,12 +16,6 @@ async function dataTypesGenerateStorageContainerSasTokenMaximumSetGen(): void { console.log(result); } -async function main() { - dataTypesGenerateStorageContainerSasTokenMaximumSetGen(); -} - -main().catch(console.error); - async function dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -36,6 +30,7 @@ async function dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedBy } async function main() { + dataTypesGenerateStorageContainerSasTokenMaximumSetGen(); dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts index 322e15e7b5..3b81d90164 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts @@ -15,12 +15,6 @@ async function dataTypesGetMaximumSetGen(): void { console.log(result); } -async function main() { - dataTypesGetMaximumSetGen(); -} - -main().catch(console.error); - async function dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -34,6 +28,7 @@ async function dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen() } async function main() { + dataTypesGetMaximumSetGen(); dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts index 06100e2c2e..371d5d35a4 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts @@ -14,12 +14,6 @@ async function dataTypesListByDataProductMaximumSetGen(): void { console.log(result); } -async function main() { - dataTypesListByDataProductMaximumSetGen(); -} - -main().catch(console.error); - async function dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -32,6 +26,7 @@ async function dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleM } async function main() { + dataTypesListByDataProductMaximumSetGen(); dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts index e2e954a6d1..e44236ebd0 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts @@ -16,12 +16,6 @@ async function dataTypesUpdateMaximumSetGen(): void { console.log(result); } -async function main() { - dataTypesUpdateMaximumSetGen(); -} - -main().catch(console.error); - async function dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -36,6 +30,7 @@ async function dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGe } async function main() { + dataTypesUpdateMaximumSetGen(); dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts index 3c71276ef3..b2d852b60e 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts @@ -10,12 +10,6 @@ async function operationsListMaximumSetGen(): void { console.log(result); } -async function main() { - operationsListMaximumSetGen(); -} - -main().catch(console.error); - async function operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const client = new NetworkAnalyticsClient(credential); @@ -24,6 +18,7 @@ async function operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen } async function main() { + operationsListMaximumSetGen(); operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts index ffb44ad60e..42121a4141 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts @@ -23,11 +23,11 @@ import { createRestError, } from "@azure-rest/core-client"; import { serializeRecord } from "../../helpers/serializerHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PollerLike, OperationState } from "@azure/core-lro"; import { DataProductsCreateOptionalParams, diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts index 3be137716a..bf97fc29c8 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts @@ -17,11 +17,11 @@ import { PathUncheckedResponse, createRestError, } from "@azure-rest/core-client"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PollerLike, OperationState } from "@azure/core-lro"; import { DataTypesCreateOptionalParams, diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index 5a0085bced..ad90b0e4bb 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -92,6 +92,7 @@ function buildExamplesForMethod( overwrite: true } ); + const exampleFunctions = []; // const dependencies = useDependencies(); for (const example of method.operation.examples ?? []) { // build example @@ -156,16 +157,20 @@ function buildExamplesForMethod( statements: exampleFunctionType.body }; addDeclaration(sourceFile, functionDeclaration, exampleFunctionType); - // Add statements referencing the tracked declarations - const functionReference = resolveReference(exampleFunctionType); - sourceFile.addStatements(` - async function main() { - ${functionReference}(); - } - - main().catch(console.error);`); - console.log(sourceFile.getFilePath(), sourceFile.getFullText()); + exampleFunctions.push(exampleFunctionType); } + // Add statements referencing the tracked declarations + const functions = exampleFunctions + .map((f) => resolveReference(f)) + .map((f) => `${f}();`) + .join("\n"); + sourceFile.addStatements(` + async function main() { + ${functions} + } + + main().catch(console.error);`); + console.log(sourceFile.getFilePath(), sourceFile.getFullText()); } function getCredentialType(initialization: SdkInitializationType) { From ce164035b27c9e4566139a0b84ace697dab301ac Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 13 Aug 2024 21:54:27 +0800 Subject: [PATCH 13/83] Update the samples --- .../dataproductsAddUserRoleSample.ts | 18 +++++- .../samples-dev/dataproductsCreateSample.ts | 58 ++++++++++++++++++- ...ctsGenerateStorageAccountSasTokenSample.ts | 12 +++- .../dataproductsListRolesAssignmentsSample.ts | 4 +- .../dataproductsRemoveUserRoleSample.ts | 20 ++++++- .../dataproductsRotateKeySample.ts | 4 +- .../samples-dev/dataproductsUpdateSample.ts | 20 ++++++- .../samples-dev/datatypesCreateSample.ts | 11 +++- .../samples-dev/datatypesDeleteDataSample.ts | 4 +- ...sGenerateStorageContainerSasTokenSample.ts | 12 +++- .../samples-dev/datatypesUpdateSample.ts | 10 +++- packages/typespec-ts/src/next/buildSamples.ts | 55 +++++++++++++----- 12 files changed, 192 insertions(+), 36 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts index 68534e947a..66d09c6d65 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts @@ -10,7 +10,14 @@ async function dataProductsAddUserRoleMaximumSetGen(): void { const result = await client.dataproducts.addUserRole( "aoiresourceGroupName", "dataproduct01", - {} as any, + { + roleId: "00000000-0000-0000-0000-00000000000", + principalId: "00000000-0000-0000-0000-00000000000", + userName: "UserName", + dataTypeScope: ["scope"], + principalType: "User", + role: "Reader", + }, ); console.log(result); } @@ -22,7 +29,14 @@ async function dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMini const result = await client.dataproducts.addUserRole( "aoiresourceGroupName", "dataproduct01", - {} as any, + { + roleId: "00000000-0000-0000-0000-00000000000", + principalId: "00000000-0000-0000-0000-00000000000", + userName: "userName", + dataTypeScope: ["scope"], + principalType: "User", + role: "Reader", + }, ); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts index a108257638..daedcc0b19 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts @@ -10,7 +10,53 @@ async function dataProductsCreateMaximumSetGen(): void { const result = await client.dataproducts.create( "aoiresourceGroupName", "dataproduct01", - {} as any, + { + properties: { + provisioningState: "Succeeded", + publisher: "Microsoft", + product: "MCC", + majorVersion: "1.0.0", + owners: ["abc@micros.com"], + redundancy: "Disabled", + purviewAccount: "testpurview", + purviewCollection: "134567890", + privateLinksEnabled: "Disabled", + publicNetworkAccess: "Enabled", + customerManagedKeyEncryptionEnabled: "Enabled", + customerEncryptionKey: { + keyVaultUri: "https://KeyVault.vault.azure.net", + keyName: "keyName", + keyVersion: "keyVersion", + }, + networkacls: { + virtualNetworkRule: [ + { + id: "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + action: "Allow", + state: "", + }, + ], + ipRules: [{ value: "1.1.1.1", action: "Allow" }], + allowedQueryIpRangeList: ["1.1.1.1"], + defaultAction: "Allow", + }, + managedResourceGroupConfiguration: { + name: "managedResourceGroupName", + location: "eastus", + }, + currentMinorVersion: "1.0.1", + consumptionEndpoints: {}, + }, + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": + {}, + }, + }, + tags: { userSpecifiedKeyName: "userSpecifiedKeyValue" }, + location: "eastus", + }, ); console.log(result); } @@ -22,7 +68,15 @@ async function dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSe const result = await client.dataproducts.create( "aoiresourceGroupName", "dataproduct01", - {} as any, + { + location: "eastus", + properties: { + publisher: "Microsoft", + product: "MCC", + majorVersion: "1.0.0", + }, + tags: { userSpecifiedKeyName: "userSpecifiedKeyValue" }, + }, ); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts index 5e263d1fcf..c4fcd2dbaf 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts @@ -10,7 +10,11 @@ async function dataProductsGenerateStorageAccountSasTokenMaximumSetGen(): void { const result = await client.dataproducts.generateStorageAccountSasToken( "aoiresourceGroupName", "dataproduct01", - {} as any, + { + startTimeStamp: new Date("2023-08-24T05:34:58.151Z"), + expiryTimeStamp: new Date("2023-08-24T05:34:58.151Z"), + ipAddress: "1.1.1.1", + }, ); console.log(result); } @@ -22,7 +26,11 @@ async function dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedB const result = await client.dataproducts.generateStorageAccountSasToken( "aoiresourceGroupName", "dataproduct01", - {} as any, + { + startTimeStamp: new Date("2023-08-24T05:35:17.051Z"), + expiryTimeStamp: new Date("2023-08-24T05:35:17.051Z"), + ipAddress: "1.1.1.1", + }, ); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts index db2f8e758f..17a1b9d169 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts @@ -10,7 +10,7 @@ async function dataProductsListRolesAssignmentsMaximumSetGen(): void { const result = await client.dataproducts.listRolesAssignments( "aoiresourceGroupName", "dataproduct01", - {} as any, + {}, ); console.log(result); } @@ -22,7 +22,7 @@ async function dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSe const result = await client.dataproducts.listRolesAssignments( "aoiresourceGroupName", "dataproduct01", - {} as any, + {}, ); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts index 2292fcd7ab..4a913cb1bb 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts @@ -10,7 +10,15 @@ async function dataProductsRemoveUserRoleMaximumSetGen(): void { const result = await client.dataproducts.removeUserRole( "aoiresourceGroupName", "dataproduct01", - {} as any, + { + roleId: "00000000-0000-0000-0000-00000000000", + principalId: "00000000-0000-0000-0000-00000000000", + userName: "UserName", + dataTypeScope: ["scope"], + principalType: "User", + role: "Reader", + roleAssignmentId: "00000000-0000-0000-0000-00000000000", + }, ); console.log(result); } @@ -22,7 +30,15 @@ async function dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleM const result = await client.dataproducts.removeUserRole( "aoiresourceGroupName", "dataproduct01", - {} as any, + { + roleId: "00000000-0000-0000-0000-00000000000", + principalId: "00000000-0000-0000-0000-00000000000", + userName: "UserName", + dataTypeScope: ["scope"], + principalType: "User", + role: "Reader", + roleAssignmentId: "00000000-0000-0000-0000-00000000000", + }, ); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts index 19a98921b7..eef959a8b4 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts @@ -10,7 +10,7 @@ async function dataProductsRotateKeyMaximumSetGen(): void { const result = await client.dataproducts.rotateKey( "aoiresourceGroupName", "dataproduct01", - {} as any, + { keyVaultUrl: "https://myKeyVault.vault.azure.net" }, ); console.log(result); } @@ -22,7 +22,7 @@ async function dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimu const result = await client.dataproducts.rotateKey( "aoiresourceGroupName", "dataproduct01", - {} as any, + { keyVaultUrl: "https://myKeyVault.vault.azure.net" }, ); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts index 19db4307bf..5599b30cca 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts @@ -10,7 +10,23 @@ async function dataProductsUpdateMaximumSetGen(): void { const result = await client.dataproducts.update( "aoiresourceGroupName", "dataproduct01", - {} as any, + { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": + {}, + }, + }, + tags: { userSpecifiedKeyName: "userSpecifiedKeyValue" }, + properties: { + owners: ["abc@micros.com", "def@micros.com"], + purviewAccount: "testpurview", + purviewCollection: "134567890", + privateLinksEnabled: "Disabled", + currentMinorVersion: "1.0.1", + }, + }, ); console.log(result); } @@ -22,7 +38,7 @@ async function dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSe const result = await client.dataproducts.update( "aoiresourceGroupName", "dataproduct01", - {} as any, + {}, ); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts index 5bf76468e1..d99b1fcc62 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts @@ -11,7 +11,14 @@ async function dataTypesCreateMaximumSetGen(): void { "aoiresourceGroupName", "dataproduct01", "datatypename", - {} as any, + { + properties: { + provisioningState: "Succeeded", + storageOutputRetention: 27, + databaseCacheRetention: 23, + databaseRetention: 6, + }, + }, ); console.log(result); } @@ -24,7 +31,7 @@ async function dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGe "aoiresourceGroupName", "dataproduct01", "datatypename", - {} as any, + {}, ); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts index 24d63fa127..cf60c858ca 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts @@ -11,7 +11,7 @@ async function dataTypesDeleteDataMaximumSetGen(): void { "aoiresourceGroupName", "dataproduct01", "datatypename", - {} as any, + {}, ); console.log(result); } @@ -24,7 +24,7 @@ async function dataTypesDeleteDataMinimumSetGen(): void { "aoiresourceGroupName", "dataproduct01", "datatypename", - {} as any, + {}, ); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts index 984b56a77b..4370d0e51e 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts @@ -11,7 +11,11 @@ async function dataTypesGenerateStorageContainerSasTokenMaximumSetGen(): void { "aoiresourceGroupName", "dataproduct01", "datatypename", - {} as any, + { + startTimeStamp: new Date("2023-08-24T05:34:58.039Z"), + expiryTimeStamp: new Date("2023-08-24T05:34:58.039Z"), + ipAddress: "1.1.1.1", + }, ); console.log(result); } @@ -24,7 +28,11 @@ async function dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedBy "aoiresourceGroupName", "dataproduct01", "datatypename", - {} as any, + { + startTimeStamp: new Date("2023-08-24T05:35:16.887Z"), + expiryTimeStamp: new Date("2023-08-24T05:35:16.887Z"), + ipAddress: "1.1.1.1", + }, ); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts index e44236ebd0..7f0a524832 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts @@ -11,7 +11,13 @@ async function dataTypesUpdateMaximumSetGen(): void { "aoiresourceGroupName", "dataproduct01", "datatypename", - {} as any, + { + properties: { + storageOutputRetention: 30, + databaseCacheRetention: 16, + databaseRetention: 9, + }, + }, ); console.log(result); } @@ -24,7 +30,7 @@ async function dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGe "aoiresourceGroupName", "dataproduct01", "datatypename", - {} as any, + {}, ); console.log(result); } diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index ad90b0e4bb..a1dd774d67 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -4,10 +4,10 @@ import { resolveReference } from "../framework/reference.js"; import { SdkContext } from "../utils/interfaces.js"; import { SdkClientType, - SdkHttpParameterExample, SdkInitializationType, SdkServiceMethod, - SdkServiceOperation + SdkServiceOperation, + SdkTypeExample } from "@azure-tools/typespec-client-generator-core"; import { emitCredential } from "./emitCredential.js"; import { NameType, normalizeName } from "@azure-tools/rlc-common"; @@ -97,8 +97,8 @@ function buildExamplesForMethod( for (const example of method.operation.examples ?? []) { // build example const exampleFunctionBody: string[] = [], - clientParams = [], - methodParams = []; + clientParams: string[] = [], + methodParams: string[] = []; const exampleName = normalizeName( transformSpecialLetterToSpace(example.name), NameType.Method @@ -124,7 +124,7 @@ function buildExamplesForMethod( } const paramName = param.parameter.name; exampleFunctionBody.push( - `const ${paramName} = ${getParameterValue(param)};` + `const ${paramName} = ${getParameterValue(param.value)};` ); clientParams.push(paramName); } @@ -136,7 +136,7 @@ function buildExamplesForMethod( if (param.parameter.onClient === true) { continue; } - const paramValue = `${getParameterValue(param)}`; + const paramValue = `${getParameterValue(param.value)}`; methodParams.push(paramValue); } const prefix = options.operationGroupPrefix @@ -187,18 +187,17 @@ function getCredentialType(initialization: SdkInitializationType) { } // TODO: handle values that are not strings -function getParameterValue(parameter: SdkHttpParameterExample) { - const example = parameter.value; - let retValue = example.value; - switch (example.kind) { +function getParameterValue(value: SdkTypeExample) { + let retValue = value.value; + switch (value.kind) { case "string": { - switch (example.type.kind) { + switch (value.type.kind) { case "utcDateTime": case "offsetDateTime": - retValue = `new Date("${example.value}")`; + retValue = `new Date("${value.value}")`; break; default: - retValue = `"${example.value}"`; + retValue = `"${value.value}"`; break; } break; @@ -206,8 +205,36 @@ function getParameterValue(parameter: SdkHttpParameterExample) { case "boolean": case "number": case "null": - retValue = `${example.value}`; + retValue = `${value.value}`; break; + case "dict": + case "model": { + const values = []; + const additionalPropertiesValue = + value.kind === "model" ? value?.additionalPropertiesValue : {}; + for (const propName in { + ...value.value, + ...additionalPropertiesValue + }) { + const propValue = value.value[propName]; + if (propValue === undefined || propValue === null) { + continue; + } + const propRetValue = `"${propName}": ` + getParameterValue(propValue); + values.push(propRetValue); + } + + retValue = `{${values.join(", ")}}`; + break; + } + case "array": { + const valuesArr = []; + for (const element of value.value) { + valuesArr.push(getParameterValue(element)); + } + retValue = `[${valuesArr.join(", ")}]`; + break; + } default: retValue = "{} as any"; break; From a8d73ca4be479dd8f111519055d8488117eca3a8 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 13 Aug 2024 22:05:04 +0800 Subject: [PATCH 14/83] Update the comments in sample gen --- packages/typespec-ts/src/next/buildSamples.ts | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index a1dd774d67..5587b14ec7 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -15,28 +15,11 @@ import { useContext } from "../contextManager.js"; import { join } from "path"; export function buildSamples(dpgContext: SdkContext) { - // Create a new ts-morph project for (const client of dpgContext.sdkPackage.clients) { buildClassicalClientSample(dpgContext, client); } } -// importing the necessary modules - -// async function getASingleSubscription() { -// const subscriptionId = "291bba3f-e0a5-47bc-a099-3bdcb2a50a05"; -// const credential = new DefaultAzureCredential(); -// const client = new SubscriptionClient(credential); -// const result = await client.subscriptions.get(subscriptionId); -// console.log(result); -// } - -// async function main() { -// getASingleSubscription(); -// } - -// main().catch(console.error); - function buildClassicalClientSample( dpgContext: SdkContext, client: SdkClientType @@ -100,7 +83,7 @@ function buildExamplesForMethod( clientParams: string[] = [], methodParams: string[] = []; const exampleName = normalizeName( - transformSpecialLetterToSpace(example.name), + escapeSpecialCharToSpace(example.name), NameType.Method ); const exampleFunctionType = { @@ -186,7 +169,6 @@ function getCredentialType(initialization: SdkInitializationType) { : undefined; } -// TODO: handle values that are not strings function getParameterValue(value: SdkTypeExample) { let retValue = value.value; switch (value.kind) { @@ -209,6 +191,7 @@ function getParameterValue(value: SdkTypeExample) { break; case "dict": case "model": { + // TODO: handle the client name and serialization name gaps const values = []; const additionalPropertiesValue = value.kind === "model" ? value?.additionalPropertiesValue : {}; @@ -228,10 +211,9 @@ function getParameterValue(value: SdkTypeExample) { break; } case "array": { - const valuesArr = []; - for (const element of value.value) { - valuesArr.push(getParameterValue(element)); - } + const valuesArr = value.value.map((element) => + getParameterValue(element) + ); retValue = `[${valuesArr.join(", ")}]`; break; } @@ -242,7 +224,7 @@ function getParameterValue(value: SdkTypeExample) { return retValue; } -function transformSpecialLetterToSpace(str: string) { +function escapeSpecialCharToSpace(str: string) { if (!str) { return str; } From 10267e11d07ffac7af1e1cc7f0059e06b63da1a1 Mon Sep 17 00:00:00 2001 From: Jose Manuel Heredia Hidalgo Date: Thu, 15 Aug 2024 16:16:42 -0700 Subject: [PATCH 15/83] Generate models from TCGC and use binder --- .../typespec-ts/review/openai_modular.api.md | 280 +- .../typespec-ts/src/api/operations.ts | 36 +- .../generated/typespec-ts/src/index.ts | 124 +- .../generated/typespec-ts/src/models/index.ts | 124 +- .../typespec-ts/src/models/models.ts | 2409 +++++++++-------- .../typespec-ts/src/framework/dependency.ts | 15 + .../typespec-ts/src/framework/hooks/binder.ts | 4 +- packages/typespec-ts/src/framework/refkey.ts | 2 +- packages/typespec-ts/src/index.ts | 5 +- .../modular/buildClassicalOperationGroups.ts | 14 - .../src/modular/buildClientContext.ts | 2 - .../src/modular/buildOperations.ts | 46 - .../typespec-ts/src/modular/emit-models.ts | 365 +++ .../src/modular/external-dependencies.ts | 30 + .../src/modular/helpers/operationHelpers.ts | 16 +- .../get-credential-expression.ts | 18 + .../type-expressions/get-enum-expression.ts | 17 + .../type-expressions/get-model-expression.ts | 49 + .../type-expressions/get-type-expression.ts | 87 + .../type-expressions/get-union-expression.ts | 17 + .../src/modular/type-expressions/utils.ts | 15 + 21 files changed, 2336 insertions(+), 1339 deletions(-) create mode 100644 packages/typespec-ts/src/modular/emit-models.ts create mode 100644 packages/typespec-ts/src/modular/type-expressions/get-credential-expression.ts create mode 100644 packages/typespec-ts/src/modular/type-expressions/get-enum-expression.ts create mode 100644 packages/typespec-ts/src/modular/type-expressions/get-model-expression.ts create mode 100644 packages/typespec-ts/src/modular/type-expressions/get-type-expression.ts create mode 100644 packages/typespec-ts/src/modular/type-expressions/get-union-expression.ts create mode 100644 packages/typespec-ts/src/modular/type-expressions/utils.ts diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/review/openai_modular.api.md b/packages/typespec-test/test/openai_modular/generated/typespec-ts/review/openai_modular.api.md index 0151f3c5c9..0789d48ef1 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/review/openai_modular.api.md +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/review/openai_modular.api.md @@ -11,9 +11,15 @@ import { OperationOptions } from '@azure-rest/core-client'; import { Pipeline } from '@azure/core-rest-pipeline'; import { TokenCredential } from '@azure/core-auth'; -// @public +// @public (undocumented) export type AudioTaskLabel = "transcribe" | "translate"; +// @public +export enum AudioTaskLabelKnownValues { + transcribe = "\"transcribe\"", + translate = "\"translate\"" +} + // @public export interface AudioTranscription { duration?: number; @@ -24,9 +30,18 @@ export interface AudioTranscription { words?: AudioTranscriptionWord[]; } -// @public +// @public (undocumented) export type AudioTranscriptionFormat = "json" | "verbose_json" | "text" | "srt" | "vtt"; +// @public +export enum AudioTranscriptionFormatKnownValues { + json = "\"json\"", + srt = "\"srt\"", + text = "\"text\"", + verbose_json = "\"verbose_json\"", + vtt = "\"vtt\"" +} + // @public export interface AudioTranscriptionOptions { file: Uint8Array; @@ -53,9 +68,15 @@ export interface AudioTranscriptionSegment { tokens: number[]; } -// @public +// @public (undocumented) export type AudioTranscriptionTimestampGranularity = "word" | "segment"; +// @public +export enum AudioTranscriptionTimestampGranularityKnownValues { + segment = "\"segment\"", + word = "\"word\"" +} + // @public export interface AudioTranscriptionWord { end: number; @@ -72,9 +93,18 @@ export interface AudioTranslation { text: string; } -// @public +// @public (undocumented) export type AudioTranslationFormat = "json" | "verbose_json" | "text" | "srt" | "vtt"; +// @public +export enum AudioTranslationFormatKnownValues { + json = "\"json\"", + srt = "\"srt\"", + text = "\"text\"", + verbose_json = "\"verbose_json\"", + vtt = "\"vtt\"" +} + // @public export interface AudioTranslationOptions { file: Uint8Array; @@ -115,7 +145,7 @@ export interface AzureChatExtensionConfiguration { type: AzureChatExtensionType; } -// @public +// @public (undocumented) export type AzureChatExtensionConfigurationUnion = AzureSearchChatExtensionConfiguration | AzureMachineLearningIndexChatExtensionConfiguration | AzureCosmosDBChatExtensionConfiguration | ElasticsearchChatExtensionConfiguration | PineconeChatExtensionConfiguration | AzureChatExtensionConfiguration; // @public @@ -141,9 +171,15 @@ export interface AzureChatExtensionRetrievedDocument { url?: string; } -// @public +// @public (undocumented) export type AzureChatExtensionRetrieveDocumentFilterReason = "score" | "rerank"; +// @public +export enum AzureChatExtensionRetrieveDocumentFilterReasonKnownValues { + rerank = "\"rerank\"", + score = "\"score\"" +} + // @public export interface AzureChatExtensionsMessageContext { allRetrievedDocuments?: AzureChatExtensionRetrievedDocument[]; @@ -151,9 +187,18 @@ export interface AzureChatExtensionsMessageContext { intent?: string; } -// @public +// @public (undocumented) export type AzureChatExtensionType = "azure_search" | "azure_ml_index" | "azure_cosmos_db" | "elasticsearch" | "pinecone"; +// @public +export enum AzureChatExtensionTypeKnownValues { + azureCosmosDB = "\"azure_cosmos_db\"", + azureMachineLearningIndex = "\"azure_ml_index\"", + azureSearch = "\"azure_search\"", + elasticsearch = "\"elasticsearch\"", + pinecone = "\"pinecone\"" +} + // @public export interface AzureChatGroundingEnhancementConfiguration { enabled: boolean; @@ -280,9 +325,18 @@ export interface AzureSearchIndexFieldMappingOptions { vectorFields?: string[]; } -// @public +// @public (undocumented) export type AzureSearchQueryType = "simple" | "semantic" | "vector" | "vector_simple_hybrid" | "vector_semantic_hybrid"; +// @public +export enum AzureSearchQueryTypeKnownValues { + semantic = "\"semantic\"", + simple = "\"simple\"", + vector = "\"vector\"", + vectorSemanticHybrid = "\"vector_semantic_hybrid\"", + vectorSimpleHybrid = "\"vector_simple_hybrid\"" +} + // @public export interface ChatChoice { contentFilterResults?: ContentFilterResultsForChoice; @@ -344,7 +398,7 @@ export interface ChatCompletionsNamedToolSelection { type: string; } -// @public +// @public (undocumented) export type ChatCompletionsNamedToolSelectionUnion = ChatCompletionsNamedFunctionToolSelection | ChatCompletionsNamedToolSelection; // @public @@ -378,7 +432,7 @@ export interface ChatCompletionsResponseFormat { type: string; } -// @public +// @public (undocumented) export type ChatCompletionsResponseFormatUnion = ChatCompletionsTextResponseFormat | ChatCompletionsJsonResponseFormat | ChatCompletionsResponseFormat; // @public @@ -392,7 +446,7 @@ export interface ChatCompletionsToolCall { type: string; } -// @public +// @public (undocumented) export type ChatCompletionsToolCallUnion = ChatCompletionsFunctionToolCall | ChatCompletionsToolCall; // @public @@ -400,18 +454,24 @@ export interface ChatCompletionsToolDefinition { type: string; } -// @public +// @public (undocumented) export type ChatCompletionsToolDefinitionUnion = ChatCompletionsFunctionToolDefinition | ChatCompletionsToolDefinition; -// @public +// @public (undocumented) export type ChatCompletionsToolSelectionPreset = "auto" | "none"; +// @public +export enum ChatCompletionsToolSelectionPresetKnownValues { + auto = "\"auto\"", + none = "\"none\"" +} + // @public export interface ChatFinishDetails { type: string; } -// @public +// @public (undocumented) export type ChatFinishDetailsUnion = StopFinishDetails | MaxTokensFinishDetails | ChatFinishDetails; // @public @@ -419,7 +479,7 @@ export interface ChatMessageContentItem { type: string; } -// @public +// @public (undocumented) export type ChatMessageContentItemUnion = ChatMessageTextContentItem | ChatMessageImageContentItem | ChatMessageContentItem; // @public @@ -428,9 +488,16 @@ export interface ChatMessageImageContentItem extends ChatMessageContentItem { type: "image_url"; } -// @public +// @public (undocumented) export type ChatMessageImageDetailLevel = "auto" | "low" | "high"; +// @public +export enum ChatMessageImageDetailLevelKnownValues { + auto = "\"auto\"", + high = "\"high\"", + low = "\"low\"" +} + // @public export interface ChatMessageImageUrl { detail?: ChatMessageImageDetailLevel; @@ -464,7 +531,7 @@ export interface ChatRequestMessage { role: ChatRole; } -// @public +// @public (undocumented) export type ChatRequestMessageUnion = ChatRequestSystemMessage | ChatRequestUserMessage | ChatRequestAssistantMessage | ChatRequestToolMessage | ChatRequestFunctionMessage | ChatRequestMessage; // @public @@ -497,9 +564,18 @@ export interface ChatResponseMessage { toolCalls?: ChatCompletionsToolCallUnion[]; } -// @public +// @public (undocumented) export type ChatRole = "system" | "assistant" | "user" | "function" | "tool"; +// @public +export enum ChatRoleKnownValues { + assistant = "\"assistant\"", + "function" = "\"function\"", + system = "\"system\"", + tool = "\"tool\"", + user = "\"user\"" +} + // @public export interface ChatTokenLogProbabilityInfo { bytes: number[] | null; @@ -533,9 +609,18 @@ export interface Completions { usage: CompletionsUsage; } -// @public +// @public (undocumented) export type CompletionsFinishReason = "stop" | "length" | "content_filter" | "function_call" | "tool_calls"; +// @public +export enum CompletionsFinishReasonKnownValues { + contentFiltered = "\"content_filter\"", + functionCall = "\"function_call\"", + stopped = "\"stop\"", + tokenLimitReached = "\"length\"", + toolCalls = "\"tool_calls\"" +} + // @public export interface CompletionsLogProbabilityModel { textOffset: number[]; @@ -635,9 +720,17 @@ export interface ContentFilterResultsForPrompt { promptIndex: number; } -// @public +// @public (undocumented) export type ContentFilterSeverity = "safe" | "low" | "medium" | "high"; +// @public +export enum ContentFilterSeverityKnownValues { + high = "\"high\"", + low = "\"low\"", + medium = "\"medium\"", + safe = "\"safe\"" +} + // @public export interface ElasticsearchChatExtensionConfiguration extends AzureChatExtensionConfiguration { parameters: ElasticsearchChatExtensionParameters; @@ -671,12 +764,24 @@ export interface ElasticsearchIndexFieldMappingOptions { vectorFields?: string[]; } -// @public +// @public (undocumented) export type ElasticsearchQueryType = "simple" | "vector"; // @public +export enum ElasticsearchQueryTypeKnownValues { + simple = "\"simple\"", + vector = "\"vector\"" +} + +// @public (undocumented) export type EmbeddingEncodingFormat = "float" | "base64"; +// @public +export enum EmbeddingEncodingFormatKnownValues { + base64 = "\"base64\"", + float = "\"float\"" +} + // @public export interface EmbeddingItem { embedding: number[]; @@ -705,15 +810,27 @@ export interface EmbeddingsUsage { totalTokens: number; } +// @public +export interface ErrorResponse { + error: ErrorModel; + errorCode?: string; +} + // @public export interface FunctionCall { arguments: string; name: string; } -// @public +// @public (undocumented) export type FunctionCallPreset = "auto" | "none"; +// @public +export enum FunctionCallPresetKnownValues { + auto = "\"auto\"", + none = "\"none\"" +} + // @public export interface FunctionDefinition { description?: string; @@ -806,24 +923,51 @@ export interface ImageGenerationPromptFilterResults { violence?: ContentFilterResult; } -// @public +// @public (undocumented) export type ImageGenerationQuality = "standard" | "hd"; // @public +export enum ImageGenerationQualityKnownValues { + hd = "\"hd\"", + standard = "\"standard\"" +} + +// @public (undocumented) export type ImageGenerationResponseFormat = "url" | "b64_json"; +// @public +export enum ImageGenerationResponseFormatKnownValues { + base64 = "\"b64_json\"", + url = "\"url\"" +} + // @public export interface ImageGenerations { created: Date; data: ImageGenerationData[]; } -// @public +// @public (undocumented) export type ImageGenerationStyle = "natural" | "vivid"; // @public +export enum ImageGenerationStyleKnownValues { + natural = "\"natural\"", + vivid = "\"vivid\"" +} + +// @public (undocumented) export type ImageSize = "256x256" | "512x512" | "1024x1024" | "1792x1024" | "1024x1792"; +// @public +export enum ImageSizeKnownValues { + size1024x1024 = "\"1024x1024\"", + size1024x1792 = "\"1024x1792\"", + size1792x1024 = "\"1792x1024\"", + size256x256 = "\"256x256\"", + size512x512 = "\"512x512\"" +} + // @public export interface MaxTokensFinishDetails extends ChatFinishDetails { type: "max_tokens"; @@ -846,21 +990,39 @@ export interface OnYourDataAuthenticationOptions { type: OnYourDataAuthenticationType; } -// @public +// @public (undocumented) export type OnYourDataAuthenticationOptionsUnion = OnYourDataApiKeyAuthenticationOptions | OnYourDataConnectionStringAuthenticationOptions | OnYourDataKeyAndKeyIdAuthenticationOptions | OnYourDataEncodedApiKeyAuthenticationOptions | OnYourDataAccessTokenAuthenticationOptions | OnYourDataSystemAssignedManagedIdentityAuthenticationOptions | OnYourDataUserAssignedManagedIdentityAuthenticationOptions | OnYourDataAuthenticationOptions; -// @public +// @public (undocumented) export type OnYourDataAuthenticationType = "api_key" | "connection_string" | "key_and_key_id" | "encoded_api_key" | "access_token" | "system_assigned_managed_identity" | "user_assigned_managed_identity"; +// @public +export enum OnYourDataAuthenticationTypeKnownValues { + accessToken = "\"access_token\"", + apiKey = "\"api_key\"", + connectionString = "\"connection_string\"", + encodedApiKey = "\"encoded_api_key\"", + keyAndKeyId = "\"key_and_key_id\"", + systemAssignedManagedIdentity = "\"system_assigned_managed_identity\"", + userAssignedManagedIdentity = "\"user_assigned_managed_identity\"" +} + // @public export interface OnYourDataConnectionStringAuthenticationOptions extends OnYourDataAuthenticationOptions { connectionString: string; type: "connection_string"; } -// @public +// @public (undocumented) export type OnYourDataContextProperty = "citations" | "intent" | "all_retrieved_documents"; +// @public +export enum OnYourDataContextPropertyKnownValues { + allRetrievedDocuments = "\"all_retrieved_documents\"", + citations = "\"citations\"", + intent = "\"intent\"" +} + // @public export interface OnYourDataDeploymentNameVectorizationSource extends OnYourDataVectorizationSource { deploymentName: string; @@ -910,10 +1072,17 @@ export interface OnYourDataVectorizationSource { type: OnYourDataVectorizationSourceType; } -// @public +// @public (undocumented) export type OnYourDataVectorizationSourceType = "endpoint" | "deployment_name" | "model_id"; // @public +export enum OnYourDataVectorizationSourceTypeKnownValues { + deploymentName = "\"deployment_name\"", + endpoint = "\"endpoint\"", + modelId = "\"model_id\"" +} + +// @public (undocumented) export type OnYourDataVectorizationSourceUnion = OnYourDataEndpointVectorizationSource | OnYourDataDeploymentNameVectorizationSource | OnYourDataModelIdVectorizationSource | OnYourDataVectorizationSource; // @public @@ -933,12 +1102,18 @@ export interface OnYourDataVectorSearchAuthenticationOptions { type: OnYourDataVectorSearchAuthenticationType; } -// @public +// @public (undocumented) export type OnYourDataVectorSearchAuthenticationOptionsUnion = OnYourDataVectorSearchApiKeyAuthenticationOptions | OnYourDataVectorSearchAccessTokenAuthenticationOptions | OnYourDataVectorSearchAuthenticationOptions; -// @public +// @public (undocumented) export type OnYourDataVectorSearchAuthenticationType = "api_key" | "access_token"; +// @public +export enum OnYourDataVectorSearchAuthenticationTypeKnownValues { + accessToken = "\"access_token\"", + apiKey = "\"api_key\"" +} + // @public (undocumented) export class OpenAIClient { constructor(endpointParam: string, credential: KeyCredential | TokenCredential, options?: OpenAIClientOptionalParams); @@ -959,6 +1134,13 @@ export interface OpenAIClientOptionalParams extends ClientOptions { apiVersion?: string; } +// @public +export interface OpenAIClientOptions { + apiVersion: string; + credential: KeyCredential | TokenCredential; + endpoint: string | string; +} + // @public export interface PineconeChatExtensionConfiguration extends AzureChatExtensionConfiguration { parameters: PineconeChatExtensionParameters; @@ -990,8 +1172,20 @@ export interface PineconeFieldMappingOptions { urlField?: string; } -// @public -export type ServiceApiVersions = "2022-12-01" | "2023-05-15" | "2023-06-01-preview" | "2023-07-01-preview" | "2024-02-01" | "2024-02-15-preview" | "2024-03-01-preview" | "2024-04-01-preview" | "2024-05-01-preview" | "2024-06-01"; +// @public (undocumented) +export type ServiceApiVersions = "2022-12-01" | "2023-05-15" | "2024-02-01" | "2024-06-01"; + +// @public (undocumented) +export enum ServiceApiVersionsKnownValues { + // (undocumented) + v2022_12_01 = "\"2022-12-01\"", + // (undocumented) + v2023_05_15 = "\"2023-05-15\"", + // (undocumented) + v2024_02_01 = "\"2024-02-01\"", + // (undocumented) + v2024_06_01 = "\"2024-06-01\"" +} // @public export interface SpeechGenerationOptions { @@ -1002,12 +1196,32 @@ export interface SpeechGenerationOptions { voice: SpeechVoice; } -// @public +// @public (undocumented) export type SpeechGenerationResponseFormat = "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm"; // @public +export enum SpeechGenerationResponseFormatKnownValues { + aac = "\"aac\"", + flac = "\"flac\"", + mp3 = "\"mp3\"", + opus = "\"opus\"", + pcm = "\"pcm\"", + wav = "\"wav\"" +} + +// @public (undocumented) export type SpeechVoice = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; +// @public +export enum SpeechVoiceKnownValues { + alloy = "\"alloy\"", + echo = "\"echo\"", + fable = "\"fable\"", + nova = "\"nova\"", + onyx = "\"onyx\"", + shimmer = "\"shimmer\"" +} + // @public export interface StopFinishDetails extends ChatFinishDetails { stop: string; diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/api/operations.ts b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/api/operations.ts index 593f68d5f3..cbc786a8c9 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/api/operations.ts +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/api/operations.ts @@ -1,39 +1,39 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { OpenAIContext as Client } from "./index.js"; +import { + StreamableMethod, + operationOptionsToRequestParameters, + PathUncheckedResponse, + createRestError, +} from "@azure-rest/core-client"; +import { uint8ArrayToString } from "@azure/core-util"; +import { serializeRecord } from "../helpers/serializerHelpers.js"; import { - chatRequestMessageUnionSerializer, - functionDefinitionSerializer, - azureChatExtensionConfigurationUnionSerializer, - azureChatEnhancementConfigurationSerializer, - chatCompletionsResponseFormatUnionSerializer, AudioTranscriptionOptions, AudioTranscription, - AudioTaskLabel, AudioTranslationOptions, AudioTranslation, CompletionsOptions, Completions, - ContentFilterSeverity, - CompletionsFinishReason, ChatCompletionsOptions, - ChatRole, + azureChatEnhancementConfigurationSerializer, + functionDefinitionSerializer, ChatCompletions, ImageGenerationOptions, ImageGenerations, SpeechGenerationOptions, EmbeddingsOptions, Embeddings, + AudioTaskLabel, + ContentFilterSeverity, + CompletionsFinishReason, + ChatRole, + azureChatExtensionConfigurationUnionSerializer, + chatCompletionsResponseFormatUnionSerializer, + chatRequestMessageUnionSerializer, } from "../models/models.js"; -import { OpenAIContext as Client } from "./index.js"; -import { - StreamableMethod, - operationOptionsToRequestParameters, - PathUncheckedResponse, - createRestError, -} from "@azure-rest/core-client"; -import { uint8ArrayToString } from "@azure/core-util"; -import { serializeRecord } from "../helpers/serializerHelpers.js"; import { GetAudioTranscriptionAsPlainTextOptionalParams, GetAudioTranscriptionAsResponseObjectOptionalParams, diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/index.ts b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/index.ts index dad76b6263..dfb3798411 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/index.ts +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/index.ts @@ -4,22 +4,18 @@ export { OpenAIClient, OpenAIClientOptionalParams } from "./openAIClient.js"; export { AudioTranscriptionOptions, - AudioTranscriptionFormat, - AudioTranscriptionTimestampGranularity, AudioTranscription, - AudioTaskLabel, AudioTranscriptionSegment, AudioTranscriptionWord, AudioTranslationOptions, - AudioTranslationFormat, AudioTranslation, AudioTranslationSegment, CompletionsOptions, Completions, + CompletionsUsage, ContentFilterResultsForPrompt, ContentFilterResultDetailsForPrompt, ContentFilterResult, - ContentFilterSeverity, ContentFilterDetectionResult, ContentFilterDetailedResults, ContentFilterBlocklistIdResult, @@ -27,31 +23,39 @@ export { ContentFilterResultsForChoice, ContentFilterCitedDetectionResult, CompletionsLogProbabilityModel, - CompletionsFinishReason, - CompletionsUsage, ChatCompletionsOptions, + AzureChatEnhancementConfiguration, + AzureChatGroundingEnhancementConfiguration, + AzureChatOCREnhancementConfiguration, + ChatCompletionsResponseFormat, + ChatCompletionsResponseFormatUnion, ChatRequestMessage, + ChatRequestMessageUnion, ChatRequestSystemMessage, ChatRequestUserMessage, ChatMessageContentItem, + ChatMessageContentItemUnion, ChatMessageTextContentItem, ChatMessageImageContentItem, ChatMessageImageUrl, - ChatMessageImageDetailLevel, ChatRequestAssistantMessage, + FunctionCall, ChatCompletionsToolCall, + ChatCompletionsToolCallUnion, ChatCompletionsFunctionToolCall, - FunctionCall, ChatRequestToolMessage, ChatRequestFunctionMessage, - ChatRole, FunctionDefinition, - FunctionCallPreset, FunctionName, AzureChatExtensionConfiguration, + AzureChatExtensionConfigurationUnion, AzureSearchChatExtensionConfiguration, AzureSearchChatExtensionParameters, OnYourDataAuthenticationOptions, + OnYourDataAuthenticationOptionsUnion, + AzureSearchIndexFieldMappingOptions, + OnYourDataVectorizationSource, + OnYourDataVectorizationSourceUnion, OnYourDataApiKeyAuthenticationOptions, OnYourDataConnectionStringAuthenticationOptions, OnYourDataKeyAndKeyIdAuthenticationOptions, @@ -59,19 +63,13 @@ export { OnYourDataAccessTokenAuthenticationOptions, OnYourDataSystemAssignedManagedIdentityAuthenticationOptions, OnYourDataUserAssignedManagedIdentityAuthenticationOptions, - OnYourDataAuthenticationType, - OnYourDataContextProperty, - AzureSearchIndexFieldMappingOptions, - AzureSearchQueryType, - OnYourDataVectorizationSource, OnYourDataEndpointVectorizationSource, OnYourDataVectorSearchAuthenticationOptions, + OnYourDataVectorSearchAuthenticationOptionsUnion, OnYourDataVectorSearchApiKeyAuthenticationOptions, OnYourDataVectorSearchAccessTokenAuthenticationOptions, - OnYourDataVectorSearchAuthenticationType, OnYourDataDeploymentNameVectorizationSource, OnYourDataModelIdVectorizationSource, - OnYourDataVectorizationSourceType, AzureMachineLearningIndexChatExtensionConfiguration, AzureMachineLearningIndexChatExtensionParameters, AzureCosmosDBChatExtensionConfiguration, @@ -80,70 +78,100 @@ export { ElasticsearchChatExtensionConfiguration, ElasticsearchChatExtensionParameters, ElasticsearchIndexFieldMappingOptions, - ElasticsearchQueryType, PineconeChatExtensionConfiguration, PineconeChatExtensionParameters, PineconeFieldMappingOptions, - AzureChatExtensionType, - AzureChatEnhancementConfiguration, - AzureChatGroundingEnhancementConfiguration, - AzureChatOCREnhancementConfiguration, - ChatCompletionsResponseFormat, ChatCompletionsTextResponseFormat, ChatCompletionsJsonResponseFormat, ChatCompletionsToolDefinition, + ChatCompletionsToolDefinitionUnion, ChatCompletionsFunctionToolDefinition, - ChatCompletionsToolSelectionPreset, ChatCompletionsNamedToolSelection, + ChatCompletionsNamedToolSelectionUnion, ChatCompletionsNamedFunctionToolSelection, ChatCompletionsFunctionToolSelection, ChatCompletions, ChatChoice, ChatResponseMessage, AzureChatExtensionsMessageContext, + ChatFinishDetails, + ChatFinishDetailsUnion, + AzureChatEnhancements, + AzureGroundingEnhancement, AzureChatExtensionDataSourceResponseCitation, AzureChatExtensionRetrievedDocument, - AzureChatExtensionRetrieveDocumentFilterReason, ChatChoiceLogProbabilityInfo, ChatTokenLogProbabilityResult, ChatTokenLogProbabilityInfo, - ChatFinishDetails, StopFinishDetails, MaxTokensFinishDetails, - AzureChatEnhancements, - AzureGroundingEnhancement, AzureGroundingEnhancementLine, AzureGroundingEnhancementLineSpan, AzureGroundingEnhancementCoordinatePoint, ImageGenerationOptions, - ImageSize, - ImageGenerationResponseFormat, - ImageGenerationQuality, - ImageGenerationStyle, ImageGenerations, ImageGenerationData, ImageGenerationContentFilterResults, ImageGenerationPromptFilterResults, SpeechGenerationOptions, - SpeechVoice, - SpeechGenerationResponseFormat, EmbeddingsOptions, - EmbeddingEncodingFormat, Embeddings, - EmbeddingItem, EmbeddingsUsage, + EmbeddingItem, + AudioTranscriptionFormatKnownValues, + AudioTranscriptionFormat, + AudioTranscriptionTimestampGranularityKnownValues, + AudioTranscriptionTimestampGranularity, + AudioTaskLabelKnownValues, + AudioTaskLabel, + AudioTranslationFormatKnownValues, + AudioTranslationFormat, + ContentFilterSeverityKnownValues, + ContentFilterSeverity, + CompletionsFinishReasonKnownValues, + CompletionsFinishReason, + ChatRoleKnownValues, + ChatRole, + ChatMessageImageDetailLevelKnownValues, + ChatMessageImageDetailLevel, + FunctionCallPresetKnownValues, + FunctionCallPreset, + AzureChatExtensionTypeKnownValues, + AzureChatExtensionType, + OnYourDataAuthenticationTypeKnownValues, + OnYourDataAuthenticationType, + OnYourDataContextPropertyKnownValues, + OnYourDataContextProperty, + AzureSearchQueryTypeKnownValues, + AzureSearchQueryType, + OnYourDataVectorizationSourceTypeKnownValues, + OnYourDataVectorizationSourceType, + OnYourDataVectorSearchAuthenticationTypeKnownValues, + OnYourDataVectorSearchAuthenticationType, + ElasticsearchQueryTypeKnownValues, + ElasticsearchQueryType, + ChatCompletionsToolSelectionPresetKnownValues, + ChatCompletionsToolSelectionPreset, + AzureChatExtensionRetrieveDocumentFilterReasonKnownValues, + AzureChatExtensionRetrieveDocumentFilterReason, + ImageSizeKnownValues, + ImageSize, + ImageGenerationResponseFormatKnownValues, + ImageGenerationResponseFormat, + ImageGenerationQualityKnownValues, + ImageGenerationQuality, + ImageGenerationStyleKnownValues, + ImageGenerationStyle, + SpeechVoiceKnownValues, + SpeechVoice, + SpeechGenerationResponseFormatKnownValues, + SpeechGenerationResponseFormat, + EmbeddingEncodingFormatKnownValues, + EmbeddingEncodingFormat, + ServiceApiVersionsKnownValues, ServiceApiVersions, - ChatRequestMessageUnion, - ChatMessageContentItemUnion, - ChatCompletionsToolCallUnion, - AzureChatExtensionConfigurationUnion, - OnYourDataAuthenticationOptionsUnion, - OnYourDataVectorizationSourceUnion, - OnYourDataVectorSearchAuthenticationOptionsUnion, - ChatCompletionsResponseFormatUnion, - ChatCompletionsToolDefinitionUnion, - ChatCompletionsNamedToolSelectionUnion, - ChatFinishDetailsUnion, + OpenAIClientOptions, + ErrorResponse, GetAudioTranscriptionAsPlainTextOptionalParams, GetAudioTranscriptionAsResponseObjectOptionalParams, GetAudioTranslationAsPlainTextOptionalParams, diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/index.ts b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/index.ts index e48782c424..4f32649e28 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/index.ts +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/index.ts @@ -3,22 +3,18 @@ export { AudioTranscriptionOptions, - AudioTranscriptionFormat, - AudioTranscriptionTimestampGranularity, AudioTranscription, - AudioTaskLabel, AudioTranscriptionSegment, AudioTranscriptionWord, AudioTranslationOptions, - AudioTranslationFormat, AudioTranslation, AudioTranslationSegment, CompletionsOptions, Completions, + CompletionsUsage, ContentFilterResultsForPrompt, ContentFilterResultDetailsForPrompt, ContentFilterResult, - ContentFilterSeverity, ContentFilterDetectionResult, ContentFilterDetailedResults, ContentFilterBlocklistIdResult, @@ -26,31 +22,39 @@ export { ContentFilterResultsForChoice, ContentFilterCitedDetectionResult, CompletionsLogProbabilityModel, - CompletionsFinishReason, - CompletionsUsage, ChatCompletionsOptions, + AzureChatEnhancementConfiguration, + AzureChatGroundingEnhancementConfiguration, + AzureChatOCREnhancementConfiguration, + ChatCompletionsResponseFormat, + ChatCompletionsResponseFormatUnion, ChatRequestMessage, + ChatRequestMessageUnion, ChatRequestSystemMessage, ChatRequestUserMessage, ChatMessageContentItem, + ChatMessageContentItemUnion, ChatMessageTextContentItem, ChatMessageImageContentItem, ChatMessageImageUrl, - ChatMessageImageDetailLevel, ChatRequestAssistantMessage, + FunctionCall, ChatCompletionsToolCall, + ChatCompletionsToolCallUnion, ChatCompletionsFunctionToolCall, - FunctionCall, ChatRequestToolMessage, ChatRequestFunctionMessage, - ChatRole, FunctionDefinition, - FunctionCallPreset, FunctionName, AzureChatExtensionConfiguration, + AzureChatExtensionConfigurationUnion, AzureSearchChatExtensionConfiguration, AzureSearchChatExtensionParameters, OnYourDataAuthenticationOptions, + OnYourDataAuthenticationOptionsUnion, + AzureSearchIndexFieldMappingOptions, + OnYourDataVectorizationSource, + OnYourDataVectorizationSourceUnion, OnYourDataApiKeyAuthenticationOptions, OnYourDataConnectionStringAuthenticationOptions, OnYourDataKeyAndKeyIdAuthenticationOptions, @@ -58,19 +62,13 @@ export { OnYourDataAccessTokenAuthenticationOptions, OnYourDataSystemAssignedManagedIdentityAuthenticationOptions, OnYourDataUserAssignedManagedIdentityAuthenticationOptions, - OnYourDataAuthenticationType, - OnYourDataContextProperty, - AzureSearchIndexFieldMappingOptions, - AzureSearchQueryType, - OnYourDataVectorizationSource, OnYourDataEndpointVectorizationSource, OnYourDataVectorSearchAuthenticationOptions, + OnYourDataVectorSearchAuthenticationOptionsUnion, OnYourDataVectorSearchApiKeyAuthenticationOptions, OnYourDataVectorSearchAccessTokenAuthenticationOptions, - OnYourDataVectorSearchAuthenticationType, OnYourDataDeploymentNameVectorizationSource, OnYourDataModelIdVectorizationSource, - OnYourDataVectorizationSourceType, AzureMachineLearningIndexChatExtensionConfiguration, AzureMachineLearningIndexChatExtensionParameters, AzureCosmosDBChatExtensionConfiguration, @@ -79,70 +77,100 @@ export { ElasticsearchChatExtensionConfiguration, ElasticsearchChatExtensionParameters, ElasticsearchIndexFieldMappingOptions, - ElasticsearchQueryType, PineconeChatExtensionConfiguration, PineconeChatExtensionParameters, PineconeFieldMappingOptions, - AzureChatExtensionType, - AzureChatEnhancementConfiguration, - AzureChatGroundingEnhancementConfiguration, - AzureChatOCREnhancementConfiguration, - ChatCompletionsResponseFormat, ChatCompletionsTextResponseFormat, ChatCompletionsJsonResponseFormat, ChatCompletionsToolDefinition, + ChatCompletionsToolDefinitionUnion, ChatCompletionsFunctionToolDefinition, - ChatCompletionsToolSelectionPreset, ChatCompletionsNamedToolSelection, + ChatCompletionsNamedToolSelectionUnion, ChatCompletionsNamedFunctionToolSelection, ChatCompletionsFunctionToolSelection, ChatCompletions, ChatChoice, ChatResponseMessage, AzureChatExtensionsMessageContext, + ChatFinishDetails, + ChatFinishDetailsUnion, + AzureChatEnhancements, + AzureGroundingEnhancement, AzureChatExtensionDataSourceResponseCitation, AzureChatExtensionRetrievedDocument, - AzureChatExtensionRetrieveDocumentFilterReason, ChatChoiceLogProbabilityInfo, ChatTokenLogProbabilityResult, ChatTokenLogProbabilityInfo, - ChatFinishDetails, StopFinishDetails, MaxTokensFinishDetails, - AzureChatEnhancements, - AzureGroundingEnhancement, AzureGroundingEnhancementLine, AzureGroundingEnhancementLineSpan, AzureGroundingEnhancementCoordinatePoint, ImageGenerationOptions, - ImageSize, - ImageGenerationResponseFormat, - ImageGenerationQuality, - ImageGenerationStyle, ImageGenerations, ImageGenerationData, ImageGenerationContentFilterResults, ImageGenerationPromptFilterResults, SpeechGenerationOptions, - SpeechVoice, - SpeechGenerationResponseFormat, EmbeddingsOptions, - EmbeddingEncodingFormat, Embeddings, - EmbeddingItem, EmbeddingsUsage, + EmbeddingItem, + AudioTranscriptionFormatKnownValues, + AudioTranscriptionFormat, + AudioTranscriptionTimestampGranularityKnownValues, + AudioTranscriptionTimestampGranularity, + AudioTaskLabelKnownValues, + AudioTaskLabel, + AudioTranslationFormatKnownValues, + AudioTranslationFormat, + ContentFilterSeverityKnownValues, + ContentFilterSeverity, + CompletionsFinishReasonKnownValues, + CompletionsFinishReason, + ChatRoleKnownValues, + ChatRole, + ChatMessageImageDetailLevelKnownValues, + ChatMessageImageDetailLevel, + FunctionCallPresetKnownValues, + FunctionCallPreset, + AzureChatExtensionTypeKnownValues, + AzureChatExtensionType, + OnYourDataAuthenticationTypeKnownValues, + OnYourDataAuthenticationType, + OnYourDataContextPropertyKnownValues, + OnYourDataContextProperty, + AzureSearchQueryTypeKnownValues, + AzureSearchQueryType, + OnYourDataVectorizationSourceTypeKnownValues, + OnYourDataVectorizationSourceType, + OnYourDataVectorSearchAuthenticationTypeKnownValues, + OnYourDataVectorSearchAuthenticationType, + ElasticsearchQueryTypeKnownValues, + ElasticsearchQueryType, + ChatCompletionsToolSelectionPresetKnownValues, + ChatCompletionsToolSelectionPreset, + AzureChatExtensionRetrieveDocumentFilterReasonKnownValues, + AzureChatExtensionRetrieveDocumentFilterReason, + ImageSizeKnownValues, + ImageSize, + ImageGenerationResponseFormatKnownValues, + ImageGenerationResponseFormat, + ImageGenerationQualityKnownValues, + ImageGenerationQuality, + ImageGenerationStyleKnownValues, + ImageGenerationStyle, + SpeechVoiceKnownValues, + SpeechVoice, + SpeechGenerationResponseFormatKnownValues, + SpeechGenerationResponseFormat, + EmbeddingEncodingFormatKnownValues, + EmbeddingEncodingFormat, + ServiceApiVersionsKnownValues, ServiceApiVersions, - ChatRequestMessageUnion, - ChatMessageContentItemUnion, - ChatCompletionsToolCallUnion, - AzureChatExtensionConfigurationUnion, - OnYourDataAuthenticationOptionsUnion, - OnYourDataVectorizationSourceUnion, - OnYourDataVectorSearchAuthenticationOptionsUnion, - ChatCompletionsResponseFormatUnion, - ChatCompletionsToolDefinitionUnion, - ChatCompletionsNamedToolSelectionUnion, - ChatFinishDetailsUnion, + OpenAIClientOptions, + ErrorResponse, } from "./models.js"; export { GetAudioTranscriptionAsPlainTextOptionalParams, diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/models.ts b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/models.ts index 9778d837cd..45ac8a951e 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/models.ts +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/models.ts @@ -1,8 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { serializeRecord } from "../helpers/serializerHelpers.js"; -import { uint8ArrayToString } from "@azure/core-util"; +import { KeyCredential, TokenCredential } from "@azure/core-auth"; import { ErrorModel } from "@azure-rest/core-client"; /** The configuration information for an audio transcription request. */ @@ -45,30 +44,12 @@ export interface AudioTranscriptionOptions { } export function audioTranscriptionOptionsSerializer( - item: AudioTranscriptionOptions, -): Record { - return { - file: uint8ArrayToString(item["file"], "base64"), - filename: item["filename"], - response_format: item["responseFormat"], - language: item["language"], - prompt: item["prompt"], - temperature: item["temperature"], - timestamp_granularities: item["timestampGranularities"], - model: item["model"], - }; + input: AudioTranscriptionOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** Defines available options for the underlying response format of output transcription information. */ -export type AudioTranscriptionFormat = - | "json" - | "verbose_json" - | "text" - | "srt" - | "vtt"; -/** Defines the timestamp granularities that can be requested on a verbose transcription response. */ -export type AudioTranscriptionTimestampGranularity = "word" | "segment"; - /** Result information for an operation that transcribed spoken audio into written text. */ export interface AudioTranscription { /** The transcribed text for the provided audio data. */ @@ -88,8 +69,12 @@ export interface AudioTranscription { words?: AudioTranscriptionWord[]; } -/** Defines the possible descriptors for available audio operation responses. */ -export type AudioTaskLabel = "transcribe" | "translate"; +export function audioTranscriptionSerializer( + input: AudioTranscription, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} /** * Extended information about a single segment of transcribed audio data. @@ -125,6 +110,13 @@ export interface AudioTranscriptionSegment { seek: number; } +export function audioTranscriptionSegmentSerializer( + input: AudioTranscriptionSegment, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Extended information about a single transcribed word, as provided on responses when the 'word' timestamp granularity is provided. */ export interface AudioTranscriptionWord { /** The textual content of the word. */ @@ -135,6 +127,13 @@ export interface AudioTranscriptionWord { end: number; } +export function audioTranscriptionWordSerializer( + input: AudioTranscriptionWord, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** The configuration information for an audio translation request. */ export interface AudioTranslationOptions { /** @@ -162,26 +161,12 @@ export interface AudioTranslationOptions { } export function audioTranslationOptionsSerializer( - item: AudioTranslationOptions, -): Record { - return { - file: uint8ArrayToString(item["file"], "base64"), - filename: item["filename"], - response_format: item["responseFormat"], - prompt: item["prompt"], - temperature: item["temperature"], - model: item["model"], - }; + input: AudioTranslationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** Defines available options for the underlying response format of output translation information. */ -export type AudioTranslationFormat = - | "json" - | "verbose_json" - | "text" - | "srt" - | "vtt"; - /** Result information for an operation that translated spoken audio into written text. */ export interface AudioTranslation { /** The translated text for the provided audio data. */ @@ -199,6 +184,11 @@ export interface AudioTranslation { segments?: AudioTranslationSegment[]; } +export function audioTranslationSerializer(input: AudioTranslation): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** * Extended information about a single segment of translated audio data. * Segments generally represent roughly 5-10 seconds of speech. Segment boundaries typically occur between words but not @@ -233,6 +223,13 @@ export interface AudioTranslationSegment { seek: number; } +export function audioTranslationSegmentSerializer( + input: AudioTranslationSegment, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** * The configuration information for a completions request. * Completions support a wide variety of tasks and generate text that continues from or "completes" @@ -328,28 +325,10 @@ export interface CompletionsOptions { } export function completionsOptionsSerializer( - item: CompletionsOptions, -): Record { - return { - prompt: item["prompt"], - max_tokens: item["maxTokens"], - temperature: item["temperature"], - top_p: item["topP"], - logit_bias: !item.logitBias - ? item.logitBias - : (serializeRecord(item.logitBias as any) as any), - user: item["user"], - n: item["n"], - logprobs: item["logprobs"], - suffix: item["suffix"], - echo: item["echo"], - stop: item["stop"], - presence_penalty: item["presencePenalty"], - frequency_penalty: item["frequencyPenalty"], - best_of: item["bestOf"], - stream: item["stream"], - model: item["model"], - }; + input: CompletionsOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -380,6 +359,30 @@ export interface Completions { usage: CompletionsUsage; } +export function completionsSerializer(input: Completions): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** + * Representation of the token counts processed for a completions request. + * Counts consider all tokens across prompts, choices, choice alternates, best_of generations, and + * other consumers. + */ +export interface CompletionsUsage { + /** The number of tokens generated across all completions emissions. */ + completionTokens: number; + /** The number of tokens in the provided prompts for the completions request. */ + promptTokens: number; + /** The total number of tokens processed for the completions request and response. */ + totalTokens: number; +} + +export function completionsUsageSerializer(input: CompletionsUsage): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Content filtering results for a single prompt in the request. */ export interface ContentFilterResultsForPrompt { /** The index of this prompt in the set of prompt results */ @@ -388,6 +391,13 @@ export interface ContentFilterResultsForPrompt { contentFilterResults: ContentFilterResultDetailsForPrompt; } +export function contentFilterResultsForPromptSerializer( + input: ContentFilterResultsForPrompt, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Information about content filtering evaluated against input data to Azure OpenAI. */ export interface ContentFilterResultDetailsForPrompt { /** @@ -430,6 +440,13 @@ export interface ContentFilterResultDetailsForPrompt { indirectAttack?: ContentFilterDetectionResult; } +export function contentFilterResultDetailsForPromptSerializer( + input: ContentFilterResultDetailsForPrompt, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Information about filtered content severity level and if it has been filtered or not. */ export interface ContentFilterResult { /** A value indicating whether or not the content has been filtered. */ @@ -438,8 +455,12 @@ export interface ContentFilterResult { severity: ContentFilterSeverity; } -/** Ratings for the intensity and risk level of harmful content. */ -export type ContentFilterSeverity = "safe" | "low" | "medium" | "high"; +export function contentFilterResultSerializer( + input: ContentFilterResult, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} /** Represents the outcome of a detection operation performed by content filtering. */ export interface ContentFilterDetectionResult { @@ -449,6 +470,13 @@ export interface ContentFilterDetectionResult { detected: boolean; } +export function contentFilterDetectionResultSerializer( + input: ContentFilterDetectionResult, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Represents a structured collection of result details for content filtering. */ export interface ContentFilterDetailedResults { /** A value indicating whether or not the content has been filtered. */ @@ -457,6 +485,13 @@ export interface ContentFilterDetailedResults { details: ContentFilterBlocklistIdResult[]; } +export function contentFilterDetailedResultsSerializer( + input: ContentFilterDetailedResults, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Represents the outcome of an evaluation against a custom blocklist as performed by content filtering. */ export interface ContentFilterBlocklistIdResult { /** A value indicating whether or not the content has been filtered. */ @@ -465,6 +500,13 @@ export interface ContentFilterBlocklistIdResult { id: string; } +export function contentFilterBlocklistIdResultSerializer( + input: ContentFilterBlocklistIdResult, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** * The representation of a single prompt completion as part of an overall completions request. * Generally, `n` choices are generated per provided prompt with a default value of 1. @@ -487,6 +529,11 @@ export interface Choice { finishReason: CompletionsFinishReason | null; } +export function choiceSerializer(input: Choice): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Information about content filtering evaluated against generated model output. */ export interface ContentFilterResultsForChoice { /** @@ -529,6 +576,13 @@ export interface ContentFilterResultsForChoice { protectedMaterialCode?: ContentFilterCitedDetectionResult; } +export function contentFilterResultsForChoiceSerializer( + input: ContentFilterResultsForChoice, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Represents the outcome of a detection operation against protected resources as performed by content filtering. */ export interface ContentFilterCitedDetectionResult { /** A value indicating whether or not the content has been filtered. */ @@ -541,6 +595,13 @@ export interface ContentFilterCitedDetectionResult { license: string; } +export function contentFilterCitedDetectionResultSerializer( + input: ContentFilterCitedDetectionResult, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Representation of a log probabilities model for a completions generation. */ export interface CompletionsLogProbabilityModel { /** The textual forms of tokens evaluated in this probability model. */ @@ -553,26 +614,11 @@ export interface CompletionsLogProbabilityModel { textOffset: number[]; } -/** Representation of the manner in which a completions response concluded. */ -export type CompletionsFinishReason = - | "stop" - | "length" - | "content_filter" - | "function_call" - | "tool_calls"; - -/** - * Representation of the token counts processed for a completions request. - * Counts consider all tokens across prompts, choices, choice alternates, best_of generations, and - * other consumers. - */ -export interface CompletionsUsage { - /** The number of tokens generated across all completions emissions. */ - completionTokens: number; - /** The number of tokens in the provided prompts for the completions request. */ - promptTokens: number; - /** The total number of tokens processed for the completions request and response. */ - totalTokens: number; +export function completionsLogProbabilityModelSerializer( + input: CompletionsLogProbabilityModel, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -688,90 +734,107 @@ export interface ChatCompletionsOptions { } export function chatCompletionsOptionsSerializer( - item: ChatCompletionsOptions, -): Record { - return { - messages: item["messages"].map((p) => chatRequestMessageUnionSerializer(p)), - functions: - item["functions"] === undefined - ? item["functions"] - : item["functions"].map(functionDefinitionSerializer), - function_call: item["functionCall"] as any, - max_tokens: item["maxTokens"], - temperature: item["temperature"], - top_p: item["topP"], - logit_bias: !item.logitBias - ? item.logitBias - : (serializeRecord(item.logitBias as any) as any), - user: item["user"], - n: item["n"], - stop: item["stop"], - presence_penalty: item["presencePenalty"], - frequency_penalty: item["frequencyPenalty"], - stream: item["stream"], - model: item["model"], - data_sources: - item["dataSources"] === undefined - ? item["dataSources"] - : item["dataSources"].map((p) => - azureChatExtensionConfigurationUnionSerializer(p), - ), - enhancements: !item.enhancements - ? item.enhancements - : azureChatEnhancementConfigurationSerializer(item.enhancements), - seed: item["seed"], - logprobs: item["logprobs"], - top_logprobs: item["topLogprobs"], - response_format: !item.responseFormat - ? item.responseFormat - : chatCompletionsResponseFormatUnionSerializer(item.responseFormat), - tools: item["tools"], - tool_choice: item["toolChoice"] as any, - }; + input: ChatCompletionsOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** An abstract representation of a chat message as provided in a request. */ -export interface ChatRequestMessage { - /** the discriminator possible values: system, user, assistant, tool, function */ - role: ChatRole; +/** A representation of the available Azure OpenAI enhancement configurations. */ +export interface AzureChatEnhancementConfiguration { + /** A representation of the available options for the Azure OpenAI grounding enhancement. */ + grounding?: AzureChatGroundingEnhancementConfiguration; + /** A representation of the available options for the Azure OpenAI optical character recognition (OCR) enhancement. */ + ocr?: AzureChatOCREnhancementConfiguration; } -export function chatRequestMessageUnionSerializer( - item: ChatRequestMessageUnion, -) { - switch (item.role) { - case "system": - return chatRequestSystemMessageSerializer( - item as ChatRequestSystemMessage, - ); +export function azureChatEnhancementConfigurationSerializer( + input: AzureChatEnhancementConfiguration, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** A representation of the available options for the Azure OpenAI grounding enhancement. */ +export interface AzureChatGroundingEnhancementConfiguration { + /** Specifies whether the enhancement is enabled. */ + enabled: boolean; +} + +export function azureChatGroundingEnhancementConfigurationSerializer( + input: AzureChatGroundingEnhancementConfiguration, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** A representation of the available options for the Azure OpenAI optical character recognition (OCR) enhancement. */ +export interface AzureChatOCREnhancementConfiguration { + /** Specifies whether the enhancement is enabled. */ + enabled: boolean; +} + +export function azureChatOCREnhancementConfigurationSerializer( + input: AzureChatOCREnhancementConfiguration, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** + * An abstract representation of a response format configuration usable by Chat Completions. Can be used to enable JSON + * mode. + */ +export interface ChatCompletionsResponseFormat { + /** The discriminated type for the response format. */ + type: string; +} - case "user": - return chatRequestUserMessageSerializer(item as ChatRequestUserMessage); +export function chatCompletionsResponseFormatUnionSerializer( + input: ChatCompletionsResponseFormatUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} - case "assistant": - return chatRequestAssistantMessageSerializer( - item as ChatRequestAssistantMessage, - ); +export type ChatCompletionsResponseFormatUnion = + | ChatCompletionsTextResponseFormat + | ChatCompletionsJsonResponseFormat + | ChatCompletionsResponseFormat; - case "tool": - return chatRequestToolMessageSerializer(item as ChatRequestToolMessage); +export function chatCompletionsResponseFormatSerializer( + input: ChatCompletionsResponseFormat, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} - case "function": - return chatRequestFunctionMessageSerializer( - item as ChatRequestFunctionMessage, - ); +/** An abstract representation of a chat message as provided in a request. */ +export interface ChatRequestMessage { + /** The chat role associated with this message. */ + role: ChatRole; +} - default: - return chatRequestMessageSerializer(item); - } +export function chatRequestMessageUnionSerializer( + input: ChatRequestMessageUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); } +export type ChatRequestMessageUnion = + | ChatRequestSystemMessage + | ChatRequestUserMessage + | ChatRequestAssistantMessage + | ChatRequestToolMessage + | ChatRequestFunctionMessage + | ChatRequestMessage; + export function chatRequestMessageSerializer( - item: ChatRequestMessageUnion, -): Record { - return { - ...chatRequestMessageUnionSerializer(item), - }; + input: ChatRequestMessage, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -788,13 +851,10 @@ export interface ChatRequestSystemMessage extends ChatRequestMessage { } export function chatRequestSystemMessageSerializer( - item: ChatRequestSystemMessage, -): Record { - return { - role: item["role"], - content: item["content"], - name: item["name"], - }; + input: ChatRequestSystemMessage, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** A request chat message representing user input to the assistant. */ @@ -808,46 +868,35 @@ export interface ChatRequestUserMessage extends ChatRequestMessage { } export function chatRequestUserMessageSerializer( - item: ChatRequestUserMessage, -): Record { - return { - role: item["role"], - content: item["content"] as any, - name: item["name"], - }; + input: ChatRequestUserMessage, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** An abstract representation of a structured content item within a chat message. */ export interface ChatMessageContentItem { - /** the discriminator possible values: text, image_url */ + /** The discriminated object type. */ type: string; } export function chatMessageContentItemUnionSerializer( - item: ChatMessageContentItemUnion, -) { - switch (item.type) { - case "text": - return chatMessageTextContentItemSerializer( - item as ChatMessageTextContentItem, - ); - - case "image_url": - return chatMessageImageContentItemSerializer( - item as ChatMessageImageContentItem, - ); - - default: - return chatMessageContentItemSerializer(item); - } + input: ChatMessageContentItemUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); } +export type ChatMessageContentItemUnion = + | ChatMessageTextContentItem + | ChatMessageImageContentItem + | ChatMessageContentItem; + export function chatMessageContentItemSerializer( - item: ChatMessageContentItemUnion, -): Record { - return { - ...chatMessageContentItemUnionSerializer(item), - }; + input: ChatMessageContentItem, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** A structured chat content item containing plain text. */ @@ -859,12 +908,10 @@ export interface ChatMessageTextContentItem extends ChatMessageContentItem { } export function chatMessageTextContentItemSerializer( - item: ChatMessageTextContentItem, -): Record { - return { - type: item["type"], - text: item["text"], - }; + input: ChatMessageTextContentItem, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** A structured chat content item containing an image reference. */ @@ -876,12 +923,10 @@ export interface ChatMessageImageContentItem extends ChatMessageContentItem { } export function chatMessageImageContentItemSerializer( - item: ChatMessageImageContentItem, -): Record { - return { - type: item["type"], - image_url: chatMessageImageUrlSerializer(item.imageUrl), - }; + input: ChatMessageImageContentItem, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** An internet location from which the model may retrieve an image. */ @@ -896,17 +941,12 @@ export interface ChatMessageImageUrl { } export function chatMessageImageUrlSerializer( - item: ChatMessageImageUrl, -): Record { - return { - url: item["url"], - detail: item["detail"], - }; + input: ChatMessageImageUrl, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** A representation of the possible image detail levels for image-based chat completions message content. */ -export type ChatMessageImageDetailLevel = "auto" | "low" | "high"; - /** A request chat message representing response or action from the assistant. */ export interface ChatRequestAssistantMessage extends ChatRequestMessage { /** The chat role associated with this message, which is always 'assistant' for assistant messages. */ @@ -928,17 +968,28 @@ export interface ChatRequestAssistantMessage extends ChatRequestMessage { } export function chatRequestAssistantMessageSerializer( - item: ChatRequestAssistantMessage, -): Record { - return { - role: item["role"], - content: item["content"], - name: item["name"], - tool_calls: item["toolCalls"], - function_call: !item.functionCall - ? item.functionCall - : functionCallSerializer(item.functionCall), - }; + input: ChatRequestAssistantMessage, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** The name and arguments of a function that should be called, as generated by the model. */ +export interface FunctionCall { + /** The name of the function to call. */ + name: string; + /** + * The arguments to call the function with, as generated by the model in JSON format. + * Note that the model does not always generate valid JSON, and may hallucinate parameters + * not defined by your function schema. Validate the arguments in your code before calling + * your function. + */ + arguments: string; +} + +export function functionCallSerializer(input: FunctionCall): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -946,33 +997,28 @@ export function chatRequestAssistantMessageSerializer( * chat completion. */ export interface ChatCompletionsToolCall { - /** the discriminator possible values: function */ + /** The object type. */ type: string; /** The ID of the tool call. */ id: string; } export function chatCompletionsToolCallUnionSerializer( - item: ChatCompletionsToolCallUnion, -) { - switch (item.type) { - case "function": - return chatCompletionsFunctionToolCallSerializer( - item as ChatCompletionsFunctionToolCall, - ); - - default: - return chatCompletionsToolCallSerializer(item); - } + input: ChatCompletionsToolCallUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); } +export type ChatCompletionsToolCallUnion = + | ChatCompletionsFunctionToolCall + | ChatCompletionsToolCall; + export function chatCompletionsToolCallSerializer( - item: ChatCompletionsToolCallUnion, -): Record { - return { - type: item["type"], - id: item["id"], - }; + input: ChatCompletionsToolCall, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -988,35 +1034,10 @@ export interface ChatCompletionsFunctionToolCall } export function chatCompletionsFunctionToolCallSerializer( - item: ChatCompletionsFunctionToolCall, -): Record { - return { - type: item["type"], - id: item["id"], - function: functionCallSerializer(item.function), - }; -} - -/** The name and arguments of a function that should be called, as generated by the model. */ -export interface FunctionCall { - /** The name of the function to call. */ - name: string; - /** - * The arguments to call the function with, as generated by the model in JSON format. - * Note that the model does not always generate valid JSON, and may hallucinate parameters - * not defined by your function schema. Validate the arguments in your code before calling - * your function. - */ - arguments: string; -} - -export function functionCallSerializer( - item: FunctionCall, -): Record { - return { - name: item["name"], - arguments: item["arguments"], - }; + input: ChatCompletionsFunctionToolCall, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** A request chat message representing requested output from a configured tool. */ @@ -1030,13 +1051,10 @@ export interface ChatRequestToolMessage extends ChatRequestMessage { } export function chatRequestToolMessageSerializer( - item: ChatRequestToolMessage, -): Record { - return { - role: item["role"], - content: item["content"], - tool_call_id: item["toolCallId"], - }; + input: ChatRequestToolMessage, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** A request chat message representing requested output from a configured function. */ @@ -1050,18 +1068,12 @@ export interface ChatRequestFunctionMessage extends ChatRequestMessage { } export function chatRequestFunctionMessageSerializer( - item: ChatRequestFunctionMessage, -): Record { - return { - role: item["role"], - name: item["name"], - content: item["content"], - }; + input: ChatRequestFunctionMessage, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** A description of the intended purpose of a message within a chat completions interaction. */ -export type ChatRole = "system" | "assistant" | "user" | "function" | "tool"; - /** The definition of a caller-specified function that chat completions may invoke in response to matching user input. */ export interface FunctionDefinition { /** The name of the function to be called. */ @@ -1076,21 +1088,12 @@ export interface FunctionDefinition { } export function functionDefinitionSerializer( - item: FunctionDefinition, -): Record { - return { - name: item["name"], - description: item["description"], - parameters: item["parameters"], - }; + input: FunctionDefinition, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** - * The collection of predefined behaviors for handling request-provided function information in a chat completions - * operation. - */ -export type FunctionCallPreset = "auto" | "none"; - /** * A structure that specifies the exact name of a specific, request-provided function to use when processing a chat * completions operation. @@ -1100,12 +1103,9 @@ export interface FunctionName { name: string; } -export function functionNameSerializer( - item: FunctionName, -): Record { - return { - name: item["name"], - }; +export function functionNameSerializer(input: FunctionName): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -1114,50 +1114,33 @@ export function functionNameSerializer( * The use of this configuration is compatible only with Azure OpenAI. */ export interface AzureChatExtensionConfiguration { - /** the discriminator possible values: azure_search, azure_ml_index, azure_cosmos_db, elasticsearch, pinecone */ + /** + * The label for the type of an Azure chat extension. This typically corresponds to a matching Azure resource. + * Azure chat extensions are only compatible with Azure OpenAI. + */ type: AzureChatExtensionType; } export function azureChatExtensionConfigurationUnionSerializer( - item: AzureChatExtensionConfigurationUnion, -) { - switch (item.type) { - case "azure_search": - return azureSearchChatExtensionConfigurationSerializer( - item as AzureSearchChatExtensionConfiguration, - ); - - case "azure_ml_index": - return azureMachineLearningIndexChatExtensionConfigurationSerializer( - item as AzureMachineLearningIndexChatExtensionConfiguration, - ); - - case "azure_cosmos_db": - return azureCosmosDBChatExtensionConfigurationSerializer( - item as AzureCosmosDBChatExtensionConfiguration, - ); - - case "elasticsearch": - return elasticsearchChatExtensionConfigurationSerializer( - item as ElasticsearchChatExtensionConfiguration, - ); - - case "pinecone": - return pineconeChatExtensionConfigurationSerializer( - item as PineconeChatExtensionConfiguration, - ); - - default: - return azureChatExtensionConfigurationSerializer(item); - } + input: AzureChatExtensionConfigurationUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); } +export type AzureChatExtensionConfigurationUnion = + | AzureSearchChatExtensionConfiguration + | AzureMachineLearningIndexChatExtensionConfiguration + | AzureCosmosDBChatExtensionConfiguration + | ElasticsearchChatExtensionConfiguration + | PineconeChatExtensionConfiguration + | AzureChatExtensionConfiguration; + export function azureChatExtensionConfigurationSerializer( - item: AzureChatExtensionConfigurationUnion, -): Record { - return { - ...azureChatExtensionConfigurationUnionSerializer(item), - }; + input: AzureChatExtensionConfiguration, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -1176,12 +1159,10 @@ export interface AzureSearchChatExtensionConfiguration } export function azureSearchChatExtensionConfigurationSerializer( - item: AzureSearchChatExtensionConfiguration, -): Record { - return { - type: item["type"], - parameters: azureSearchChatExtensionParametersSerializer(item.parameters), - }; + input: AzureSearchChatExtensionConfiguration, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** Parameters for Azure Cognitive Search when used as an Azure OpenAI chat extension. The supported authentication types are APIKey, SystemAssignedManagedIdentity and UserAssignedManagedIdentity. */ @@ -1231,125 +1212,123 @@ export interface AzureSearchChatExtensionParameters { } export function azureSearchChatExtensionParametersSerializer( - item: AzureSearchChatExtensionParameters, -): Record { - return { - authentication: !item.authentication - ? item.authentication - : onYourDataAuthenticationOptionsUnionSerializer(item.authentication), - top_n_documents: item["topNDocuments"], - in_scope: item["inScope"], - strictness: item["strictness"], - role_information: item["roleInformation"], - max_search_queries: item["maxSearchQueries"], - allow_partial_result: item["allowPartialResult"], - include_contexts: item["includeContexts"], - endpoint: item["endpoint"], - index_name: item["indexName"], - fields_mapping: !item.fieldsMapping - ? item.fieldsMapping - : azureSearchIndexFieldMappingOptionsSerializer(item.fieldsMapping), - query_type: item["queryType"], - semantic_configuration: item["semanticConfiguration"], - filter: item["filter"], - embedding_dependency: !item.embeddingDependency - ? item.embeddingDependency - : onYourDataVectorizationSourceUnionSerializer(item.embeddingDependency), - }; + input: AzureSearchChatExtensionParameters, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** The authentication options for Azure OpenAI On Your Data. */ export interface OnYourDataAuthenticationOptions { - /** the discriminator possible values: api_key, connection_string, key_and_key_id, encoded_api_key, access_token, system_assigned_managed_identity, user_assigned_managed_identity */ + /** The authentication type. */ type: OnYourDataAuthenticationType; } export function onYourDataAuthenticationOptionsUnionSerializer( - item: OnYourDataAuthenticationOptionsUnion, -) { - switch (item.type) { - case "api_key": - return onYourDataApiKeyAuthenticationOptionsSerializer( - item as OnYourDataApiKeyAuthenticationOptions, - ); - - case "connection_string": - return onYourDataConnectionStringAuthenticationOptionsSerializer( - item as OnYourDataConnectionStringAuthenticationOptions, - ); - - case "key_and_key_id": - return onYourDataKeyAndKeyIdAuthenticationOptionsSerializer( - item as OnYourDataKeyAndKeyIdAuthenticationOptions, - ); - - case "encoded_api_key": - return onYourDataEncodedApiKeyAuthenticationOptionsSerializer( - item as OnYourDataEncodedApiKeyAuthenticationOptions, - ); - - case "access_token": - return onYourDataAccessTokenAuthenticationOptionsSerializer( - item as OnYourDataAccessTokenAuthenticationOptions, - ); - - case "system_assigned_managed_identity": - return onYourDataSystemAssignedManagedIdentityAuthenticationOptionsSerializer( - item as OnYourDataSystemAssignedManagedIdentityAuthenticationOptions, - ); - - case "user_assigned_managed_identity": - return onYourDataUserAssignedManagedIdentityAuthenticationOptionsSerializer( - item as OnYourDataUserAssignedManagedIdentityAuthenticationOptions, - ); - - default: - return onYourDataAuthenticationOptionsSerializer(item); - } + input: OnYourDataAuthenticationOptionsUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); } +export type OnYourDataAuthenticationOptionsUnion = + | OnYourDataApiKeyAuthenticationOptions + | OnYourDataConnectionStringAuthenticationOptions + | OnYourDataKeyAndKeyIdAuthenticationOptions + | OnYourDataEncodedApiKeyAuthenticationOptions + | OnYourDataAccessTokenAuthenticationOptions + | OnYourDataSystemAssignedManagedIdentityAuthenticationOptions + | OnYourDataUserAssignedManagedIdentityAuthenticationOptions + | OnYourDataAuthenticationOptions; + export function onYourDataAuthenticationOptionsSerializer( - item: OnYourDataAuthenticationOptionsUnion, -): Record { - return { - ...onYourDataAuthenticationOptionsUnionSerializer(item), - }; + input: OnYourDataAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** The authentication options for Azure OpenAI On Your Data when using an API key. */ -export interface OnYourDataApiKeyAuthenticationOptions - extends OnYourDataAuthenticationOptions { - /** The authentication type of API key. */ - type: "api_key"; - /** The API key to use for authentication. */ - key: string; +/** Optional settings to control how fields are processed when using a configured Azure Search resource. */ +export interface AzureSearchIndexFieldMappingOptions { + /** The name of the index field to use as a title. */ + titleField?: string; + /** The name of the index field to use as a URL. */ + urlField?: string; + /** The name of the index field to use as a filepath. */ + filepathField?: string; + /** The names of index fields that should be treated as content. */ + contentFields?: string[]; + /** The separator pattern that content fields should use. */ + contentFieldsSeparator?: string; + /** The names of fields that represent vector data. */ + vectorFields?: string[]; + /** The names of fields that represent image vector data. */ + imageVectorFields?: string[]; } -export function onYourDataApiKeyAuthenticationOptionsSerializer( - item: OnYourDataApiKeyAuthenticationOptions, -): Record { - return { - type: item["type"], - key: item["key"], - }; +export function azureSearchIndexFieldMappingOptionsSerializer( + input: AzureSearchIndexFieldMappingOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** The authentication options for Azure OpenAI On Your Data when using a connection string. */ -export interface OnYourDataConnectionStringAuthenticationOptions - extends OnYourDataAuthenticationOptions { - /** The authentication type of connection string. */ - type: "connection_string"; - /** The connection string to use for authentication. */ - connectionString: string; +/** An abstract representation of a vectorization source for Azure OpenAI On Your Data with vector search. */ +export interface OnYourDataVectorizationSource { + /** The type of vectorization source to use. */ + type: OnYourDataVectorizationSourceType; } -export function onYourDataConnectionStringAuthenticationOptionsSerializer( - item: OnYourDataConnectionStringAuthenticationOptions, -): Record { - return { - type: item["type"], - connection_string: item["connectionString"], - }; +export function onYourDataVectorizationSourceUnionSerializer( + input: OnYourDataVectorizationSourceUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +export type OnYourDataVectorizationSourceUnion = + | OnYourDataEndpointVectorizationSource + | OnYourDataDeploymentNameVectorizationSource + | OnYourDataModelIdVectorizationSource + | OnYourDataVectorizationSource; + +export function onYourDataVectorizationSourceSerializer( + input: OnYourDataVectorizationSource, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** The authentication options for Azure OpenAI On Your Data when using an API key. */ +export interface OnYourDataApiKeyAuthenticationOptions + extends OnYourDataAuthenticationOptions { + /** The authentication type of API key. */ + type: "api_key"; + /** The API key to use for authentication. */ + key: string; +} + +export function onYourDataApiKeyAuthenticationOptionsSerializer( + input: OnYourDataApiKeyAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** The authentication options for Azure OpenAI On Your Data when using a connection string. */ +export interface OnYourDataConnectionStringAuthenticationOptions + extends OnYourDataAuthenticationOptions { + /** The authentication type of connection string. */ + type: "connection_string"; + /** The connection string to use for authentication. */ + connectionString: string; +} + +export function onYourDataConnectionStringAuthenticationOptionsSerializer( + input: OnYourDataConnectionStringAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** The authentication options for Azure OpenAI On Your Data when using an Elasticsearch key and key ID pair. */ @@ -1364,13 +1343,10 @@ export interface OnYourDataKeyAndKeyIdAuthenticationOptions } export function onYourDataKeyAndKeyIdAuthenticationOptionsSerializer( - item: OnYourDataKeyAndKeyIdAuthenticationOptions, -): Record { - return { - type: item["type"], - key: item["key"], - key_id: item["keyId"], - }; + input: OnYourDataKeyAndKeyIdAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** The authentication options for Azure OpenAI On Your Data when using an Elasticsearch encoded API key. */ @@ -1383,12 +1359,10 @@ export interface OnYourDataEncodedApiKeyAuthenticationOptions } export function onYourDataEncodedApiKeyAuthenticationOptionsSerializer( - item: OnYourDataEncodedApiKeyAuthenticationOptions, -): Record { - return { - type: item["type"], - encoded_api_key: item["encodedApiKey"], - }; + input: OnYourDataEncodedApiKeyAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** The authentication options for Azure OpenAI On Your Data when using access token. */ @@ -1401,12 +1375,10 @@ export interface OnYourDataAccessTokenAuthenticationOptions } export function onYourDataAccessTokenAuthenticationOptionsSerializer( - item: OnYourDataAccessTokenAuthenticationOptions, -): Record { - return { - type: item["type"], - access_token: item["accessToken"], - }; + input: OnYourDataAccessTokenAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** The authentication options for Azure OpenAI On Your Data when using a system-assigned managed identity. */ @@ -1417,11 +1389,10 @@ export interface OnYourDataSystemAssignedManagedIdentityAuthenticationOptions } export function onYourDataSystemAssignedManagedIdentityAuthenticationOptionsSerializer( - item: OnYourDataSystemAssignedManagedIdentityAuthenticationOptions, -): Record { - return { - type: item["type"], - }; + input: OnYourDataSystemAssignedManagedIdentityAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** The authentication options for Azure OpenAI On Your Data when using a user-assigned managed identity. */ @@ -1434,105 +1405,10 @@ export interface OnYourDataUserAssignedManagedIdentityAuthenticationOptions } export function onYourDataUserAssignedManagedIdentityAuthenticationOptionsSerializer( - item: OnYourDataUserAssignedManagedIdentityAuthenticationOptions, -): Record { - return { - type: item["type"], - managed_identity_resource_id: item["managedIdentityResourceId"], - }; -} - -/** The authentication types supported with Azure OpenAI On Your Data. */ -export type OnYourDataAuthenticationType = - | "api_key" - | "connection_string" - | "key_and_key_id" - | "encoded_api_key" - | "access_token" - | "system_assigned_managed_identity" - | "user_assigned_managed_identity"; -/** The context property. */ -export type OnYourDataContextProperty = - | "citations" - | "intent" - | "all_retrieved_documents"; - -/** Optional settings to control how fields are processed when using a configured Azure Search resource. */ -export interface AzureSearchIndexFieldMappingOptions { - /** The name of the index field to use as a title. */ - titleField?: string; - /** The name of the index field to use as a URL. */ - urlField?: string; - /** The name of the index field to use as a filepath. */ - filepathField?: string; - /** The names of index fields that should be treated as content. */ - contentFields?: string[]; - /** The separator pattern that content fields should use. */ - contentFieldsSeparator?: string; - /** The names of fields that represent vector data. */ - vectorFields?: string[]; - /** The names of fields that represent image vector data. */ - imageVectorFields?: string[]; -} - -export function azureSearchIndexFieldMappingOptionsSerializer( - item: AzureSearchIndexFieldMappingOptions, -): Record { - return { - title_field: item["titleField"], - url_field: item["urlField"], - filepath_field: item["filepathField"], - content_fields: item["contentFields"], - content_fields_separator: item["contentFieldsSeparator"], - vector_fields: item["vectorFields"], - image_vector_fields: item["imageVectorFields"], - }; -} - -/** The type of Azure Search retrieval query that should be executed when using it as an Azure OpenAI chat extension. */ -export type AzureSearchQueryType = - | "simple" - | "semantic" - | "vector" - | "vector_simple_hybrid" - | "vector_semantic_hybrid"; - -/** An abstract representation of a vectorization source for Azure OpenAI On Your Data with vector search. */ -export interface OnYourDataVectorizationSource { - /** the discriminator possible values: endpoint, deployment_name, model_id */ - type: OnYourDataVectorizationSourceType; -} - -export function onYourDataVectorizationSourceUnionSerializer( - item: OnYourDataVectorizationSourceUnion, -) { - switch (item.type) { - case "endpoint": - return onYourDataEndpointVectorizationSourceSerializer( - item as OnYourDataEndpointVectorizationSource, - ); - - case "deployment_name": - return onYourDataDeploymentNameVectorizationSourceSerializer( - item as OnYourDataDeploymentNameVectorizationSource, - ); - - case "model_id": - return onYourDataModelIdVectorizationSourceSerializer( - item as OnYourDataModelIdVectorizationSource, - ); - - default: - return onYourDataVectorizationSourceSerializer(item); - } -} - -export function onYourDataVectorizationSourceSerializer( - item: OnYourDataVectorizationSourceUnion, -): Record { - return { - ...onYourDataVectorizationSourceUnionSerializer(item), - }; + input: OnYourDataUserAssignedManagedIdentityAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -1550,48 +1426,35 @@ export interface OnYourDataEndpointVectorizationSource } export function onYourDataEndpointVectorizationSourceSerializer( - item: OnYourDataEndpointVectorizationSource, -): Record { - return { - type: item["type"], - endpoint: item["endpoint"], - authentication: onYourDataVectorSearchAuthenticationOptionsUnionSerializer( - item.authentication, - ), - }; + input: OnYourDataEndpointVectorizationSource, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** The authentication options for Azure OpenAI On Your Data vector search. */ export interface OnYourDataVectorSearchAuthenticationOptions { - /** the discriminator possible values: api_key, access_token */ + /** The type of authentication to use. */ type: OnYourDataVectorSearchAuthenticationType; } export function onYourDataVectorSearchAuthenticationOptionsUnionSerializer( - item: OnYourDataVectorSearchAuthenticationOptionsUnion, -) { - switch (item.type) { - case "api_key": - return onYourDataVectorSearchApiKeyAuthenticationOptionsSerializer( - item as OnYourDataVectorSearchApiKeyAuthenticationOptions, - ); - - case "access_token": - return onYourDataVectorSearchAccessTokenAuthenticationOptionsSerializer( - item as OnYourDataVectorSearchAccessTokenAuthenticationOptions, - ); - - default: - return onYourDataVectorSearchAuthenticationOptionsSerializer(item); - } + input: OnYourDataVectorSearchAuthenticationOptionsUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); } +export type OnYourDataVectorSearchAuthenticationOptionsUnion = + | OnYourDataVectorSearchApiKeyAuthenticationOptions + | OnYourDataVectorSearchAccessTokenAuthenticationOptions + | OnYourDataVectorSearchAuthenticationOptions; + export function onYourDataVectorSearchAuthenticationOptionsSerializer( - item: OnYourDataVectorSearchAuthenticationOptionsUnion, -): Record { - return { - ...onYourDataVectorSearchAuthenticationOptionsUnionSerializer(item), - }; + input: OnYourDataVectorSearchAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** The authentication options for Azure OpenAI On Your Data when using an API key. */ @@ -1604,12 +1467,10 @@ export interface OnYourDataVectorSearchApiKeyAuthenticationOptions } export function onYourDataVectorSearchApiKeyAuthenticationOptionsSerializer( - item: OnYourDataVectorSearchApiKeyAuthenticationOptions, -): Record { - return { - type: item["type"], - key: item["key"], - }; + input: OnYourDataVectorSearchApiKeyAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** The authentication options for Azure OpenAI On Your Data vector search when using access token. */ @@ -1622,19 +1483,12 @@ export interface OnYourDataVectorSearchAccessTokenAuthenticationOptions } export function onYourDataVectorSearchAccessTokenAuthenticationOptionsSerializer( - item: OnYourDataVectorSearchAccessTokenAuthenticationOptions, -): Record { - return { - type: item["type"], - access_token: item["accessToken"], - }; + input: OnYourDataVectorSearchAccessTokenAuthenticationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** The authentication types supported with Azure OpenAI On Your Data vector search. */ -export type OnYourDataVectorSearchAuthenticationType = - | "api_key" - | "access_token"; - /** * The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based * on an internal embeddings model deployment name in the same Azure OpenAI resource. @@ -1650,13 +1504,10 @@ export interface OnYourDataDeploymentNameVectorizationSource } export function onYourDataDeploymentNameVectorizationSourceSerializer( - item: OnYourDataDeploymentNameVectorizationSource, -): Record { - return { - type: item["type"], - deployment_name: item["deploymentName"], - dimensions: item["dimensions"], - }; + input: OnYourDataDeploymentNameVectorizationSource, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -1672,23 +1523,12 @@ export interface OnYourDataModelIdVectorizationSource } export function onYourDataModelIdVectorizationSourceSerializer( - item: OnYourDataModelIdVectorizationSource, -): Record { - return { - type: item["type"], - model_id: item["modelId"], - }; + input: OnYourDataModelIdVectorizationSource, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** - * Represents the available sources Azure OpenAI On Your Data can use to configure vectorization of data for use with - * vector search. - */ -export type OnYourDataVectorizationSourceType = - | "endpoint" - | "deployment_name" - | "model_id"; - /** * A specific representation of configurable options for Azure Machine Learning vector index when using it as an Azure * OpenAI chat extension. @@ -1705,14 +1545,10 @@ export interface AzureMachineLearningIndexChatExtensionConfiguration } export function azureMachineLearningIndexChatExtensionConfigurationSerializer( - item: AzureMachineLearningIndexChatExtensionConfiguration, -): Record { - return { - type: item["type"], - parameters: azureMachineLearningIndexChatExtensionParametersSerializer( - item.parameters, - ), - }; + input: AzureMachineLearningIndexChatExtensionConfiguration, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** Parameters for the Azure Machine Learning vector index chat extension. The supported authentication types are AccessToken, SystemAssignedManagedIdentity and UserAssignedManagedIdentity. */ @@ -1756,24 +1592,10 @@ export interface AzureMachineLearningIndexChatExtensionParameters { } export function azureMachineLearningIndexChatExtensionParametersSerializer( - item: AzureMachineLearningIndexChatExtensionParameters, -): Record { - return { - authentication: !item.authentication - ? item.authentication - : onYourDataAuthenticationOptionsUnionSerializer(item.authentication), - top_n_documents: item["topNDocuments"], - in_scope: item["inScope"], - strictness: item["strictness"], - role_information: item["roleInformation"], - max_search_queries: item["maxSearchQueries"], - allow_partial_result: item["allowPartialResult"], - include_contexts: item["includeContexts"], - project_resource_id: item["projectResourceId"], - name: item["name"], - version: item["version"], - filter: item["filter"], - }; + input: AzureMachineLearningIndexChatExtensionParameters, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -1792,12 +1614,10 @@ export interface AzureCosmosDBChatExtensionConfiguration } export function azureCosmosDBChatExtensionConfigurationSerializer( - item: AzureCosmosDBChatExtensionConfiguration, -): Record { - return { - type: item["type"], - parameters: azureCosmosDBChatExtensionParametersSerializer(item.parameters), - }; + input: AzureCosmosDBChatExtensionConfiguration, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -1846,29 +1666,10 @@ export interface AzureCosmosDBChatExtensionParameters { } export function azureCosmosDBChatExtensionParametersSerializer( - item: AzureCosmosDBChatExtensionParameters, -): Record { - return { - authentication: !item.authentication - ? item.authentication - : onYourDataAuthenticationOptionsUnionSerializer(item.authentication), - top_n_documents: item["topNDocuments"], - in_scope: item["inScope"], - strictness: item["strictness"], - role_information: item["roleInformation"], - max_search_queries: item["maxSearchQueries"], - allow_partial_result: item["allowPartialResult"], - include_contexts: item["includeContexts"], - database_name: item["databaseName"], - container_name: item["containerName"], - index_name: item["indexName"], - fields_mapping: azureCosmosDBFieldMappingOptionsSerializer( - item.fieldsMapping, - ), - embedding_dependency: onYourDataVectorizationSourceUnionSerializer( - item.embeddingDependency, - ), - }; + input: AzureCosmosDBChatExtensionParameters, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** Optional settings to control how fields are processed when using a configured Azure Cosmos DB resource. */ @@ -1888,16 +1689,10 @@ export interface AzureCosmosDBFieldMappingOptions { } export function azureCosmosDBFieldMappingOptionsSerializer( - item: AzureCosmosDBFieldMappingOptions, -): Record { - return { - title_field: item["titleField"], - url_field: item["urlField"], - filepath_field: item["filepathField"], - content_fields: item["contentFields"], - content_fields_separator: item["contentFieldsSeparator"], - vector_fields: item["vectorFields"], - }; + input: AzureCosmosDBFieldMappingOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -1916,12 +1711,10 @@ export interface ElasticsearchChatExtensionConfiguration } export function elasticsearchChatExtensionConfigurationSerializer( - item: ElasticsearchChatExtensionConfiguration, -): Record { - return { - type: item["type"], - parameters: elasticsearchChatExtensionParametersSerializer(item.parameters), - }; + input: ElasticsearchChatExtensionConfiguration, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** Parameters to use when configuring Elasticsearch® as an Azure OpenAI chat extension. The supported authentication types are KeyAndKeyId and EncodedAPIKey. */ @@ -1967,29 +1760,10 @@ export interface ElasticsearchChatExtensionParameters { } export function elasticsearchChatExtensionParametersSerializer( - item: ElasticsearchChatExtensionParameters, -): Record { - return { - authentication: !item.authentication - ? item.authentication - : onYourDataAuthenticationOptionsUnionSerializer(item.authentication), - top_n_documents: item["topNDocuments"], - in_scope: item["inScope"], - strictness: item["strictness"], - role_information: item["roleInformation"], - max_search_queries: item["maxSearchQueries"], - allow_partial_result: item["allowPartialResult"], - include_contexts: item["includeContexts"], - endpoint: item["endpoint"], - index_name: item["indexName"], - fields_mapping: !item.fieldsMapping - ? item.fieldsMapping - : elasticsearchIndexFieldMappingOptionsSerializer(item.fieldsMapping), - query_type: item["queryType"], - embedding_dependency: !item.embeddingDependency - ? item.embeddingDependency - : onYourDataVectorizationSourceUnionSerializer(item.embeddingDependency), - }; + input: ElasticsearchChatExtensionParameters, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** Optional settings to control how fields are processed when using a configured Elasticsearch® resource. */ @@ -2009,21 +1783,12 @@ export interface ElasticsearchIndexFieldMappingOptions { } export function elasticsearchIndexFieldMappingOptionsSerializer( - item: ElasticsearchIndexFieldMappingOptions, -): Record { - return { - title_field: item["titleField"], - url_field: item["urlField"], - filepath_field: item["filepathField"], - content_fields: item["contentFields"], - content_fields_separator: item["contentFieldsSeparator"], - vector_fields: item["vectorFields"], - }; + input: ElasticsearchIndexFieldMappingOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** The type of Elasticsearch® retrieval query that should be executed when using it as an Azure OpenAI chat extension. */ -export type ElasticsearchQueryType = "simple" | "vector"; - /** * A specific representation of configurable options for Pinecone when using it as an Azure OpenAI chat * extension. @@ -2040,12 +1805,10 @@ export interface PineconeChatExtensionConfiguration } export function pineconeChatExtensionConfigurationSerializer( - item: PineconeChatExtensionConfiguration, -): Record { - return { - type: item["type"], - parameters: pineconeChatExtensionParametersSerializer(item.parameters), - }; + input: PineconeChatExtensionConfiguration, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** Parameters for configuring Azure OpenAI Pinecone chat extensions. The supported authentication type is APIKey. */ @@ -2089,26 +1852,10 @@ export interface PineconeChatExtensionParameters { } export function pineconeChatExtensionParametersSerializer( - item: PineconeChatExtensionParameters, -): Record { - return { - authentication: !item.authentication - ? item.authentication - : onYourDataAuthenticationOptionsUnionSerializer(item.authentication), - top_n_documents: item["topNDocuments"], - in_scope: item["inScope"], - strictness: item["strictness"], - role_information: item["roleInformation"], - max_search_queries: item["maxSearchQueries"], - allow_partial_result: item["allowPartialResult"], - include_contexts: item["includeContexts"], - environment: item["environment"], - index_name: item["indexName"], - fields_mapping: pineconeFieldMappingOptionsSerializer(item.fieldsMapping), - embedding_dependency: onYourDataVectorizationSourceUnionSerializer( - item.embeddingDependency, - ), - }; + input: PineconeChatExtensionParameters, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** Optional settings to control how fields are processed when using a configured Pinecone resource. */ @@ -2126,112 +1873,10 @@ export interface PineconeFieldMappingOptions { } export function pineconeFieldMappingOptionsSerializer( - item: PineconeFieldMappingOptions, -): Record { - return { - title_field: item["titleField"], - url_field: item["urlField"], - filepath_field: item["filepathField"], - content_fields: item["contentFields"], - content_fields_separator: item["contentFieldsSeparator"], - }; -} - -/** - * A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat - * completions request that should use Azure OpenAI chat extensions to augment the response behavior. - * The use of this configuration is compatible only with Azure OpenAI. - */ -export type AzureChatExtensionType = - | "azure_search" - | "azure_ml_index" - | "azure_cosmos_db" - | "elasticsearch" - | "pinecone"; - -/** A representation of the available Azure OpenAI enhancement configurations. */ -export interface AzureChatEnhancementConfiguration { - /** A representation of the available options for the Azure OpenAI grounding enhancement. */ - grounding?: AzureChatGroundingEnhancementConfiguration; - /** A representation of the available options for the Azure OpenAI optical character recognition (OCR) enhancement. */ - ocr?: AzureChatOCREnhancementConfiguration; -} - -export function azureChatEnhancementConfigurationSerializer( - item: AzureChatEnhancementConfiguration, -): Record { - return { - grounding: !item.grounding - ? item.grounding - : azureChatGroundingEnhancementConfigurationSerializer(item.grounding), - ocr: !item.ocr - ? item.ocr - : azureChatOCREnhancementConfigurationSerializer(item.ocr), - }; -} - -/** A representation of the available options for the Azure OpenAI grounding enhancement. */ -export interface AzureChatGroundingEnhancementConfiguration { - /** Specifies whether the enhancement is enabled. */ - enabled: boolean; -} - -export function azureChatGroundingEnhancementConfigurationSerializer( - item: AzureChatGroundingEnhancementConfiguration, -): Record { - return { - enabled: item["enabled"], - }; -} - -/** A representation of the available options for the Azure OpenAI optical character recognition (OCR) enhancement. */ -export interface AzureChatOCREnhancementConfiguration { - /** Specifies whether the enhancement is enabled. */ - enabled: boolean; -} - -export function azureChatOCREnhancementConfigurationSerializer( - item: AzureChatOCREnhancementConfiguration, -): Record { - return { - enabled: item["enabled"], - }; -} - -/** - * An abstract representation of a response format configuration usable by Chat Completions. Can be used to enable JSON - * mode. - */ -export interface ChatCompletionsResponseFormat { - /** the discriminator possible values: text, json_object */ - type: string; -} - -export function chatCompletionsResponseFormatUnionSerializer( - item: ChatCompletionsResponseFormatUnion, -) { - switch (item.type) { - case "text": - return chatCompletionsTextResponseFormatSerializer( - item as ChatCompletionsTextResponseFormat, - ); - - case "json_object": - return chatCompletionsJsonResponseFormatSerializer( - item as ChatCompletionsJsonResponseFormat, - ); - - default: - return chatCompletionsResponseFormatSerializer(item); - } -} - -export function chatCompletionsResponseFormatSerializer( - item: ChatCompletionsResponseFormatUnion, -): Record { - return { - type: item["type"], - }; + input: PineconeFieldMappingOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -2245,11 +1890,10 @@ export interface ChatCompletionsTextResponseFormat } export function chatCompletionsTextResponseFormatSerializer( - item: ChatCompletionsTextResponseFormat, -): Record { - return { - type: item["type"], - }; + input: ChatCompletionsTextResponseFormat, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** A response format for Chat Completions that restricts responses to emitting valid JSON objects. */ @@ -2260,39 +1904,34 @@ export interface ChatCompletionsJsonResponseFormat } export function chatCompletionsJsonResponseFormatSerializer( - item: ChatCompletionsJsonResponseFormat, -): Record { - return { - type: item["type"], - }; + input: ChatCompletionsJsonResponseFormat, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** An abstract representation of a tool that can be used by the model to improve a chat completions response. */ export interface ChatCompletionsToolDefinition { - /** the discriminator possible values: function */ + /** The object type. */ type: string; } export function chatCompletionsToolDefinitionUnionSerializer( - item: ChatCompletionsToolDefinitionUnion, -) { - switch (item.type) { - case "function": - return chatCompletionsFunctionToolDefinitionSerializer( - item as ChatCompletionsFunctionToolDefinition, - ); - - default: - return chatCompletionsToolDefinitionSerializer(item); - } + input: ChatCompletionsToolDefinitionUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); } +export type ChatCompletionsToolDefinitionUnion = + | ChatCompletionsFunctionToolDefinition + | ChatCompletionsToolDefinition; + export function chatCompletionsToolDefinitionSerializer( - item: ChatCompletionsToolDefinitionUnion, -): Record { - return { - type: item["type"], - }; + input: ChatCompletionsToolDefinition, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** The definition information for a chat completions function tool that can call a function in response to a tool call. */ @@ -2305,43 +1944,34 @@ export interface ChatCompletionsFunctionToolDefinition } export function chatCompletionsFunctionToolDefinitionSerializer( - item: ChatCompletionsFunctionToolDefinition, -): Record { - return { - type: item["type"], - function: functionDefinitionSerializer(item.function), - }; + input: ChatCompletionsFunctionToolDefinition, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** Represents a generic policy for how a chat completions tool may be selected. */ -export type ChatCompletionsToolSelectionPreset = "auto" | "none"; - /** An abstract representation of an explicit, named tool selection to use for a chat completions request. */ export interface ChatCompletionsNamedToolSelection { - /** the discriminator possible values: function */ + /** The object type. */ type: string; } export function chatCompletionsNamedToolSelectionUnionSerializer( - item: ChatCompletionsNamedToolSelectionUnion, -) { - switch (item.type) { - case "function": - return chatCompletionsNamedFunctionToolSelectionSerializer( - item as ChatCompletionsNamedFunctionToolSelection, - ); - - default: - return chatCompletionsNamedToolSelectionSerializer(item); - } + input: ChatCompletionsNamedToolSelectionUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); } +export type ChatCompletionsNamedToolSelectionUnion = + | ChatCompletionsNamedFunctionToolSelection + | ChatCompletionsNamedToolSelection; + export function chatCompletionsNamedToolSelectionSerializer( - item: ChatCompletionsNamedToolSelectionUnion, -): Record { - return { - type: item["type"], - }; + input: ChatCompletionsNamedToolSelection, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** A tool selection of a specific, named function tool that will limit chat completions to using the named function. */ @@ -2354,12 +1984,10 @@ export interface ChatCompletionsNamedFunctionToolSelection } export function chatCompletionsNamedFunctionToolSelectionSerializer( - item: ChatCompletionsNamedFunctionToolSelection, -): Record { - return { - type: item["type"], - function: chatCompletionsFunctionToolSelectionSerializer(item.function), - }; + input: ChatCompletionsNamedFunctionToolSelection, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** A tool selection of a specific, named function tool that will limit chat completions to using the named function. */ @@ -2369,11 +1997,10 @@ export interface ChatCompletionsFunctionToolSelection { } export function chatCompletionsFunctionToolSelectionSerializer( - item: ChatCompletionsFunctionToolSelection, -): Record { - return { - name: item["name"], - }; + input: ChatCompletionsFunctionToolSelection, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** @@ -2411,6 +2038,11 @@ export interface ChatCompletions { usage: CompletionsUsage; } +export function chatCompletionsSerializer(input: ChatCompletions): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** * The representation of a single prompt completion as part of an overall chat completions request. * Generally, `n` choices are generated per provided prompt with a default value of 1. @@ -2446,6 +2078,11 @@ export interface ChatChoice { enhancements?: AzureChatEnhancements; } +export function chatChoiceSerializer(input: ChatChoice): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** A representation of a chat message as received in a response. */ export interface ChatResponseMessage { /** The chat role associated with the message. */ @@ -2469,6 +2106,13 @@ export interface ChatResponseMessage { context?: AzureChatExtensionsMessageContext; } +export function chatResponseMessageSerializer( + input: ChatResponseMessage, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** * A representation of the additional context information available when Azure OpenAI chat extensions are involved * in the generation of a corresponding chat completions response. This context information is only populated when @@ -2488,6 +2132,65 @@ export interface AzureChatExtensionsMessageContext { allRetrievedDocuments?: AzureChatExtensionRetrievedDocument[]; } +export function azureChatExtensionsMessageContextSerializer( + input: AzureChatExtensionsMessageContext, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** An abstract representation of structured information about why a chat completions response terminated. */ +export interface ChatFinishDetails { + /** The object type. */ + type: string; +} + +export function chatFinishDetailsUnionSerializer( + input: ChatFinishDetailsUnion, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +export type ChatFinishDetailsUnion = + | StopFinishDetails + | MaxTokensFinishDetails + | ChatFinishDetails; + +export function chatFinishDetailsSerializer(input: ChatFinishDetails): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** + * Represents the output results of Azure enhancements to chat completions, as configured via the matching input provided + * in the request. + */ +export interface AzureChatEnhancements { + /** The grounding enhancement that returns the bounding box of the objects detected in the image. */ + grounding?: AzureGroundingEnhancement; +} + +export function azureChatEnhancementsSerializer( + input: AzureChatEnhancements, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** The grounding enhancement that returns the bounding box of the objects detected in the image. */ +export interface AzureGroundingEnhancement { + /** The lines of text detected by the grounding enhancement. */ + lines: AzureGroundingEnhancementLine[]; +} + +export function azureGroundingEnhancementSerializer( + input: AzureGroundingEnhancement, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** * A single instance of additional context information available when Azure OpenAI chat extensions are involved * in the generation of a corresponding chat completions response. This context information is only populated when @@ -2506,6 +2209,13 @@ export interface AzureChatExtensionDataSourceResponseCitation { chunkId?: string; } +export function azureChatExtensionDataSourceResponseCitationSerializer( + input: AzureChatExtensionDataSourceResponseCitation, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** The retrieved document. */ export interface AzureChatExtensionRetrievedDocument { /** The content of the citation. */ @@ -2533,8 +2243,12 @@ export interface AzureChatExtensionRetrievedDocument { filterReason?: AzureChatExtensionRetrieveDocumentFilterReason; } -/** The reason for filtering the retrieved document. */ -export type AzureChatExtensionRetrieveDocumentFilterReason = "score" | "rerank"; +export function azureChatExtensionRetrievedDocumentSerializer( + input: AzureChatExtensionRetrievedDocument, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} /** Log probability information for a choice, as requested via 'logprobs' and 'top_logprobs'. */ export interface ChatChoiceLogProbabilityInfo { @@ -2542,6 +2256,13 @@ export interface ChatChoiceLogProbabilityInfo { content: ChatTokenLogProbabilityResult[] | null; } +export function chatChoiceLogProbabilityInfoSerializer( + input: ChatChoiceLogProbabilityInfo, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** A representation of the log probability information for a single content token, including a list of most likely tokens if 'top_logprobs' were requested. */ export interface ChatTokenLogProbabilityResult { /** The message content token. */ @@ -2554,6 +2275,13 @@ export interface ChatTokenLogProbabilityResult { topLogprobs: ChatTokenLogProbabilityInfo[] | null; } +export function chatTokenLogProbabilityResultSerializer( + input: ChatTokenLogProbabilityResult, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** A representation of the log probability information for a single message content token. */ export interface ChatTokenLogProbabilityInfo { /** The message content token. */ @@ -2564,10 +2292,11 @@ export interface ChatTokenLogProbabilityInfo { bytes: number[] | null; } -/** An abstract representation of structured information about why a chat completions response terminated. */ -export interface ChatFinishDetails { - /** the discriminator possible values: stop, max_tokens */ - type: string; +export function chatTokenLogProbabilityInfoSerializer( + input: ChatTokenLogProbabilityInfo, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** A structured representation of a stop reason that signifies natural termination by the model. */ @@ -2578,6 +2307,11 @@ export interface StopFinishDetails extends ChatFinishDetails { stop: string; } +export function stopFinishDetailsSerializer(input: StopFinishDetails): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** * A structured representation of a stop reason that signifies a token limit was reached before the model could naturally * complete. @@ -2587,19 +2321,11 @@ export interface MaxTokensFinishDetails extends ChatFinishDetails { type: "max_tokens"; } -/** - * Represents the output results of Azure enhancements to chat completions, as configured via the matching input provided - * in the request. - */ -export interface AzureChatEnhancements { - /** The grounding enhancement that returns the bounding box of the objects detected in the image. */ - grounding?: AzureGroundingEnhancement; -} - -/** The grounding enhancement that returns the bounding box of the objects detected in the image. */ -export interface AzureGroundingEnhancement { - /** The lines of text detected by the grounding enhancement. */ - lines: AzureGroundingEnhancementLine[]; +export function maxTokensFinishDetailsSerializer( + input: MaxTokensFinishDetails, +): unknown { + console.log(input); + throw new Error("Not implemented"); } /** A content line object consisting of an adjacent sequence of content elements, such as words and selection marks. */ @@ -2610,6 +2336,13 @@ export interface AzureGroundingEnhancementLine { spans: AzureGroundingEnhancementLineSpan[]; } +export function azureGroundingEnhancementLineSerializer( + input: AzureGroundingEnhancementLine, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** A span object that represents a detected object and its bounding box information. */ export interface AzureGroundingEnhancementLineSpan { /** The text content of the span that represents the detected object. */ @@ -2625,7 +2358,14 @@ export interface AzureGroundingEnhancementLineSpan { polygon: AzureGroundingEnhancementCoordinatePoint[]; } -/** A representation of a single polygon point as used by the Azure grounding enhancement. */ +export function azureGroundingEnhancementLineSpanSerializer( + input: AzureGroundingEnhancementLineSpan, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** A representation of a single polygon point as used by the Azure grounding enhancement. */ export interface AzureGroundingEnhancementCoordinatePoint { /** The x-coordinate (horizontal axis) of the point. */ x: number; @@ -2633,6 +2373,13 @@ export interface AzureGroundingEnhancementCoordinatePoint { y: number; } +export function azureGroundingEnhancementCoordinatePointSerializer( + input: AzureGroundingEnhancementCoordinatePoint, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Represents the request data used to generate images. */ export interface ImageGenerationOptions { /** @@ -2671,40 +2418,12 @@ export interface ImageGenerationOptions { } export function imageGenerationOptionsSerializer( - item: ImageGenerationOptions, -): Record { - return { - model: item["model"], - prompt: item["prompt"], - n: item["n"], - size: item["size"], - response_format: item["responseFormat"], - quality: item["quality"], - style: item["style"], - user: item["user"], - }; + input: ImageGenerationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** The desired size of generated images. */ -export type ImageSize = - | "256x256" - | "512x512" - | "1024x1024" - | "1792x1024" - | "1024x1792"; -/** The format in which the generated images are returned. */ -export type ImageGenerationResponseFormat = "url" | "b64_json"; -/** - * An image generation configuration that specifies how the model should prioritize quality, cost, and speed. - * Only configurable with dall-e-3 models. - */ -export type ImageGenerationQuality = "standard" | "hd"; -/** - * An image generation configuration that specifies how the model should incorporate realism and other visual characteristics. - * Only configurable with dall-e-3 models. - */ -export type ImageGenerationStyle = "natural" | "vivid"; - /** The result of a successful image generation operation. */ export interface ImageGenerations { /** @@ -2716,6 +2435,11 @@ export interface ImageGenerations { data: ImageGenerationData[]; } +export function imageGenerationsSerializer(input: ImageGenerations): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** * A representation of a single generated image, provided as either base64-encoded data or as a URL from which the image * may be retrieved. @@ -2743,6 +2467,13 @@ export interface ImageGenerationData { promptFilterResults?: ImageGenerationPromptFilterResults; } +export function imageGenerationDataSerializer( + input: ImageGenerationData, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Describes the content filtering result for the image generation request. */ export interface ImageGenerationContentFilterResults { /** @@ -2772,6 +2503,13 @@ export interface ImageGenerationContentFilterResults { selfHarm?: ContentFilterResult; } +export function imageGenerationContentFilterResultsSerializer( + input: ImageGenerationContentFilterResults, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Describes the content filtering results for the prompt of a image generation request. */ export interface ImageGenerationPromptFilterResults { /** @@ -2807,6 +2545,13 @@ export interface ImageGenerationPromptFilterResults { customBlocklists?: ContentFilterDetailedResults; } +export function imageGenerationPromptFilterResultsSerializer( + input: ImageGenerationPromptFilterResults, +): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** A representation of the request options that control the behavior of a text-to-speech operation. */ export interface SpeechGenerationOptions { /** The text to generate audio for. The maximum length is 4096 characters. */ @@ -2822,34 +2567,12 @@ export interface SpeechGenerationOptions { } export function speechGenerationOptionsSerializer( - item: SpeechGenerationOptions, -): Record { - return { - input: item["input"], - voice: item["voice"], - response_format: item["responseFormat"], - speed: item["speed"], - model: item["model"], - }; + input: SpeechGenerationOptions, +): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** The available voices for text-to-speech. */ -export type SpeechVoice = - | "alloy" - | "echo" - | "fable" - | "onyx" - | "nova" - | "shimmer"; -/** The supported audio output formats for text-to-speech. */ -export type SpeechGenerationResponseFormat = - | "mp3" - | "opus" - | "aac" - | "flac" - | "wav" - | "pcm"; - /** * The configuration information for an embeddings request. * Embeddings measure the relatedness of text strings and are commonly used for search, clustering, @@ -2883,22 +2606,11 @@ export interface EmbeddingsOptions { inputType?: string; } -export function embeddingsOptionsSerializer( - item: EmbeddingsOptions, -): Record { - return { - user: item["user"], - model: item["model"], - input: item["input"], - encoding_format: item["encodingFormat"], - dimensions: item["dimensions"], - input_type: item["inputType"], - }; +export function embeddingsOptionsSerializer(input: EmbeddingsOptions): unknown { + console.log(input); + throw new Error("Not implemented"); } -/** Represents the available formats for embeddings data on responses. */ -export type EmbeddingEncodingFormat = "float" | "base64"; - /** * Representation of the response data from an embeddings request. * Embeddings measure the relatedness of text strings and are commonly used for search, clustering, @@ -2911,6 +2623,24 @@ export interface Embeddings { usage: EmbeddingsUsage; } +export function embeddingsSerializer(input: Embeddings): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** Measurement of the amount of tokens used in this request and response. */ +export interface EmbeddingsUsage { + /** Number of tokens sent in the original request. */ + promptTokens: number; + /** Total number of tokens transacted in this request/response. */ + totalTokens: number; +} + +export function embeddingsUsageSerializer(input: EmbeddingsUsage): unknown { + console.log(input); + throw new Error("Not implemented"); +} + /** Representation of a single embeddings relatedness comparison. */ export interface EmbeddingItem { /** @@ -2922,87 +2652,528 @@ export interface EmbeddingItem { index: number; } -/** Measurement of the amount of tokens used in this request and response. */ -export interface EmbeddingsUsage { - /** Number of tokens sent in the original request. */ - promptTokens: number; - /** Total number of tokens transacted in this request/response. */ - totalTokens: number; +export function embeddingItemSerializer(input: EmbeddingItem): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** Defines available options for the underlying response format of output transcription information. */ +export enum AudioTranscriptionFormatKnownValues { + /** Use a response body that is a JSON object containing a single 'text' field for the transcription. */ + json = '"json"', + /** + * Use a response body that is a JSON object containing transcription text along with timing, segments, and other + * metadata. + */ + verbose_json = '"verbose_json"', + /** Use a response body that is plain text containing the raw, unannotated transcription. */ + text = '"text"', + /** Use a response body that is plain text in SubRip (SRT) format that also includes timing information. */ + srt = '"srt"', + /** Use a response body that is plain text in Web Video Text Tracks (VTT) format that also includes timing information. */ + vtt = '"vtt"', +} + +export type AudioTranscriptionFormat = + | "json" + | "verbose_json" + | "text" + | "srt" + | "vtt"; + +/** Defines the timestamp granularities that can be requested on a verbose transcription response. */ +export enum AudioTranscriptionTimestampGranularityKnownValues { + /** + * Indicates that responses should include timing information about each transcribed word. Note that generating word + * timestamp information will incur additional response latency. + */ + word = '"word"', + /** + * Indicates that responses should include timing and other information about each transcribed audio segment. Audio + * segment timestamp information does not incur any additional latency. + */ + segment = '"segment"', +} + +export type AudioTranscriptionTimestampGranularity = "word" | "segment"; + +/** Defines the possible descriptors for available audio operation responses. */ +export enum AudioTaskLabelKnownValues { + /** Accompanying response data resulted from an audio transcription task. */ + transcribe = '"transcribe"', + /** Accompanying response data resulted from an audio translation task. */ + translate = '"translate"', +} + +export type AudioTaskLabel = "transcribe" | "translate"; + +/** Defines available options for the underlying response format of output translation information. */ +export enum AudioTranslationFormatKnownValues { + /** Use a response body that is a JSON object containing a single 'text' field for the translation. */ + json = '"json"', + /** + * Use a response body that is a JSON object containing translation text along with timing, segments, and other + * metadata. + */ + verbose_json = '"verbose_json"', + /** Use a response body that is plain text containing the raw, unannotated translation. */ + text = '"text"', + /** Use a response body that is plain text in SubRip (SRT) format that also includes timing information. */ + srt = '"srt"', + /** Use a response body that is plain text in Web Video Text Tracks (VTT) format that also includes timing information. */ + vtt = '"vtt"', +} + +export type AudioTranslationFormat = + | "json" + | "verbose_json" + | "text" + | "srt" + | "vtt"; + +/** Ratings for the intensity and risk level of harmful content. */ +export enum ContentFilterSeverityKnownValues { + /** + * Content may be related to violence, self-harm, sexual, or hate categories but the terms + * are used in general, journalistic, scientific, medical, and similar professional contexts, + * which are appropriate for most audiences. + */ + safe = '"safe"', + /** + * Content that expresses prejudiced, judgmental, or opinionated views, includes offensive + * use of language, stereotyping, use cases exploring a fictional world (for example, gaming, + * literature) and depictions at low intensity. + */ + low = '"low"', + /** + * Content that uses offensive, insulting, mocking, intimidating, or demeaning language + * towards specific identity groups, includes depictions of seeking and executing harmful + * instructions, fantasies, glorification, promotion of harm at medium intensity. + */ + medium = '"medium"', + /** + * Content that displays explicit and severe harmful instructions, actions, + * damage, or abuse; includes endorsement, glorification, or promotion of severe + * harmful acts, extreme or illegal forms of harm, radicalization, or non-consensual + * power exchange or abuse. + */ + high = '"high"', +} + +export type ContentFilterSeverity = "safe" | "low" | "medium" | "high"; + +/** Representation of the manner in which a completions response concluded. */ +export enum CompletionsFinishReasonKnownValues { + /** Completions ended normally and reached its end of token generation. */ + stopped = '"stop"', + /** Completions exhausted available token limits before generation could complete. */ + tokenLimitReached = '"length"', + /** + * Completions generated a response that was identified as potentially sensitive per content + * moderation policies. + */ + contentFiltered = '"content_filter"', + /** Completion ended normally, with the model requesting a function to be called. */ + functionCall = '"function_call"', + /** Completion ended with the model calling a provided tool for output. */ + toolCalls = '"tool_calls"', +} + +export type CompletionsFinishReason = + | "stop" + | "length" + | "content_filter" + | "function_call" + | "tool_calls"; + +/** A description of the intended purpose of a message within a chat completions interaction. */ +export enum ChatRoleKnownValues { + /** The role that instructs or sets the behavior of the assistant. */ + system = '"system"', + /** The role that provides responses to system-instructed, user-prompted input. */ + assistant = '"assistant"', + /** The role that provides input for chat completions. */ + user = '"user"', + /** The role that provides function results for chat completions. */ + "function" = '"function"', + /** The role that represents extension tool activity within a chat completions operation. */ + tool = '"tool"', +} + +export type ChatRole = "system" | "assistant" | "user" | "function" | "tool"; + +/** A representation of the possible image detail levels for image-based chat completions message content. */ +export enum ChatMessageImageDetailLevelKnownValues { + /** Specifies that the model should determine which detail level to apply using heuristics like image size. */ + auto = '"auto"', + /** + * Specifies that image evaluation should be constrained to the 'low-res' model that may be faster and consume fewer + * tokens but may also be less accurate for highly detailed images. + */ + low = '"low"', + /** + * Specifies that image evaluation should enable the 'high-res' model that may be more accurate for highly detailed + * images but may also be slower and consume more tokens. + */ + high = '"high"', +} + +export type ChatMessageImageDetailLevel = "auto" | "low" | "high"; + +/** + * The collection of predefined behaviors for handling request-provided function information in a chat completions + * operation. + */ +export enum FunctionCallPresetKnownValues { + /** + * Specifies that the model may either use any of the functions provided in this chat completions request or + * instead return a standard chat completions response as if no functions were provided. + */ + auto = '"auto"', + /** + * Specifies that the model should not respond with a function call and should instead provide a standard chat + * completions response. Response content may still be influenced by the provided function information. + */ + none = '"none"', +} + +export type FunctionCallPreset = "auto" | "none"; + +/** + * A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat + * completions request that should use Azure OpenAI chat extensions to augment the response behavior. + * The use of this configuration is compatible only with Azure OpenAI. + */ +export enum AzureChatExtensionTypeKnownValues { + /** Represents the use of Azure AI Search as an Azure OpenAI chat extension. */ + azureSearch = '"azure_search"', + /** Represents the use of Azure Machine Learning index as an Azure OpenAI chat extension. */ + azureMachineLearningIndex = '"azure_ml_index"', + /** Represents the use of Azure Cosmos DB as an Azure OpenAI chat extension. */ + azureCosmosDB = '"azure_cosmos_db"', + /** Represents the use of Elasticsearch® index as an Azure OpenAI chat extension. */ + elasticsearch = '"elasticsearch"', + /** Represents the use of Pinecone index as an Azure OpenAI chat extension. */ + pinecone = '"pinecone"', +} + +export type AzureChatExtensionType = + | "azure_search" + | "azure_ml_index" + | "azure_cosmos_db" + | "elasticsearch" + | "pinecone"; + +/** The authentication types supported with Azure OpenAI On Your Data. */ +export enum OnYourDataAuthenticationTypeKnownValues { + /** Authentication via API key. */ + apiKey = '"api_key"', + /** Authentication via connection string. */ + connectionString = '"connection_string"', + /** Authentication via key and key ID pair. */ + keyAndKeyId = '"key_and_key_id"', + /** Authentication via encoded API key. */ + encodedApiKey = '"encoded_api_key"', + /** Authentication via access token. */ + accessToken = '"access_token"', + /** Authentication via system-assigned managed identity. */ + systemAssignedManagedIdentity = '"system_assigned_managed_identity"', + /** Authentication via user-assigned managed identity. */ + userAssignedManagedIdentity = '"user_assigned_managed_identity"', +} + +export type OnYourDataAuthenticationType = + | "api_key" + | "connection_string" + | "key_and_key_id" + | "encoded_api_key" + | "access_token" + | "system_assigned_managed_identity" + | "user_assigned_managed_identity"; + +/** The context property. */ +export enum OnYourDataContextPropertyKnownValues { + /** The `citations` property. */ + citations = '"citations"', + /** The `intent` property. */ + intent = '"intent"', + /** The `all_retrieved_documents` property. */ + allRetrievedDocuments = '"all_retrieved_documents"', +} + +export type OnYourDataContextProperty = + | "citations" + | "intent" + | "all_retrieved_documents"; + +/** The type of Azure Search retrieval query that should be executed when using it as an Azure OpenAI chat extension. */ +export enum AzureSearchQueryTypeKnownValues { + /** Represents the default, simple query parser. */ + simple = '"simple"', + /** Represents the semantic query parser for advanced semantic modeling. */ + semantic = '"semantic"', + /** Represents vector search over computed data. */ + vector = '"vector"', + /** Represents a combination of the simple query strategy with vector data. */ + vectorSimpleHybrid = '"vector_simple_hybrid"', + /** Represents a combination of semantic search and vector data querying. */ + vectorSemanticHybrid = '"vector_semantic_hybrid"', +} + +export type AzureSearchQueryType = + | "simple" + | "semantic" + | "vector" + | "vector_simple_hybrid" + | "vector_semantic_hybrid"; + +/** + * Represents the available sources Azure OpenAI On Your Data can use to configure vectorization of data for use with + * vector search. + */ +export enum OnYourDataVectorizationSourceTypeKnownValues { + /** Represents vectorization performed by public service calls to an Azure OpenAI embedding model. */ + endpoint = '"endpoint"', + /** + * Represents an Ada model deployment name to use. This model deployment must be in the same Azure OpenAI resource, but + * On Your Data will use this model deployment via an internal call rather than a public one, which enables vector + * search even in private networks. + */ + deploymentName = '"deployment_name"', + /** + * Represents a specific embedding model ID as defined in the search service. + * Currently only supported by Elasticsearch®. + */ + modelId = '"model_id"', +} + +export type OnYourDataVectorizationSourceType = + | "endpoint" + | "deployment_name" + | "model_id"; + +/** The authentication types supported with Azure OpenAI On Your Data vector search. */ +export enum OnYourDataVectorSearchAuthenticationTypeKnownValues { + /** Authentication via API key. */ + apiKey = '"api_key"', + /** Authentication via access token. */ + accessToken = '"access_token"', +} + +export type OnYourDataVectorSearchAuthenticationType = + | "api_key" + | "access_token"; + +/** The type of Elasticsearch® retrieval query that should be executed when using it as an Azure OpenAI chat extension. */ +export enum ElasticsearchQueryTypeKnownValues { + /** Represents the default, simple query parser. */ + simple = '"simple"', + /** Represents vector search over computed data. */ + vector = '"vector"', +} + +export type ElasticsearchQueryType = "simple" | "vector"; + +/** Represents a generic policy for how a chat completions tool may be selected. */ +export enum ChatCompletionsToolSelectionPresetKnownValues { + /** + * Specifies that the model may either use any of the tools provided in this chat completions request or + * instead return a standard chat completions response as if no tools were provided. + */ + auto = '"auto"', + /** + * Specifies that the model should not respond with a tool call and should instead provide a standard chat + * completions response. Response content may still be influenced by the provided tool definitions. + */ + none = '"none"', +} + +export type ChatCompletionsToolSelectionPreset = "auto" | "none"; + +/** The reason for filtering the retrieved document. */ +export enum AzureChatExtensionRetrieveDocumentFilterReasonKnownValues { + /** The document is filtered by original search score threshold defined by `strictness` configure. */ + score = '"score"', + /** The document is not filtered by original search score threshold, but is filtered by rerank score and `top_n_documents` configure. */ + rerank = '"rerank"', +} + +export type AzureChatExtensionRetrieveDocumentFilterReason = "score" | "rerank"; + +/** The desired size of generated images. */ +export enum ImageSizeKnownValues { + /** + * Very small image size of 256x256 pixels. + * Only supported with dall-e-2 models. + */ + size256x256 = '"256x256"', + /** + * A smaller image size of 512x512 pixels. + * Only supported with dall-e-2 models. + */ + size512x512 = '"512x512"', + /** + * A standard, square image size of 1024x1024 pixels. + * Supported by both dall-e-2 and dall-e-3 models. + */ + size1024x1024 = '"1024x1024"', + /** + * A wider image size of 1024x1792 pixels. + * Only supported with dall-e-3 models. + */ + size1792x1024 = '"1792x1024"', + /** + * A taller image size of 1792x1024 pixels. + * Only supported with dall-e-3 models. + */ + size1024x1792 = '"1024x1792"', +} + +export type ImageSize = + | "256x256" + | "512x512" + | "1024x1024" + | "1792x1024" + | "1024x1792"; + +/** The format in which the generated images are returned. */ +export enum ImageGenerationResponseFormatKnownValues { + /** Image generation response items should provide a URL from which the image may be retrieved. */ + url = '"url"', + /** Image generation response items should provide image data as a base64-encoded string. */ + base64 = '"b64_json"', +} + +export type ImageGenerationResponseFormat = "url" | "b64_json"; + +/** + * An image generation configuration that specifies how the model should prioritize quality, cost, and speed. + * Only configurable with dall-e-3 models. + */ +export enum ImageGenerationQualityKnownValues { + /** Requests image generation with standard, balanced characteristics of quality, cost, and speed. */ + standard = '"standard"', + /** Requests image generation with higher quality, higher cost and lower speed relative to standard. */ + hd = '"hd"', +} + +export type ImageGenerationQuality = "standard" | "hd"; + +/** + * An image generation configuration that specifies how the model should incorporate realism and other visual characteristics. + * Only configurable with dall-e-3 models. + */ +export enum ImageGenerationStyleKnownValues { + /** Requests image generation in a natural style with less preference for dramatic and hyper-realistic characteristics. */ + natural = '"natural"', + /** + * Requests image generation in a vivid style with a higher preference for dramatic and hyper-realistic + * characteristics. + */ + vivid = '"vivid"', +} + +export type ImageGenerationStyle = "natural" | "vivid"; + +/** The available voices for text-to-speech. */ +export enum SpeechVoiceKnownValues { + /** The Alloy voice. */ + alloy = '"alloy"', + /** The Echo voice. */ + echo = '"echo"', + /** The Fable voice. */ + fable = '"fable"', + /** The Onyx voice. */ + onyx = '"onyx"', + /** The Nova voice. */ + nova = '"nova"', + /** The Shimmer voice. */ + shimmer = '"shimmer"', +} + +export type SpeechVoice = + | "alloy" + | "echo" + | "fable" + | "onyx" + | "nova" + | "shimmer"; + +/** The supported audio output formats for text-to-speech. */ +export enum SpeechGenerationResponseFormatKnownValues { + /** Use MP3 as the audio output format. MP3 is the default, general-purpose format. */ + mp3 = '"mp3"', + /** Use Opus as the audio output format. Opus is optimized for internet streaming and low latency. */ + opus = '"opus"', + /** Use AAC as the audio output format. AAC is optimized for digital audio compression and is preferred by YouTube, Android, and iOS. */ + aac = '"aac"', + /** Use FLAC as the audio output format. FLAC is a fully lossless format optimized for maximum quality at the expense of size. */ + flac = '"flac"', + /** Use uncompressed WAV as the audio output format, suitable for low-latency applications to avoid decoding overhead. */ + wav = '"wav"', + /** Use uncompressed PCM as the audio output format, which is similar to WAV but contains raw samples in 24kHz (16-bit signed, low-endian), without the header. */ + pcm = '"pcm"', +} + +export type SpeechGenerationResponseFormat = + | "mp3" + | "opus" + | "aac" + | "flac" + | "wav" + | "pcm"; + +/** Represents the available formats for embeddings data on responses. */ +export enum EmbeddingEncodingFormatKnownValues { + /** Specifies that responses should provide arrays of floats for each embedding. */ + float = '"float"', + /** Specifies that responses should provide a base64-encoded string for each embedding. */ + base64 = '"base64"', +} + +export type EmbeddingEncodingFormat = "float" | "base64"; + +export enum ServiceApiVersionsKnownValues { + v2022_12_01 = '"2022-12-01"', + v2023_05_15 = '"2023-05-15"', + v2024_02_01 = '"2024-02-01"', + v2024_06_01 = '"2024-06-01"', } -/** Type of ServiceApiVersions */ export type ServiceApiVersions = | "2022-12-01" | "2023-05-15" - | "2023-06-01-preview" - | "2023-07-01-preview" | "2024-02-01" - | "2024-02-15-preview" - | "2024-03-01-preview" - | "2024-04-01-preview" - | "2024-05-01-preview" | "2024-06-01"; -/** Alias for ChatRequestMessageUnion */ -export type ChatRequestMessageUnion = - | ChatRequestSystemMessage - | ChatRequestUserMessage - | ChatRequestAssistantMessage - | ChatRequestToolMessage - | ChatRequestFunctionMessage - | ChatRequestMessage; -/** Alias for ChatMessageContentItemUnion */ -export type ChatMessageContentItemUnion = - | ChatMessageTextContentItem - | ChatMessageImageContentItem - | ChatMessageContentItem; -/** Alias for ChatCompletionsToolCallUnion */ -export type ChatCompletionsToolCallUnion = - | ChatCompletionsFunctionToolCall - | ChatCompletionsToolCall; -/** Alias for AzureChatExtensionConfigurationUnion */ -export type AzureChatExtensionConfigurationUnion = - | AzureSearchChatExtensionConfiguration - | AzureMachineLearningIndexChatExtensionConfiguration - | AzureCosmosDBChatExtensionConfiguration - | ElasticsearchChatExtensionConfiguration - | PineconeChatExtensionConfiguration - | AzureChatExtensionConfiguration; -/** Alias for OnYourDataAuthenticationOptionsUnion */ -export type OnYourDataAuthenticationOptionsUnion = - | OnYourDataApiKeyAuthenticationOptions - | OnYourDataConnectionStringAuthenticationOptions - | OnYourDataKeyAndKeyIdAuthenticationOptions - | OnYourDataEncodedApiKeyAuthenticationOptions - | OnYourDataAccessTokenAuthenticationOptions - | OnYourDataSystemAssignedManagedIdentityAuthenticationOptions - | OnYourDataUserAssignedManagedIdentityAuthenticationOptions - | OnYourDataAuthenticationOptions; -/** Alias for OnYourDataVectorizationSourceUnion */ -export type OnYourDataVectorizationSourceUnion = - | OnYourDataEndpointVectorizationSource - | OnYourDataDeploymentNameVectorizationSource - | OnYourDataModelIdVectorizationSource - | OnYourDataVectorizationSource; -/** Alias for OnYourDataVectorSearchAuthenticationOptionsUnion */ -export type OnYourDataVectorSearchAuthenticationOptionsUnion = - | OnYourDataVectorSearchApiKeyAuthenticationOptions - | OnYourDataVectorSearchAccessTokenAuthenticationOptions - | OnYourDataVectorSearchAuthenticationOptions; -/** Alias for ChatCompletionsResponseFormatUnion */ -export type ChatCompletionsResponseFormatUnion = - | ChatCompletionsTextResponseFormat - | ChatCompletionsJsonResponseFormat - | ChatCompletionsResponseFormat; -/** Alias for ChatCompletionsToolDefinitionUnion */ -export type ChatCompletionsToolDefinitionUnion = - | ChatCompletionsFunctionToolDefinition - | ChatCompletionsToolDefinition; -/** Alias for ChatCompletionsNamedToolSelectionUnion */ -export type ChatCompletionsNamedToolSelectionUnion = - | ChatCompletionsNamedFunctionToolSelection - | ChatCompletionsNamedToolSelection; -/** Alias for ChatFinishDetailsUnion */ -export type ChatFinishDetailsUnion = - | StopFinishDetails - | MaxTokensFinishDetails - | ChatFinishDetails; + +/** Initialization class for the client */ +export interface OpenAIClientOptions { + /** Service host */ + endpoint: string | string; + /** Credential used to authenticate requests to the service. */ + credential: KeyCredential | TokenCredential; + /** The API version to use for this operation. */ + apiVersion: string; +} + +export function openAIClientOptionsSerializer(input: { + endpoint: string | string; + credential: KeyCredential | TokenCredential; + apiVersion: string; +}): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** A response containing error details. */ +export interface ErrorResponse { + /** The error object. */ + error: ErrorModel; + /** String error code indicating what went wrong. */ + errorCode?: string; +} + +export function errorResponseSerializer(input: ErrorResponse): unknown { + console.log(input); + throw new Error("Not implemented"); +} diff --git a/packages/typespec-ts/src/framework/dependency.ts b/packages/typespec-ts/src/framework/dependency.ts index b25a6f2a55..ed3832e148 100644 --- a/packages/typespec-ts/src/framework/dependency.ts +++ b/packages/typespec-ts/src/framework/dependency.ts @@ -51,6 +51,21 @@ export interface CoreDependencies extends Record { name: "uint8ArrayToString"; module: string; }; + KeyCredential: { + kind: "externalDependency"; + name: "KeyCredential"; + module: string; + }; + TokenCredential: { + kind: "externalDependency"; + name: "TokenCredential"; + module: string; + }; + ErrorModel: { + kind: "externalDependency"; + name: "ErrorModel"; + module: string; + }; } export type CoreDependency = keyof CoreDependencies; diff --git a/packages/typespec-ts/src/framework/hooks/binder.ts b/packages/typespec-ts/src/framework/hooks/binder.ts index 94dc1961a2..53512259ff 100644 --- a/packages/typespec-ts/src/framework/hooks/binder.ts +++ b/packages/typespec-ts/src/framework/hooks/binder.ts @@ -43,7 +43,7 @@ export interface Binder { resolveAllReferences(): void; } -const PLACEHOLDER_PREFIX = "_PLACEHOLDER_"; +const PLACEHOLDER_PREFIX = "__PLACEHOLDER_"; class BinderImp implements Binder { private declarations = new Map(); @@ -157,7 +157,7 @@ class BinderImp implements Binder { * @returns The serialized placeholder string. */ private serializePlaceholder(refkey: unknown): string { - return `${PLACEHOLDER_PREFIX}${String(refkey)}_`; + return `${PLACEHOLDER_PREFIX}${String(refkey)}__`; } /** diff --git a/packages/typespec-ts/src/framework/refkey.ts b/packages/typespec-ts/src/framework/refkey.ts index 57f766b50c..76558d1b8b 100644 --- a/packages/typespec-ts/src/framework/refkey.ts +++ b/packages/typespec-ts/src/framework/refkey.ts @@ -24,5 +24,5 @@ function getKey(value: unknown): RefKey { } export function refkey(...args: unknown[]) { - return args.map((v) => getKey(v)).join("\u2063"); + return args.map((v) => getKey(v)).join("_"); } diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index ec1554051a..d3b721f690 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -50,7 +50,7 @@ import { } from "./modular/buildRootIndex.js"; import { buildSerializeUtils } from "./modular/buildSerializeUtils.js"; import { buildSubpathIndexFile } from "./modular/buildSubpathIndex.js"; -import { buildModels, buildModelsOptions } from "./modular/emitModels.js"; +import { buildModelsOptions } from "./modular/emitModels.js"; import { ModularCodeModel } from "./modular/modularCodeModel.js"; import { transformRLCModel } from "./transform/transform.js"; import { transformRLCOptions } from "./transform/transfromRLCOptions.js"; @@ -73,6 +73,7 @@ import { } from "./modular/external-dependencies.js"; import { emitLoggerFile } from "./modular/emitLoggerFile.js"; import { buildRestorePoller } from "./modular/buildRestorePoller.js"; +import { emitTypes } from "./modular/emit-models.js"; export * from "./lib.js"; @@ -248,8 +249,8 @@ export async function $onEmit(context: EmitContext) { const isMultiClients = modularCodeModel.clients.length > 1; + emitTypes(dpgContext.sdkPackage, { sourceRoot: modularSourcesRoot }); for (const subClient of modularCodeModel.clients) { - buildModels(subClient, modularCodeModel); buildModelsOptions(subClient, modularCodeModel); if (!env["EXPERIMENTAL_TYPESPEC_TS_SERIALIZATION"]) buildSerializeUtils(modularCodeModel); diff --git a/packages/typespec-ts/src/modular/buildClassicalOperationGroups.ts b/packages/typespec-ts/src/modular/buildClassicalOperationGroups.ts index 4f56ddd447..921fc68f9d 100644 --- a/packages/typespec-ts/src/modular/buildClassicalOperationGroups.ts +++ b/packages/typespec-ts/src/modular/buildClassicalOperationGroups.ts @@ -1,6 +1,5 @@ import { NameType } from "@azure-tools/rlc-common"; import { SourceFile } from "ts-morph"; -import { importModels } from "./buildOperations.js"; import { getClassicalOperation } from "./helpers/classicalOperationHelpers.js"; import { getClassicalLayerPrefix } from "./helpers/namingHelpers.js"; import { @@ -44,15 +43,6 @@ export function buildClassicOperationFiles( ); getClassicalOperation(dpgContext, client, classicFile, operationGroup); - // Import models used from ./models.ts - // We SHOULD keep this because otherwise ts-morph will "helpfully" try to import models from the rest layer when we call fixMissingImports(). - importModels( - srcPath, - classicFile, - codeModel.project, - subfolder, - operationGroup.namespaceHierarchies.length - ); importApis(classicFile, client, codeModel, operationGroup); // We need to import the paging helpers and types explicitly because ts-morph may not be able to find them. classicOperationFiles.set(classicOperationFileName, classicFile); @@ -93,10 +83,6 @@ export function buildClassicOperationFiles( operationGroup, layer ); - - // Import models used from ./models.ts - // We SHOULD keep this because otherwise ts-morph will "helpfully" try to import models from the rest layer when we call fixMissingImports(). - importModels(srcPath, classicFile, codeModel.project, subfolder, layer); importApis(classicFile, client, codeModel, operationGroup, layer); classicOperationFiles.set(classicOperationFileName, classicFile); } diff --git a/packages/typespec-ts/src/modular/buildClientContext.ts b/packages/typespec-ts/src/modular/buildClientContext.ts index eba4dbcf8a..c5fa486498 100644 --- a/packages/typespec-ts/src/modular/buildClientContext.ts +++ b/packages/typespec-ts/src/modular/buildClientContext.ts @@ -5,7 +5,6 @@ import { } from "@azure-tools/rlc-common"; import { SourceFile } from "ts-morph"; import { SdkContext } from "../utils/interfaces.js"; -import { importModels } from "./buildOperations.js"; import { buildGetClientCredentialParam, buildGetClientEndpointParam, @@ -37,7 +36,6 @@ export function buildClientContext( ); importCredential(codeModel.runtimeImports, clientContextFile); - importModels(srcPath, clientContextFile, codeModel.project, subfolder); clientContextFile.addImportDeclaration({ moduleSpecifier: getImportSpecifier("restClient", codeModel.runtimeImports), namedImports: ["ClientOptions", "Client", "getClient"] diff --git a/packages/typespec-ts/src/modular/buildOperations.ts b/packages/typespec-ts/src/modular/buildOperations.ts index 21b8e03b41..5d425ebb75 100644 --- a/packages/typespec-ts/src/modular/buildOperations.ts +++ b/packages/typespec-ts/src/modular/buildOperations.ts @@ -58,16 +58,6 @@ export function buildOperationFiles( }api/${operationFileName}.ts` ); - // Import models used from ./models.ts - // We SHOULD keep this because otherwise ts-morph will "helpfully" try to import models from the rest layer when we call fixMissingImports(). - importModels( - srcPath, - operationGroupFile, - codeModel.project, - subfolder, - operationGroup.namespaceHierarchies.length - ); - // Import the deserializeUtils importDeserializeUtils( srcPath, @@ -135,42 +125,6 @@ export function buildOperationFiles( return operationFiles; } -export function importModels( - srcPath: string, - sourceFile: SourceFile, - project: Project, - subfolder: string = "", - importLayer: number = 0 -) { - const hasModelsImport = sourceFile.getImportDeclarations().some((i) => { - return i.getModuleSpecifierValue().endsWith(`models/models.js`); - }); - const modelsFile = project.getSourceFile( - `${srcPath}/${ - subfolder && subfolder !== "" ? subfolder + "/" : "" - }models/models.ts` - ); - const models: string[] = []; - - for (const [name] of modelsFile?.getExportedDeclarations().entries() ?? []) { - if (name.startsWith("_")) { - continue; - } - models.push(name); - } - - if (models.length > 0 && !hasModelsImport) { - sourceFile.addImportDeclaration({ - moduleSpecifier: `${"../".repeat(importLayer + 1)}models/models.js`, - namedImports: models - }); - } - - // Import all models and then let ts-morph clean up the unused ones - // we can't fixUnusedIdentifiers here because the operaiton files are still being generated. - // sourceFile.fixUnusedIdentifiers(); -} - export function importDeserializeUtils( srcPath: string, sourceFile: SourceFile, diff --git a/packages/typespec-ts/src/modular/emit-models.ts b/packages/typespec-ts/src/modular/emit-models.ts new file mode 100644 index 0000000000..5fd3250bdf --- /dev/null +++ b/packages/typespec-ts/src/modular/emit-models.ts @@ -0,0 +1,365 @@ +import { + SdkClientType, + SdkEnumType, + SdkEnumValueType, + SdkHttpOperation, + SdkHttpPackage, + SdkMethod, + SdkModelPropertyType, + SdkModelType, + SdkType, + SdkUnionType +} from "@azure-tools/typespec-client-generator-core"; +import { + EnumDeclarationStructure, + EnumMemberStructure, + FunctionDeclarationStructure, + InterfaceDeclarationStructure, + PropertySignatureStructure, + StructureKind, + TypeAliasDeclarationStructure +} from "ts-morph"; +import { getTypeExpression } from "./type-expressions/get-type-expression.js"; +import { useContext } from "../contextManager.js"; +import { addDeclaration } from "../framework/declaration.js"; +import { refkey } from "../framework/refkey.js"; +import path from "path"; +import { NameType, normalizeName } from "@azure-tools/rlc-common"; +import { + getExternalModel, + getModelExpression +} from "./type-expressions/get-model-expression.js"; + +export function emitTypes( + sdkPackage: SdkHttpPackage, + { sourceRoot }: { sourceRoot: string } +) { + const emitQueue: Set = new Set(); + const outputProject = useContext("outputProject"); + + const modelsFilePath = getModelsPath(sourceRoot); + let sourceFile = outputProject.getSourceFile(modelsFilePath); + + if (!sourceFile) { + sourceFile = outputProject.createSourceFile(modelsFilePath, "", { + overwrite: true + }); + } + + visitPackageTypes(sdkPackage, emitQueue); + + for (const type of emitQueue) { + switch (type.kind) { + case "model": + const modelInterface = buildModelInterface(type); + addDeclaration(sourceFile, modelInterface, type); + const modelPolymorphicType = buildModelPolymorphicType(type); + if (modelPolymorphicType) { + const polymorphicSerializer = buildModelPolymorphicSerializer(type); + if (polymorphicSerializer) { + addDeclaration( + sourceFile, + polymorphicSerializer, + refkey(type, "serializer") + ); + } + + addDeclaration( + sourceFile, + modelPolymorphicType, + refkey(type, "polymorphicType") + ); + } + const serializerFunction = buildSerializerFunction(type); + addDeclaration( + sourceFile, + serializerFunction, + refkey(type, "serializer") + ); + break; + case "enum": + const [enumType, knownValuesEnum] = buildEnumTypes(type); + addDeclaration( + sourceFile, + knownValuesEnum, + refkey(type, "knownValues") + ); + addDeclaration(sourceFile, enumType, type); + break; + case "union": + const unionType = buildUnionType(type); + addDeclaration(sourceFile, unionType, type); + break; + } + } +} + +export function getModelsPath(sourceRoot: string): string { + return path.join(...[sourceRoot, "models", `models.ts`]); +} + +function buildUnionType(type: SdkUnionType): TypeAliasDeclarationStructure { + const unionDeclaration: TypeAliasDeclarationStructure = { + kind: StructureKind.TypeAlias, + name: normalizeName(type.name, NameType.Interface), + isExported: true, + type: type.values.map((v) => getTypeExpression(v)).join(" | ") + }; + + if (type.description) { + unionDeclaration.docs = [type.description]; + } + + return unionDeclaration; +} + +function buildEnumTypes( + type: SdkEnumType +): [TypeAliasDeclarationStructure, EnumDeclarationStructure] { + const enumDeclaration: EnumDeclarationStructure = { + kind: StructureKind.Enum, + name: `${normalizeName(type.name, NameType.Interface)}KnownValues`, + isExported: true, + members: type.values.map(emitEnumMember) + }; + + const enumAsUnion: TypeAliasDeclarationStructure = { + kind: StructureKind.TypeAlias, + name: normalizeName(type.name, NameType.Interface), + isExported: true, + type: type.values.map((v) => getTypeExpression(v)).join(" | ") + }; + + if (type.description) { + enumDeclaration.docs = [type.description]; + } + + return [enumAsUnion, enumDeclaration]; +} + +function emitEnumMember(member: SdkEnumValueType): EnumMemberStructure { + const memberStructure: EnumMemberStructure = { + kind: StructureKind.EnumMember, + name: member.name, + value: getTypeExpression(member) + }; + + if (member.description) { + memberStructure.docs = [member.description]; + } + + return memberStructure; +} + +function buildModelInterface( + type: SdkModelType +): InterfaceDeclarationStructure { + const interfaceStructure: InterfaceDeclarationStructure = { + kind: StructureKind.Interface, + name: normalizeName(type.name, NameType.Interface), + isExported: true, + properties: type.properties.map(buildModelProperty) + }; + + if (type.baseModel) { + const partentReference = getModelExpression(type.baseModel, { + skipPolymorphicUnion: true + }); + interfaceStructure.extends = [partentReference]; + } + + if (type.description) { + interfaceStructure.docs = [type.description]; + } + + return interfaceStructure; +} + +function buildModelPolymorphicType(type: SdkModelType) { + if (!type.discriminatedSubtypes) { + return undefined; + } + + const discriminatedSubtypes = Object.values(type.discriminatedSubtypes); + + const typeDeclaration: TypeAliasDeclarationStructure = { + kind: StructureKind.TypeAlias, + name: `${normalizeName(type.name, NameType.Interface)}Union`, + isExported: true, + type: discriminatedSubtypes.map((t) => getTypeExpression(t)).join(" | ") + }; + + typeDeclaration.type += ` | ${getModelExpression(type, { + skipPolymorphicUnion: true + })}`; + return typeDeclaration; +} + +function buildModelProperty( + property: SdkModelPropertyType +): PropertySignatureStructure { + const propertyStructure: PropertySignatureStructure = { + kind: StructureKind.PropertySignature, + name: normalizeName(property.name, NameType.Property), + type: getTypeExpression(property.type) + }; + + if (property.description) { + propertyStructure.docs = [property.description]; + } + + if (property.optional) { + propertyStructure.hasQuestionToken = true; + } + + return propertyStructure; +} + +function visitPackageTypes( + sdkPackage: SdkHttpPackage, + emitQueue: Set +) { + // Add all models in the package to the emit queue + for (const model of sdkPackage.models) { + visitType(model, emitQueue); + } + + // Add all enums to the queue + for (const enumType of sdkPackage.enums) { + emitQueue.add(enumType); + } + + // Visit the clients to discover all models + for (const client of sdkPackage.clients) { + visitClient(client, emitQueue); + } +} + +function visitClient( + client: SdkClientType, + emitQueue: Set +) { + visitType(client.initialization, emitQueue); + client.methods.forEach((method) => visitClientMethod(method, emitQueue)); +} + +function visitClientMethod( + method: SdkMethod, + emitQueue: Set +) { + switch (method.kind) { + case "lro": + case "paging": + case "lropaging": + case "basic": + // Visit the response + visitType(method.response.type, emitQueue); + // Visit the error response + visitType(method.exception?.type, emitQueue); + // Visit the parameters + method.parameters.forEach((parameter) => { + visitType(parameter.type, emitQueue); + }); + + visitOperation(method.operation, emitQueue); + break; + case "clientaccessor": + method.response.methods.forEach((responseMethod) => + visitClientMethod(responseMethod, emitQueue) + ); + method.parameters.forEach((parameter) => + visitType(parameter.type, emitQueue) + ); + break; + default: + throw new Error(`Unknown sdk method kind: ${(method as any).kind}`); + } +} + +function visitOperation( + operation: SdkHttpOperation, + emitQueue: Set +) { + // Visit the request + visitType(operation.bodyParam?.type, emitQueue); + // Visit the response + operation.exceptions.forEach((exception) => + visitType(exception.type, emitQueue) + ); + + operation.parameters.forEach((parameter) => + visitType(parameter.type, emitQueue) + ); + + operation.responses.forEach((response) => + visitType(response.type, emitQueue) + ); +} + +function visitType( + type: SdkType | undefined, + emitQueue: Set +) { + if (!type) { + return; + } + + if (emitQueue.has(type as any)) { + return; + } + + if (type.kind === "model") { + const externalModel = getExternalModel(type); + if (externalModel) { + return; + } + emitQueue.add(type); + for (const property of type.properties) { + if (!emitQueue.has(property.type as any)) { + visitType(property.type, emitQueue); + } + } + } +} + +function buildSerializerFunction( + type: SdkModelType +): FunctionDeclarationStructure { + const serializerFunction: FunctionDeclarationStructure = { + kind: StructureKind.Function, + name: `${normalizeName(type.name, NameType.Method)}Serializer`, + isExported: true, + parameters: [ + { + name: "input", + type: getModelExpression(type, { skipPolymorphicUnion: true }) + } + ], + returnType: "unknown", + statements: [`console.log(input)`, `throw new Error("Not implemented")`] + }; + + return serializerFunction; +} + +function buildModelPolymorphicSerializer(type: SdkModelType) { + if (!type.discriminatedSubtypes) { + return undefined; + } + + const serializerFunction: FunctionDeclarationStructure = { + kind: StructureKind.Function, + name: `${normalizeName(type.name, NameType.Method)}UnionSerializer`, + isExported: true, + parameters: [ + { + name: "input", + type: getModelExpression(type) + } + ], + returnType: "unknown", + statements: [`console.log(input)`, `throw new Error("Not implemented")`] + }; + + return serializerFunction; +} diff --git a/packages/typespec-ts/src/modular/external-dependencies.ts b/packages/typespec-ts/src/modular/external-dependencies.ts index 53013eb0d8..f3cc9e123b 100644 --- a/packages/typespec-ts/src/modular/external-dependencies.ts +++ b/packages/typespec-ts/src/modular/external-dependencies.ts @@ -55,6 +55,21 @@ export const DefaultCoreDependencies: CoreDependencies = { kind: "externalDependency", name: "uint8ArrayToString", module: "@typespec/ts-http-runtime" + }, + KeyCredential: { + kind: "externalDependency", + name: "KeyCredential", + module: "@typespec/ts-http-runtime" + }, + TokenCredential: { + kind: "externalDependency", + name: "TokenCredential", + module: "@typespec/ts-http-runtime" + }, + ErrorModel: { + kind: "externalDependency", + name: "ErrorModel", + module: "@typespec/ts-http-runtime" } } as const; @@ -136,5 +151,20 @@ export const AzureCoreDependencies: CoreDependencies = { kind: "externalDependency", module: "@azure/core-util", name: "uint8ArrayToString" + }, + KeyCredential: { + kind: "externalDependency", + name: "KeyCredential", + module: "@azure/core-auth" + }, + TokenCredential: { + kind: "externalDependency", + name: "TokenCredential", + module: "@azure/core-auth" + }, + ErrorModel: { + kind: "externalDependency", + name: "ErrorModel", + module: "@azure-rest/core-client" } }; diff --git a/packages/typespec-ts/src/modular/helpers/operationHelpers.ts b/packages/typespec-ts/src/modular/helpers/operationHelpers.ts index 1c0e5f9dac..5936bf05b8 100644 --- a/packages/typespec-ts/src/modular/helpers/operationHelpers.ts +++ b/packages/typespec-ts/src/modular/helpers/operationHelpers.ts @@ -45,6 +45,8 @@ import { buildType, isTypeNullable } from "./typeHelpers.js"; import { resolveReference } from "../../framework/reference.js"; import { PagingHelpers, PollingHelpers } from "../static-helpers-metadata.js"; import { AzurePollingDependencies } from "../external-dependencies.js"; +import { useSdkTypes } from "../../framework/hooks/sdkTypes.js"; +import { refkey } from "../../framework/refkey.js"; export function getSendPrivateFunction( dpgContext: SdkContext, @@ -1277,6 +1279,7 @@ export function serializeRequestValue( typeStack: Type[] = [], format?: string ): string { + const getSdkType = useSdkTypes(); const requiredPrefix = required === false ? `${clientValue} === undefined` : ""; const nullablePrefix = isTypeNullable(type) ? `${clientValue} === null` : ""; @@ -1323,10 +1326,11 @@ export function serializeRequestValue( return `${prefix}.map(p => { return ${elementNullOrUndefinedPrefix}{${propertiesStr}}})`; } else { + const sdkModel = getSdkType(type.elementType.__raw!); + const serializerRefkey = refkey(sdkModel, "serializer"); + const serializerReference = resolveReference(serializerRefkey); // When it is not anonymous we can hand it off to the serializer function - return `${prefix}.map(${toCamelCase( - type.elementType.name + "Serializer" - )})`; + return `${prefix}.map(${serializerReference})`; } } else if ( needsDeserialize(type.elementType) && @@ -1375,9 +1379,9 @@ export function serializeRequestValue( if (isNormalUnion(type)) { return `${clientValue}`; } else if (isSpecialHandledUnion(type)) { - const serializeFunctionName = type.name - ? `${toCamelCase(type.name)}Serializer` - : getDeserializeFunctionName(type, "serialize"); + const sdkType = getSdkType(type.__raw!); + const serializerRefkey = refkey(sdkType, "serializer"); + const serializeFunctionName = resolveReference(serializerRefkey); return `${serializeFunctionName}(${clientValue})`; } else { return `${clientValue} as any`; diff --git a/packages/typespec-ts/src/modular/type-expressions/get-credential-expression.ts b/packages/typespec-ts/src/modular/type-expressions/get-credential-expression.ts new file mode 100644 index 0000000000..a8037dd831 --- /dev/null +++ b/packages/typespec-ts/src/modular/type-expressions/get-credential-expression.ts @@ -0,0 +1,18 @@ +import { SdkCredentialType } from "@azure-tools/typespec-client-generator-core"; +import { resolveReference } from "../../framework/reference.js"; +import { useDependencies } from "../../framework/hooks/useDependencies.js"; + +export function getCredentialExpression(type: SdkCredentialType): string { + const dependencies = useDependencies(); + switch (type.scheme.type) { + case "apiKey": + case "http": + return resolveReference(dependencies.KeyCredential); + case "oauth2": + case "openIdConnect": + return resolveReference(dependencies.TokenCredential); + default: + // TODO: Add diagnostics about unknown credential type + return "any"; + } +} diff --git a/packages/typespec-ts/src/modular/type-expressions/get-enum-expression.ts b/packages/typespec-ts/src/modular/type-expressions/get-enum-expression.ts new file mode 100644 index 0000000000..b1dc1402a9 --- /dev/null +++ b/packages/typespec-ts/src/modular/type-expressions/get-enum-expression.ts @@ -0,0 +1,17 @@ +import { SdkEnumType } from "@azure-tools/typespec-client-generator-core"; +import { resolveReference } from "../../framework/reference.js"; +import { getTypeExpression, EmitTypeOptions } from "./get-type-expression.js"; +import { shouldEmitInline } from "./utils.js"; + +export function getEnumExpression( + type: SdkEnumType, + options: EmitTypeOptions = {} +): string { + if (shouldEmitInline(type, options)) { + return `(${type.values + .map((v) => `${getTypeExpression(v, options)}`) + .join(" | ")})`; + } else { + return resolveReference(type); + } +} diff --git a/packages/typespec-ts/src/modular/type-expressions/get-model-expression.ts b/packages/typespec-ts/src/modular/type-expressions/get-model-expression.ts new file mode 100644 index 0000000000..daaeea634f --- /dev/null +++ b/packages/typespec-ts/src/modular/type-expressions/get-model-expression.ts @@ -0,0 +1,49 @@ +import { SdkModelType } from "@azure-tools/typespec-client-generator-core"; +import { resolveReference } from "../../framework/reference.js"; +import { getTypeExpression, EmitTypeOptions } from "./get-type-expression.js"; +import { shouldEmitInline } from "./utils.js"; +import { refkey } from "../../framework/refkey.js"; +import { useContext } from "../../contextManager.js"; + +export interface ModelExpressionOptions extends EmitTypeOptions { + skipPolymorphicUnion?: boolean; +} + +export function getModelExpression( + type: SdkModelType, + options: ModelExpressionOptions = {} +): string { + const externalModel = getExternalModel(type); + if (externalModel) { + return resolveReference(externalModel); + } + + if (shouldEmitInline(type, options)) { + return `{ + ${type.properties + .map((p) => `"${p.name}": ${getTypeExpression(p.type, options)}`) + .join(",\n")} + }`; + } else { + if (!options.skipPolymorphicUnion && type.discriminatedSubtypes) { + return resolveReference(refkey(type, "polymorphicType")); + } else { + return resolveReference(type); + } + } +} + +const externalModels: Record = { + "Azure.Core.Foundations.Error": "ErrorModel" +}; + +export function getExternalModel(type: SdkModelType) { + const commonName = externalModels[type.crossLanguageDefinitionId]; + + if (!commonName) { + return undefined; + } + + const externalDependencies = useContext("dependencies"); + return externalDependencies[commonName]; +} diff --git a/packages/typespec-ts/src/modular/type-expressions/get-type-expression.ts b/packages/typespec-ts/src/modular/type-expressions/get-type-expression.ts new file mode 100644 index 0000000000..f565073a7e --- /dev/null +++ b/packages/typespec-ts/src/modular/type-expressions/get-type-expression.ts @@ -0,0 +1,87 @@ +import { SdkType } from "@azure-tools/typespec-client-generator-core"; +import { getCredentialExpression } from "./get-credential-expression.js"; +import { getModelExpression } from "./get-model-expression.js"; +import { getEnumExpression } from "./get-enum-expression.js"; +import { getUnionExpression } from "./get-union-expression.js"; + +export interface EmitTypeOptions { + emitInline?: boolean; +} + +export function getTypeExpression( + type: SdkType, + options?: EmitTypeOptions +): string { + switch (type.kind) { + case "array": { + const valueType = getTypeExpression(type.valueType, options); + return `(${valueType})[]`; + } + case "enum": + return getEnumExpression(type, options); + case "any": + return "any"; + case "boolean": + return "boolean"; + case "decimal": + case "decimal128": + case "float": + case "float32": + case "float64": + case "integer": + case "int16": + case "int32": + case "int64": + case "int8": + case "uint16": + case "uint32": + case "uint64": + case "uint8": + case "numeric": + case "safeint": + return "number"; + case "endpoint": + case "plainDate": + case "plainTime": + case "string": + case "url": + // TODO - what typespec produces uri, password? + return "string"; + case "bytes": + return "Uint8Array"; + case "constant": + return String(type.value); + case "duration": + return getTypeExpression(type.wireType, options); + case "credential": + // Credential comes from @useAuth decorator + return getCredentialExpression(type); + case "dict": { + const valueType = getTypeExpression(type.valueType, options); + return `Record`; + } + case "enumvalue": + return String(type.value); + case "model": + return getModelExpression(type, options); + case "nullable": { + const nonNullableType = getTypeExpression(type.type, options); + return `(${nonNullableType}) | null`; + } + case "offsetDateTime": + return "string"; + case "tuple": { + const types = type.values + .map((v) => getTypeExpression(v, options)) + .join(", "); + return `[${types}]`; + } + case "union": + return getUnionExpression(type, options); + case "utcDateTime": + return "Date"; + + default: + return "any"; + } +} diff --git a/packages/typespec-ts/src/modular/type-expressions/get-union-expression.ts b/packages/typespec-ts/src/modular/type-expressions/get-union-expression.ts new file mode 100644 index 0000000000..e60d824d46 --- /dev/null +++ b/packages/typespec-ts/src/modular/type-expressions/get-union-expression.ts @@ -0,0 +1,17 @@ +import { SdkUnionType } from "@azure-tools/typespec-client-generator-core"; +import { resolveReference } from "../../framework/reference.js"; +import { getTypeExpression, EmitTypeOptions } from "./get-type-expression.js"; +import { shouldEmitInline } from "./utils.js"; + +export function getUnionExpression( + type: SdkUnionType, + options: EmitTypeOptions = {} +): string { + if (shouldEmitInline(type, options)) { + return `(${type.values + .map((v) => `${getTypeExpression(v, options)}`) + .join(" | ")})`; + } else { + return resolveReference(type); + } +} diff --git a/packages/typespec-ts/src/modular/type-expressions/utils.ts b/packages/typespec-ts/src/modular/type-expressions/utils.ts new file mode 100644 index 0000000000..77d32033a5 --- /dev/null +++ b/packages/typespec-ts/src/modular/type-expressions/utils.ts @@ -0,0 +1,15 @@ +import { EmitTypeOptions } from "./get-type-expression.js"; + +export function shouldEmitInline( + type: { isGeneratedName?: boolean }, + options: EmitTypeOptions = {} +): boolean { + const emitInline = options.emitInline; + + if (emitInline === undefined && "isGeneratedName" in type) { + // If not explicitly set, default to emitting inline for anonymous types + return Boolean(type.isGeneratedName); + } + + return Boolean(emitInline); +} From 430076749d428985337b87c58fd95ab4b2bed9db Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 18 Aug 2024 20:59:23 +0800 Subject: [PATCH 16/83] Fix subscription id issue --- .../samples-dev/operationsListSample.ts | 6 ++++-- .../typespec-ts/src/api/dataProducts/index.ts | 2 +- .../typespec-ts/src/api/dataTypes/index.ts | 2 +- packages/typespec-ts/src/next/buildSamples.ts | 20 +++++++++++++++++-- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts index b2d852b60e..fadb2df5af 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts @@ -5,14 +5,16 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; async function operationsListMaximumSetGen(): void { const credential = new DefaultAzureCredential(); - const client = new NetworkAnalyticsClient(credential); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); const result = await client.operations.list(); console.log(result); } async function operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); - const client = new NetworkAnalyticsClient(credential); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); const result = await client.operations.list(); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts index 42121a4141..ffb44ad60e 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts @@ -23,11 +23,11 @@ import { createRestError, } from "@azure-rest/core-client"; import { serializeRecord } from "../../helpers/serializerHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PollerLike, OperationState } from "@azure/core-lro"; import { DataProductsCreateOptionalParams, diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts index bf97fc29c8..3be137716a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts @@ -17,11 +17,11 @@ import { PathUncheckedResponse, createRestError, } from "@azure-rest/core-client"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PollerLike, OperationState } from "@azure/core-lro"; import { DataTypesCreateOptionalParams, diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index 5587b14ec7..4a92766609 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -98,7 +98,15 @@ function buildExamplesForMethod( ); clientParams.push("credential"); } + let subscriptionIdValue = `"00000000-0000-0000-0000-00000000000"`; for (const param of example.parameters) { + if ( + param.parameter.name === "subscriptionId" && + dpgContext.rlcOptions?.azureArm + ) { + subscriptionIdValue = getParameterValue(param.value); + continue; + } if ( param.parameter.type.kind === "constant" || param.parameter.onClient === false @@ -111,9 +119,17 @@ function buildExamplesForMethod( ); clientParams.push(paramName); } + // always add subscriptionId for ARM clients + if (dpgContext.rlcOptions?.azureArm) { + exampleFunctionBody.push( + `const subscriptionId = ${subscriptionIdValue};` + ); + clientParams.push("subscriptionId"); + } exampleFunctionBody.push( `const client = new ${options.clientName}(${clientParams.join(", ")});` ); + // prepare operation-level parameters for (const param of example.parameters) { if (param.parameter.onClient === true) { @@ -169,7 +185,7 @@ function getCredentialType(initialization: SdkInitializationType) { : undefined; } -function getParameterValue(value: SdkTypeExample) { +function getParameterValue(value: SdkTypeExample): string { let retValue = value.value; switch (value.kind) { case "string": { @@ -221,7 +237,7 @@ function getParameterValue(value: SdkTypeExample) { retValue = "{} as any"; break; } - return retValue; + return `${retValue}`; } function escapeSpecialCharToSpace(str: string) { From 345016e122ed2ab4f0f5366182b4eee97b3c7ca5 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 18 Aug 2024 21:18:44 +0800 Subject: [PATCH 17/83] update the example summary --- common/config/rush/pnpm-lock.yaml | 52 +++++++++++++++++-- .../dataproductsAddUserRoleSample.ts | 12 +++++ .../samples-dev/dataproductsCreateSample.ts | 12 +++++ .../samples-dev/dataproductsDeleteSample.ts | 12 +++++ ...ctsGenerateStorageAccountSasTokenSample.ts | 12 +++++ .../samples-dev/dataproductsGetSample.ts | 12 +++++ .../dataproductsListByResourceGroupSample.ts | 12 +++++ .../dataproductsListBySubscriptionSample.ts | 12 +++++ .../dataproductsListRolesAssignmentsSample.ts | 12 +++++ .../dataproductsRemoveUserRoleSample.ts | 12 +++++ .../dataproductsRotateKeySample.ts | 12 +++++ .../samples-dev/dataproductsUpdateSample.ts | 12 +++++ .../dataproductscatalogsGetSample.ts | 12 +++++ ...oductscatalogsListByResourceGroupSample.ts | 12 +++++ ...roductscatalogsListBySubscriptionSample.ts | 12 +++++ .../samples-dev/datatypesCreateSample.ts | 12 +++++ .../samples-dev/datatypesDeleteDataSample.ts | 12 +++++ .../samples-dev/datatypesDeleteSample.ts | 12 +++++ ...sGenerateStorageContainerSasTokenSample.ts | 12 +++++ .../samples-dev/datatypesGetSample.ts | 12 +++++ .../datatypesListByDataProductSample.ts | 12 +++++ .../samples-dev/datatypesUpdateSample.ts | 12 +++++ .../samples-dev/operationsListSample.ts | 12 +++++ packages/typespec-ts/package.json | 4 +- packages/typespec-ts/src/next/buildSamples.ts | 8 ++- 25 files changed, 322 insertions(+), 6 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 09c9f25e2a..a456947eeb 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -237,7 +237,7 @@ importers: '@azure-tools/typespec-autorest': '>=0.45.0 <1.0.0' '@azure-tools/typespec-azure-core': '>=0.45.0 <1.0.0' '@azure-tools/typespec-azure-resource-manager': '>=0.45.0 <1.0.0' - '@azure-tools/typespec-client-generator-core': '>=0.45.1 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.45.3 <1.0.0' '@azure/abort-controller': ^2.1.2 '@azure/core-auth': ^1.6.0 '@azure/core-lro': ^3.0.0 @@ -292,10 +292,10 @@ importers: '@azure-tools/cadl-ranch-api': 0.4.4 '@azure-tools/cadl-ranch-expect': 0.14.1_y3yxhtjg35d3g6m2dacugmsjfu '@azure-tools/cadl-ranch-specs': 0.34.9_tng6jshqt7yaa5x3ni6zlckyqm - '@azure-tools/typespec-autorest': 0.45.0_n4w2xh5fhregk7uzwn23tc3udm + '@azure-tools/typespec-autorest': 0.45.0_o6b4rinboa2fjzlsc372ktw7ay '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte '@azure-tools/typespec-azure-resource-manager': 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i - '@azure-tools/typespec-client-generator-core': 0.45.1_rxzquxnvxkwebgrumlsfc6ni5i + '@azure-tools/typespec-client-generator-core': 0.45.3_rxzquxnvxkwebgrumlsfc6ni5i '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.6.0 '@azure/core-lro': 3.0.0 @@ -579,6 +579,30 @@ packages: '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + dev: false + + /@azure-tools/typespec-autorest/0.45.0_o6b4rinboa2fjzlsc372ktw7ay: + resolution: {integrity: sha512-6ycZ0bEfXC0U26FHHEt9smAhxh78SACIDY+u7zLAopRzmxjTuthDdGgYSShuRDu3J+vEBi1fOKpz4cYQkgRkBQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@azure-tools/typespec-azure-core': ~0.45.0 + '@azure-tools/typespec-azure-resource-manager': ~0.45.0 + '@azure-tools/typespec-client-generator-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@azure-tools/typespec-azure-resource-manager': 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i + '@azure-tools/typespec-client-generator-core': 0.45.3_rxzquxnvxkwebgrumlsfc6ni5i + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + dev: true /@azure-tools/typespec-azure-core/0.45.0_alrznhyrw66bvx6gp4zrtdfkte: resolution: {integrity: sha512-GycGMCmaIVSN+TftPtlPJLyeOrglbLmH08ZiZaVMjSih/TQEJM21RGR6d8QdjlkQWN61ntNDRD+RP2uv9tHmqw==} @@ -631,6 +655,28 @@ packages: '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 change-case: 5.4.4 pluralize: 8.0.0 + dev: false + + /@azure-tools/typespec-client-generator-core/0.45.3_rxzquxnvxkwebgrumlsfc6ni5i: + resolution: {integrity: sha512-o1E38DJnJ71ixK3jHTy42QgY1ztXPGEOhJjdzSb9aI0aXlqqBt0Klgg52RuBHBajQ+RI+nWtGLE+LJaVDSHAqw==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@azure-tools/typespec-azure-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + change-case: 5.4.4 + pluralize: 8.0.0 + dev: true /@azure/abort-controller/1.1.0: resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts index 66d09c6d65..4bb66a1433 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to assign role to the data product. + * + * @summary assign role to the data product. + * x-ms-original-file: 2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json + */ async function dataProductsAddUserRoleMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -22,6 +28,12 @@ async function dataProductsAddUserRoleMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to assign role to the data product. + * + * @summary assign role to the data product. + * x-ms-original-file: 2023-11-15/DataProducts_AddUserRole_MinimumSet_Gen.json + */ async function dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts index daedcc0b19..2a83a74bf4 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to create data product resource. + * + * @summary create data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Create_MaximumSet_Gen.json + */ async function dataProductsCreateMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -61,6 +67,12 @@ async function dataProductsCreateMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to create data product resource. + * + * @summary create data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Create_MinimumSet_Gen.json + */ async function dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts index e8fffc5329..2d82e52228 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to delete data product resource. + * + * @summary delete data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Delete_MaximumSet_Gen.json + */ async function dataProductsDeleteMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -14,6 +20,12 @@ async function dataProductsDeleteMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to delete data product resource. + * + * @summary delete data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Delete_MinimumSet_Gen.json + */ async function dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts index c4fcd2dbaf..afdda60702 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to generate sas token for storage account. + * + * @summary generate sas token for storage account. + * x-ms-original-file: 2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json + */ async function dataProductsGenerateStorageAccountSasTokenMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -19,6 +25,12 @@ async function dataProductsGenerateStorageAccountSasTokenMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to generate sas token for storage account. + * + * @summary generate sas token for storage account. + * x-ms-original-file: 2023-11-15/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json + */ async function dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts index 7d0f4340bd..af90c1bf3a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to retrieve data product resource. + * + * @summary retrieve data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Get_MaximumSet_Gen.json + */ async function dataProductsGetMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -14,6 +20,12 @@ async function dataProductsGetMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to retrieve data product resource. + * + * @summary retrieve data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Get_MinimumSet_Gen.json + */ async function dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts index c73205a0b4..3ed07f4b4a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to list data products by resource group. + * + * @summary list data products by resource group. + * x-ms-original-file: 2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json + */ async function dataProductsListByResourceGroupMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -13,6 +19,12 @@ async function dataProductsListByResourceGroupMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to list data products by resource group. + * + * @summary list data products by resource group. + * x-ms-original-file: 2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json + */ async function dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts index 088ea846a4..ccbd1f3b1b 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to list data products by subscription. + * + * @summary list data products by subscription. + * x-ms-original-file: 2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json + */ async function dataProductsListBySubscriptionMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -11,6 +17,12 @@ async function dataProductsListBySubscriptionMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to list data products by subscription. + * + * @summary list data products by subscription. + * x-ms-original-file: 2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json + */ async function dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts index 17a1b9d169..2c05867442 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to list user roles associated with the data product. + * + * @summary list user roles associated with the data product. + * x-ms-original-file: 2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json + */ async function dataProductsListRolesAssignmentsMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -15,6 +21,12 @@ async function dataProductsListRolesAssignmentsMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to list user roles associated with the data product. + * + * @summary list user roles associated with the data product. + * x-ms-original-file: 2023-11-15/DataProducts_ListRolesAssignments_MinimumSet_Gen.json + */ async function dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts index 4a913cb1bb..705db38ac4 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to remove role from the data product. + * + * @summary remove role from the data product. + * x-ms-original-file: 2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json + */ async function dataProductsRemoveUserRoleMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -23,6 +29,12 @@ async function dataProductsRemoveUserRoleMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to remove role from the data product. + * + * @summary remove role from the data product. + * x-ms-original-file: 2023-11-15/DataProducts_RemoveUserRole_MinimumSet_Gen.json + */ async function dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts index eef959a8b4..78aaac52e7 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to initiate key rotation on Data Product. + * + * @summary initiate key rotation on Data Product. + * x-ms-original-file: 2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json + */ async function dataProductsRotateKeyMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -15,6 +21,12 @@ async function dataProductsRotateKeyMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to initiate key rotation on Data Product. + * + * @summary initiate key rotation on Data Product. + * x-ms-original-file: 2023-11-15/DataProducts_RotateKey_MinimumSet_Gen.json + */ async function dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts index 5599b30cca..22006abe9a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to update data product resource. + * + * @summary update data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Update_MaximumSet_Gen.json + */ async function dataProductsUpdateMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -31,6 +37,12 @@ async function dataProductsUpdateMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to update data product resource. + * + * @summary update data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Update_MinimumSet_Gen.json + */ async function dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts index a7d561840f..3165dc51f1 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to retrieve data type resource. + * + * @summary retrieve data type resource. + * x-ms-original-file: 2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json + */ async function dataProductsCatalogsGetMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -11,6 +17,12 @@ async function dataProductsCatalogsGetMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to retrieve data type resource. + * + * @summary retrieve data type resource. + * x-ms-original-file: 2023-11-15/DataProductsCatalogs_Get_MinimumSet_Gen.json + */ async function dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts index 7cf553e2f1..901e750ea7 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to list data catalog by resource group. + * + * @summary list data catalog by resource group. + * x-ms-original-file: 2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json + */ async function dataProductsCatalogsListByResourceGroupMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -13,6 +19,12 @@ async function dataProductsCatalogsListByResourceGroupMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to list data catalog by resource group. + * + * @summary list data catalog by resource group. + * x-ms-original-file: 2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json + */ async function dataProductsCatalogsListByResourceGroupMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts index da2b03018c..bf1e6c7852 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to list data catalog by subscription. + * + * @summary list data catalog by subscription. + * x-ms-original-file: 2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json + */ async function dataProductsCatalogsListBySubscriptionMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -11,6 +17,12 @@ async function dataProductsCatalogsListBySubscriptionMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to list data catalog by subscription. + * + * @summary list data catalog by subscription. + * x-ms-original-file: 2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json + */ async function dataProductsCatalogsListBySubscriptionMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts index d99b1fcc62..ac1d63c88a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to create data type resource. + * + * @summary create data type resource. + * x-ms-original-file: 2023-11-15/DataTypes_Create_MaximumSet_Gen.json + */ async function dataTypesCreateMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -23,6 +29,12 @@ async function dataTypesCreateMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to create data type resource. + * + * @summary create data type resource. + * x-ms-original-file: 2023-11-15/DataTypes_Create_MinimumSet_Gen.json + */ async function dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts index cf60c858ca..76bc456206 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to delete data for data type. + * + * @summary delete data for data type. + * x-ms-original-file: 2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json + */ async function dataTypesDeleteDataMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -16,6 +22,12 @@ async function dataTypesDeleteDataMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to delete data for data type. + * + * @summary delete data for data type. + * x-ms-original-file: 2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json + */ async function dataTypesDeleteDataMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts index 0877b45e8b..31e0afdefa 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to delete data type resource. + * + * @summary delete data type resource. + * x-ms-original-file: 2023-11-15/DataTypes_Delete_MaximumSet_Gen.json + */ async function dataTypesDeleteMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -15,6 +21,12 @@ async function dataTypesDeleteMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to delete data type resource. + * + * @summary delete data type resource. + * x-ms-original-file: 2023-11-15/DataTypes_Delete_MinimumSet_Gen.json + */ async function dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts index 4370d0e51e..d536ebc758 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to generate sas token for storage container. + * + * @summary generate sas token for storage container. + * x-ms-original-file: 2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json + */ async function dataTypesGenerateStorageContainerSasTokenMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -20,6 +26,12 @@ async function dataTypesGenerateStorageContainerSasTokenMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to generate sas token for storage container. + * + * @summary generate sas token for storage container. + * x-ms-original-file: 2023-11-15/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json + */ async function dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts index 3b81d90164..fb58bcde33 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to retrieve data type resource. + * + * @summary retrieve data type resource. + * x-ms-original-file: 2023-11-15/DataTypes_Get_MaximumSet_Gen.json + */ async function dataTypesGetMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -15,6 +21,12 @@ async function dataTypesGetMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to retrieve data type resource. + * + * @summary retrieve data type resource. + * x-ms-original-file: 2023-11-15/DataTypes_Get_MinimumSet_Gen.json + */ async function dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts index 371d5d35a4..501789c788 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to list data type by parent resource. + * + * @summary list data type by parent resource. + * x-ms-original-file: 2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json + */ async function dataTypesListByDataProductMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -14,6 +20,12 @@ async function dataTypesListByDataProductMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to list data type by parent resource. + * + * @summary list data type by parent resource. + * x-ms-original-file: 2023-11-15/DataTypes_ListByDataProduct_MinimumSet_Gen.json + */ async function dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts index 7f0a524832..98c6eda642 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to update data type resource. + * + * @summary update data type resource. + * x-ms-original-file: 2023-11-15/DataTypes_Update_MaximumSet_Gen.json + */ async function dataTypesUpdateMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -22,6 +28,12 @@ async function dataTypesUpdateMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to update data type resource. + * + * @summary update data type resource. + * x-ms-original-file: 2023-11-15/DataTypes_Update_MinimumSet_Gen.json + */ async function dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts index fadb2df5af..7995464c9e 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts @@ -3,6 +3,12 @@ import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; +/** + * This sample demonstrates how to list the operations for the provider + * + * @summary list the operations for the provider + * x-ms-original-file: 2023-11-15/Operations_List_MaximumSet_Gen.json + */ async function operationsListMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; @@ -11,6 +17,12 @@ async function operationsListMaximumSetGen(): void { console.log(result); } +/** + * This sample demonstrates how to list the operations for the provider + * + * @summary list the operations for the provider + * x-ms-original-file: 2023-11-15/Operations_List_MinimumSet_Gen.json + */ async function operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/packages/typespec-ts/package.json b/packages/typespec-ts/package.json index 6f02748e3e..01d5ce5d5a 100644 --- a/packages/typespec-ts/package.json +++ b/packages/typespec-ts/package.json @@ -70,7 +70,7 @@ "@azure-tools/typespec-autorest": ">=0.45.0 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.45.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.45.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.45.1 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.45.3 <1.0.0", "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.6.0", "@azure/core-lro": "^3.0.0", @@ -143,4 +143,4 @@ "url": "https://github.com/Azure/autorest.typescript/issues" }, "homepage": "https://github.com/Azure/autorest.typescript/tree/main/packages/typespec-ts/" -} \ No newline at end of file +} diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index 4a92766609..8a1f19ba9f 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -148,12 +148,18 @@ function buildExamplesForMethod( ); exampleFunctionBody.push(`console.log(result);`); // Create a function declaration structure + const normalizedDescription = + (method.description?.charAt(0).toLowerCase() ?? "") + + method.description?.slice(1); const functionDeclaration: FunctionDeclarationStructure = { kind: StructureKind.Function, isAsync: true, name: exampleFunctionType.name, returnType: exampleFunctionType.returnType, - statements: exampleFunctionType.body + statements: exampleFunctionType.body, + docs: [ + `This sample demonstrates how to ${normalizedDescription}\n\n@summary ${normalizedDescription}\nx-ms-original-file: ${example.filePath}` + ] }; addDeclaration(sourceFile, functionDeclaration, exampleFunctionType); exampleFunctions.push(exampleFunctionType); From 842a3f421d5681d0cc3d595a7abb5d9b5bc2692a Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 18 Aug 2024 21:31:07 +0800 Subject: [PATCH 18/83] Update the paging operations --- .../dataproductsListByResourceGroupSample.ts | 20 ++++++++++++------ .../dataproductsListBySubscriptionSample.ts | 16 ++++++++++---- ...oductscatalogsListByResourceGroupSample.ts | 20 ++++++++++++------ ...roductscatalogsListBySubscriptionSample.ts | 16 ++++++++++---- .../datatypesListByDataProductSample.ts | 20 ++++++++++++------ .../samples-dev/operationsListSample.ts | 16 ++++++++++---- packages/typespec-ts/src/next/buildSamples.ts | 21 +++++++++++++------ 7 files changed, 93 insertions(+), 36 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts index 3ed07f4b4a..87a7c9aee1 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts @@ -13,10 +13,14 @@ async function dataProductsListByResourceGroupMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.listByResourceGroup( + const resArray = new Array(); + for await (let item of client.dataproducts.listByResourceGroup( "aoiresourceGroupName", - ); - console.log(result); + )) { + resArray.push(item); + } + + console.log(resArray); } /** @@ -29,10 +33,14 @@ async function dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSet const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.listByResourceGroup( + const resArray = new Array(); + for await (let item of client.dataproducts.listByResourceGroup( "aoiresourceGroupName", - ); - console.log(result); + )) { + resArray.push(item); + } + + console.log(resArray); } async function main() { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts index ccbd1f3b1b..1a3bc0a4e6 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts @@ -13,8 +13,12 @@ async function dataProductsListBySubscriptionMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.listBySubscription(); - console.log(result); + const resArray = new Array(); + for await (let item of client.dataproducts.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); } /** @@ -27,8 +31,12 @@ async function dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetR const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.listBySubscription(); - console.log(result); + const resArray = new Array(); + for await (let item of client.dataproducts.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); } async function main() { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts index 901e750ea7..cc139505f6 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts @@ -13,10 +13,14 @@ async function dataProductsCatalogsListByResourceGroupMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproductscatalogs.listByResourceGroup( + const resArray = new Array(); + for await (let item of client.dataproductscatalogs.listByResourceGroup( "aoiresourceGroupName", - ); - console.log(result); + )) { + resArray.push(item); + } + + console.log(resArray); } /** @@ -29,10 +33,14 @@ async function dataProductsCatalogsListByResourceGroupMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproductscatalogs.listByResourceGroup( + const resArray = new Array(); + for await (let item of client.dataproductscatalogs.listByResourceGroup( "aoiresourceGroupName", - ); - console.log(result); + )) { + resArray.push(item); + } + + console.log(resArray); } async function main() { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts index bf1e6c7852..343dcda820 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts @@ -13,8 +13,12 @@ async function dataProductsCatalogsListBySubscriptionMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproductscatalogs.listBySubscription(); - console.log(result); + const resArray = new Array(); + for await (let item of client.dataproductscatalogs.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); } /** @@ -27,8 +31,12 @@ async function dataProductsCatalogsListBySubscriptionMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproductscatalogs.listBySubscription(); - console.log(result); + const resArray = new Array(); + for await (let item of client.dataproductscatalogs.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); } async function main() { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts index 501789c788..52e80c786f 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts @@ -13,11 +13,15 @@ async function dataTypesListByDataProductMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.listByDataProduct( + const resArray = new Array(); + for await (let item of client.datatypes.listByDataProduct( "aoiresourceGroupName", "dataproduct01", - ); - console.log(result); + )) { + resArray.push(item); + } + + console.log(resArray); } /** @@ -30,11 +34,15 @@ async function dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleM const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.listByDataProduct( + const resArray = new Array(); + for await (let item of client.datatypes.listByDataProduct( "aoiresourceGroupName", "dataproduct01", - ); - console.log(result); + )) { + resArray.push(item); + } + + console.log(resArray); } async function main() { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts index 7995464c9e..f0b986b9a1 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts @@ -13,8 +13,12 @@ async function operationsListMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.operations.list(); - console.log(result); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + + console.log(resArray); } /** @@ -27,8 +31,12 @@ async function operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.operations.list(); - console.log(result); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + + console.log(resArray); } async function main() { diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index 8a1f19ba9f..5f3d7423bb 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -141,12 +141,21 @@ function buildExamplesForMethod( const prefix = options.operationGroupPrefix ? `${options.operationGroupPrefix}.` : ""; - exampleFunctionBody.push( - `const result = await client.${prefix}${method.name}(${methodParams.join( - ", " - )});` - ); - exampleFunctionBody.push(`console.log(result);`); + const isPaging = method.kind === "paging"; + const methodCall = `client.${prefix}${method.name}(${methodParams.join( + ", " + )})`; + if (isPaging) { + exampleFunctionBody.push(`const resArray = new Array();`); + exampleFunctionBody.push( + `for await (let item of ${methodCall}) { resArray.push(item); }` + ); + exampleFunctionBody.push(`console.log(resArray);`); + } else { + exampleFunctionBody.push(`const result = await ${methodCall};`); + exampleFunctionBody.push(`console.log(result);`); + } + // Create a function declaration structure const normalizedDescription = (method.description?.charAt(0).toLowerCase() ?? "") + From 35b42a3b632aeb298af30ba2ceade474fde09f12 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 18 Aug 2024 21:52:06 +0800 Subject: [PATCH 19/83] Add import for default credential --- .../samples-dev/dataproductsAddUserRoleSample.ts | 1 + .../typespec-ts/samples-dev/dataproductsCreateSample.ts | 1 + .../typespec-ts/samples-dev/dataproductsDeleteSample.ts | 1 + .../dataproductsGenerateStorageAccountSasTokenSample.ts | 1 + .../typespec-ts/samples-dev/dataproductsGetSample.ts | 1 + .../samples-dev/dataproductsListByResourceGroupSample.ts | 1 + .../samples-dev/dataproductsListBySubscriptionSample.ts | 1 + .../samples-dev/dataproductsListRolesAssignmentsSample.ts | 1 + .../samples-dev/dataproductsRemoveUserRoleSample.ts | 1 + .../samples-dev/dataproductsRotateKeySample.ts | 1 + .../typespec-ts/samples-dev/dataproductsUpdateSample.ts | 1 + .../samples-dev/dataproductscatalogsGetSample.ts | 1 + .../dataproductscatalogsListByResourceGroupSample.ts | 1 + .../dataproductscatalogsListBySubscriptionSample.ts | 1 + .../typespec-ts/samples-dev/datatypesCreateSample.ts | 1 + .../typespec-ts/samples-dev/datatypesDeleteDataSample.ts | 1 + .../typespec-ts/samples-dev/datatypesDeleteSample.ts | 1 + .../datatypesGenerateStorageContainerSasTokenSample.ts | 1 + .../typespec-ts/samples-dev/datatypesGetSample.ts | 1 + .../samples-dev/datatypesListByDataProductSample.ts | 1 + .../typespec-ts/samples-dev/datatypesUpdateSample.ts | 1 + .../typespec-ts/samples-dev/operationsListSample.ts | 1 + packages/typespec-ts/src/index.ts | 7 ++++++- packages/typespec-ts/src/modular/external-dependencies.ts | 8 ++++++++ packages/typespec-ts/src/next/buildSamples.ts | 6 +++++- 25 files changed, 41 insertions(+), 2 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts index 4bb66a1433..5cb69e7b59 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts index 2a83a74bf4..24a5cd9418 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts index 2d82e52228..62dea6a58a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts index afdda60702..0f16540f20 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts index af90c1bf3a..8009b4041b 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts index 87a7c9aee1..e12c1a519c 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts index 1a3bc0a4e6..c5b7861201 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts index 2c05867442..e3391c46a0 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts index 705db38ac4..dece13f64a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts index 78aaac52e7..750b01aeb3 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts index 22006abe9a..539db04682 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts index 3165dc51f1..e12ed6b1ae 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts index cc139505f6..f814ba8038 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts index 343dcda820..e28be8f00e 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts index ac1d63c88a..5225677660 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts index 76bc456206..9c1aa523eb 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts index 31e0afdefa..ea2c359c2a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts index d536ebc758..fea8a881c0 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts index fb58bcde33..74592d8483 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts index 52e80c786f..10faa92efc 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts index 98c6eda642..7dca6fde6f 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts index f0b986b9a1..38965ad9b7 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { DefaultAzureCredential } from "@azure/identity"; import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index add8ce35ea..0c8ab60270 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -70,6 +70,7 @@ import { } from "./modular/static-helpers-metadata.js"; import { AzureCoreDependencies, + AzureIdentityDependencies, AzurePollingDependencies } from "./modular/external-dependencies.js"; import { emitLoggerFile } from "./modular/emitLoggerFile.js"; @@ -114,7 +115,11 @@ export async function $onEmit(context: EmitContext) { ); const extraDependencies = rlcOptions?.flavor === "azure" - ? { ...AzurePollingDependencies, ...AzureCoreDependencies } + ? { + ...AzurePollingDependencies, + ...AzureCoreDependencies, + ...AzureIdentityDependencies + } : {}; const binder = provideBinder(outputProject, { staticHelpers, diff --git a/packages/typespec-ts/src/modular/external-dependencies.ts b/packages/typespec-ts/src/modular/external-dependencies.ts index 53013eb0d8..7b4a03dd1e 100644 --- a/packages/typespec-ts/src/modular/external-dependencies.ts +++ b/packages/typespec-ts/src/modular/external-dependencies.ts @@ -138,3 +138,11 @@ export const AzureCoreDependencies: CoreDependencies = { name: "uint8ArrayToString" } }; + +export const AzureIdentityDependencies = { + DefaultAzureCredential: { + kind: "externalDependency", + module: "@azure/identity", + name: "DefaultAzureCredential" + } +}; diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index 5f3d7423bb..529deb11ad 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -13,6 +13,7 @@ import { emitCredential } from "./emitCredential.js"; import { NameType, normalizeName } from "@azure-tools/rlc-common"; import { useContext } from "../contextManager.js"; import { join } from "path"; +import { AzureIdentityDependencies } from "../modular/external-dependencies.js"; export function buildSamples(dpgContext: SdkContext) { for (const client of dpgContext.sdkPackage.clients) { @@ -93,8 +94,11 @@ function buildExamplesForMethod( }; // prepare client-level parameters if (options.credentialType) { + // Only support DefaultAzureCredential for now exampleFunctionBody.push( - `const credential = new ${options.credentialType}();` + `const credential = new ${resolveReference( + AzureIdentityDependencies.DefaultAzureCredential + )}();` ); clientParams.push("credential"); } From 7e399b125d93f30c9762e7a65941e90e6626479a Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 18 Aug 2024 22:15:33 +0800 Subject: [PATCH 20/83] Update the package name dependencies --- .../samples-dev/dataproductsAddUserRoleSample.ts | 2 +- .../typespec-ts/samples-dev/dataproductsCreateSample.ts | 2 +- .../typespec-ts/samples-dev/dataproductsDeleteSample.ts | 2 +- .../dataproductsGenerateStorageAccountSasTokenSample.ts | 2 +- .../typespec-ts/samples-dev/dataproductsGetSample.ts | 2 +- .../samples-dev/dataproductsListByResourceGroupSample.ts | 2 +- .../samples-dev/dataproductsListBySubscriptionSample.ts | 2 +- .../dataproductsListRolesAssignmentsSample.ts | 2 +- .../samples-dev/dataproductsRemoveUserRoleSample.ts | 2 +- .../samples-dev/dataproductsRotateKeySample.ts | 2 +- .../typespec-ts/samples-dev/dataproductsUpdateSample.ts | 2 +- .../samples-dev/dataproductscatalogsGetSample.ts | 2 +- .../dataproductscatalogsListByResourceGroupSample.ts | 2 +- .../dataproductscatalogsListBySubscriptionSample.ts | 2 +- .../typespec-ts/samples-dev/datatypesCreateSample.ts | 2 +- .../typespec-ts/samples-dev/datatypesDeleteDataSample.ts | 2 +- .../typespec-ts/samples-dev/datatypesDeleteSample.ts | 2 +- .../datatypesGenerateStorageContainerSasTokenSample.ts | 2 +- .../typespec-ts/samples-dev/datatypesGetSample.ts | 2 +- .../samples-dev/datatypesListByDataProductSample.ts | 2 +- .../typespec-ts/samples-dev/datatypesUpdateSample.ts | 2 +- .../typespec-ts/samples-dev/operationsListSample.ts | 2 +- packages/typespec-ts/src/index.ts | 1 + packages/typespec-ts/src/next/buildSamples.ts | 9 ++++++++- 24 files changed, 31 insertions(+), 23 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts index 5cb69e7b59..7563e91518 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to assign role to the data product. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts index 24a5cd9418..22b00d503a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to create data product resource. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts index 62dea6a58a..f081d5137f 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to delete data product resource. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts index 0f16540f20..bb90990e63 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to generate sas token for storage account. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts index 8009b4041b..695e4c73d7 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to retrieve data product resource. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts index e12c1a519c..451d25b9f9 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to list data products by resource group. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts index c5b7861201..0f815544a7 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to list data products by subscription. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts index e3391c46a0..516a7647c6 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to list user roles associated with the data product. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts index dece13f64a..0f7721f9f2 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to remove role from the data product. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts index 750b01aeb3..841b10aa8b 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to initiate key rotation on Data Product. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts index 539db04682..3bc3b6979c 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to update data product resource. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts index e12ed6b1ae..f866477395 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to retrieve data type resource. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts index f814ba8038..9cc6594975 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to list data catalog by resource group. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts index e28be8f00e..c6469e6033 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to list data catalog by subscription. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts index 5225677660..7775ea7266 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to create data type resource. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts index 9c1aa523eb..bf818b2bf8 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to delete data for data type. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts index ea2c359c2a..de93227e20 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to delete data type resource. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts index fea8a881c0..31f6fd2eb7 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to generate sas token for storage container. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts index 74592d8483..43626501ef 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to retrieve data type resource. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts index 10faa92efc..06610a8937 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to list data type by parent resource. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts index 7dca6fde6f..b554d199fc 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to update data type resource. diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts index 38965ad9b7..70e5f3ac6e 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -import { NetworkAnalyticsClient } from "../src/networkAnalyticsClient.js"; /** * This sample demonstrates how to list the operations for the provider diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index 0c8ab60270..53db86916d 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -113,6 +113,7 @@ export async function $onEmit(context: EmitContext) { }, { sourcesDir: modularSourcesDir } ); + const extraDependencies = rlcOptions?.flavor === "azure" ? { diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index 529deb11ad..a35690967e 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -77,7 +77,14 @@ function buildExamplesForMethod( } ); const exampleFunctions = []; - // const dependencies = useDependencies(); + // TODO: remove hard-coded for package + if (dpgContext.rlcOptions?.packageDetails?.name) { + sourceFile.addImportDeclaration({ + moduleSpecifier: dpgContext.rlcOptions?.packageDetails?.name, + namedImports: [options.clientName] + }); + } + for (const example of method.operation.examples ?? []) { // build example const exampleFunctionBody: string[] = [], From 5ba88ff72c2737c88efe8f06770484366baf552e Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 18 Aug 2024 22:19:24 +0800 Subject: [PATCH 21/83] update the package.json file --- .../generated/typespec-ts/package.json | 168 +++++++++++++++++- 1 file changed, 159 insertions(+), 9 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json index 6a75d27224..c65bd755af 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json @@ -13,20 +13,39 @@ ".": "./src/index.ts", "./api": "./src/api/index.ts", "./models": "./src/models/index.ts", - "./api/operations": "src/api/operations/index.ts", - "./api/dataProductsCatalogs": "src/api/dataProductsCatalogs/index.ts", - "./api/dataTypes": "src/api/dataTypes/index.ts", - "./api/dataProducts": "src/api/dataProducts/index.ts" + "./api/operations": "./src/api/operations/index.ts", + "./api/dataProductsCatalogs": "./src/api/dataProductsCatalogs/index.ts", + "./api/dataTypes": "./src/api/dataTypes/index.ts", + "./api/dataProducts": "./src/api/dataProducts/index.ts" }, - "dialects": ["esm", "commonjs"], - "esmDialects": ["browser", "react-native"], + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], "selfLink": false }, "type": "module", - "keywords": ["node", "azure", "cloud", "typescript", "browser", "isomorphic"], + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], "author": "Microsoft Corporation", "license": "MIT", - "files": ["dist", "README.md", "LICENSE", "review/*", "CHANGELOG.md"], + "files": [ + "dist", + "README.md", + "LICENSE", + "review/*", + "CHANGELOG.md" + ], "dependencies": { "@azure-rest/core-client": "^2.1.0", "@azure/core-auth": "^1.6.0", @@ -74,5 +93,136 @@ "test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node", "test": "npm run clean && tshy && npm run unit-test:node && npm run unit-test:browser && npm run integration-test", "build": "npm run clean && tshy && npm run extract-api" - } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "react-native": { + "types": "./dist/react-native/index.d.ts", + "default": "./dist/react-native/index.js" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./api": { + "browser": { + "types": "./dist/browser/api/index.d.ts", + "default": "./dist/browser/api/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/index.d.ts", + "default": "./dist/react-native/api/index.js" + }, + "import": { + "types": "./dist/esm/api/index.d.ts", + "default": "./dist/esm/api/index.js" + }, + "require": { + "types": "./dist/commonjs/api/index.d.ts", + "default": "./dist/commonjs/api/index.js" + } + }, + "./models": { + "browser": { + "types": "./dist/browser/models/index.d.ts", + "default": "./dist/browser/models/index.js" + }, + "react-native": { + "types": "./dist/react-native/models/index.d.ts", + "default": "./dist/react-native/models/index.js" + }, + "import": { + "types": "./dist/esm/models/index.d.ts", + "default": "./dist/esm/models/index.js" + }, + "require": { + "types": "./dist/commonjs/models/index.d.ts", + "default": "./dist/commonjs/models/index.js" + } + }, + "./api/operations": { + "browser": { + "types": "./dist/browser/api/operations/index.d.ts", + "default": "./dist/browser/api/operations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/operations/index.d.ts", + "default": "./dist/react-native/api/operations/index.js" + }, + "import": { + "types": "./dist/esm/api/operations/index.d.ts", + "default": "./dist/esm/api/operations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/operations/index.d.ts", + "default": "./dist/commonjs/api/operations/index.js" + } + }, + "./api/dataProductsCatalogs": { + "browser": { + "types": "./dist/browser/api/dataProductsCatalogs/index.d.ts", + "default": "./dist/browser/api/dataProductsCatalogs/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/dataProductsCatalogs/index.d.ts", + "default": "./dist/react-native/api/dataProductsCatalogs/index.js" + }, + "import": { + "types": "./dist/esm/api/dataProductsCatalogs/index.d.ts", + "default": "./dist/esm/api/dataProductsCatalogs/index.js" + }, + "require": { + "types": "./dist/commonjs/api/dataProductsCatalogs/index.d.ts", + "default": "./dist/commonjs/api/dataProductsCatalogs/index.js" + } + }, + "./api/dataTypes": { + "browser": { + "types": "./dist/browser/api/dataTypes/index.d.ts", + "default": "./dist/browser/api/dataTypes/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/dataTypes/index.d.ts", + "default": "./dist/react-native/api/dataTypes/index.js" + }, + "import": { + "types": "./dist/esm/api/dataTypes/index.d.ts", + "default": "./dist/esm/api/dataTypes/index.js" + }, + "require": { + "types": "./dist/commonjs/api/dataTypes/index.d.ts", + "default": "./dist/commonjs/api/dataTypes/index.js" + } + }, + "./api/dataProducts": { + "browser": { + "types": "./dist/browser/api/dataProducts/index.d.ts", + "default": "./dist/browser/api/dataProducts/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/dataProducts/index.d.ts", + "default": "./dist/react-native/api/dataProducts/index.js" + }, + "import": { + "types": "./dist/esm/api/dataProducts/index.d.ts", + "default": "./dist/esm/api/dataProducts/index.js" + }, + "require": { + "types": "./dist/commonjs/api/dataProducts/index.d.ts", + "default": "./dist/commonjs/api/dataProducts/index.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts" } From a12885a4db2c8668fa3bba2df353c5eec1d49036 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 18 Aug 2024 23:00:34 +0800 Subject: [PATCH 22/83] Update the property name --- .../generated/typespec-ts/package.json | 168 +----------------- .../dataproductsAddUserRoleSample.ts | 4 +- .../samples-dev/dataproductsCreateSample.ts | 4 +- .../samples-dev/dataproductsDeleteSample.ts | 4 +- ...ctsGenerateStorageAccountSasTokenSample.ts | 4 +- .../samples-dev/dataproductsGetSample.ts | 4 +- .../dataproductsListByResourceGroupSample.ts | 4 +- .../dataproductsListBySubscriptionSample.ts | 4 +- .../dataproductsListRolesAssignmentsSample.ts | 4 +- .../dataproductsRemoveUserRoleSample.ts | 4 +- .../dataproductsRotateKeySample.ts | 4 +- .../samples-dev/dataproductsUpdateSample.ts | 4 +- .../dataproductscatalogsGetSample.ts | 4 +- ...oductscatalogsListByResourceGroupSample.ts | 4 +- ...roductscatalogsListBySubscriptionSample.ts | 4 +- .../samples-dev/datatypesCreateSample.ts | 4 +- .../samples-dev/datatypesDeleteDataSample.ts | 4 +- .../samples-dev/datatypesDeleteSample.ts | 4 +- ...sGenerateStorageContainerSasTokenSample.ts | 4 +- .../samples-dev/datatypesGetSample.ts | 4 +- .../datatypesListByDataProductSample.ts | 4 +- .../samples-dev/datatypesUpdateSample.ts | 4 +- .../typespec-ts/src/api/dataProducts/index.ts | 2 +- .../typespec-ts/src/api/dataTypes/index.ts | 2 +- packages/typespec-ts/src/next/buildSamples.ts | 5 +- 25 files changed, 57 insertions(+), 204 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json index c65bd755af..6a75d27224 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json @@ -13,39 +13,20 @@ ".": "./src/index.ts", "./api": "./src/api/index.ts", "./models": "./src/models/index.ts", - "./api/operations": "./src/api/operations/index.ts", - "./api/dataProductsCatalogs": "./src/api/dataProductsCatalogs/index.ts", - "./api/dataTypes": "./src/api/dataTypes/index.ts", - "./api/dataProducts": "./src/api/dataProducts/index.ts" + "./api/operations": "src/api/operations/index.ts", + "./api/dataProductsCatalogs": "src/api/dataProductsCatalogs/index.ts", + "./api/dataTypes": "src/api/dataTypes/index.ts", + "./api/dataProducts": "src/api/dataProducts/index.ts" }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], + "dialects": ["esm", "commonjs"], + "esmDialects": ["browser", "react-native"], "selfLink": false }, "type": "module", - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], + "keywords": ["node", "azure", "cloud", "typescript", "browser", "isomorphic"], "author": "Microsoft Corporation", "license": "MIT", - "files": [ - "dist", - "README.md", - "LICENSE", - "review/*", - "CHANGELOG.md" - ], + "files": ["dist", "README.md", "LICENSE", "review/*", "CHANGELOG.md"], "dependencies": { "@azure-rest/core-client": "^2.1.0", "@azure/core-auth": "^1.6.0", @@ -93,136 +74,5 @@ "test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node", "test": "npm run clean && tshy && npm run unit-test:node && npm run unit-test:browser && npm run integration-test", "build": "npm run clean && tshy && npm run extract-api" - }, - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "react-native": { - "types": "./dist/react-native/index.d.ts", - "default": "./dist/react-native/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - }, - "./api": { - "browser": { - "types": "./dist/browser/api/index.d.ts", - "default": "./dist/browser/api/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/index.d.ts", - "default": "./dist/react-native/api/index.js" - }, - "import": { - "types": "./dist/esm/api/index.d.ts", - "default": "./dist/esm/api/index.js" - }, - "require": { - "types": "./dist/commonjs/api/index.d.ts", - "default": "./dist/commonjs/api/index.js" - } - }, - "./models": { - "browser": { - "types": "./dist/browser/models/index.d.ts", - "default": "./dist/browser/models/index.js" - }, - "react-native": { - "types": "./dist/react-native/models/index.d.ts", - "default": "./dist/react-native/models/index.js" - }, - "import": { - "types": "./dist/esm/models/index.d.ts", - "default": "./dist/esm/models/index.js" - }, - "require": { - "types": "./dist/commonjs/models/index.d.ts", - "default": "./dist/commonjs/models/index.js" - } - }, - "./api/operations": { - "browser": { - "types": "./dist/browser/api/operations/index.d.ts", - "default": "./dist/browser/api/operations/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/operations/index.d.ts", - "default": "./dist/react-native/api/operations/index.js" - }, - "import": { - "types": "./dist/esm/api/operations/index.d.ts", - "default": "./dist/esm/api/operations/index.js" - }, - "require": { - "types": "./dist/commonjs/api/operations/index.d.ts", - "default": "./dist/commonjs/api/operations/index.js" - } - }, - "./api/dataProductsCatalogs": { - "browser": { - "types": "./dist/browser/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/browser/api/dataProductsCatalogs/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/react-native/api/dataProductsCatalogs/index.js" - }, - "import": { - "types": "./dist/esm/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/esm/api/dataProductsCatalogs/index.js" - }, - "require": { - "types": "./dist/commonjs/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/commonjs/api/dataProductsCatalogs/index.js" - } - }, - "./api/dataTypes": { - "browser": { - "types": "./dist/browser/api/dataTypes/index.d.ts", - "default": "./dist/browser/api/dataTypes/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/dataTypes/index.d.ts", - "default": "./dist/react-native/api/dataTypes/index.js" - }, - "import": { - "types": "./dist/esm/api/dataTypes/index.d.ts", - "default": "./dist/esm/api/dataTypes/index.js" - }, - "require": { - "types": "./dist/commonjs/api/dataTypes/index.d.ts", - "default": "./dist/commonjs/api/dataTypes/index.js" - } - }, - "./api/dataProducts": { - "browser": { - "types": "./dist/browser/api/dataProducts/index.d.ts", - "default": "./dist/browser/api/dataProducts/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/dataProducts/index.d.ts", - "default": "./dist/react-native/api/dataProducts/index.js" - }, - "import": { - "types": "./dist/esm/api/dataProducts/index.d.ts", - "default": "./dist/esm/api/dataProducts/index.js" - }, - "require": { - "types": "./dist/commonjs/api/dataProducts/index.d.ts", - "default": "./dist/commonjs/api/dataProducts/index.js" - } - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts" + } } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts index 7563e91518..d7164b40ab 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts @@ -14,7 +14,7 @@ async function dataProductsAddUserRoleMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.addUserRole( + const result = await client.dataProducts.addUserRole( "aoiresourceGroupName", "dataproduct01", { @@ -39,7 +39,7 @@ async function dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMini const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.addUserRole( + const result = await client.dataProducts.addUserRole( "aoiresourceGroupName", "dataproduct01", { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts index 22b00d503a..fb2a875268 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts @@ -14,7 +14,7 @@ async function dataProductsCreateMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.create( + const result = await client.dataProducts.create( "aoiresourceGroupName", "dataproduct01", { @@ -78,7 +78,7 @@ async function dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSe const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.create( + const result = await client.dataProducts.create( "aoiresourceGroupName", "dataproduct01", { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts index f081d5137f..0188cb50dd 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts @@ -14,7 +14,7 @@ async function dataProductsDeleteMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.delete( + const result = await client.dataProducts.delete( "aoiresourceGroupName", "dataproduct01", ); @@ -31,7 +31,7 @@ async function dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSe const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.delete( + const result = await client.dataProducts.delete( "aoiresourceGroupName", "dataproduct01", ); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts index bb90990e63..36683e9740 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts @@ -14,7 +14,7 @@ async function dataProductsGenerateStorageAccountSasTokenMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.generateStorageAccountSasToken( + const result = await client.dataProducts.generateStorageAccountSasToken( "aoiresourceGroupName", "dataproduct01", { @@ -36,7 +36,7 @@ async function dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedB const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.generateStorageAccountSasToken( + const result = await client.dataProducts.generateStorageAccountSasToken( "aoiresourceGroupName", "dataproduct01", { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts index 695e4c73d7..1f5ecb3037 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts @@ -14,7 +14,7 @@ async function dataProductsGetMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.get( + const result = await client.dataProducts.get( "aoiresourceGroupName", "dataproduct01", ); @@ -31,7 +31,7 @@ async function dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGe const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.get( + const result = await client.dataProducts.get( "aoiresourceGroupName", "dataproduct01", ); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts index 451d25b9f9..e8b75372f7 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts @@ -15,7 +15,7 @@ async function dataProductsListByResourceGroupMaximumSetGen(): void { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.dataproducts.listByResourceGroup( + for await (let item of client.dataProducts.listByResourceGroup( "aoiresourceGroupName", )) { resArray.push(item); @@ -35,7 +35,7 @@ async function dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSet const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.dataproducts.listByResourceGroup( + for await (let item of client.dataProducts.listByResourceGroup( "aoiresourceGroupName", )) { resArray.push(item); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts index 0f815544a7..914e45ee06 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts @@ -15,7 +15,7 @@ async function dataProductsListBySubscriptionMaximumSetGen(): void { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.dataproducts.listBySubscription()) { + for await (let item of client.dataProducts.listBySubscription()) { resArray.push(item); } @@ -33,7 +33,7 @@ async function dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetR const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.dataproducts.listBySubscription()) { + for await (let item of client.dataProducts.listBySubscription()) { resArray.push(item); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts index 516a7647c6..e409dfc4c9 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts @@ -14,7 +14,7 @@ async function dataProductsListRolesAssignmentsMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.listRolesAssignments( + const result = await client.dataProducts.listRolesAssignments( "aoiresourceGroupName", "dataproduct01", {}, @@ -32,7 +32,7 @@ async function dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSe const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.listRolesAssignments( + const result = await client.dataProducts.listRolesAssignments( "aoiresourceGroupName", "dataproduct01", {}, diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts index 0f7721f9f2..a6ded717ab 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts @@ -14,7 +14,7 @@ async function dataProductsRemoveUserRoleMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.removeUserRole( + const result = await client.dataProducts.removeUserRole( "aoiresourceGroupName", "dataproduct01", { @@ -40,7 +40,7 @@ async function dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleM const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.removeUserRole( + const result = await client.dataProducts.removeUserRole( "aoiresourceGroupName", "dataproduct01", { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts index 841b10aa8b..00520a78ea 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts @@ -14,7 +14,7 @@ async function dataProductsRotateKeyMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.rotateKey( + const result = await client.dataProducts.rotateKey( "aoiresourceGroupName", "dataproduct01", { keyVaultUrl: "https://myKeyVault.vault.azure.net" }, @@ -32,7 +32,7 @@ async function dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimu const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.rotateKey( + const result = await client.dataProducts.rotateKey( "aoiresourceGroupName", "dataproduct01", { keyVaultUrl: "https://myKeyVault.vault.azure.net" }, diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts index 3bc3b6979c..cd52e227a7 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts @@ -14,7 +14,7 @@ async function dataProductsUpdateMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.update( + const result = await client.dataProducts.update( "aoiresourceGroupName", "dataproduct01", { @@ -48,7 +48,7 @@ async function dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSe const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproducts.update( + const result = await client.dataProducts.update( "aoiresourceGroupName", "dataproduct01", {}, diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts index f866477395..8f61d22992 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts @@ -14,7 +14,7 @@ async function dataProductsCatalogsGetMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproductscatalogs.get("aoiresourceGroupName"); + const result = await client.dataProductsCatalogs.get("aoiresourceGroupName"); console.log(result); } @@ -28,7 +28,7 @@ async function dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMini const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataproductscatalogs.get("aoiresourceGroupName"); + const result = await client.dataProductsCatalogs.get("aoiresourceGroupName"); console.log(result); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts index 9cc6594975..0028587307 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts @@ -15,7 +15,7 @@ async function dataProductsCatalogsListByResourceGroupMaximumSetGen(): void { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.dataproductscatalogs.listByResourceGroup( + for await (let item of client.dataProductsCatalogs.listByResourceGroup( "aoiresourceGroupName", )) { resArray.push(item); @@ -35,7 +35,7 @@ async function dataProductsCatalogsListByResourceGroupMinimumSetGen(): void { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.dataproductscatalogs.listByResourceGroup( + for await (let item of client.dataProductsCatalogs.listByResourceGroup( "aoiresourceGroupName", )) { resArray.push(item); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts index c6469e6033..0fd084d025 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts @@ -15,7 +15,7 @@ async function dataProductsCatalogsListBySubscriptionMaximumSetGen(): void { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.dataproductscatalogs.listBySubscription()) { + for await (let item of client.dataProductsCatalogs.listBySubscription()) { resArray.push(item); } @@ -33,7 +33,7 @@ async function dataProductsCatalogsListBySubscriptionMinimumSetGen(): void { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.dataproductscatalogs.listBySubscription()) { + for await (let item of client.dataProductsCatalogs.listBySubscription()) { resArray.push(item); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts index 7775ea7266..ebd1154f6a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts @@ -14,7 +14,7 @@ async function dataTypesCreateMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.create( + const result = await client.dataTypes.create( "aoiresourceGroupName", "dataproduct01", "datatypename", @@ -40,7 +40,7 @@ async function dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGe const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.create( + const result = await client.dataTypes.create( "aoiresourceGroupName", "dataproduct01", "datatypename", diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts index bf818b2bf8..3e3966dbce 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts @@ -14,7 +14,7 @@ async function dataTypesDeleteDataMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.deleteData( + const result = await client.dataTypes.deleteData( "aoiresourceGroupName", "dataproduct01", "datatypename", @@ -33,7 +33,7 @@ async function dataTypesDeleteDataMinimumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.deleteData( + const result = await client.dataTypes.deleteData( "aoiresourceGroupName", "dataproduct01", "datatypename", diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts index de93227e20..5674df4aa7 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts @@ -14,7 +14,7 @@ async function dataTypesDeleteMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.delete( + const result = await client.dataTypes.delete( "aoiresourceGroupName", "dataproduct01", "datatypename", @@ -32,7 +32,7 @@ async function dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGe const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.delete( + const result = await client.dataTypes.delete( "aoiresourceGroupName", "dataproduct01", "datatypename", diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts index 31f6fd2eb7..7b1ff4e123 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts @@ -14,7 +14,7 @@ async function dataTypesGenerateStorageContainerSasTokenMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.generateStorageContainerSasToken( + const result = await client.dataTypes.generateStorageContainerSasToken( "aoiresourceGroupName", "dataproduct01", "datatypename", @@ -37,7 +37,7 @@ async function dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedBy const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.generateStorageContainerSasToken( + const result = await client.dataTypes.generateStorageContainerSasToken( "aoiresourceGroupName", "dataproduct01", "datatypename", diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts index 43626501ef..b336c39cb3 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts @@ -14,7 +14,7 @@ async function dataTypesGetMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.get( + const result = await client.dataTypes.get( "aoiresourceGroupName", "dataproduct01", "datatypename", @@ -32,7 +32,7 @@ async function dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen() const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.get( + const result = await client.dataTypes.get( "aoiresourceGroupName", "dataproduct01", "datatypename", diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts index 06610a8937..7d0d4c6b14 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts @@ -15,7 +15,7 @@ async function dataTypesListByDataProductMaximumSetGen(): void { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.datatypes.listByDataProduct( + for await (let item of client.dataTypes.listByDataProduct( "aoiresourceGroupName", "dataproduct01", )) { @@ -36,7 +36,7 @@ async function dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleM const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.datatypes.listByDataProduct( + for await (let item of client.dataTypes.listByDataProduct( "aoiresourceGroupName", "dataproduct01", )) { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts index b554d199fc..f38d15a1ba 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts @@ -14,7 +14,7 @@ async function dataTypesUpdateMaximumSetGen(): void { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.update( + const result = await client.dataTypes.update( "aoiresourceGroupName", "dataproduct01", "datatypename", @@ -39,7 +39,7 @@ async function dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGe const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.datatypes.update( + const result = await client.dataTypes.update( "aoiresourceGroupName", "dataproduct01", "datatypename", diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts index ffb44ad60e..42121a4141 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts @@ -23,11 +23,11 @@ import { createRestError, } from "@azure-rest/core-client"; import { serializeRecord } from "../../helpers/serializerHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PollerLike, OperationState } from "@azure/core-lro"; import { DataProductsCreateOptionalParams, diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts index 3be137716a..bf97fc29c8 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts @@ -17,11 +17,11 @@ import { PathUncheckedResponse, createRestError, } from "@azure-rest/core-client"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PollerLike, OperationState } from "@azure/core-lro"; import { DataTypesCreateOptionalParams, diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/next/buildSamples.ts index a35690967e..d2bc10411f 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/next/buildSamples.ts @@ -39,7 +39,10 @@ function buildClassicalClientSample( buildExamplesForMethod(dpgContext, operation, { clientName, credentialType, - operationGroupPrefix: operationOrGroup.response.name.toLowerCase() + operationGroupPrefix: normalizeName( + operationOrGroup.response.name, + NameType.Property + ) }); } } else { From 1d0e542e9950c1fc03559bb75de2e2ef26c32c5b Mon Sep 17 00:00:00 2001 From: Jose Manuel Heredia Hidalgo Date: Mon, 19 Aug 2024 11:32:31 -0700 Subject: [PATCH 23/83] generic serializers --- .../serialization/serializers.ts | 60 ++++++++ .../unit/static-helpers/serialization.test.ts | 141 ++++++++++++++++++ 2 files changed, 201 insertions(+) create mode 100644 packages/typespec-ts/static/static-helpers/serialization/serializers.ts create mode 100644 packages/typespec-ts/test-next/unit/static-helpers/serialization.test.ts diff --git a/packages/typespec-ts/static/static-helpers/serialization/serializers.ts b/packages/typespec-ts/static/static-helpers/serialization/serializers.ts new file mode 100644 index 0000000000..7db0a9dbf5 --- /dev/null +++ b/packages/typespec-ts/static/static-helpers/serialization/serializers.ts @@ -0,0 +1,60 @@ +import { EncodingType, uint8ArrayToString } from "@typespec/ts-http-runtime"; +export const serializeRecord = withNullChecks( + ( + item: Record, + serializer?: (item: any) => any + ): Record => { + return Object.keys(item).reduce((acc, key) => { + if (isPassthroughElement(item[key])) { + acc[key] = item[key] as any; + } else if (serializer) { + const value = item[key]; + if (value !== undefined) { + acc[key] = serializer(value); + } + } else { + console.warn(`Don't know how to serialize ${item[key]}`); + acc[key] = item[key] as any; + } + return acc; + }, {}); + } +); + +export const serializePassthrough = withNullChecks((item: T): T => item); + +export const serializeArray = withNullChecks( + (items: T[], serializer: (item: T) => unknown): unknown[] => { + return items.map((item) => { + if (isPassthroughElement(item)) { + return item; + } + return serializer(item); + }); + } +); + +export const serializeUtcDateTime = withNullChecks((date: Date): string => { + // todo support encoding? + return date.toISOString(); +}); + +export const serializeBytes = withNullChecks( + (bytes: Uint8Array, encoding: EncodingType): string => { + return uint8ArrayToString(bytes, encoding); + } +); + +export function withNullChecks(fn: (input: any, ...args: any) => unknown) { + return function (input: any | null | undefined, ...args: any) { + if (input === null || input === undefined) { + return input; + } + + return fn(input, ...args); + }; +} + +export function isPassthroughElement(t: any) { + return ["number", "string", "boolean", "null"].includes(typeof t); +} diff --git a/packages/typespec-ts/test-next/unit/static-helpers/serialization.test.ts b/packages/typespec-ts/test-next/unit/static-helpers/serialization.test.ts new file mode 100644 index 0000000000..47cdd6e4ed --- /dev/null +++ b/packages/typespec-ts/test-next/unit/static-helpers/serialization.test.ts @@ -0,0 +1,141 @@ +import { describe, it, expect, vi } from "vitest"; +import { + serializeRecord, + serializePassthrough, + serializeArray, + serializeUtcDateTime, + serializeBytes, + withNullChecks, + isPassthroughElement +} from "../../../static/static-helpers/serialization/serializers.js"; +import { EncodingType } from "@typespec/ts-http-runtime"; + +describe("serializeRecord", () => { + it("should serialize a record using the provided serializer", () => { + const input = { a: 1, b: 2 }; + const serializer = (item: number) => item.toString(); + const result = serializeRecord(input, serializer); + expect(result).toEqual({ a: 1, b: 2 }); + }); + + it("should handle null and undefined correctly", () => { + const input = { a: 1, b: null, c: undefined }; + const serializer = (item: number | null) => item?.toString() ?? "null"; + const result = serializeRecord(input, serializer); + expect(result).toEqual({ a: 1, b: "null" }); + }); + + it("should use passthrough for passthrough elements", () => { + const input = { a: 1, b: "string", c: new Date("2023-08-01") }; + const result = serializeRecord(input); + expect(result).toEqual(input); + }); + + it("should warn and passthrough unhandled types", () => { + const input = { a: {}, b: [] }; + console.warn = vi.fn(); // Mock console.warn + const result = serializeRecord(input); + expect(result).toEqual(input); + expect(console.warn).toHaveBeenCalledWith( + "Don't know how to serialize [object Object]" + ); + expect(console.warn).toHaveBeenCalledWith("Don't know how to serialize "); + }); +}); + +describe("serializePassthrough", () => { + it("should return the input as-is", () => { + const input = { a: 1, b: "test" }; + const result = serializePassthrough(input); + expect(result).toBe(input); + }); + + it("should handle null and undefined correctly", () => { + const nullResult = serializePassthrough(null); + const undefinedResult = serializePassthrough(undefined); + expect(nullResult).toBeNull(); + expect(undefinedResult).toBeUndefined(); + }); +}); + +describe("serializeArray", () => { + it("should serialize an array using the provided serializer", () => { + const input = [1, 2, 3]; + const serializer = (item: number) => item.toString(); + const result = serializeArray(input, serializer); + expect(result).toEqual([1, 2, 3]); + }); + + it("should use passthrough for passthrough elements", () => { + const input = [1, "string", new Date("2023-08-01")]; + const result = serializeArray(input, (item) => item); + expect(result).toEqual(input); + }); + + it("should handle empty arrays correctly", () => { + const input: any[] = []; + const serializer = (item: any) => item.toString(); + const result = serializeArray(input, serializer); + expect(result).toEqual([]); + }); +}); + +describe("serializeUtcDateTime", () => { + it("should serialize a Date object to UTC string", () => { + const input = new Date("2023-08-01T00:00:00Z"); + const result = serializeUtcDateTime(input); + expect(result).toBe("2023-08-01T00:00:00.000Z"); + }); + + it("should handle null and undefined correctly", () => { + const nullResult = serializeUtcDateTime(null); + const undefinedResult = serializeUtcDateTime(undefined); + expect(nullResult).toBeNull(); + expect(undefinedResult).toBeUndefined(); + }); +}); + +describe("serializeBytes", () => { + it("should serialize a Uint8Array to a string with given encoding", () => { + const input = new Uint8Array([72, 101, 108, 108, 111]); // 'Hello' + const encoding: EncodingType = "utf-8"; + const result = serializeBytes(input, encoding); + expect(result).toBe("Hello"); + }); + + it("should handle null and undefined correctly", () => { + const nullResult = serializeBytes(null, "utf-8"); + const undefinedResult = serializeBytes(undefined, "utf-8"); + expect(nullResult).toBeNull(); + expect(undefinedResult).toBeUndefined(); + }); +}); + +describe("withNullChecks", () => { + it("should return null or undefined if input is null or undefined", () => { + const fn = withNullChecks((input: number) => input + 1); + expect(fn(null)).toBeNull(); + expect(fn(undefined)).toBeUndefined(); + }); + + it("should apply the function if input is not null or undefined", () => { + const fn = withNullChecks((input: number) => input + 1); + expect(fn(1)).toBe(2); + }); +}); + +describe("isPassthroughElement", () => { + it("should return true for numbers, strings, booleans, null, and dates", () => { + expect(isPassthroughElement(1)).toBe(true); + expect(isPassthroughElement("string")).toBe(true); + expect(isPassthroughElement(true)).toBe(true); + expect(isPassthroughElement(new Date())).toBe(true); + }); + + it("should return false for other types", () => { + expect(isPassthroughElement({})).toBe(false); + expect(isPassthroughElement([])).toBe(false); + expect(isPassthroughElement(() => {})).toBe(false); + expect(isPassthroughElement(null)).toBe(false); + }); +}); From 10560b3acbb8172eef368747bcd11ed97c2e2026 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 20 Aug 2024 11:08:17 +0800 Subject: [PATCH 24/83] Update the sample gen based on binder pr --- packages/typespec-ts/src/index.ts | 4 +- .../emitSamples.ts} | 41 ++++++++----------- .../typespec-ts/src/next/emitCredential.ts | 17 -------- 3 files changed, 18 insertions(+), 44 deletions(-) rename packages/typespec-ts/src/{next/buildSamples.ts => modular/emitSamples.ts} (89%) delete mode 100644 packages/typespec-ts/src/next/emitCredential.ts diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index ab8a38f1fd..5502bf6fd9 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -60,7 +60,6 @@ import { GenerationDirDetail, SdkContext } from "./utils/interfaces.js"; import { provideContext, useContext } from "./contextManager.js"; import { emitSerializerHelpersFile } from "./modular/buildHelperSerializers.js"; import { provideSdkTypes } from "./framework/hooks/sdkTypes.js"; -import { buildSamples as buildModularSamples } from "./next/buildSamples.js"; import { provideBinder } from "./framework/hooks/binder.js"; import { loadStaticHelpers } from "./framework/load-static-helpers.js"; import { @@ -76,6 +75,7 @@ import { import { emitLoggerFile } from "./modular/emitLoggerFile.js"; import { buildRestorePoller } from "./modular/buildRestorePoller.js"; import { emitTypes } from "./modular/emit-models.js"; +import { emitSamples } from "./modular/emitSamples.js"; export * from "./lib.js"; @@ -230,7 +230,7 @@ export async function $onEmit(context: EmitContext) { } async function generateModularSources() { - buildModularSamples(dpgContext); + emitSamples(dpgContext); const modularSourcesRoot = dpgContext.generationPathDetail?.modularSourcesDir ?? "src"; const project = useContext("outputProject"); diff --git a/packages/typespec-ts/src/next/buildSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts similarity index 89% rename from packages/typespec-ts/src/next/buildSamples.ts rename to packages/typespec-ts/src/modular/emitSamples.ts index d2bc10411f..d1c65fd900 100644 --- a/packages/typespec-ts/src/next/buildSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -4,30 +4,34 @@ import { resolveReference } from "../framework/reference.js"; import { SdkContext } from "../utils/interfaces.js"; import { SdkClientType, - SdkInitializationType, SdkServiceMethod, SdkServiceOperation, SdkTypeExample } from "@azure-tools/typespec-client-generator-core"; -import { emitCredential } from "./emitCredential.js"; import { NameType, normalizeName } from "@azure-tools/rlc-common"; import { useContext } from "../contextManager.js"; import { join } from "path"; import { AzureIdentityDependencies } from "../modular/external-dependencies.js"; +import { getTypeExpression } from "./type-expressions/get-type-expression.js"; -export function buildSamples(dpgContext: SdkContext) { +export function emitSamples(dpgContext: SdkContext) { for (const client of dpgContext.sdkPackage.clients) { - buildClassicalClientSample(dpgContext, client); + emitClassicalClientSample(dpgContext, client); } } -function buildClassicalClientSample( +function emitClassicalClientSample( dpgContext: SdkContext, client: SdkClientType ) { // build client-level parameters const clientName = client.name; - const credentialType = getCredentialType(client.initialization); + const credentialParameter = client.initialization.properties.find( + (p) => p.kind === "credential" + )?.type; + const credentialParameterType = credentialParameter + ? getTypeExpression(credentialParameter!) + : undefined; for (const operationOrGroup of client.methods) { if (operationOrGroup.kind === "clientaccessor") { for (const operation of operationOrGroup.response.methods) { @@ -38,7 +42,7 @@ function buildClassicalClientSample( // this is an operation buildExamplesForMethod(dpgContext, operation, { clientName, - credentialType, + credentialType: credentialParameterType, operationGroupPrefix: normalizeName( operationOrGroup.response.name, NameType.Property @@ -48,7 +52,7 @@ function buildClassicalClientSample( } else { buildExamplesForMethod(dpgContext, operationOrGroup, { clientName, - credentialType + credentialType: credentialParameterType }); } } @@ -198,24 +202,10 @@ function buildExamplesForMethod( } main().catch(console.error);`); - console.log(sourceFile.getFilePath(), sourceFile.getFullText()); -} - -function getCredentialType(initialization: SdkInitializationType) { - const param = initialization.properties.find((p) => p.kind === "credential"); - if (!param) return; - if (param.type.kind === "union") { - // TODO: support union types - return; - } - const type = emitCredential(param.type); - return ["KeyCredential", "TokenCredential"].includes(type) - ? "DefaultAzureCredential" - : undefined; } function getParameterValue(value: SdkTypeExample): string { - let retValue = value.value; + let retValue = `{} as any`; switch (value.kind) { case "string": { switch (value.type.kind) { @@ -232,6 +222,8 @@ function getParameterValue(value: SdkTypeExample): string { case "boolean": case "number": case "null": + case "any": + case "union": retValue = `${value.value}`; break; case "dict": @@ -263,10 +255,9 @@ function getParameterValue(value: SdkTypeExample): string { break; } default: - retValue = "{} as any"; break; } - return `${retValue}`; + return retValue; } function escapeSpecialCharToSpace(str: string) { diff --git a/packages/typespec-ts/src/next/emitCredential.ts b/packages/typespec-ts/src/next/emitCredential.ts deleted file mode 100644 index b80110ac6e..0000000000 --- a/packages/typespec-ts/src/next/emitCredential.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { SdkCredentialType } from "@azure-tools/typespec-client-generator-core"; - -export function emitCredential(type: SdkCredentialType): string { - // TODO: How to handle this for 3p? - // TODO: Handle "external" dependencies - switch (type.scheme.type) { - case "apiKey": - case "http": - return `KeyCredential`; - case "oauth2": - case "openIdConnect": - return "TokenCredential"; - default: - // TODO: Add diagnostics about unknown credential type - return "any"; - } -} From 87731f1ea7be880abd825b8db7801c128b2df928 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 20 Aug 2024 13:42:29 +0800 Subject: [PATCH 25/83] Generate samples for hierachy client --- .../typespec-ts/samples-dev/bCOp1Sample.ts | 24 +++++++ .../typespec-ts/samples-dev/bECOp1Sample.ts | 22 ++++++ .../typespec-ts/samples-dev/bOp1Sample.ts | 24 +++++++ .../typespec-ts/samples-dev/op1Sample.ts | 24 +++++++ .../typespec-ts/src/api/b/c/index.ts | 1 - .../typespec-ts/src/api/b/e/c/index.ts | 1 - .../generated/typespec-ts/src/api/b/index.ts | 1 - .../generated/typespec-ts/src/api/d/index.ts | 2 +- .../typespec-ts/src/api/operations.ts | 2 +- .../typespec-ts/src/classic/b/c/index.ts | 1 - .../typespec-ts/src/classic/b/e/c/index.ts | 1 - .../typespec-ts/src/classic/b/index.ts | 1 - .../typespec-ts/src/classic/d/index.ts | 2 +- .../generated/typespec-ts/src/index.ts | 7 +- .../generated/typespec-ts/src/models/index.ts | 9 ++- .../typespec-ts/src/models/models.ts | 38 +++++++---- .../hierarchy_generic/spec/examples/bOp1.json | 22 ++++++ .../hierarchy_generic/spec/examples/cOp1.json | 22 ++++++ .../hierarchy_generic/spec/examples/op1.json | 22 ++++++ .../test/hierarchy_generic/tspconfig.yaml | 2 + .../typespec-ts/src/modular/emitSamples.ts | 67 +++++++++++++------ 21 files changed, 247 insertions(+), 48 deletions(-) create mode 100644 packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bCOp1Sample.ts create mode 100644 packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bECOp1Sample.ts create mode 100644 packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bOp1Sample.ts create mode 100644 packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts create mode 100644 packages/typespec-test/test/hierarchy_generic/spec/examples/bOp1.json create mode 100644 packages/typespec-test/test/hierarchy_generic/spec/examples/cOp1.json create mode 100644 packages/typespec-test/test/hierarchy_generic/spec/examples/op1.json diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bCOp1Sample.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bCOp1Sample.ts new file mode 100644 index 0000000000..17812d2b9a --- /dev/null +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bCOp1Sample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { FooClient } from "@msinternal/hierarchy-generic"; + +/** + * This sample demonstrates how to undefined + * + * @summary undefined + * x-ms-original-file: cOp1.json + */ +async function cOp1() { + const client = new FooClient(); + const result = await client.b.c.op1({ + prop2: "00000000-0000-0000-0000-00000000000", + }); + console.log(result); +} + +async function main() { + cOp1(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bECOp1Sample.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bECOp1Sample.ts new file mode 100644 index 0000000000..677866bf17 --- /dev/null +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bECOp1Sample.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { FooClient } from "@msinternal/hierarchy-generic"; + +/** + * This sample demonstrates how to undefined + * + * @summary undefined + * x-ms-original-file: cOp1.json + */ +async function cOp1() { + const client = new FooClient(); + const result = await client.b.e.c.op1({}); + console.log(result); +} + +async function main() { + cOp1(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bOp1Sample.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bOp1Sample.ts new file mode 100644 index 0000000000..487a31f535 --- /dev/null +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bOp1Sample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { FooClient } from "@msinternal/hierarchy-generic"; + +/** + * This sample demonstrates how to undefined + * + * @summary undefined + * x-ms-original-file: bOp1.json + */ +async function bOpeS() { + const client = new FooClient(); + const result = await client.b.op1({ + prop2: "00000000-0000-0000-0000-00000000000", + }); + console.log(result); +} + +async function main() { + bOpeS(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts new file mode 100644 index 0000000000..362f997cbb --- /dev/null +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { FooClient } from "@msinternal/hierarchy-generic"; + +/** + * This sample demonstrates how to undefined + * + * @summary undefined + * x-ms-original-file: op1.json + */ +async function optop() { + const client = new FooClient(); + const result = await client.op1({ + prop1: "00000000-0000-0000-0000-00000000000", + }); + console.log(result); +} + +async function main() { + optop(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/c/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/c/index.ts index 74a1aaa5c2..b6f1b1619c 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/c/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/c/index.ts @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { BA } from "../../../models/models.js"; import { FooContext as Client } from "../../index.js"; import { StreamableMethod, diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/e/c/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/e/c/index.ts index 233c4f407c..a9f21525f3 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/e/c/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/e/c/index.ts @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { BEA } from "../../../../models/models.js"; import { FooContext as Client } from "../../../index.js"; import { StreamableMethod, diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/index.ts index 2edcde8260..3d516f18d6 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/index.ts @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { BA } from "../../models/models.js"; import { FooContext as Client } from "../index.js"; import { StreamableMethod, diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts index 2ff751524a..e12a2e0d99 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { A } from "../../models/models.js"; import { FooContext as Client } from "../index.js"; import { StreamableMethod, @@ -9,6 +8,7 @@ import { PathUncheckedResponse, createRestError, } from "@azure-rest/core-client"; +import { A } from "../../models/models.js"; import { DOp1OptionalParams } from "../../models/options.js"; export function _op1Send( diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts index 8c65b8acf0..7dff7fa132 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { A } from "../models/models.js"; import { FooContext as Client } from "./index.js"; import { StreamableMethod, @@ -9,6 +8,7 @@ import { PathUncheckedResponse, createRestError, } from "@azure-rest/core-client"; +import { A } from "../models/models.js"; import { Op1OptionalParams } from "../models/options.js"; export function _op1Send( diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/c/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/c/index.ts index 442d4309c1..d9ec997d18 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/c/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/c/index.ts @@ -2,7 +2,6 @@ // Licensed under the MIT license. import { FooContext } from "../../../api/fooContext.js"; -import { BA } from "../../../models/models.js"; import { op1 } from "../../../api/b/c/index.js"; import { BCOp1OptionalParams } from "../../../models/options.js"; diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/e/c/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/e/c/index.ts index 13686dad55..b282b10885 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/e/c/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/e/c/index.ts @@ -2,7 +2,6 @@ // Licensed under the MIT license. import { FooContext } from "../../../../api/fooContext.js"; -import { BEA } from "../../../../models/models.js"; import { op1 } from "../../../../api/b/e/c/index.js"; import { BECOp1OptionalParams } from "../../../../models/options.js"; diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/index.ts index 696a0989c4..3200b855b5 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/index.ts @@ -2,7 +2,6 @@ // Licensed under the MIT license. import { FooContext } from "../../api/fooContext.js"; -import { BA } from "../../models/models.js"; import { op1 } from "../../api/b/index.js"; import { BOp1OptionalParams } from "../../models/options.js"; import { BCOperations, getBCOperations } from "./c/index.js"; diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/d/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/d/index.ts index 8ee80c842c..84b0b244ae 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/d/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/d/index.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. import { FooContext } from "../../api/fooContext.js"; -import { A } from "../../models/models.js"; import { op1 } from "../../api/d/index.js"; +import { A } from "../../models/models.js"; import { DOp1OptionalParams } from "../../models/options.js"; /** Interface representing a D operations. */ diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/index.ts index fcb67b9adc..86c50076e0 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/index.ts @@ -3,9 +3,12 @@ export { FooClient, FooClientOptionalParams } from "./fooClient.js"; export { + aSerializer_1, + aSerializer_2, A, - BA, - BEA, + A_1, + A_2, + FooClientOptions, Op1OptionalParams, BOp1OptionalParams, BECOp1OptionalParams, diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/index.ts index c658e318bc..d0618ee2fa 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/index.ts @@ -1,7 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export { A, BA, BEA } from "./models.js"; +export { + aSerializer_1, + aSerializer_2, + A, + A_1, + A_2, + FooClientOptions, +} from "./models.js"; export { Op1OptionalParams, BOp1OptionalParams, diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts index eb5e10d4f1..ebfc9a5d41 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts @@ -5,28 +5,38 @@ export interface A { prop1: string; } -export function aSerializer(item: A): Record { - return { - prop1: item["prop1"], - }; +export function aSerializer(input: A): unknown { + console.log(input); + throw new Error("Not implemented"); } -export interface BA { +export interface A_1 { prop2: string; } -export function bASerializer(item: BA): Record { - return { - prop2: item["prop2"], - }; +export function aSerializer_1(input: A_1): unknown { + console.log(input); + throw new Error("Not implemented"); } -export interface BEA { +export interface A_2 { prop3: string; } -export function bEASerializer(item: BEA): Record { - return { - prop3: item["prop3"], - }; +export function aSerializer_2(input: A_2): unknown { + console.log(input); + throw new Error("Not implemented"); +} + +/** Initialization class for the client */ +export interface FooClientOptions { + /** Service host */ + endpoint: string; +} + +export function fooClientOptionsSerializer(input: { + endpoint: string; +}): unknown { + console.log(input); + throw new Error("Not implemented"); } diff --git a/packages/typespec-test/test/hierarchy_generic/spec/examples/bOp1.json b/packages/typespec-test/test/hierarchy_generic/spec/examples/bOp1.json new file mode 100644 index 0000000000..e359a81e14 --- /dev/null +++ b/packages/typespec-test/test/hierarchy_generic/spec/examples/bOp1.json @@ -0,0 +1,22 @@ +{ + "title": "B_OpeS", + "operationId": "B_Op1", + "parameters": { + "body": { + "prop2": "00000000-0000-0000-0000-00000000000" + } + }, + "responses": { + "200": { + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": ["scope"], + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000" + } + } + } +} diff --git a/packages/typespec-test/test/hierarchy_generic/spec/examples/cOp1.json b/packages/typespec-test/test/hierarchy_generic/spec/examples/cOp1.json new file mode 100644 index 0000000000..afa819493d --- /dev/null +++ b/packages/typespec-test/test/hierarchy_generic/spec/examples/cOp1.json @@ -0,0 +1,22 @@ +{ + "title": "C_Op1", + "operationId": "C_Op1", + "parameters": { + "body": { + "prop2": "00000000-0000-0000-0000-00000000000" + } + }, + "responses": { + "200": { + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": ["scope"], + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000" + } + } + } +} diff --git a/packages/typespec-test/test/hierarchy_generic/spec/examples/op1.json b/packages/typespec-test/test/hierarchy_generic/spec/examples/op1.json new file mode 100644 index 0000000000..1ba456edc1 --- /dev/null +++ b/packages/typespec-test/test/hierarchy_generic/spec/examples/op1.json @@ -0,0 +1,22 @@ +{ + "title": "Optop", + "operationId": "Op1", + "parameters": { + "body": { + "prop1": "00000000-0000-0000-0000-00000000000" + } + }, + "responses": { + "200": { + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": ["scope"], + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000" + } + } + } +} diff --git a/packages/typespec-test/test/hierarchy_generic/tspconfig.yaml b/packages/typespec-test/test/hierarchy_generic/tspconfig.yaml index 008c5a7e19..03d64c2461 100644 --- a/packages/typespec-test/test/hierarchy_generic/tspconfig.yaml +++ b/packages/typespec-test/test/hierarchy_generic/tspconfig.yaml @@ -2,7 +2,9 @@ emit: - "@azure-tools/typespec-ts" options: "@azure-tools/typespec-ts": + examples-directory: "{project-root}/spec/examples" azureSdkForJs: false + generateSample: true isModularLibrary: true "emitter-output-dir": "{project-root}/generated/typespec-ts" packageDetails: diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index d1c65fd900..33049a6b4f 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -16,13 +16,14 @@ import { getTypeExpression } from "./type-expressions/get-type-expression.js"; export function emitSamples(dpgContext: SdkContext) { for (const client of dpgContext.sdkPackage.clients) { - emitClassicalClientSample(dpgContext, client); + emitClassicalClientSamples(dpgContext, client); } } -function emitClassicalClientSample( +function emitClassicalClientSamples( dpgContext: SdkContext, - client: SdkClientType + client: SdkClientType, + operationGroupPrefix?: string ) { // build client-level parameters const clientName = client.name; @@ -32,33 +33,52 @@ function emitClassicalClientSample( const credentialParameterType = credentialParameter ? getTypeExpression(credentialParameter!) : undefined; + emitClassicalClientSamplesDfs( + dpgContext, + client, + clientName, + credentialParameterType, + operationGroupPrefix ?? "" + ); +} + +function emitClassicalClientSamplesDfs( + dpgContext: SdkContext, + client: SdkClientType, + clientName: string, + credentialParameterType?: string, + operationGroupPrefix?: string +) { for (const operationOrGroup of client.methods) { if (operationOrGroup.kind === "clientaccessor") { - for (const operation of operationOrGroup.response.methods) { - // TODO: support nested operation groups - if (operation.kind === "clientaccessor") { - continue; - } - // this is an operation - buildExamplesForMethod(dpgContext, operation, { - clientName, - credentialType: credentialParameterType, - operationGroupPrefix: normalizeName( - operationOrGroup.response.name, - NameType.Property - ) - }); + let prefix = normalizeName( + operationOrGroup.response.name, + NameType.Property + ); + // append hierarchy prefix if hierarchyClient is enabled + if (dpgContext.rlcOptions?.hierarchyClient === true) { + prefix = + (operationGroupPrefix ? `${operationGroupPrefix}.` : "") + prefix; } + + emitClassicalClientSamplesDfs( + dpgContext, + operationOrGroup.response, + clientName, + credentialParameterType, + prefix + ); } else { - buildExamplesForMethod(dpgContext, operationOrGroup, { + emitMethodSamples(dpgContext, operationOrGroup, { clientName, - credentialType: credentialParameterType + credentialType: credentialParameterType, + operationGroupPrefix }); } } } -function buildExamplesForMethod( +function emitMethodSamples( dpgContext: SdkContext, method: SdkServiceMethod, options: { @@ -67,6 +87,10 @@ function buildExamplesForMethod( operationGroupPrefix?: string; } ) { + const examples = method.operation.examples ?? []; + if (examples.length === 0) { + return; + } const project = useContext("outputProject"); const operationPrefix = `${options.operationGroupPrefix ?? ""} ${ method.name @@ -92,7 +116,7 @@ function buildExamplesForMethod( }); } - for (const example of method.operation.examples ?? []) { + for (const example of examples) { // build example const exampleFunctionBody: string[] = [], clientParams: string[] = [], @@ -182,7 +206,6 @@ function buildExamplesForMethod( kind: StructureKind.Function, isAsync: true, name: exampleFunctionType.name, - returnType: exampleFunctionType.returnType, statements: exampleFunctionType.body, docs: [ `This sample demonstrates how to ${normalizedDescription}\n\n@summary ${normalizedDescription}\nx-ms-original-file: ${example.filePath}` From cd67ee95848b23bcef9e69b0b568cc37c676eccf Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 20 Aug 2024 14:11:38 +0800 Subject: [PATCH 26/83] Handle property renaming --- .../typespec-ts/samples-dev/op1Sample.ts | 2 +- .../generated/typespec-ts/src/api/d/index.ts | 2 +- .../typespec-ts/src/api/operations.ts | 2 +- .../typespec-ts/src/models/models.ts | 2 +- .../test/hierarchy_generic/spec/main.tsp | 3 +++ .../typespec-ts/src/modular/emitSamples.ts | 22 +++++++++++++++++-- 6 files changed, 27 insertions(+), 6 deletions(-) diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts index 362f997cbb..af2dfe0b08 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts @@ -12,7 +12,7 @@ import { FooClient } from "@msinternal/hierarchy-generic"; async function optop() { const client = new FooClient(); const result = await client.op1({ - prop1: "00000000-0000-0000-0000-00000000000", + propRename: "00000000-0000-0000-0000-00000000000", }); console.log(result); } diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts index e12a2e0d99..07d47e5e41 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts @@ -20,7 +20,7 @@ export function _op1Send( .path("/d") .post({ ...operationOptionsToRequestParameters(options), - body: { prop1: body["prop1"] }, + body: { prop1: body["propRename"] }, }); } diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts index 7dff7fa132..3147c9efb1 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts @@ -20,7 +20,7 @@ export function _op1Send( .path("/") .post({ ...operationOptionsToRequestParameters(options), - body: { prop1: body["prop1"] }, + body: { prop1: body["propRename"] }, }); } diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts index ebfc9a5d41..0d07971b19 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. export interface A { - prop1: string; + propRename: string; } export function aSerializer(input: A): unknown { diff --git a/packages/typespec-test/test/hierarchy_generic/spec/main.tsp b/packages/typespec-test/test/hierarchy_generic/spec/main.tsp index 472e66bf29..ae5bf84391 100644 --- a/packages/typespec-test/test/hierarchy_generic/spec/main.tsp +++ b/packages/typespec-test/test/hierarchy_generic/spec/main.tsp @@ -1,6 +1,8 @@ import "@typespec/rest"; import "@typespec/http"; +import "@azure-tools/typespec-client-generator-core"; +using Azure.ClientGenerator.Core; using TypeSpec.Rest; using TypeSpec.Http; @@ -8,6 +10,7 @@ using TypeSpec.Http; namespace Foo; model A { + @clientName("propRename", "javascript") prop1: string; } diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 33049a6b4f..0c2799c49f 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -6,6 +6,7 @@ import { SdkClientType, SdkServiceMethod, SdkServiceOperation, + SdkType, SdkTypeExample } from "@azure-tools/typespec-client-generator-core"; import { NameType, normalizeName } from "@azure-tools/rlc-common"; @@ -251,7 +252,7 @@ function getParameterValue(value: SdkTypeExample): string { break; case "dict": case "model": { - // TODO: handle the client name and serialization name gaps + const mapper = getPropertyClientNameMapper(value.type); const values = []; const additionalPropertiesValue = value.kind === "model" ? value?.additionalPropertiesValue : {}; @@ -263,7 +264,9 @@ function getParameterValue(value: SdkTypeExample): string { if (propValue === undefined || propValue === null) { continue; } - const propRetValue = `"${propName}": ` + getParameterValue(propValue); + const propRetValue = + `"${mapper.get(propName) ?? propName}": ` + + getParameterValue(propValue); values.push(propRetValue); } @@ -283,6 +286,21 @@ function getParameterValue(value: SdkTypeExample): string { return retValue; } +function getPropertyClientNameMapper(model: SdkType) { + const mapper = new Map(); + if (model.kind !== "model") { + return mapper; + } + for (const prop of model.properties) { + if (prop.kind !== "property") { + continue; + } + + mapper.set(prop.serializedName, prop.name); + } + return mapper; +} + function escapeSpecialCharToSpace(str: string) { if (!str) { return str; From efea27bb1606603a6d48934f608c3b235304cd97 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Wed, 21 Aug 2024 11:13:34 +0800 Subject: [PATCH 27/83] update uts --- .vscode/launch.json | 4 +- .../test/modularUnit/scenarios.spec.ts | 232 ++++++++++++++++++ .../scenarios/samples/exampleTypesChecking.md | 80 ++++++ 3 files changed, 314 insertions(+), 2 deletions(-) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios.spec.ts create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md diff --git a/.vscode/launch.json b/.vscode/launch.json index a1980d5bd5..1d8e588f42 100755 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -112,7 +112,7 @@ { "name": "[TypeSpec] Smoke Test Debug", "request": "launch", - "cwd": "${workspaceFolder}/packages/typespec-test/test/NetworkAnalytics.Management", + "cwd": "${workspaceFolder}/packages/typespec-test/test/hierarchy_generic", "runtimeArgs": ["tsp", "compile", "./spec"], "runtimeExecutable": "npx", "skipFiles": ["/**"], @@ -146,7 +146,7 @@ "--timeout", "999999", "--colors", - "./test/unit/**/*.spec.ts" + "./test/modularUnit/**/*.spec.ts" ], "runtimeExecutable": "npx", "skipFiles": ["/**"], diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts new file mode 100644 index 0000000000..b7f8783d27 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -0,0 +1,232 @@ +import { assert } from "chai"; +import { readdirSync, readFileSync, statSync, writeFileSync } from "fs"; +import path from "path"; +import { + emitModularModelsFromTypeSpec, + emitModularOperationsFromTypeSpec +} from "../util/emitUtil.js"; +import { assertEqualContent } from "../util/testUtil.js"; +import { format } from "prettier"; +import { prettierTypeScriptOptions } from "../../src/lib.js"; + +const SCENARIOS_LOCATION = "./test/modularUnit/scenarios/samples"; + +const SCENARIOS_UPDATE = false; + +type EmitterFunction = ( + tsp: string, + namedArgs: Record +) => Promise; + +/** + * Mapping of different snapshot types to how to get them. + * Snapshot types can take single-word string arguments templated in curly braces {} and are otherwise regex + * + * TODO: trying to figure out the best syntax for this; the existing "emit" functions have a lot of positional boolean options. + * It would be good to make it easy to specify what options you want in a clear way. + */ +const OUTPUT_CODE_BLOCK_TYPES: Record = { + // Snapshot of a particular interface named {name} in the models file + "(ts|typescript) models interface {name}": async (tsp, { name }) => { + const result = await emitModularModelsFromTypeSpec(tsp); + return result!.getInterfaceOrThrow(name ?? "No name specified!").getText(); + }, + + // Snapshot of a particular function named {name} in the models file + "(ts|typescript) models function {name}": async (tsp, { name }) => { + const result = await emitModularModelsFromTypeSpec(tsp); + + if (result === undefined) { + return "// (file was not generated)"; + } + + return result.getFunctionOrThrow(name ?? "No name specified!").getText(); + }, + + // Snapshot of the entire models file + "(ts|typescript) models": async (tsp) => { + const result = await emitModularModelsFromTypeSpec(tsp); + + if (result === undefined) { + return "// (file was not generated)"; + } + + return result.getFullText(); + }, + + // Snapshot of the options + "(ts|typescript) models:withOptions interface {name}": async ( + tsp, + { name } + ) => { + const result = await emitModularModelsFromTypeSpec(tsp, true); + + if (result === undefined) { + return "// (file was not generated)"; + } + + return result.getInterfaceOrThrow(name ?? "No name specified!").getText(); + }, + + // Snapshot of the entire models file + "(ts|typescript) models:withOptions": async (tsp) => { + const result = await emitModularModelsFromTypeSpec(tsp, true); + + if (result === undefined) { + return "// (file was not generated)"; + } + + return result.getFullText(); + }, + + // Snapshot of the entire operations file for when there is only one operation group + // If there is more than one operations group, currently we throw + "(ts|typescript) operations": async (tsp) => { + const result = await emitModularOperationsFromTypeSpec(tsp); + assert.equal(result?.length, 1, "Expected exactly 1 source file"); + return result![0]!.getFullText(); + }, + + // Snapshot of a specific function in the operations definitions + // Throws if more than one operations group generated + "(ts|typescript) operations function {name}": async (tsp, { name }) => { + const result = await emitModularOperationsFromTypeSpec(tsp); + assert.equal(result?.length, 1, "Expected exactly 1 source file"); + return result![0]!.getFunctionOrThrow(name!).getText(); + } +}; + +describe.only("Scenarios", function () { + describeScenarios(SCENARIOS_LOCATION); +}); + +function describeScenarios(location: string) { + const children = readdirSync(location); + console.log("Scenarios found: ", children, location); + for (const child of children) { + const fullPath = path.join(location, child); + const stat = statSync(fullPath); + if (stat.isDirectory()) { + describe(child, function () { + describeScenarios(fullPath); + }); + } else { + describeScenario(fullPath); + } + } +} + +function describeScenario(scenarioFile: string) { + let content = readFileSync(scenarioFile, { encoding: "utf-8" }); + + // Reads the first line, which should be a top-level header (h1). + // This becomes the name of the describe block for this scenario. + const scenarioName = + content.split("\n")[0]?.replace(/^#+\s+/, "") + + (SCENARIOS_UPDATE ? " (UPDATING)" : ""); + + // Mark the test as .only if the test title starts with "only:". Useful for + // debuggging and updating. + (scenarioName.toLowerCase().startsWith("only:") ? describe.only : describe)( + scenarioName!, + function () { + const codeBlocks = getCodeBlocks(content); + + // Find all TypeSpec codeblocks. If there are multiple, concat them and treat them as a single TypeSpec. + const typeSpecInput = codeBlocks + .filter((x) => x.heading === "tsp" || x.heading === "typespec") + .map((x) => x.content) + .join("\n"); + const examplesInput = codeBlocks.filter((x) => x.heading === "json"); + console.log("TypeSpec examples: ", examplesInput); + const testCodeBlocks = codeBlocks.filter((x) => + x.heading.startsWith("ts") + ); + + for (const codeBlock of testCodeBlocks) { + let tested = false; + for (const [template, fn] of Object.entries(OUTPUT_CODE_BLOCK_TYPES)) { + // This regex creates a named capture group for each template argument + const templateRegex = new RegExp( + "^" + template.replace(/\{(\w+)\}/g, "(?<$1>\\w+)") + "$" + ); + const match = codeBlock.heading.match(templateRegex); + + if (match !== null) { + const namedArgs = match.groups; + + it(codeBlock.heading, async function () { + const result = await fn(typeSpecInput, namedArgs ?? {}); + + if (SCENARIOS_UPDATE) { + content = updateCodeBlock( + content, + codeBlock.heading, + (await format(result, prettierTypeScriptOptions)).trim() + ); + } else { + await assertEqualContent(codeBlock.content, result, true); + } + }); + + tested = true; + } + } + + if (!tested) { + // Empty test case to mark it as skipped + it.skip(codeBlock.heading, function () {}); + } + } + + // Update after all the tests in the scenario if write mode was enabled + afterEach(function () { + if (SCENARIOS_UPDATE) { + writeFileSync(scenarioFile, content); + } + }); + } + ); +} + +interface CodeBlock { + content: string; + heading: string; +} + +/** + * Finds all code blocks in the input file text + * @param fileText Full text of the input file + * @returns List of code blocks in the source file with their heading (i.e. the language details after the first ```) and the content. + */ +function getCodeBlocks(fileText: string): CodeBlock[] { + fileText = fileText.replace(/\r\n/g, "\n"); + const matches = fileText.matchAll( + /^```(?[^\n]+)\n(?(.|\n)*?)```$/gm + ); + + return [...matches].map((match) => ({ + content: match.groups!["content"]!, + heading: match.groups!["heading"]! + })); +} + +/** + * Update a code block's content in a given file, returning the updated file content. + * + * @param file The full text of the input file. + * @param codeBlockHeading The heading of the code block whose content should be replaced. + * @param newContent The content to replace the code block's content with. + * @returns The new file content that results after replacing the content of the code block with the new content. + */ +function updateCodeBlock( + file: string, + codeBlockHeading: string, + newContent: string +): string { + const lines = file.split("\n"); + const start = lines.indexOf("```" + codeBlockHeading) + 1; + const end = lines.indexOf("```", start); + + return [...lines.slice(0, start), newContent, ...lines.slice(end)].join("\n"); +} diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md new file mode 100644 index 0000000000..fcafefc5df --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md @@ -0,0 +1,80 @@ +# Should map empty anonymous model ({}) to Record + +The return type for an empty anonymous model `{}` should be Record + +## TypeSpec + +```tsp +model Foo { + bar: string; +} + +model Widget { + strValue: string; + numValue: int32; + enumValue: "red" | "blue"; + modelValue: Foo; + dateValue: utcDateTime; + arrValue: string[]; + unionValue: Foo | string; + nullValue: null; + ...Record; +} + +op read(body: Widget): void; +``` + +## Example + +```json +{ + "title": "read", + "operationId": "read", + "parameters": { + "body": { + "strValue": "00000000-0000-0000-0000-00000000000", + "numValue": 0.12, + "enumValue": "red", + "modelValue": { + "bar": "bar value" + }, + "dateValue": "2022-08-09", + "arrValue": ["x", "y"], + "unionValue": "test", + "nullValue": null, + "additionalProp": "additional prop" + } + }, + "responses": { + "200": {} + } +} +``` + +## Operations + +Body should get cast to `any` in the deserialize function: + +```ts operations function _readDeserialize +export async function _readDeserialize( + result: Read200Response +): Promise> { + if (result.status !== "200") { + throw createRestError(result); + } + + return result.body as any; +} +``` + +The operation should have return type `Record`: + +```ts operations function read +export async function read( + context: string, + options: ReadOptionalParams = { requestOptions: {} } +): Promise> { + const result = await _readSend(context, options); + return _readDeserialize(result); +} +``` From 967696fef2a447a5406c51958da027c968b9dfcb Mon Sep 17 00:00:00 2001 From: "Jiao Di (MSFT)" <80496810+v-jiaodi@users.noreply.github.com> Date: Thu, 22 Aug 2024 13:37:36 +0800 Subject: [PATCH 28/83] add example client test case --- .../test/commands/cadl-ranch-list.js | 8 ++ .../integration/azureExampleClient.spec.ts | 35 ++++++++ .../generated/azure/example/basic/.gitignore | 6 ++ .../azure/example/basic/src/index.d.ts | 84 +++++++++++++++++++ .../azure/example/basic/tspconfig.yaml | 12 +++ .../azureExampleClient.spec.ts | 29 +++++++ .../generated/azure/example/basic/.gitignore | 6 ++ .../azure/example/basic/src/index.d.ts | 43 ++++++++++ .../azure/example/basic/tspconfig.yaml | 12 +++ 9 files changed, 235 insertions(+) create mode 100644 packages/typespec-ts/test/integration/azureExampleClient.spec.ts create mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore create mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts create mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml create mode 100644 packages/typespec-ts/test/modularIntegration/azureExampleClient.spec.ts create mode 100644 packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/.gitignore create mode 100644 packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/src/index.d.ts create mode 100644 packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml diff --git a/packages/typespec-ts/test/commands/cadl-ranch-list.js b/packages/typespec-ts/test/commands/cadl-ranch-list.js index eae788b9d0..7be2f8fa22 100644 --- a/packages/typespec-ts/test/commands/cadl-ranch-list.js +++ b/packages/typespec-ts/test/commands/cadl-ranch-list.js @@ -278,6 +278,10 @@ export const rlcTsps = [ { outputPath: "azure/resource-manager/models/common-types/managed-identity", inputPath: "azure/resource-manager/models/common-types/managed-identity" + }, + { + outputPath: "azure/example/basic", + inputPath: "azure/example/basic" } ]; @@ -538,6 +542,10 @@ export const modularTsps = [ { outputPath: "azure/resource-manager/models/common-types/managed-identity", inputPath: "azure/resource-manager/models/common-types/managed-identity" + }, + { + outputPath: "azure/example/basic", + inputPath: "azure/example/basic" } ]; diff --git a/packages/typespec-ts/test/integration/azureExampleClient.spec.ts b/packages/typespec-ts/test/integration/azureExampleClient.spec.ts new file mode 100644 index 0000000000..b01d0d0750 --- /dev/null +++ b/packages/typespec-ts/test/integration/azureExampleClient.spec.ts @@ -0,0 +1,35 @@ +import BasicClientFactory, { + BasicClient +} from "./generated/azure/example/basic/src/index.js"; +import { assert } from "chai"; +describe("Basic Rest Client", () => { + let client: BasicClient; + + beforeEach(() => { + client = BasicClientFactory({ allowInsecureConnection: true }); + }); + + it("basic example client action", async () => { + const result = await client.path("/azure/example/basic/basic").post({ + queryParameters: { + "query-param": "query", + "api-version": "2022-12-01-preview" + }, + headers: { "header-param": "header" }, + body: { + stringProperty: "text", + modelProperty: { + int32Property: 1, + float32Property: 1.5, + enumProperty: "EnumValue1" + }, + arrayProperty: ["item"], + recordProperty: { + record: "value" + } + } + }); + assert.strictEqual(result.status, "200"); + assert.strictEqual(result.body.stringProperty, "text"); + }); +}); diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore b/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore new file mode 100644 index 0000000000..39220655cc --- /dev/null +++ b/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore @@ -0,0 +1,6 @@ +/** +!/src +/src/** +!/src/index.d.ts +!/.gitignore +!/tspconfig.yaml diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts b/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts new file mode 100644 index 0000000000..2d08ef41c7 --- /dev/null +++ b/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts @@ -0,0 +1,84 @@ +import { Client } from '@azure-rest/core-client'; +import { ClientOptions } from '@azure-rest/core-client'; +import { HttpResponse } from '@azure-rest/core-client'; +import { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; +import { RequestParameters } from '@azure-rest/core-client'; +import { StreamableMethod } from '@azure-rest/core-client'; + +export declare interface ActionRequest { + stringProperty: string; + modelProperty?: Model; + arrayProperty?: string[]; + recordProperty?: Record; +} + +export declare interface ActionResponseOutput { + stringProperty: string; + modelProperty?: ModelOutput; + arrayProperty?: string[]; + recordProperty?: Record; +} + +export declare interface Basic { + post(options: BasicParameters): StreamableMethod; +} + +export declare interface Basic200Response extends HttpResponse { + status: "200"; + body: ActionResponseOutput; +} + +export declare interface BasicBodyParam { + body: ActionRequest; +} + +export declare type BasicClient = Client & { + path: Routes; +}; + +export declare interface BasicClientOptions extends ClientOptions { + apiVersion?: string; +} + +export declare interface BasicHeaderParam { + headers: RawHttpHeadersInput & BasicHeaders; +} + +export declare interface BasicHeaders { + "header-param": string; +} + +export declare type BasicParameters = BasicQueryParam & BasicHeaderParam & BasicBodyParam & RequestParameters; + +export declare interface BasicQueryParam { + queryParameters: BasicQueryParamProperties; +} + +export declare interface BasicQueryParamProperties { + "query-param": string; +} + +declare function createClient({ apiVersion, ...options }?: BasicClientOptions): BasicClient; +export default createClient; + +export declare type Enum = string; + +export declare type EnumOutput = string; + +export declare interface Model { + int32Property?: number; + float32Property?: number; + enumProperty?: Enum; +} + +export declare interface ModelOutput { + int32Property?: number; + float32Property?: number; + enumProperty?: EnumOutput; +} + +export declare interface Routes { + (path: "/azure/example/basic/azure/example/basic/basic"): Basic; +} + +export { } diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml b/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml new file mode 100644 index 0000000000..af9776cfe4 --- /dev/null +++ b/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml @@ -0,0 +1,12 @@ +emit: + - "@azure-tools/typespec-ts" +options: + "@azure-tools/typespec-ts": + "emitter-output-dir": "{project-root}" + generateMetadata: true + generateTest: false + addCredentials: false + azureSdkForJs: false + isTypeSpecTest: true + packageDetails: + name: "@msinternal/example" diff --git a/packages/typespec-ts/test/modularIntegration/azureExampleClient.spec.ts b/packages/typespec-ts/test/modularIntegration/azureExampleClient.spec.ts new file mode 100644 index 0000000000..041e2b0e62 --- /dev/null +++ b/packages/typespec-ts/test/modularIntegration/azureExampleClient.spec.ts @@ -0,0 +1,29 @@ +import { AzureExampleClient } from "./generated/azure/example/basic/src/index.js"; +import { assert } from "chai"; +describe("AzureExampleClient Client", () => { + let client: AzureExampleClient; + + beforeEach(() => { + client = new AzureExampleClient({ + allowInsecureConnection: true, + endpoint: "http://localhost:3002" + }); + }); + + it("basic example client action", async () => { + const result = await client.basicAction("query", "header", { + stringProperty: "text", + modelProperty: { + int32Property: 1, + float32Property: 1.5, + enumProperty: "EnumValue1" + }, + arrayProperty: ["item"], + recordProperty: { + record: "value" + } + }); + + assert.strictEqual(result.stringProperty, "text"); + }); +}); diff --git a/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/.gitignore b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/.gitignore new file mode 100644 index 0000000000..39220655cc --- /dev/null +++ b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/.gitignore @@ -0,0 +1,6 @@ +/** +!/src +/src/** +!/src/index.d.ts +!/.gitignore +!/tspconfig.yaml diff --git a/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/src/index.d.ts b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/src/index.d.ts new file mode 100644 index 0000000000..15f38874b8 --- /dev/null +++ b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/src/index.d.ts @@ -0,0 +1,43 @@ +import { ClientOptions } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { Pipeline } from '@azure/core-rest-pipeline'; + +export declare interface ActionRequest { + stringProperty: string; + modelProperty?: Model; + arrayProperty?: string[]; + recordProperty?: Record; +} + +export declare interface ActionResponse { + stringProperty: string; + modelProperty?: Model; + arrayProperty?: string[]; + recordProperty?: Record; +} + +export declare class AzureExampleClient { + private _client; + readonly pipeline: Pipeline; + constructor(options?: AzureExampleClientOptionalParams); + basicAction(queryParam: string, headerParam: string, body: ActionRequest, options?: BasicActionOptionalParams): Promise; +} + +export declare interface AzureExampleClientOptionalParams extends ClientOptions { + apiVersion?: string; +} + +export declare interface BasicActionOptionalParams extends OperationOptions { +} + +export declare type Enum = "EnumValue1"; + +export declare interface Model { + int32Property?: number; + float32Property?: number; + enumProperty?: Enum; +} + +export declare type Versions = "2022-12-01-preview"; + +export { } diff --git a/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml new file mode 100644 index 0000000000..b8570a61da --- /dev/null +++ b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml @@ -0,0 +1,12 @@ +emit: + - "@azure-tools/typespec-ts" +options: + "@azure-tools/typespec-ts": + generateMetadata: true + generateTest: false + azureSdkForJs: false + isModularLibrary: true + hierarchyClient: false + "emitter-output-dir": "{project-root}" + packageDetails: + name: "@msinternal/example" From 8e1438fbb2fc61fdb3089b1ca88f041dcd7c9d49 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Thu, 22 Aug 2024 15:04:36 +0800 Subject: [PATCH 29/83] update the samples --- packages/typespec-ts/src/index.ts | 3 +- .../typespec-ts/src/modular/emitSamples.ts | 29 +++++++++---- .../test/modularUnit/scenarios.spec.ts | 32 ++++++++++++--- .../scenarios/samples/exampleTypesChecking.md | 41 ++++++++----------- packages/typespec-ts/test/util/emitUtil.ts | 19 +++++++++ packages/typespec-ts/test/util/testUtil.ts | 6 ++- 6 files changed, 92 insertions(+), 38 deletions(-) diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index 5502bf6fd9..79f3e509c5 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -379,7 +379,8 @@ export async function createContextWithDefaultOptions( main: "@azure-tools/typespec-ts", metadata: { name: "@azure-tools/typespec-ts" } } - ] + ], + "examples-directory": `./examples` }; context.options = { ...context.options, diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 0c2799c49f..34dd485441 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -1,4 +1,8 @@ -import { StructureKind, FunctionDeclarationStructure } from "ts-morph"; +import { + StructureKind, + FunctionDeclarationStructure, + SourceFile +} from "ts-morph"; import { addDeclaration } from "../framework/declaration.js"; import { resolveReference } from "../framework/reference.js"; import { SdkContext } from "../utils/interfaces.js"; @@ -15,10 +19,13 @@ import { join } from "path"; import { AzureIdentityDependencies } from "../modular/external-dependencies.js"; import { getTypeExpression } from "./type-expressions/get-type-expression.js"; -export function emitSamples(dpgContext: SdkContext) { +export function emitSamples(dpgContext: SdkContext): SourceFile[] { + const generatedFiles: SourceFile[] = []; for (const client of dpgContext.sdkPackage.clients) { - emitClassicalClientSamples(dpgContext, client); + const tmp = emitClassicalClientSamples(dpgContext, client); + generatedFiles.push(...tmp); } + return generatedFiles; } function emitClassicalClientSamples( @@ -34,13 +41,16 @@ function emitClassicalClientSamples( const credentialParameterType = credentialParameter ? getTypeExpression(credentialParameter!) : undefined; + const generatedFiles: SourceFile[] = []; emitClassicalClientSamplesDfs( dpgContext, client, clientName, credentialParameterType, - operationGroupPrefix ?? "" + operationGroupPrefix ?? "", + generatedFiles ); + return generatedFiles; } function emitClassicalClientSamplesDfs( @@ -48,7 +58,8 @@ function emitClassicalClientSamplesDfs( client: SdkClientType, clientName: string, credentialParameterType?: string, - operationGroupPrefix?: string + operationGroupPrefix?: string, + generatedFiles: SourceFile[] = [] ) { for (const operationOrGroup of client.methods) { if (operationOrGroup.kind === "clientaccessor") { @@ -70,11 +81,14 @@ function emitClassicalClientSamplesDfs( prefix ); } else { - emitMethodSamples(dpgContext, operationOrGroup, { + const sample = emitMethodSamples(dpgContext, operationOrGroup, { clientName, credentialType: credentialParameterType, operationGroupPrefix }); + if (sample) { + generatedFiles.push(sample); + } } } } @@ -87,7 +101,7 @@ function emitMethodSamples( credentialType?: string; operationGroupPrefix?: string; } -) { +): SourceFile | undefined { const examples = method.operation.examples ?? []; if (examples.length === 0) { return; @@ -226,6 +240,7 @@ function emitMethodSamples( } main().catch(console.error);`); + return sourceFile; } function getParameterValue(value: SdkTypeExample): string { diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index b7f8783d27..f9394f9000 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -3,7 +3,8 @@ import { readdirSync, readFileSync, statSync, writeFileSync } from "fs"; import path from "path"; import { emitModularModelsFromTypeSpec, - emitModularOperationsFromTypeSpec + emitModularOperationsFromTypeSpec, + emitSamplesFromTypeSpec } from "../util/emitUtil.js"; import { assertEqualContent } from "../util/testUtil.js"; import { format } from "prettier"; @@ -15,7 +16,8 @@ const SCENARIOS_UPDATE = false; type EmitterFunction = ( tsp: string, - namedArgs: Record + namedArgs: Record, + examples?: Record ) => Promise; /** @@ -93,6 +95,18 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { const result = await emitModularOperationsFromTypeSpec(tsp); assert.equal(result?.length, 1, "Expected exactly 1 source file"); return result![0]!.getFunctionOrThrow(name!).getText(); + }, + + // Snapshot of a specific example generation + // Throws if more than one example generated + "(ts|typescript) samples": async (tsp, {}, example) => { + if (!example) { + throw new Error("No example provided for samples"); + } + const result = await emitSamplesFromTypeSpec(tsp, example); + assert.equal(result?.length, 1, "Expected exactly 1 source file"); + console.log("Result: ", result![0]!.getFullText()); + return result![0]!.getText(); } }; @@ -137,10 +151,16 @@ function describeScenario(scenarioFile: string) { .filter((x) => x.heading === "tsp" || x.heading === "typespec") .map((x) => x.content) .join("\n"); - const examplesInput = codeBlocks.filter((x) => x.heading === "json"); + const examplesInput = codeBlocks.filter((x) => + x.heading.startsWith("json") + ); + const examples: Record = {}; + for (const example of examplesInput) { + examples[example.heading] = example.content; + } console.log("TypeSpec examples: ", examplesInput); - const testCodeBlocks = codeBlocks.filter((x) => - x.heading.startsWith("ts") + const testCodeBlocks = codeBlocks.filter( + (x) => x.heading.startsWith("ts") && x.heading !== "tsp" ); for (const codeBlock of testCodeBlocks) { @@ -156,7 +176,7 @@ function describeScenario(scenarioFile: string) { const namedArgs = match.groups; it(codeBlock.heading, async function () { - const result = await fn(typeSpecInput, namedArgs ?? {}); + const result = await fn(typeSpecInput, namedArgs ?? {}, examples); if (SCENARIOS_UPDATE) { content = updateCodeBlock( diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md index fcafefc5df..fba1474b4b 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md @@ -1,4 +1,4 @@ -# Should map empty anonymous model ({}) to Record +# Should generate samples for for different types The return type for an empty anonymous model `{}` should be Record @@ -26,7 +26,7 @@ op read(body: Widget): void; ## Example -```json +```json_read_operations { "title": "read", "operationId": "read", @@ -51,30 +51,25 @@ op read(body: Widget): void; } ``` -## Operations +## Samples -Body should get cast to `any` in the deserialize function: +Generate samples for for different types: -```ts operations function _readDeserialize -export async function _readDeserialize( - result: Read200Response -): Promise> { - if (result.status !== "200") { - throw createRestError(result); - } - - return result.body as any; +```ts samples +/** + * This sample demonstrates how to undefined + * + * @summary undefined + * x-ms-original-file: json_read_operations.json + */ async function read() { + const client = new TestingClient(); + const result = await client.read(); + console.log(result); } -``` -The operation should have return type `Record`: - -```ts operations function read -export async function read( - context: string, - options: ReadOptionalParams = { requestOptions: {} } -): Promise> { - const result = await _readSend(context, options); - return _readDeserialize(result); +async function main() { + __PLACEHOLDER_o13__(); } + +main().catch(console.error); ``` diff --git a/packages/typespec-ts/test/util/emitUtil.ts b/packages/typespec-ts/test/util/emitUtil.ts index 8dc5b3caf5..4c22ac8718 100644 --- a/packages/typespec-ts/test/util/emitUtil.ts +++ b/packages/typespec-ts/test/util/emitUtil.ts @@ -35,6 +35,7 @@ import { buildClassicalClient } from "../../src/modular/buildClassicalClient.js" import { Project } from "ts-morph"; import { useBinder } from "../../src/framework/hooks/binder.js"; import { useContext } from "../../src/contextManager.js"; +import { emitSamples } from "../../src/modular/emitSamples.js"; export async function emitPageHelperFromTypeSpec( tspContent: string, @@ -556,3 +557,21 @@ export async function emitModularClientFromTypeSpec( expectDiagnosticEmpty(dpgContext.program.diagnostics); return undefined; } + +export async function emitSamplesFromTypeSpec( + tspContent: string, + examples: Record +) { + const context = await rlcEmitterFor( + tspContent, + true, + false, + false, + false, + false, + false, + examples + ); + const dpgContext = await createDpgContextTestHelper(context.program); + return await emitSamples(dpgContext); +} diff --git a/packages/typespec-ts/test/util/testUtil.ts b/packages/typespec-ts/test/util/testUtil.ts index 1a2e912618..3bc80e7941 100644 --- a/packages/typespec-ts/test/util/testUtil.ts +++ b/packages/typespec-ts/test/util/testUtil.ts @@ -55,7 +55,8 @@ export async function rlcEmitterFor( needTCGC: boolean = false, withRawContent: boolean = false, withVersionedApiVersion: boolean = false, - needArmTemplate: boolean = false + needArmTemplate: boolean = false, + exampleJson: Record = {} ): Promise { const host: TestHost = await createRLCEmitterTestHost(); const namespace = ` @@ -97,6 +98,9 @@ ${ ${code} `; host.addTypeSpecFile("main.tsp", content); + for (const example in exampleJson) { + host.addTypeSpecFile(`./examples/${example}.json`, exampleJson[example]); + } await host.compile("./", { warningAsError: false }); From 589fb28a156bb6fb5b9b40d9f9c3d7746c8c0b6f Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Thu, 22 Aug 2024 15:08:05 +0800 Subject: [PATCH 30/83] update the sample generations --- .../modularUnit/scenarios/samples/exampleTypesChecking.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md index fba1474b4b..23d734a488 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md @@ -56,12 +56,7 @@ op read(body: Widget): void; Generate samples for for different types: ```ts samples -/** - * This sample demonstrates how to undefined - * - * @summary undefined - * x-ms-original-file: json_read_operations.json - */ async function read() { +async function read() { const client = new TestingClient(); const result = await client.read(); console.log(result); From c1ccd7ebafb064d6844b6238ea447bf30981e57f Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Thu, 22 Aug 2024 15:33:09 +0800 Subject: [PATCH 31/83] update the sample cases --- .../typespec-ts/src/modular/emitSamples.ts | 5 +++-- .../test/modularUnit/scenarios.spec.ts | 2 +- .../samples/operations/armCurdOperations.md | 0 .../operations/hierachyClientOperations.md | 0 .../parameters/paramaterSpreadCheck.md | 0 .../parameters/parameterPositionCheck.md | 21 ++++++++++++++++++ .../parameterTypesCheck.md} | 22 ++++++++++++++----- packages/typespec-ts/test/util/emitUtil.ts | 4 +++- 8 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/operations/hierachyClientOperations.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md rename packages/typespec-ts/test/modularUnit/scenarios/samples/{exampleTypesChecking.md => parameters/parameterTypesCheck.md} (68%) diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 34dd485441..0e3f33591b 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -270,12 +270,13 @@ function getParameterValue(value: SdkTypeExample): string { const mapper = getPropertyClientNameMapper(value.type); const values = []; const additionalPropertiesValue = - value.kind === "model" ? value?.additionalPropertiesValue : {}; + value.kind === "model" ? value?.additionalPropertiesValue ?? {} : {}; for (const propName in { ...value.value, ...additionalPropertiesValue }) { - const propValue = value.value[propName]; + const propValue = + value.value[propName] ?? additionalPropertiesValue[propName]; if (propValue === undefined || propValue === null) { continue; } diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index f9394f9000..b5b584f0a8 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -12,7 +12,7 @@ import { prettierTypeScriptOptions } from "../../src/lib.js"; const SCENARIOS_LOCATION = "./test/modularUnit/scenarios/samples"; -const SCENARIOS_UPDATE = false; +const SCENARIOS_UPDATE = true; type EmitterFunction = ( tsp: string, diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/hierachyClientOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/hierachyClientOperations.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md new file mode 100644 index 0000000000..f3eed40f76 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md @@ -0,0 +1,21 @@ +async function read() { + const client = new TestingClient(); + const result = await client.read({ + strValue: "00000000-0000-0000-0000-00000000000", + numValue: 0.12, + enumValue: "red", + modelValue: { bar: "bar value" }, + dateValue: new Date("2022-08-09"), + arrValue: ["x", "y"], + unionValue: test, + nullValue: null, + additionalProp: "additional prop", + }); + console.log(result); +} + +async function main() { + read(); +} + +main().catch(console.error); diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md similarity index 68% rename from packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md rename to packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index 23d734a488..645dbfa3c5 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/exampleTypesChecking.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -7,6 +7,7 @@ The return type for an empty anonymous model `{}` should be Record ```tsp model Foo { bar: string; + barDate?: utcDateTime; } model Widget { @@ -21,12 +22,12 @@ model Widget { ...Record; } -op read(body: Widget): void; +op read(@bodyRoot body: Widget): void; ``` ## Example -```json_read_operations +```json { "title": "read", "operationId": "read", @@ -36,7 +37,8 @@ op read(body: Widget): void; "numValue": 0.12, "enumValue": "red", "modelValue": { - "bar": "bar value" + "bar": "bar value", + "barDate": "2022-08-09" }, "dateValue": "2022-08-09", "arrValue": ["x", "y"], @@ -58,12 +60,22 @@ Generate samples for for different types: ```ts samples async function read() { const client = new TestingClient(); - const result = await client.read(); + const result = await client.read({ + strValue: "00000000-0000-0000-0000-00000000000", + numValue: 0.12, + enumValue: "red", + modelValue: { bar: "bar value", barDate: new Date("2022-08-09") }, + dateValue: new Date("2022-08-09"), + arrValue: ["x", "y"], + unionValue: test, + nullValue: null, + additionalProp: "additional prop", + }); console.log(result); } async function main() { - __PLACEHOLDER_o13__(); + read(); } main().catch(console.error); diff --git a/packages/typespec-ts/test/util/emitUtil.ts b/packages/typespec-ts/test/util/emitUtil.ts index 4c22ac8718..47f72e935d 100644 --- a/packages/typespec-ts/test/util/emitUtil.ts +++ b/packages/typespec-ts/test/util/emitUtil.ts @@ -573,5 +573,7 @@ export async function emitSamplesFromTypeSpec( examples ); const dpgContext = await createDpgContextTestHelper(context.program); - return await emitSamples(dpgContext); + const files = await emitSamples(dpgContext); + useBinder().resolveAllReferences(); + return files; } From 6854140db0c4ea80131c8764a042daf9afbcd8da Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Thu, 22 Aug 2024 15:37:31 +0800 Subject: [PATCH 32/83] update the sample cases --- .../scenarios/samples/parameters/parameterTypesCheck.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index 645dbfa3c5..8ef02509ae 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -69,7 +69,7 @@ async function read() { arrValue: ["x", "y"], unionValue: test, nullValue: null, - additionalProp: "additional prop", + additionalProp: "additional prop" }); console.log(result); } From a1977727bfb1417d3ef042c8d32d934aa799d3b4 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Thu, 22 Aug 2024 15:50:51 +0800 Subject: [PATCH 33/83] update the test cases --- .../test/modularUnit/scenarios.spec.ts | 2 +- .../parameters/paramaterSpreadCheck.md | 69 +++++++++++++++++++ .../parameters/parameterPositionCheck.md | 21 ------ .../samples/parameters/parameterTypesCheck.md | 11 ++- 4 files changed, 79 insertions(+), 24 deletions(-) diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index b5b584f0a8..d7f6b427f0 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -106,7 +106,7 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { const result = await emitSamplesFromTypeSpec(tsp, example); assert.equal(result?.length, 1, "Expected exactly 1 source file"); console.log("Result: ", result![0]!.getFullText()); - return result![0]!.getText(); + return result![0]!.getFullText(); } }; diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md index e69de29bb2..8a5db71556 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md @@ -0,0 +1,69 @@ +# Should generate samples for spread cases + +The return type for an empty anonymous model `{}` should be Record + +## TypeSpec + +```tsp +@doc("This is a simple model.") +model BodyParameter { + name: string; +} +@doc("This is a model with all http request decorator.") +model CompositeRequest { + @path + name: string; + + @header + testHeader: string; + + @body + body: BodyParameter; +} + +@doc("show example demo") +op read(...CompositeRequest): void; +``` + +## Example + +```json +{ + "title": "read", + "operationId": "read", + "parameters": { + "name": "foo", + "testHeader": "xxx-header", + "body": { + "name": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for spread cases: + +```ts samples +/** + * This sample demonstrates how to show example demo + * + * @summary show example demo + * x-ms-original-file: json.json + */ +async function read() { + const client = new TestingClient(); + const result = await client.read("foo", "xxx-header", { name: "body name" }); + console.log(result); +} + +async function main() { + read(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md index f3eed40f76..e69de29bb2 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md @@ -1,21 +0,0 @@ -async function read() { - const client = new TestingClient(); - const result = await client.read({ - strValue: "00000000-0000-0000-0000-00000000000", - numValue: 0.12, - enumValue: "red", - modelValue: { bar: "bar value" }, - dateValue: new Date("2022-08-09"), - arrValue: ["x", "y"], - unionValue: test, - nullValue: null, - additionalProp: "additional prop", - }); - console.log(result); -} - -async function main() { - read(); -} - -main().catch(console.error); diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index 8ef02509ae..2415e1a983 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -1,4 +1,4 @@ -# Should generate samples for for different types +# Should generate samples for different types The return type for an empty anonymous model `{}` should be Record @@ -22,6 +22,7 @@ model Widget { ...Record; } +@doc("show example demo") op read(@bodyRoot body: Widget): void; ``` @@ -58,6 +59,12 @@ op read(@bodyRoot body: Widget): void; Generate samples for for different types: ```ts samples +/** + * This sample demonstrates how to show example demo + * + * @summary show example demo + * x-ms-original-file: json.json + */ async function read() { const client = new TestingClient(); const result = await client.read({ @@ -69,7 +76,7 @@ async function read() { arrValue: ["x", "y"], unionValue: test, nullValue: null, - additionalProp: "additional prop" + additionalProp: "additional prop", }); console.log(result); } From 375f5d5729ae0f47421fb18b3e4e2b0207202646 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Thu, 22 Aug 2024 15:54:05 +0800 Subject: [PATCH 34/83] update the test cases --- packages/typespec-ts/test/modularUnit/scenarios.spec.ts | 2 +- .../scenarios/samples/parameters/paramaterSpreadCheck.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index d7f6b427f0..363bef8443 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -12,7 +12,7 @@ import { prettierTypeScriptOptions } from "../../src/lib.js"; const SCENARIOS_LOCATION = "./test/modularUnit/scenarios/samples"; -const SCENARIOS_UPDATE = true; +const SCENARIOS_UPDATE = false; type EmitterFunction = ( tsp: string, diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md index 8a5db71556..882ba93767 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md @@ -17,6 +17,9 @@ model CompositeRequest { @header testHeader: string; + @header + optionalQuery?: string; + @body body: BodyParameter; } @@ -33,6 +36,7 @@ op read(...CompositeRequest): void; "operationId": "read", "parameters": { "name": "foo", + "optionalQuery": "optional query", "testHeader": "xxx-header", "body": { "name": "body name" From 3dc71475f397b6ac56db08523759679999e32e7f Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Thu, 22 Aug 2024 16:00:46 +0800 Subject: [PATCH 35/83] update md files --- .../{operations => client}/hierachyClientOperations.md | 0 .../scenarios/samples/client/multipleClientSamples.md | 0 .../scenarios/samples/parameters/paramaterSpreadCheck.md | 9 ++++++++- 3 files changed, 8 insertions(+), 1 deletion(-) rename packages/typespec-ts/test/modularUnit/scenarios/samples/{operations => client}/hierachyClientOperations.md (100%) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClientSamples.md diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/hierachyClientOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierachyClientOperations.md similarity index 100% rename from packages/typespec-ts/test/modularUnit/scenarios/samples/operations/hierachyClientOperations.md rename to packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierachyClientOperations.md diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClientSamples.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClientSamples.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md index 882ba93767..34e190fec1 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md @@ -61,7 +61,14 @@ Generate samples for spread cases: */ async function read() { const client = new TestingClient(); - const result = await client.read("foo", "xxx-header", { name: "body name" }); + const result = await client.read( + "foo", + "xxx-header", + { name: "body name" }, + { + optionalQuery: "optional query" + } + ); console.log(result); } From b2a2b6b9dd2c15ac9a0af4876ec2c1e2643e1c37 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 25 Aug 2024 18:42:32 +0800 Subject: [PATCH 36/83] update to latest main --- common/config/rush/pnpm-lock.yaml | 52 ++- .../typespec-ts/src/framework/dependency.ts | 14 +- .../typespec-ts/src/framework/hooks/binder.ts | 4 +- packages/typespec-ts/src/framework/refkey.ts | 2 +- packages/typespec-ts/src/index.ts | 16 +- .../modular/buildClassicalOperationGroups.ts | 14 + .../src/modular/buildClientContext.ts | 2 + .../src/modular/buildOperations.ts | 46 ++ .../typespec-ts/src/modular/emitModels.ts | 409 ------------------ .../src/modular/external-dependencies.ts | 30 +- .../src/modular/helpers/operationHelpers.ts | 18 +- .../test/commands/cadl-ranch-list.js | 2 + packages/typespec-ts/test/util/testUtil.ts | 5 +- 13 files changed, 134 insertions(+), 480 deletions(-) delete mode 100644 packages/typespec-ts/src/modular/emitModels.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 84d0ecad93..09b3c8b46f 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -237,7 +237,7 @@ importers: '@azure-tools/typespec-autorest': '>=0.45.0 <1.0.0' '@azure-tools/typespec-azure-core': '>=0.45.0 <1.0.0' '@azure-tools/typespec-azure-resource-manager': '>=0.45.0 <1.0.0' - '@azure-tools/typespec-client-generator-core': '>=0.45.1 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.45.3 <1.0.0' '@azure/abort-controller': ^2.1.2 '@azure/core-auth': ^1.6.0 '@azure/core-lro': ^3.0.0 @@ -292,10 +292,10 @@ importers: '@azure-tools/cadl-ranch-api': 0.4.6 '@azure-tools/cadl-ranch-expect': 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu '@azure-tools/cadl-ranch-specs': 0.36.1_cvode6xhpuyl3aj5dk75xzx5nu - '@azure-tools/typespec-autorest': 0.45.0_n4w2xh5fhregk7uzwn23tc3udm + '@azure-tools/typespec-autorest': 0.45.0_ch4e7dmaodljkmzs7h7dd2lznu '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte '@azure-tools/typespec-azure-resource-manager': 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i - '@azure-tools/typespec-client-generator-core': 0.45.1_rxzquxnvxkwebgrumlsfc6ni5i + '@azure-tools/typespec-client-generator-core': 0.45.4_rxzquxnvxkwebgrumlsfc6ni5i '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.6.0 '@azure/core-lro': 3.0.0 @@ -542,6 +542,29 @@ packages: - supports-color dev: true + /@azure-tools/typespec-autorest/0.45.0_ch4e7dmaodljkmzs7h7dd2lznu: + resolution: {integrity: sha512-6ycZ0bEfXC0U26FHHEt9smAhxh78SACIDY+u7zLAopRzmxjTuthDdGgYSShuRDu3J+vEBi1fOKpz4cYQkgRkBQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@azure-tools/typespec-azure-core': ~0.45.0 + '@azure-tools/typespec-azure-resource-manager': ~0.45.0 + '@azure-tools/typespec-client-generator-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@azure-tools/typespec-azure-resource-manager': 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i + '@azure-tools/typespec-client-generator-core': 0.45.4_rxzquxnvxkwebgrumlsfc6ni5i + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + dev: true + /@azure-tools/typespec-autorest/0.45.0_n4w2xh5fhregk7uzwn23tc3udm: resolution: {integrity: sha512-6ycZ0bEfXC0U26FHHEt9smAhxh78SACIDY+u7zLAopRzmxjTuthDdGgYSShuRDu3J+vEBi1fOKpz4cYQkgRkBQ==} engines: {node: '>=18.0.0'} @@ -563,6 +586,7 @@ packages: '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + dev: false /@azure-tools/typespec-azure-core/0.45.0_alrznhyrw66bvx6gp4zrtdfkte: resolution: {integrity: sha512-GycGMCmaIVSN+TftPtlPJLyeOrglbLmH08ZiZaVMjSih/TQEJM21RGR6d8QdjlkQWN61ntNDRD+RP2uv9tHmqw==} @@ -615,6 +639,28 @@ packages: '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 change-case: 5.4.4 pluralize: 8.0.0 + dev: false + + /@azure-tools/typespec-client-generator-core/0.45.4_rxzquxnvxkwebgrumlsfc6ni5i: + resolution: {integrity: sha512-QJygwMqhEtBi2tPYs/HAfs0QTowXAwp6QpP/Vd2pHnJAncTV1BN17n/9LLAlMu2CnLimqvTuIN+FfliM28AX9w==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@azure-tools/typespec-azure-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + change-case: 5.4.4 + pluralize: 8.0.0 + dev: true /@azure/abort-controller/1.1.0: resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==} diff --git a/packages/typespec-ts/src/framework/dependency.ts b/packages/typespec-ts/src/framework/dependency.ts index ed3832e148..4a3c181a87 100644 --- a/packages/typespec-ts/src/framework/dependency.ts +++ b/packages/typespec-ts/src/framework/dependency.ts @@ -51,19 +51,9 @@ export interface CoreDependencies extends Record { name: "uint8ArrayToString"; module: string; }; - KeyCredential: { + stringToUint8Array: { kind: "externalDependency"; - name: "KeyCredential"; - module: string; - }; - TokenCredential: { - kind: "externalDependency"; - name: "TokenCredential"; - module: string; - }; - ErrorModel: { - kind: "externalDependency"; - name: "ErrorModel"; + name: "stringToUint8Array"; module: string; }; } diff --git a/packages/typespec-ts/src/framework/hooks/binder.ts b/packages/typespec-ts/src/framework/hooks/binder.ts index 53512259ff..94dc1961a2 100644 --- a/packages/typespec-ts/src/framework/hooks/binder.ts +++ b/packages/typespec-ts/src/framework/hooks/binder.ts @@ -43,7 +43,7 @@ export interface Binder { resolveAllReferences(): void; } -const PLACEHOLDER_PREFIX = "__PLACEHOLDER_"; +const PLACEHOLDER_PREFIX = "_PLACEHOLDER_"; class BinderImp implements Binder { private declarations = new Map(); @@ -157,7 +157,7 @@ class BinderImp implements Binder { * @returns The serialized placeholder string. */ private serializePlaceholder(refkey: unknown): string { - return `${PLACEHOLDER_PREFIX}${String(refkey)}__`; + return `${PLACEHOLDER_PREFIX}${String(refkey)}_`; } /** diff --git a/packages/typespec-ts/src/framework/refkey.ts b/packages/typespec-ts/src/framework/refkey.ts index 76558d1b8b..57f766b50c 100644 --- a/packages/typespec-ts/src/framework/refkey.ts +++ b/packages/typespec-ts/src/framework/refkey.ts @@ -24,5 +24,5 @@ function getKey(value: unknown): RefKey { } export function refkey(...args: unknown[]) { - return args.map((v) => getKey(v)).join("_"); + return args.map((v) => getKey(v)).join("\u2063"); } diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index 057bde90b1..e07972dde8 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -51,7 +51,6 @@ import { buildRootIndex, buildSubClientIndexFile } from "./modular/buildRootIndex.js"; -import { buildModelsOptions } from "./modular/emitModels.js"; import { emitContentByBuilder, emitModels } from "./utils/emitUtil.js"; import { provideContext, useContext } from "./contextManager.js"; @@ -79,9 +78,6 @@ import { provideBinder } from "./framework/hooks/binder.js"; import { provideSdkTypes } from "./framework/hooks/sdkTypes.js"; import { transformRLCModel } from "./transform/transform.js"; import { transformRLCOptions } from "./transform/transfromRLCOptions.js"; - AzureIdentityDependencies, -import { emitTypes } from "./modular/emit-models.js"; -import { emitSamples } from "./modular/emitSamples.js"; export * from "./lib.js"; @@ -120,13 +116,9 @@ export async function $onEmit(context: EmitContext) { }, { sourcesDir: modularSourcesDir } ); - const extraDependencies = isAzurePackage({ options: rlcOptions }) - ? { + ? { ...AzurePollingDependencies, ...AzureCoreDependencies } : { ...DefaultCoreDependencies }; - ...AzureCoreDependencies, - ...AzureIdentityDependencies - } const binder = provideBinder(outputProject, { staticHelpers, dependencies: { @@ -241,7 +233,6 @@ export async function $onEmit(context: EmitContext) { } async function generateModularSources() { - emitSamples(dpgContext); const modularSourcesRoot = dpgContext.generationPathDetail?.modularSourcesDir ?? "src"; const project = useContext("outputProject"); @@ -268,8 +259,8 @@ export async function $onEmit(context: EmitContext) { const isMultiClients = modularCodeModel.clients.length > 1; - emitTypes(dpgContext.sdkPackage, { sourceRoot: modularSourcesRoot }); for (const subClient of modularCodeModel.clients) { + buildModels(subClient, modularCodeModel); buildModelsOptions(subClient, modularCodeModel); if (!env["EXPERIMENTAL_TYPESPEC_TS_SERIALIZATION"]) buildSerializeUtils(modularCodeModel); @@ -412,8 +403,7 @@ export async function createContextWithDefaultOptions( main: "@azure-tools/typespec-ts", metadata: { name: "@azure-tools/typespec-ts" } } - ], - "examples-directory": `./examples` + ] }; context.options = { ...context.options, diff --git a/packages/typespec-ts/src/modular/buildClassicalOperationGroups.ts b/packages/typespec-ts/src/modular/buildClassicalOperationGroups.ts index 921fc68f9d..4f56ddd447 100644 --- a/packages/typespec-ts/src/modular/buildClassicalOperationGroups.ts +++ b/packages/typespec-ts/src/modular/buildClassicalOperationGroups.ts @@ -1,5 +1,6 @@ import { NameType } from "@azure-tools/rlc-common"; import { SourceFile } from "ts-morph"; +import { importModels } from "./buildOperations.js"; import { getClassicalOperation } from "./helpers/classicalOperationHelpers.js"; import { getClassicalLayerPrefix } from "./helpers/namingHelpers.js"; import { @@ -43,6 +44,15 @@ export function buildClassicOperationFiles( ); getClassicalOperation(dpgContext, client, classicFile, operationGroup); + // Import models used from ./models.ts + // We SHOULD keep this because otherwise ts-morph will "helpfully" try to import models from the rest layer when we call fixMissingImports(). + importModels( + srcPath, + classicFile, + codeModel.project, + subfolder, + operationGroup.namespaceHierarchies.length + ); importApis(classicFile, client, codeModel, operationGroup); // We need to import the paging helpers and types explicitly because ts-morph may not be able to find them. classicOperationFiles.set(classicOperationFileName, classicFile); @@ -83,6 +93,10 @@ export function buildClassicOperationFiles( operationGroup, layer ); + + // Import models used from ./models.ts + // We SHOULD keep this because otherwise ts-morph will "helpfully" try to import models from the rest layer when we call fixMissingImports(). + importModels(srcPath, classicFile, codeModel.project, subfolder, layer); importApis(classicFile, client, codeModel, operationGroup, layer); classicOperationFiles.set(classicOperationFileName, classicFile); } diff --git a/packages/typespec-ts/src/modular/buildClientContext.ts b/packages/typespec-ts/src/modular/buildClientContext.ts index 1cd45bf5e7..407e177202 100644 --- a/packages/typespec-ts/src/modular/buildClientContext.ts +++ b/packages/typespec-ts/src/modular/buildClientContext.ts @@ -6,6 +6,7 @@ import { } from "@azure-tools/rlc-common"; import { SourceFile } from "ts-morph"; import { SdkContext } from "../utils/interfaces.js"; +import { importModels } from "./buildOperations.js"; import { buildGetClientCredentialParam, buildGetClientEndpointParam, @@ -37,6 +38,7 @@ export function buildClientContext( ); importCredential(codeModel.runtimeImports, clientContextFile); + importModels(srcPath, clientContextFile, codeModel.project, subfolder); clientContextFile.addImportDeclaration({ moduleSpecifier: getImportSpecifier("restClient", codeModel.runtimeImports), namedImports: ["ClientOptions", "Client", "getClient"] diff --git a/packages/typespec-ts/src/modular/buildOperations.ts b/packages/typespec-ts/src/modular/buildOperations.ts index 5d425ebb75..21b8e03b41 100644 --- a/packages/typespec-ts/src/modular/buildOperations.ts +++ b/packages/typespec-ts/src/modular/buildOperations.ts @@ -58,6 +58,16 @@ export function buildOperationFiles( }api/${operationFileName}.ts` ); + // Import models used from ./models.ts + // We SHOULD keep this because otherwise ts-morph will "helpfully" try to import models from the rest layer when we call fixMissingImports(). + importModels( + srcPath, + operationGroupFile, + codeModel.project, + subfolder, + operationGroup.namespaceHierarchies.length + ); + // Import the deserializeUtils importDeserializeUtils( srcPath, @@ -125,6 +135,42 @@ export function buildOperationFiles( return operationFiles; } +export function importModels( + srcPath: string, + sourceFile: SourceFile, + project: Project, + subfolder: string = "", + importLayer: number = 0 +) { + const hasModelsImport = sourceFile.getImportDeclarations().some((i) => { + return i.getModuleSpecifierValue().endsWith(`models/models.js`); + }); + const modelsFile = project.getSourceFile( + `${srcPath}/${ + subfolder && subfolder !== "" ? subfolder + "/" : "" + }models/models.ts` + ); + const models: string[] = []; + + for (const [name] of modelsFile?.getExportedDeclarations().entries() ?? []) { + if (name.startsWith("_")) { + continue; + } + models.push(name); + } + + if (models.length > 0 && !hasModelsImport) { + sourceFile.addImportDeclaration({ + moduleSpecifier: `${"../".repeat(importLayer + 1)}models/models.js`, + namedImports: models + }); + } + + // Import all models and then let ts-morph clean up the unused ones + // we can't fixUnusedIdentifiers here because the operaiton files are still being generated. + // sourceFile.fixUnusedIdentifiers(); +} + export function importDeserializeUtils( srcPath: string, sourceFile: SourceFile, diff --git a/packages/typespec-ts/src/modular/emitModels.ts b/packages/typespec-ts/src/modular/emitModels.ts deleted file mode 100644 index fa9ff92364..0000000000 --- a/packages/typespec-ts/src/modular/emitModels.ts +++ /dev/null @@ -1,409 +0,0 @@ -import { addImportsToFiles, getImportSpecifier } from "@azure-tools/rlc-common"; -import * as path from "path"; -import { - InterfaceDeclarationStructure, - OptionalKind, - SourceFile, - TypeAliasDeclarationStructure -} from "ts-morph"; -import { buildOperationOptions } from "./buildOperations.js"; -import { getDocsFromDescription } from "./helpers/docsHelpers.js"; -import { getModularModelFilePath } from "./helpers/namingHelpers.js"; -import { getType } from "./helpers/typeHelpers.js"; -import { - Client, - ModularCodeModel, - Type as ModularType -} from "./modularCodeModel.js"; -import { buildModelSerializer } from "./serialization/buildSerializerFunction.js"; -import { toCamelCase } from "../utils/casingUtils.js"; -import { addImportBySymbol } from "../utils/importHelper.js"; - -// ====== UTILITIES ====== - -function isAzureCoreErrorSdkType(t: ModularType) { - return ( - t.name && - ["error", "errormodel", "innererror", "errorresponse"].includes( - t.name.toLowerCase() - ) && - t.coreTypeInfo === "ErrorType" - ); -} - -function isAzureCoreLroSdkType(t: ModularType) { - return ( - t.name && - ["operationstate"].includes(t.name.toLowerCase()) && - t.coreTypeInfo === "LroType" - ); -} - -function isAnonymousModel(t: ModularType) { - return t.type === "model" && t.name === ""; -} - -export function isModelWithAdditionalProperties(t: ModularType) { - return t.type === "dict" && t.name !== "Record"; -} - -function getCoreClientErrorType(name: string, coreClientTypes: Set) { - const coreClientType: string = name === "Error" ? "ErrorModel" : name; - coreClientTypes.add(coreClientType); - return coreClientType; -} - -function getCoreLroType(name: string, coreLroTypes: Set) { - const coreLroType = name === "OperationState" ? "CoreOperationStatus" : name; - coreLroTypes.add(coreLroType); - return coreLroType; -} - -// ====== TYPE EXTRACTION ====== - -function extractModels(codeModel: ModularCodeModel): ModularType[] { - const models = codeModel.types.filter( - (t) => - ((t.type === "model" || t.type === "enum") && - !isAzureCoreErrorSdkType(t) && - !isAzureCoreLroSdkType(t) && - !isAnonymousModel(t)) || - isModelWithAdditionalProperties(t) - ); - - for (const model of codeModel.types) { - if (model.type === "combined") { - for (const unionModel of model.types ?? []) { - if (unionModel.type === "model") { - models.push(unionModel); - } - } - } - } - return models; -} - -/** - * Extracts all the aliases from the code model - * 1. alias from polymorphic base model, where we need to use typescript union to combine all the sub models - * 2. alias from unions, where we also need to use typescript union to combine all the union variants - */ -export function extractAliases(codeModel: ModularCodeModel): ModularType[] { - const models = codeModel.types.filter( - (t) => - ((t.type === "model" || t.type === "combined") && - t.alias && - t.aliasType) || - (isModelWithAdditionalProperties(t) && t.alias && t.aliasType) - ); - return models; -} -// ====== TYPE BUILDERS ====== -function buildEnumModel( - model: ModularType -): OptionalKind { - const valueType = model.valueType?.type === "string" ? "string" : "number"; - return { - name: model.name!, - isExported: true, - docs: [...getDocsFromDescription(model.description)], - type: buildEnumType() - }; - - function buildEnumType() { - return model.isFixed || !model.isNonExhaustive - ? getEnumValues(" | ") - : valueType; - } - - function getEnumValues(separator: string = ", ") { - const splitWord = valueType === "string" ? `"` : ``; - return (model.values ?? []) - .map((v) => `${splitWord}${v.value}${splitWord}`) - .join(separator); - } -} - -type InterfaceStructure = OptionalKind & { - extends: string[]; -}; - -export function buildModelInterface( - model: ModularType, - cache: { coreClientTypes: Set; coreLroTypes: Set } -): InterfaceStructure { - const modelProperties = model.properties ?? []; - const modelInterface = { - name: model.alias ?? model.name ?? "FIXMYNAME", - isExported: true, - docs: getDocsFromDescription(model.description), - extends: [] as string[], - properties: (modelProperties ?? []).map((p) => { - const propertyMetadata = getType(p.type, p.format); - let propertyTypeName = propertyMetadata.name; - if (isAzureCoreErrorSdkType(p.type)) { - propertyTypeName = getCoreClientErrorType( - propertyTypeName, - cache.coreClientTypes - ); - } - if (isAzureCoreLroSdkType(p.type)) { - propertyTypeName = getCoreLroType(propertyTypeName, cache.coreLroTypes); - } - - return { - name: `"${p.clientName}"`, - docs: getDocsFromDescription(p.description), - hasQuestionToken: p.optional, - isReadonly: p.readonly, - type: propertyTypeName - }; - }) - }; - - return modelInterface; -} - -// ====== MAIN FUNCTIONS ====== -/** - * This function creates the file containing all the models defined in TypeSpec - */ -export function buildModels( - subClient: Client, - codeModel: ModularCodeModel -): SourceFile | undefined { - // We are generating both models and enums here - const coreClientTypes = new Set(); - const coreLroTypes = new Set(); - // filter out the models/enums that are anonymous - const models = extractModels(codeModel).filter((m) => !!m.name); - const aliases = extractAliases(codeModel); - // Skip to generate models.ts if there is no any models - if (models.length === 0 && aliases.length === 0) { - return; - } - const modelsFile = codeModel.project.createSourceFile( - getModularModelFilePath(codeModel, subClient) - ); - for (const model of models) { - if (model.type === "enum") { - if (modelsFile.getTypeAlias(model.name!)) { - // If the enum is already defined, we don't need to do anything - continue; - } - const enumAlias = buildEnumModel(model); - - if (model.isNonExhaustive && model.name) { - modelsFile.addEnum({ - name: `Known${model.name}`, - isExported: true, - members: - model.values?.map((v) => ({ - name: v.value, - value: v.value, - docs: [v.value] - })) ?? [], - docs: [ - `Known values of {@link ${model.name}} that the service accepts.` - ] - }); - const description = getExtensibleEnumDescription(model); - if (description) { - enumAlias.docs = [description]; - } - } - modelsFile.addTypeAlias(enumAlias); - } else { - const modelInterface = buildModelInterface(model, { - coreClientTypes, - coreLroTypes - }); - - model.parents?.forEach((p) => - modelInterface.extends.push(p.alias ?? getType(p, p.format).name) - ); - if (isModelWithAdditionalProperties(model)) { - addExtendedDictInfo( - model, - modelInterface, - codeModel.modularOptions.compatibilityMode - ); - } - - if (!modelsFile.getInterface(modelInterface.name)) { - modelsFile.addInterface(modelInterface); - } - - // Generate a serializer function next to each model - const serializerFunction = buildModelSerializer( - model, - codeModel.runtimeImports - ); - - if ( - serializerFunction && - !modelsFile.getFunction(toCamelCase(modelInterface.name + "Serializer")) - ) { - modelsFile.addStatements(serializerFunction); - } - addImportBySymbol("serializeRecord", modelsFile); - modelsFile.fixUnusedIdentifiers(); - } - } - - const projectRootFromModels = codeModel.clients.length > 1 ? "../.." : "../"; - addImportsToFiles(codeModel.runtimeImports, modelsFile, { - serializerHelpers: path.posix.join( - projectRootFromModels, - "helpers", - "serializerHelpers.js" - ) - }); - - if (coreClientTypes.size > 0) { - modelsFile.addImportDeclarations([ - { - moduleSpecifier: getImportSpecifier( - "restClient", - codeModel.runtimeImports - ), - namedImports: Array.from(coreClientTypes) - } - ]); - } - - if (coreLroTypes.size > 0) { - modelsFile.addImportDeclarations([ - { - moduleSpecifier: getImportSpecifier( - "azureCoreLro", - codeModel.runtimeImports - ), - namedImports: Array.from(coreLroTypes).map((t) => - t === "CoreOperationStatus" - ? "OperationStatus as CoreOperationStatus" - : t - ) - } - ]); - } - - aliases.forEach((alias) => { - modelsFile.addTypeAlias(buildModelTypeAlias(alias)); - if (!models.includes(alias)) { - // Generate a serializer function next to each model - const serializerFunction = buildModelSerializer( - alias, - codeModel.runtimeImports - ); - if (serializerFunction) { - modelsFile.addStatements(serializerFunction); - } - } - }); - return modelsFile; -} - -function getExtensibleEnumDescription(model: ModularType): string | undefined { - if (!(model.isNonExhaustive && model.name && model.values)) { - return; - } - const valueDescriptions = model.values - .map((v) => `**${v.value}**${v.description ? `: ${v.description}` : ""}`) - .join(` \\\n`) - // Escape the character / to make sure we don't incorrectly announce a comment blocks /** */ - .replace(/^\//g, "\\/") - .replace(/([^\\])(\/)/g, "$1\\/"); - const enumLink = `{@link Known${model.name}} can be used interchangeably with ${model.name},\n this enum contains the known values that the service supports.`; - - return [ - `${model.description} \\`, - enumLink, - `### Known values supported by the service`, - valueDescriptions - ].join(" \n"); -} - -function addExtendedDictInfo( - model: ModularType, - modelInterface: InterfaceStructure, - compatibilityMode: boolean = false -) { - if ( - (model.properties && - model.properties.length > 0 && - model.elementType && - model.properties?.every((p) => { - return getType(model.elementType!)?.name.includes(getType(p.type).name); - })) || - (model.properties?.length === 0 && model.elementType) - ) { - modelInterface.extends.push( - `Record` - ); - } else if (compatibilityMode) { - modelInterface.extends.push(`Record`); - } else { - modelInterface.properties?.push({ - name: "additionalProperties", - docs: ["Additional properties"], - hasQuestionToken: true, - isReadonly: false, - type: `Record` - }); - } -} - -export function buildModelTypeAlias(model: ModularType) { - return { - name: model.name!, - isExported: true, - docs: ["Alias for " + model.name], - type: model.aliasType! - }; -} - -export function buildModelsOptions( - client: Client, - codeModel: ModularCodeModel -) { - const modelOptionsFile = codeModel.project.createSourceFile( - path.join( - codeModel.modularOptions.sourceRoot, - client.subfolder ?? "", - `models/options.ts` - ), - undefined, - { - overwrite: true - } - ); - for (const operationGroup of client.operationGroups) { - operationGroup.operations.forEach((o) => { - buildOperationOptions(o, modelOptionsFile); - }); - } - modelOptionsFile.addImportDeclarations([ - { - moduleSpecifier: getImportSpecifier( - "restClient", - codeModel.runtimeImports - ), - namedImports: ["OperationOptions"] - } - ]); - - modelOptionsFile - .getImportDeclarations() - .filter((id) => { - return ( - id.isModuleSpecifierRelative() && - !id.getModuleSpecifierValue().endsWith(".js") - ); - }) - .map((id) => { - id.setModuleSpecifier(id.getModuleSpecifierValue() + ".js"); - return id; - }); - return modelOptionsFile; -} diff --git a/packages/typespec-ts/src/modular/external-dependencies.ts b/packages/typespec-ts/src/modular/external-dependencies.ts index 3bc795e423..356b64056a 100644 --- a/packages/typespec-ts/src/modular/external-dependencies.ts +++ b/packages/typespec-ts/src/modular/external-dependencies.ts @@ -56,20 +56,10 @@ export const DefaultCoreDependencies: CoreDependencies = { name: "uint8ArrayToString", module: "@typespec/ts-http-runtime" }, - KeyCredential: { + stringToUint8Array: { kind: "externalDependency", name: "stringToUint8Array", module: "@typespec/ts-http-runtime" - }, - TokenCredential: { - kind: "externalDependency", - name: "TokenCredential", - module: "@typespec/ts-http-runtime" - }, - ErrorModel: { - kind: "externalDependency", - name: "ErrorModel", - module: "@typespec/ts-http-runtime" } } as const; @@ -156,23 +146,5 @@ export const AzureCoreDependencies: CoreDependencies = { kind: "externalDependency", module: "@azure/core-util", name: "stringToUint8Array" - }, - TokenCredential: { - kind: "externalDependency", - name: "TokenCredential", - module: "@azure/core-auth" - }, - ErrorModel: { - kind: "externalDependency", - name: "ErrorModel", - module: "@azure-rest/core-client" - } -}; - -export const AzureIdentityDependencies = { - DefaultAzureCredential: { - kind: "externalDependency", - module: "@azure/identity", - name: "DefaultAzureCredential" } }; diff --git a/packages/typespec-ts/src/modular/helpers/operationHelpers.ts b/packages/typespec-ts/src/modular/helpers/operationHelpers.ts index 3ac67da621..206ba68757 100644 --- a/packages/typespec-ts/src/modular/helpers/operationHelpers.ts +++ b/packages/typespec-ts/src/modular/helpers/operationHelpers.ts @@ -44,8 +44,8 @@ import { import { toCamelCase, toPascalCase } from "../../utils/casingUtils.js"; import { AzurePollingDependencies } from "../external-dependencies.js"; -import { useSdkTypes } from "../../framework/hooks/sdkTypes.js"; -import { refkey } from "../../framework/refkey.js"; +import { reportDiagnostic } from "../../lib.js"; +import { resolveReference } from "../../framework/reference.js"; import { useDependencies } from "../../framework/hooks/useDependencies.js"; export function getSendPrivateFunction( @@ -1285,7 +1285,6 @@ export function serializeRequestValue( typeStack: Type[] = [], format?: string ): string { - const getSdkType = useSdkTypes(); const requiredPrefix = required === false ? `${clientValue} === undefined` : ""; const nullablePrefix = isTypeNullable(type) ? `${clientValue} === null` : ""; @@ -1328,11 +1327,10 @@ export function serializeRequestValue( return `${prefix}.map(p => { return ${elementNullOrUndefinedPrefix}{${propertiesStr}}})`; } else { - const sdkModel = getSdkType(type.elementType.__raw!); - const serializerRefkey = refkey(sdkModel, "serializer"); - const serializerReference = resolveReference(serializerRefkey); // When it is not anonymous we can hand it off to the serializer function - return `${prefix}.map(${serializerReference})`; + return `${prefix}.map(${toCamelCase( + type.elementType.name + "Serializer" + )})`; } } else if ( needsDeserialize(type.elementType) && @@ -1384,9 +1382,9 @@ export function serializeRequestValue( if (isNormalUnion(type)) { return `${clientValue}`; } else if (isSpecialHandledUnion(type)) { - const sdkType = getSdkType(type.__raw!); - const serializerRefkey = refkey(sdkType, "serializer"); - const serializeFunctionName = resolveReference(serializerRefkey); + const serializeFunctionName = type.name + ? `${toCamelCase(type.name)}Serializer` + : getDeserializeFunctionName(type, "serialize"); return `${serializeFunctionName}(${clientValue})`; } else { return `${clientValue} as any`; diff --git a/packages/typespec-ts/test/commands/cadl-ranch-list.js b/packages/typespec-ts/test/commands/cadl-ranch-list.js index 11357989e3..d9df9c3c01 100644 --- a/packages/typespec-ts/test/commands/cadl-ranch-list.js +++ b/packages/typespec-ts/test/commands/cadl-ranch-list.js @@ -546,6 +546,8 @@ export const modularTsps = [ { outputPath: "azure/example/basic", inputPath: "azure/example/basic" + }, + { outputPath: "azure/core/page", inputPath: "azure/core/page" } diff --git a/packages/typespec-ts/test/util/testUtil.ts b/packages/typespec-ts/test/util/testUtil.ts index 3bc80e7941..27d85ea034 100644 --- a/packages/typespec-ts/test/util/testUtil.ts +++ b/packages/typespec-ts/test/util/testUtil.ts @@ -118,7 +118,10 @@ export async function createDpgContextTestHelper( provideContext("outputProject", outputProject); const context = await createContextWithDefaultOptions({ - program + program, + options: { + "examples-directory": `./examples` + } as any } as EmitContext); const sdkContext = { From 2a17413a4c72b2ba36861c03898e0afb6338e1a9 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 25 Aug 2024 18:43:40 +0800 Subject: [PATCH 37/83] update to latest main --- .../typespec-ts/src/modular/emitModels.ts | 409 ++++++++++++++++++ 1 file changed, 409 insertions(+) create mode 100644 packages/typespec-ts/src/modular/emitModels.ts diff --git a/packages/typespec-ts/src/modular/emitModels.ts b/packages/typespec-ts/src/modular/emitModels.ts new file mode 100644 index 0000000000..fa9ff92364 --- /dev/null +++ b/packages/typespec-ts/src/modular/emitModels.ts @@ -0,0 +1,409 @@ +import { addImportsToFiles, getImportSpecifier } from "@azure-tools/rlc-common"; +import * as path from "path"; +import { + InterfaceDeclarationStructure, + OptionalKind, + SourceFile, + TypeAliasDeclarationStructure +} from "ts-morph"; +import { buildOperationOptions } from "./buildOperations.js"; +import { getDocsFromDescription } from "./helpers/docsHelpers.js"; +import { getModularModelFilePath } from "./helpers/namingHelpers.js"; +import { getType } from "./helpers/typeHelpers.js"; +import { + Client, + ModularCodeModel, + Type as ModularType +} from "./modularCodeModel.js"; +import { buildModelSerializer } from "./serialization/buildSerializerFunction.js"; +import { toCamelCase } from "../utils/casingUtils.js"; +import { addImportBySymbol } from "../utils/importHelper.js"; + +// ====== UTILITIES ====== + +function isAzureCoreErrorSdkType(t: ModularType) { + return ( + t.name && + ["error", "errormodel", "innererror", "errorresponse"].includes( + t.name.toLowerCase() + ) && + t.coreTypeInfo === "ErrorType" + ); +} + +function isAzureCoreLroSdkType(t: ModularType) { + return ( + t.name && + ["operationstate"].includes(t.name.toLowerCase()) && + t.coreTypeInfo === "LroType" + ); +} + +function isAnonymousModel(t: ModularType) { + return t.type === "model" && t.name === ""; +} + +export function isModelWithAdditionalProperties(t: ModularType) { + return t.type === "dict" && t.name !== "Record"; +} + +function getCoreClientErrorType(name: string, coreClientTypes: Set) { + const coreClientType: string = name === "Error" ? "ErrorModel" : name; + coreClientTypes.add(coreClientType); + return coreClientType; +} + +function getCoreLroType(name: string, coreLroTypes: Set) { + const coreLroType = name === "OperationState" ? "CoreOperationStatus" : name; + coreLroTypes.add(coreLroType); + return coreLroType; +} + +// ====== TYPE EXTRACTION ====== + +function extractModels(codeModel: ModularCodeModel): ModularType[] { + const models = codeModel.types.filter( + (t) => + ((t.type === "model" || t.type === "enum") && + !isAzureCoreErrorSdkType(t) && + !isAzureCoreLroSdkType(t) && + !isAnonymousModel(t)) || + isModelWithAdditionalProperties(t) + ); + + for (const model of codeModel.types) { + if (model.type === "combined") { + for (const unionModel of model.types ?? []) { + if (unionModel.type === "model") { + models.push(unionModel); + } + } + } + } + return models; +} + +/** + * Extracts all the aliases from the code model + * 1. alias from polymorphic base model, where we need to use typescript union to combine all the sub models + * 2. alias from unions, where we also need to use typescript union to combine all the union variants + */ +export function extractAliases(codeModel: ModularCodeModel): ModularType[] { + const models = codeModel.types.filter( + (t) => + ((t.type === "model" || t.type === "combined") && + t.alias && + t.aliasType) || + (isModelWithAdditionalProperties(t) && t.alias && t.aliasType) + ); + return models; +} +// ====== TYPE BUILDERS ====== +function buildEnumModel( + model: ModularType +): OptionalKind { + const valueType = model.valueType?.type === "string" ? "string" : "number"; + return { + name: model.name!, + isExported: true, + docs: [...getDocsFromDescription(model.description)], + type: buildEnumType() + }; + + function buildEnumType() { + return model.isFixed || !model.isNonExhaustive + ? getEnumValues(" | ") + : valueType; + } + + function getEnumValues(separator: string = ", ") { + const splitWord = valueType === "string" ? `"` : ``; + return (model.values ?? []) + .map((v) => `${splitWord}${v.value}${splitWord}`) + .join(separator); + } +} + +type InterfaceStructure = OptionalKind & { + extends: string[]; +}; + +export function buildModelInterface( + model: ModularType, + cache: { coreClientTypes: Set; coreLroTypes: Set } +): InterfaceStructure { + const modelProperties = model.properties ?? []; + const modelInterface = { + name: model.alias ?? model.name ?? "FIXMYNAME", + isExported: true, + docs: getDocsFromDescription(model.description), + extends: [] as string[], + properties: (modelProperties ?? []).map((p) => { + const propertyMetadata = getType(p.type, p.format); + let propertyTypeName = propertyMetadata.name; + if (isAzureCoreErrorSdkType(p.type)) { + propertyTypeName = getCoreClientErrorType( + propertyTypeName, + cache.coreClientTypes + ); + } + if (isAzureCoreLroSdkType(p.type)) { + propertyTypeName = getCoreLroType(propertyTypeName, cache.coreLroTypes); + } + + return { + name: `"${p.clientName}"`, + docs: getDocsFromDescription(p.description), + hasQuestionToken: p.optional, + isReadonly: p.readonly, + type: propertyTypeName + }; + }) + }; + + return modelInterface; +} + +// ====== MAIN FUNCTIONS ====== +/** + * This function creates the file containing all the models defined in TypeSpec + */ +export function buildModels( + subClient: Client, + codeModel: ModularCodeModel +): SourceFile | undefined { + // We are generating both models and enums here + const coreClientTypes = new Set(); + const coreLroTypes = new Set(); + // filter out the models/enums that are anonymous + const models = extractModels(codeModel).filter((m) => !!m.name); + const aliases = extractAliases(codeModel); + // Skip to generate models.ts if there is no any models + if (models.length === 0 && aliases.length === 0) { + return; + } + const modelsFile = codeModel.project.createSourceFile( + getModularModelFilePath(codeModel, subClient) + ); + for (const model of models) { + if (model.type === "enum") { + if (modelsFile.getTypeAlias(model.name!)) { + // If the enum is already defined, we don't need to do anything + continue; + } + const enumAlias = buildEnumModel(model); + + if (model.isNonExhaustive && model.name) { + modelsFile.addEnum({ + name: `Known${model.name}`, + isExported: true, + members: + model.values?.map((v) => ({ + name: v.value, + value: v.value, + docs: [v.value] + })) ?? [], + docs: [ + `Known values of {@link ${model.name}} that the service accepts.` + ] + }); + const description = getExtensibleEnumDescription(model); + if (description) { + enumAlias.docs = [description]; + } + } + modelsFile.addTypeAlias(enumAlias); + } else { + const modelInterface = buildModelInterface(model, { + coreClientTypes, + coreLroTypes + }); + + model.parents?.forEach((p) => + modelInterface.extends.push(p.alias ?? getType(p, p.format).name) + ); + if (isModelWithAdditionalProperties(model)) { + addExtendedDictInfo( + model, + modelInterface, + codeModel.modularOptions.compatibilityMode + ); + } + + if (!modelsFile.getInterface(modelInterface.name)) { + modelsFile.addInterface(modelInterface); + } + + // Generate a serializer function next to each model + const serializerFunction = buildModelSerializer( + model, + codeModel.runtimeImports + ); + + if ( + serializerFunction && + !modelsFile.getFunction(toCamelCase(modelInterface.name + "Serializer")) + ) { + modelsFile.addStatements(serializerFunction); + } + addImportBySymbol("serializeRecord", modelsFile); + modelsFile.fixUnusedIdentifiers(); + } + } + + const projectRootFromModels = codeModel.clients.length > 1 ? "../.." : "../"; + addImportsToFiles(codeModel.runtimeImports, modelsFile, { + serializerHelpers: path.posix.join( + projectRootFromModels, + "helpers", + "serializerHelpers.js" + ) + }); + + if (coreClientTypes.size > 0) { + modelsFile.addImportDeclarations([ + { + moduleSpecifier: getImportSpecifier( + "restClient", + codeModel.runtimeImports + ), + namedImports: Array.from(coreClientTypes) + } + ]); + } + + if (coreLroTypes.size > 0) { + modelsFile.addImportDeclarations([ + { + moduleSpecifier: getImportSpecifier( + "azureCoreLro", + codeModel.runtimeImports + ), + namedImports: Array.from(coreLroTypes).map((t) => + t === "CoreOperationStatus" + ? "OperationStatus as CoreOperationStatus" + : t + ) + } + ]); + } + + aliases.forEach((alias) => { + modelsFile.addTypeAlias(buildModelTypeAlias(alias)); + if (!models.includes(alias)) { + // Generate a serializer function next to each model + const serializerFunction = buildModelSerializer( + alias, + codeModel.runtimeImports + ); + if (serializerFunction) { + modelsFile.addStatements(serializerFunction); + } + } + }); + return modelsFile; +} + +function getExtensibleEnumDescription(model: ModularType): string | undefined { + if (!(model.isNonExhaustive && model.name && model.values)) { + return; + } + const valueDescriptions = model.values + .map((v) => `**${v.value}**${v.description ? `: ${v.description}` : ""}`) + .join(` \\\n`) + // Escape the character / to make sure we don't incorrectly announce a comment blocks /** */ + .replace(/^\//g, "\\/") + .replace(/([^\\])(\/)/g, "$1\\/"); + const enumLink = `{@link Known${model.name}} can be used interchangeably with ${model.name},\n this enum contains the known values that the service supports.`; + + return [ + `${model.description} \\`, + enumLink, + `### Known values supported by the service`, + valueDescriptions + ].join(" \n"); +} + +function addExtendedDictInfo( + model: ModularType, + modelInterface: InterfaceStructure, + compatibilityMode: boolean = false +) { + if ( + (model.properties && + model.properties.length > 0 && + model.elementType && + model.properties?.every((p) => { + return getType(model.elementType!)?.name.includes(getType(p.type).name); + })) || + (model.properties?.length === 0 && model.elementType) + ) { + modelInterface.extends.push( + `Record` + ); + } else if (compatibilityMode) { + modelInterface.extends.push(`Record`); + } else { + modelInterface.properties?.push({ + name: "additionalProperties", + docs: ["Additional properties"], + hasQuestionToken: true, + isReadonly: false, + type: `Record` + }); + } +} + +export function buildModelTypeAlias(model: ModularType) { + return { + name: model.name!, + isExported: true, + docs: ["Alias for " + model.name], + type: model.aliasType! + }; +} + +export function buildModelsOptions( + client: Client, + codeModel: ModularCodeModel +) { + const modelOptionsFile = codeModel.project.createSourceFile( + path.join( + codeModel.modularOptions.sourceRoot, + client.subfolder ?? "", + `models/options.ts` + ), + undefined, + { + overwrite: true + } + ); + for (const operationGroup of client.operationGroups) { + operationGroup.operations.forEach((o) => { + buildOperationOptions(o, modelOptionsFile); + }); + } + modelOptionsFile.addImportDeclarations([ + { + moduleSpecifier: getImportSpecifier( + "restClient", + codeModel.runtimeImports + ), + namedImports: ["OperationOptions"] + } + ]); + + modelOptionsFile + .getImportDeclarations() + .filter((id) => { + return ( + id.isModuleSpecifierRelative() && + !id.getModuleSpecifierValue().endsWith(".js") + ); + }) + .map((id) => { + id.setModuleSpecifier(id.getModuleSpecifierValue() + ".js"); + return id; + }); + return modelOptionsFile; +} From 0e9a0b47ae923f949f070f2f0d62a81689afbfd8 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 25 Aug 2024 18:45:06 +0800 Subject: [PATCH 38/83] update to latest main --- .../typespec-ts/src/modular/emit-models.ts | 365 ------------------ .../serialization/serializers.ts | 60 --- 2 files changed, 425 deletions(-) delete mode 100644 packages/typespec-ts/src/modular/emit-models.ts delete mode 100644 packages/typespec-ts/static/static-helpers/serialization/serializers.ts diff --git a/packages/typespec-ts/src/modular/emit-models.ts b/packages/typespec-ts/src/modular/emit-models.ts deleted file mode 100644 index 5fd3250bdf..0000000000 --- a/packages/typespec-ts/src/modular/emit-models.ts +++ /dev/null @@ -1,365 +0,0 @@ -import { - SdkClientType, - SdkEnumType, - SdkEnumValueType, - SdkHttpOperation, - SdkHttpPackage, - SdkMethod, - SdkModelPropertyType, - SdkModelType, - SdkType, - SdkUnionType -} from "@azure-tools/typespec-client-generator-core"; -import { - EnumDeclarationStructure, - EnumMemberStructure, - FunctionDeclarationStructure, - InterfaceDeclarationStructure, - PropertySignatureStructure, - StructureKind, - TypeAliasDeclarationStructure -} from "ts-morph"; -import { getTypeExpression } from "./type-expressions/get-type-expression.js"; -import { useContext } from "../contextManager.js"; -import { addDeclaration } from "../framework/declaration.js"; -import { refkey } from "../framework/refkey.js"; -import path from "path"; -import { NameType, normalizeName } from "@azure-tools/rlc-common"; -import { - getExternalModel, - getModelExpression -} from "./type-expressions/get-model-expression.js"; - -export function emitTypes( - sdkPackage: SdkHttpPackage, - { sourceRoot }: { sourceRoot: string } -) { - const emitQueue: Set = new Set(); - const outputProject = useContext("outputProject"); - - const modelsFilePath = getModelsPath(sourceRoot); - let sourceFile = outputProject.getSourceFile(modelsFilePath); - - if (!sourceFile) { - sourceFile = outputProject.createSourceFile(modelsFilePath, "", { - overwrite: true - }); - } - - visitPackageTypes(sdkPackage, emitQueue); - - for (const type of emitQueue) { - switch (type.kind) { - case "model": - const modelInterface = buildModelInterface(type); - addDeclaration(sourceFile, modelInterface, type); - const modelPolymorphicType = buildModelPolymorphicType(type); - if (modelPolymorphicType) { - const polymorphicSerializer = buildModelPolymorphicSerializer(type); - if (polymorphicSerializer) { - addDeclaration( - sourceFile, - polymorphicSerializer, - refkey(type, "serializer") - ); - } - - addDeclaration( - sourceFile, - modelPolymorphicType, - refkey(type, "polymorphicType") - ); - } - const serializerFunction = buildSerializerFunction(type); - addDeclaration( - sourceFile, - serializerFunction, - refkey(type, "serializer") - ); - break; - case "enum": - const [enumType, knownValuesEnum] = buildEnumTypes(type); - addDeclaration( - sourceFile, - knownValuesEnum, - refkey(type, "knownValues") - ); - addDeclaration(sourceFile, enumType, type); - break; - case "union": - const unionType = buildUnionType(type); - addDeclaration(sourceFile, unionType, type); - break; - } - } -} - -export function getModelsPath(sourceRoot: string): string { - return path.join(...[sourceRoot, "models", `models.ts`]); -} - -function buildUnionType(type: SdkUnionType): TypeAliasDeclarationStructure { - const unionDeclaration: TypeAliasDeclarationStructure = { - kind: StructureKind.TypeAlias, - name: normalizeName(type.name, NameType.Interface), - isExported: true, - type: type.values.map((v) => getTypeExpression(v)).join(" | ") - }; - - if (type.description) { - unionDeclaration.docs = [type.description]; - } - - return unionDeclaration; -} - -function buildEnumTypes( - type: SdkEnumType -): [TypeAliasDeclarationStructure, EnumDeclarationStructure] { - const enumDeclaration: EnumDeclarationStructure = { - kind: StructureKind.Enum, - name: `${normalizeName(type.name, NameType.Interface)}KnownValues`, - isExported: true, - members: type.values.map(emitEnumMember) - }; - - const enumAsUnion: TypeAliasDeclarationStructure = { - kind: StructureKind.TypeAlias, - name: normalizeName(type.name, NameType.Interface), - isExported: true, - type: type.values.map((v) => getTypeExpression(v)).join(" | ") - }; - - if (type.description) { - enumDeclaration.docs = [type.description]; - } - - return [enumAsUnion, enumDeclaration]; -} - -function emitEnumMember(member: SdkEnumValueType): EnumMemberStructure { - const memberStructure: EnumMemberStructure = { - kind: StructureKind.EnumMember, - name: member.name, - value: getTypeExpression(member) - }; - - if (member.description) { - memberStructure.docs = [member.description]; - } - - return memberStructure; -} - -function buildModelInterface( - type: SdkModelType -): InterfaceDeclarationStructure { - const interfaceStructure: InterfaceDeclarationStructure = { - kind: StructureKind.Interface, - name: normalizeName(type.name, NameType.Interface), - isExported: true, - properties: type.properties.map(buildModelProperty) - }; - - if (type.baseModel) { - const partentReference = getModelExpression(type.baseModel, { - skipPolymorphicUnion: true - }); - interfaceStructure.extends = [partentReference]; - } - - if (type.description) { - interfaceStructure.docs = [type.description]; - } - - return interfaceStructure; -} - -function buildModelPolymorphicType(type: SdkModelType) { - if (!type.discriminatedSubtypes) { - return undefined; - } - - const discriminatedSubtypes = Object.values(type.discriminatedSubtypes); - - const typeDeclaration: TypeAliasDeclarationStructure = { - kind: StructureKind.TypeAlias, - name: `${normalizeName(type.name, NameType.Interface)}Union`, - isExported: true, - type: discriminatedSubtypes.map((t) => getTypeExpression(t)).join(" | ") - }; - - typeDeclaration.type += ` | ${getModelExpression(type, { - skipPolymorphicUnion: true - })}`; - return typeDeclaration; -} - -function buildModelProperty( - property: SdkModelPropertyType -): PropertySignatureStructure { - const propertyStructure: PropertySignatureStructure = { - kind: StructureKind.PropertySignature, - name: normalizeName(property.name, NameType.Property), - type: getTypeExpression(property.type) - }; - - if (property.description) { - propertyStructure.docs = [property.description]; - } - - if (property.optional) { - propertyStructure.hasQuestionToken = true; - } - - return propertyStructure; -} - -function visitPackageTypes( - sdkPackage: SdkHttpPackage, - emitQueue: Set -) { - // Add all models in the package to the emit queue - for (const model of sdkPackage.models) { - visitType(model, emitQueue); - } - - // Add all enums to the queue - for (const enumType of sdkPackage.enums) { - emitQueue.add(enumType); - } - - // Visit the clients to discover all models - for (const client of sdkPackage.clients) { - visitClient(client, emitQueue); - } -} - -function visitClient( - client: SdkClientType, - emitQueue: Set -) { - visitType(client.initialization, emitQueue); - client.methods.forEach((method) => visitClientMethod(method, emitQueue)); -} - -function visitClientMethod( - method: SdkMethod, - emitQueue: Set -) { - switch (method.kind) { - case "lro": - case "paging": - case "lropaging": - case "basic": - // Visit the response - visitType(method.response.type, emitQueue); - // Visit the error response - visitType(method.exception?.type, emitQueue); - // Visit the parameters - method.parameters.forEach((parameter) => { - visitType(parameter.type, emitQueue); - }); - - visitOperation(method.operation, emitQueue); - break; - case "clientaccessor": - method.response.methods.forEach((responseMethod) => - visitClientMethod(responseMethod, emitQueue) - ); - method.parameters.forEach((parameter) => - visitType(parameter.type, emitQueue) - ); - break; - default: - throw new Error(`Unknown sdk method kind: ${(method as any).kind}`); - } -} - -function visitOperation( - operation: SdkHttpOperation, - emitQueue: Set -) { - // Visit the request - visitType(operation.bodyParam?.type, emitQueue); - // Visit the response - operation.exceptions.forEach((exception) => - visitType(exception.type, emitQueue) - ); - - operation.parameters.forEach((parameter) => - visitType(parameter.type, emitQueue) - ); - - operation.responses.forEach((response) => - visitType(response.type, emitQueue) - ); -} - -function visitType( - type: SdkType | undefined, - emitQueue: Set -) { - if (!type) { - return; - } - - if (emitQueue.has(type as any)) { - return; - } - - if (type.kind === "model") { - const externalModel = getExternalModel(type); - if (externalModel) { - return; - } - emitQueue.add(type); - for (const property of type.properties) { - if (!emitQueue.has(property.type as any)) { - visitType(property.type, emitQueue); - } - } - } -} - -function buildSerializerFunction( - type: SdkModelType -): FunctionDeclarationStructure { - const serializerFunction: FunctionDeclarationStructure = { - kind: StructureKind.Function, - name: `${normalizeName(type.name, NameType.Method)}Serializer`, - isExported: true, - parameters: [ - { - name: "input", - type: getModelExpression(type, { skipPolymorphicUnion: true }) - } - ], - returnType: "unknown", - statements: [`console.log(input)`, `throw new Error("Not implemented")`] - }; - - return serializerFunction; -} - -function buildModelPolymorphicSerializer(type: SdkModelType) { - if (!type.discriminatedSubtypes) { - return undefined; - } - - const serializerFunction: FunctionDeclarationStructure = { - kind: StructureKind.Function, - name: `${normalizeName(type.name, NameType.Method)}UnionSerializer`, - isExported: true, - parameters: [ - { - name: "input", - type: getModelExpression(type) - } - ], - returnType: "unknown", - statements: [`console.log(input)`, `throw new Error("Not implemented")`] - }; - - return serializerFunction; -} diff --git a/packages/typespec-ts/static/static-helpers/serialization/serializers.ts b/packages/typespec-ts/static/static-helpers/serialization/serializers.ts deleted file mode 100644 index 7db0a9dbf5..0000000000 --- a/packages/typespec-ts/static/static-helpers/serialization/serializers.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { EncodingType, uint8ArrayToString } from "@typespec/ts-http-runtime"; -export const serializeRecord = withNullChecks( - ( - item: Record, - serializer?: (item: any) => any - ): Record => { - return Object.keys(item).reduce((acc, key) => { - if (isPassthroughElement(item[key])) { - acc[key] = item[key] as any; - } else if (serializer) { - const value = item[key]; - if (value !== undefined) { - acc[key] = serializer(value); - } - } else { - console.warn(`Don't know how to serialize ${item[key]}`); - acc[key] = item[key] as any; - } - return acc; - }, {}); - } -); - -export const serializePassthrough = withNullChecks((item: T): T => item); - -export const serializeArray = withNullChecks( - (items: T[], serializer: (item: T) => unknown): unknown[] => { - return items.map((item) => { - if (isPassthroughElement(item)) { - return item; - } - return serializer(item); - }); - } -); - -export const serializeUtcDateTime = withNullChecks((date: Date): string => { - // todo support encoding? - return date.toISOString(); -}); - -export const serializeBytes = withNullChecks( - (bytes: Uint8Array, encoding: EncodingType): string => { - return uint8ArrayToString(bytes, encoding); - } -); - -export function withNullChecks(fn: (input: any, ...args: any) => unknown) { - return function (input: any | null | undefined, ...args: any) { - if (input === null || input === undefined) { - return input; - } - - return fn(input, ...args); - }; -} - -export function isPassthroughElement(t: any) { - return ["number", "string", "boolean", "null"].includes(typeof t); -} From d90f6373ad64cc71bd59a59b22092e2dd24166e9 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 25 Aug 2024 18:46:19 +0800 Subject: [PATCH 39/83] update to the latest main --- .../typespec-ts/src/api/dataProducts/index.ts | 2 +- .../typespec-ts/src/api/dataTypes/index.ts | 2 +- .../tspconfig.yaml | 7 +- .../typespec-ts/src/api/b/c/index.ts | 1 + .../typespec-ts/src/api/b/e/c/index.ts | 1 + .../generated/typespec-ts/src/api/b/index.ts | 1 + .../generated/typespec-ts/src/api/d/index.ts | 4 +- .../typespec-ts/src/api/operations.ts | 4 +- .../typespec-ts/src/classic/b/c/index.ts | 1 + .../typespec-ts/src/classic/b/e/c/index.ts | 1 + .../typespec-ts/src/classic/b/index.ts | 1 + .../typespec-ts/src/classic/d/index.ts | 2 +- .../generated/typespec-ts/src/index.ts | 7 +- .../generated/typespec-ts/src/models/index.ts | 9 +- .../typespec-ts/src/models/models.ts | 40 +- .../test/hierarchy_generic/spec/main.tsp | 3 - .../test/hierarchy_generic/tspconfig.yaml | 2 - .../typespec-ts/review/openai_modular.api.md | 280 +- .../typespec-ts/src/api/operations.ts | 36 +- .../generated/typespec-ts/src/index.ts | 124 +- .../generated/typespec-ts/src/models/index.ts | 124 +- .../typespec-ts/src/models/models.ts | 2406 ++++++++--------- 22 files changed, 1299 insertions(+), 1759 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts index 42121a4141..ffb44ad60e 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataProducts/index.ts @@ -23,11 +23,11 @@ import { createRestError, } from "@azure-rest/core-client"; import { serializeRecord } from "../../helpers/serializerHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PollerLike, OperationState } from "@azure/core-lro"; import { DataProductsCreateOptionalParams, diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts index bf97fc29c8..3be137716a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/api/dataTypes/index.ts @@ -17,11 +17,11 @@ import { PathUncheckedResponse, createRestError, } from "@azure-rest/core-client"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PollerLike, OperationState } from "@azure/core-lro"; import { DataTypesCreateOptionalParams, diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml b/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml index 9815130afb..dd3b9ae633 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml +++ b/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml @@ -1,7 +1,8 @@ -emit: ["@azure-tools/typespec-ts"] +emit: [ + "@azure-tools/typespec-ts", + ] options: "@azure-tools/typespec-ts": - examples-directory: "{project-root}/spec/examples" generateMetadata: true generateTest: true generateSample: true @@ -10,4 +11,4 @@ options: experimentalExtensibleEnums: true "emitter-output-dir": "{project-root}/generated/typespec-ts" packageDetails: - name: "@azure/arm-networkanalytics" + name: "@azure/arm-networkanalytics" \ No newline at end of file diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/c/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/c/index.ts index b6f1b1619c..74a1aaa5c2 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/c/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/c/index.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { BA } from "../../../models/models.js"; import { FooContext as Client } from "../../index.js"; import { StreamableMethod, diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/e/c/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/e/c/index.ts index a9f21525f3..233c4f407c 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/e/c/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/e/c/index.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { BEA } from "../../../../models/models.js"; import { FooContext as Client } from "../../../index.js"; import { StreamableMethod, diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/index.ts index 3d516f18d6..2edcde8260 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/index.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { BA } from "../../models/models.js"; import { FooContext as Client } from "../index.js"; import { StreamableMethod, diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts index 07d47e5e41..2ff751524a 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/d/index.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { A } from "../../models/models.js"; import { FooContext as Client } from "../index.js"; import { StreamableMethod, @@ -8,7 +9,6 @@ import { PathUncheckedResponse, createRestError, } from "@azure-rest/core-client"; -import { A } from "../../models/models.js"; import { DOp1OptionalParams } from "../../models/options.js"; export function _op1Send( @@ -20,7 +20,7 @@ export function _op1Send( .path("/d") .post({ ...operationOptionsToRequestParameters(options), - body: { prop1: body["propRename"] }, + body: { prop1: body["prop1"] }, }); } diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts index 3147c9efb1..8c65b8acf0 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/operations.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { A } from "../models/models.js"; import { FooContext as Client } from "./index.js"; import { StreamableMethod, @@ -8,7 +9,6 @@ import { PathUncheckedResponse, createRestError, } from "@azure-rest/core-client"; -import { A } from "../models/models.js"; import { Op1OptionalParams } from "../models/options.js"; export function _op1Send( @@ -20,7 +20,7 @@ export function _op1Send( .path("/") .post({ ...operationOptionsToRequestParameters(options), - body: { prop1: body["propRename"] }, + body: { prop1: body["prop1"] }, }); } diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/c/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/c/index.ts index d9ec997d18..442d4309c1 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/c/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/c/index.ts @@ -2,6 +2,7 @@ // Licensed under the MIT license. import { FooContext } from "../../../api/fooContext.js"; +import { BA } from "../../../models/models.js"; import { op1 } from "../../../api/b/c/index.js"; import { BCOp1OptionalParams } from "../../../models/options.js"; diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/e/c/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/e/c/index.ts index b282b10885..13686dad55 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/e/c/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/e/c/index.ts @@ -2,6 +2,7 @@ // Licensed under the MIT license. import { FooContext } from "../../../../api/fooContext.js"; +import { BEA } from "../../../../models/models.js"; import { op1 } from "../../../../api/b/e/c/index.js"; import { BECOp1OptionalParams } from "../../../../models/options.js"; diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/index.ts index 3200b855b5..696a0989c4 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/b/index.ts @@ -2,6 +2,7 @@ // Licensed under the MIT license. import { FooContext } from "../../api/fooContext.js"; +import { BA } from "../../models/models.js"; import { op1 } from "../../api/b/index.js"; import { BOp1OptionalParams } from "../../models/options.js"; import { BCOperations, getBCOperations } from "./c/index.js"; diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/d/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/d/index.ts index 84b0b244ae..8ee80c842c 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/d/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/classic/d/index.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. import { FooContext } from "../../api/fooContext.js"; -import { op1 } from "../../api/d/index.js"; import { A } from "../../models/models.js"; +import { op1 } from "../../api/d/index.js"; import { DOp1OptionalParams } from "../../models/options.js"; /** Interface representing a D operations. */ diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/index.ts index 86c50076e0..fcb67b9adc 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/index.ts @@ -3,12 +3,9 @@ export { FooClient, FooClientOptionalParams } from "./fooClient.js"; export { - aSerializer_1, - aSerializer_2, A, - A_1, - A_2, - FooClientOptions, + BA, + BEA, Op1OptionalParams, BOp1OptionalParams, BECOp1OptionalParams, diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/index.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/index.ts index d0618ee2fa..c658e318bc 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/index.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/index.ts @@ -1,14 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export { - aSerializer_1, - aSerializer_2, - A, - A_1, - A_2, - FooClientOptions, -} from "./models.js"; +export { A, BA, BEA } from "./models.js"; export { Op1OptionalParams, BOp1OptionalParams, diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts index 0d07971b19..eb5e10d4f1 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/models/models.ts @@ -2,41 +2,31 @@ // Licensed under the MIT license. export interface A { - propRename: string; + prop1: string; } -export function aSerializer(input: A): unknown { - console.log(input); - throw new Error("Not implemented"); +export function aSerializer(item: A): Record { + return { + prop1: item["prop1"], + }; } -export interface A_1 { +export interface BA { prop2: string; } -export function aSerializer_1(input: A_1): unknown { - console.log(input); - throw new Error("Not implemented"); +export function bASerializer(item: BA): Record { + return { + prop2: item["prop2"], + }; } -export interface A_2 { +export interface BEA { prop3: string; } -export function aSerializer_2(input: A_2): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** Initialization class for the client */ -export interface FooClientOptions { - /** Service host */ - endpoint: string; -} - -export function fooClientOptionsSerializer(input: { - endpoint: string; -}): unknown { - console.log(input); - throw new Error("Not implemented"); +export function bEASerializer(item: BEA): Record { + return { + prop3: item["prop3"], + }; } diff --git a/packages/typespec-test/test/hierarchy_generic/spec/main.tsp b/packages/typespec-test/test/hierarchy_generic/spec/main.tsp index ae5bf84391..472e66bf29 100644 --- a/packages/typespec-test/test/hierarchy_generic/spec/main.tsp +++ b/packages/typespec-test/test/hierarchy_generic/spec/main.tsp @@ -1,8 +1,6 @@ import "@typespec/rest"; import "@typespec/http"; -import "@azure-tools/typespec-client-generator-core"; -using Azure.ClientGenerator.Core; using TypeSpec.Rest; using TypeSpec.Http; @@ -10,7 +8,6 @@ using TypeSpec.Http; namespace Foo; model A { - @clientName("propRename", "javascript") prop1: string; } diff --git a/packages/typespec-test/test/hierarchy_generic/tspconfig.yaml b/packages/typespec-test/test/hierarchy_generic/tspconfig.yaml index 03d64c2461..008c5a7e19 100644 --- a/packages/typespec-test/test/hierarchy_generic/tspconfig.yaml +++ b/packages/typespec-test/test/hierarchy_generic/tspconfig.yaml @@ -2,9 +2,7 @@ emit: - "@azure-tools/typespec-ts" options: "@azure-tools/typespec-ts": - examples-directory: "{project-root}/spec/examples" azureSdkForJs: false - generateSample: true isModularLibrary: true "emitter-output-dir": "{project-root}/generated/typespec-ts" packageDetails: diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/review/openai_modular.api.md b/packages/typespec-test/test/openai_modular/generated/typespec-ts/review/openai_modular.api.md index 0789d48ef1..0151f3c5c9 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/review/openai_modular.api.md +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/review/openai_modular.api.md @@ -11,14 +11,8 @@ import { OperationOptions } from '@azure-rest/core-client'; import { Pipeline } from '@azure/core-rest-pipeline'; import { TokenCredential } from '@azure/core-auth'; -// @public (undocumented) -export type AudioTaskLabel = "transcribe" | "translate"; - // @public -export enum AudioTaskLabelKnownValues { - transcribe = "\"transcribe\"", - translate = "\"translate\"" -} +export type AudioTaskLabel = "transcribe" | "translate"; // @public export interface AudioTranscription { @@ -30,17 +24,8 @@ export interface AudioTranscription { words?: AudioTranscriptionWord[]; } -// @public (undocumented) -export type AudioTranscriptionFormat = "json" | "verbose_json" | "text" | "srt" | "vtt"; - // @public -export enum AudioTranscriptionFormatKnownValues { - json = "\"json\"", - srt = "\"srt\"", - text = "\"text\"", - verbose_json = "\"verbose_json\"", - vtt = "\"vtt\"" -} +export type AudioTranscriptionFormat = "json" | "verbose_json" | "text" | "srt" | "vtt"; // @public export interface AudioTranscriptionOptions { @@ -68,14 +53,8 @@ export interface AudioTranscriptionSegment { tokens: number[]; } -// @public (undocumented) -export type AudioTranscriptionTimestampGranularity = "word" | "segment"; - // @public -export enum AudioTranscriptionTimestampGranularityKnownValues { - segment = "\"segment\"", - word = "\"word\"" -} +export type AudioTranscriptionTimestampGranularity = "word" | "segment"; // @public export interface AudioTranscriptionWord { @@ -93,17 +72,8 @@ export interface AudioTranslation { text: string; } -// @public (undocumented) -export type AudioTranslationFormat = "json" | "verbose_json" | "text" | "srt" | "vtt"; - // @public -export enum AudioTranslationFormatKnownValues { - json = "\"json\"", - srt = "\"srt\"", - text = "\"text\"", - verbose_json = "\"verbose_json\"", - vtt = "\"vtt\"" -} +export type AudioTranslationFormat = "json" | "verbose_json" | "text" | "srt" | "vtt"; // @public export interface AudioTranslationOptions { @@ -145,7 +115,7 @@ export interface AzureChatExtensionConfiguration { type: AzureChatExtensionType; } -// @public (undocumented) +// @public export type AzureChatExtensionConfigurationUnion = AzureSearchChatExtensionConfiguration | AzureMachineLearningIndexChatExtensionConfiguration | AzureCosmosDBChatExtensionConfiguration | ElasticsearchChatExtensionConfiguration | PineconeChatExtensionConfiguration | AzureChatExtensionConfiguration; // @public @@ -171,14 +141,8 @@ export interface AzureChatExtensionRetrievedDocument { url?: string; } -// @public (undocumented) -export type AzureChatExtensionRetrieveDocumentFilterReason = "score" | "rerank"; - // @public -export enum AzureChatExtensionRetrieveDocumentFilterReasonKnownValues { - rerank = "\"rerank\"", - score = "\"score\"" -} +export type AzureChatExtensionRetrieveDocumentFilterReason = "score" | "rerank"; // @public export interface AzureChatExtensionsMessageContext { @@ -187,17 +151,8 @@ export interface AzureChatExtensionsMessageContext { intent?: string; } -// @public (undocumented) -export type AzureChatExtensionType = "azure_search" | "azure_ml_index" | "azure_cosmos_db" | "elasticsearch" | "pinecone"; - // @public -export enum AzureChatExtensionTypeKnownValues { - azureCosmosDB = "\"azure_cosmos_db\"", - azureMachineLearningIndex = "\"azure_ml_index\"", - azureSearch = "\"azure_search\"", - elasticsearch = "\"elasticsearch\"", - pinecone = "\"pinecone\"" -} +export type AzureChatExtensionType = "azure_search" | "azure_ml_index" | "azure_cosmos_db" | "elasticsearch" | "pinecone"; // @public export interface AzureChatGroundingEnhancementConfiguration { @@ -325,17 +280,8 @@ export interface AzureSearchIndexFieldMappingOptions { vectorFields?: string[]; } -// @public (undocumented) -export type AzureSearchQueryType = "simple" | "semantic" | "vector" | "vector_simple_hybrid" | "vector_semantic_hybrid"; - // @public -export enum AzureSearchQueryTypeKnownValues { - semantic = "\"semantic\"", - simple = "\"simple\"", - vector = "\"vector\"", - vectorSemanticHybrid = "\"vector_semantic_hybrid\"", - vectorSimpleHybrid = "\"vector_simple_hybrid\"" -} +export type AzureSearchQueryType = "simple" | "semantic" | "vector" | "vector_simple_hybrid" | "vector_semantic_hybrid"; // @public export interface ChatChoice { @@ -398,7 +344,7 @@ export interface ChatCompletionsNamedToolSelection { type: string; } -// @public (undocumented) +// @public export type ChatCompletionsNamedToolSelectionUnion = ChatCompletionsNamedFunctionToolSelection | ChatCompletionsNamedToolSelection; // @public @@ -432,7 +378,7 @@ export interface ChatCompletionsResponseFormat { type: string; } -// @public (undocumented) +// @public export type ChatCompletionsResponseFormatUnion = ChatCompletionsTextResponseFormat | ChatCompletionsJsonResponseFormat | ChatCompletionsResponseFormat; // @public @@ -446,7 +392,7 @@ export interface ChatCompletionsToolCall { type: string; } -// @public (undocumented) +// @public export type ChatCompletionsToolCallUnion = ChatCompletionsFunctionToolCall | ChatCompletionsToolCall; // @public @@ -454,24 +400,18 @@ export interface ChatCompletionsToolDefinition { type: string; } -// @public (undocumented) +// @public export type ChatCompletionsToolDefinitionUnion = ChatCompletionsFunctionToolDefinition | ChatCompletionsToolDefinition; -// @public (undocumented) -export type ChatCompletionsToolSelectionPreset = "auto" | "none"; - // @public -export enum ChatCompletionsToolSelectionPresetKnownValues { - auto = "\"auto\"", - none = "\"none\"" -} +export type ChatCompletionsToolSelectionPreset = "auto" | "none"; // @public export interface ChatFinishDetails { type: string; } -// @public (undocumented) +// @public export type ChatFinishDetailsUnion = StopFinishDetails | MaxTokensFinishDetails | ChatFinishDetails; // @public @@ -479,7 +419,7 @@ export interface ChatMessageContentItem { type: string; } -// @public (undocumented) +// @public export type ChatMessageContentItemUnion = ChatMessageTextContentItem | ChatMessageImageContentItem | ChatMessageContentItem; // @public @@ -488,15 +428,8 @@ export interface ChatMessageImageContentItem extends ChatMessageContentItem { type: "image_url"; } -// @public (undocumented) -export type ChatMessageImageDetailLevel = "auto" | "low" | "high"; - // @public -export enum ChatMessageImageDetailLevelKnownValues { - auto = "\"auto\"", - high = "\"high\"", - low = "\"low\"" -} +export type ChatMessageImageDetailLevel = "auto" | "low" | "high"; // @public export interface ChatMessageImageUrl { @@ -531,7 +464,7 @@ export interface ChatRequestMessage { role: ChatRole; } -// @public (undocumented) +// @public export type ChatRequestMessageUnion = ChatRequestSystemMessage | ChatRequestUserMessage | ChatRequestAssistantMessage | ChatRequestToolMessage | ChatRequestFunctionMessage | ChatRequestMessage; // @public @@ -564,17 +497,8 @@ export interface ChatResponseMessage { toolCalls?: ChatCompletionsToolCallUnion[]; } -// @public (undocumented) -export type ChatRole = "system" | "assistant" | "user" | "function" | "tool"; - // @public -export enum ChatRoleKnownValues { - assistant = "\"assistant\"", - "function" = "\"function\"", - system = "\"system\"", - tool = "\"tool\"", - user = "\"user\"" -} +export type ChatRole = "system" | "assistant" | "user" | "function" | "tool"; // @public export interface ChatTokenLogProbabilityInfo { @@ -609,17 +533,8 @@ export interface Completions { usage: CompletionsUsage; } -// @public (undocumented) -export type CompletionsFinishReason = "stop" | "length" | "content_filter" | "function_call" | "tool_calls"; - // @public -export enum CompletionsFinishReasonKnownValues { - contentFiltered = "\"content_filter\"", - functionCall = "\"function_call\"", - stopped = "\"stop\"", - tokenLimitReached = "\"length\"", - toolCalls = "\"tool_calls\"" -} +export type CompletionsFinishReason = "stop" | "length" | "content_filter" | "function_call" | "tool_calls"; // @public export interface CompletionsLogProbabilityModel { @@ -720,16 +635,8 @@ export interface ContentFilterResultsForPrompt { promptIndex: number; } -// @public (undocumented) -export type ContentFilterSeverity = "safe" | "low" | "medium" | "high"; - // @public -export enum ContentFilterSeverityKnownValues { - high = "\"high\"", - low = "\"low\"", - medium = "\"medium\"", - safe = "\"safe\"" -} +export type ContentFilterSeverity = "safe" | "low" | "medium" | "high"; // @public export interface ElasticsearchChatExtensionConfiguration extends AzureChatExtensionConfiguration { @@ -764,24 +671,12 @@ export interface ElasticsearchIndexFieldMappingOptions { vectorFields?: string[]; } -// @public (undocumented) +// @public export type ElasticsearchQueryType = "simple" | "vector"; // @public -export enum ElasticsearchQueryTypeKnownValues { - simple = "\"simple\"", - vector = "\"vector\"" -} - -// @public (undocumented) export type EmbeddingEncodingFormat = "float" | "base64"; -// @public -export enum EmbeddingEncodingFormatKnownValues { - base64 = "\"base64\"", - float = "\"float\"" -} - // @public export interface EmbeddingItem { embedding: number[]; @@ -810,26 +705,14 @@ export interface EmbeddingsUsage { totalTokens: number; } -// @public -export interface ErrorResponse { - error: ErrorModel; - errorCode?: string; -} - // @public export interface FunctionCall { arguments: string; name: string; } -// @public (undocumented) -export type FunctionCallPreset = "auto" | "none"; - // @public -export enum FunctionCallPresetKnownValues { - auto = "\"auto\"", - none = "\"none\"" -} +export type FunctionCallPreset = "auto" | "none"; // @public export interface FunctionDefinition { @@ -923,51 +806,24 @@ export interface ImageGenerationPromptFilterResults { violence?: ContentFilterResult; } -// @public (undocumented) +// @public export type ImageGenerationQuality = "standard" | "hd"; // @public -export enum ImageGenerationQualityKnownValues { - hd = "\"hd\"", - standard = "\"standard\"" -} - -// @public (undocumented) export type ImageGenerationResponseFormat = "url" | "b64_json"; -// @public -export enum ImageGenerationResponseFormatKnownValues { - base64 = "\"b64_json\"", - url = "\"url\"" -} - // @public export interface ImageGenerations { created: Date; data: ImageGenerationData[]; } -// @public (undocumented) +// @public export type ImageGenerationStyle = "natural" | "vivid"; // @public -export enum ImageGenerationStyleKnownValues { - natural = "\"natural\"", - vivid = "\"vivid\"" -} - -// @public (undocumented) export type ImageSize = "256x256" | "512x512" | "1024x1024" | "1792x1024" | "1024x1792"; -// @public -export enum ImageSizeKnownValues { - size1024x1024 = "\"1024x1024\"", - size1024x1792 = "\"1024x1792\"", - size1792x1024 = "\"1792x1024\"", - size256x256 = "\"256x256\"", - size512x512 = "\"512x512\"" -} - // @public export interface MaxTokensFinishDetails extends ChatFinishDetails { type: "max_tokens"; @@ -990,22 +846,11 @@ export interface OnYourDataAuthenticationOptions { type: OnYourDataAuthenticationType; } -// @public (undocumented) +// @public export type OnYourDataAuthenticationOptionsUnion = OnYourDataApiKeyAuthenticationOptions | OnYourDataConnectionStringAuthenticationOptions | OnYourDataKeyAndKeyIdAuthenticationOptions | OnYourDataEncodedApiKeyAuthenticationOptions | OnYourDataAccessTokenAuthenticationOptions | OnYourDataSystemAssignedManagedIdentityAuthenticationOptions | OnYourDataUserAssignedManagedIdentityAuthenticationOptions | OnYourDataAuthenticationOptions; -// @public (undocumented) -export type OnYourDataAuthenticationType = "api_key" | "connection_string" | "key_and_key_id" | "encoded_api_key" | "access_token" | "system_assigned_managed_identity" | "user_assigned_managed_identity"; - // @public -export enum OnYourDataAuthenticationTypeKnownValues { - accessToken = "\"access_token\"", - apiKey = "\"api_key\"", - connectionString = "\"connection_string\"", - encodedApiKey = "\"encoded_api_key\"", - keyAndKeyId = "\"key_and_key_id\"", - systemAssignedManagedIdentity = "\"system_assigned_managed_identity\"", - userAssignedManagedIdentity = "\"user_assigned_managed_identity\"" -} +export type OnYourDataAuthenticationType = "api_key" | "connection_string" | "key_and_key_id" | "encoded_api_key" | "access_token" | "system_assigned_managed_identity" | "user_assigned_managed_identity"; // @public export interface OnYourDataConnectionStringAuthenticationOptions extends OnYourDataAuthenticationOptions { @@ -1013,15 +858,8 @@ export interface OnYourDataConnectionStringAuthenticationOptions extends OnYourD type: "connection_string"; } -// @public (undocumented) -export type OnYourDataContextProperty = "citations" | "intent" | "all_retrieved_documents"; - // @public -export enum OnYourDataContextPropertyKnownValues { - allRetrievedDocuments = "\"all_retrieved_documents\"", - citations = "\"citations\"", - intent = "\"intent\"" -} +export type OnYourDataContextProperty = "citations" | "intent" | "all_retrieved_documents"; // @public export interface OnYourDataDeploymentNameVectorizationSource extends OnYourDataVectorizationSource { @@ -1072,17 +910,10 @@ export interface OnYourDataVectorizationSource { type: OnYourDataVectorizationSourceType; } -// @public (undocumented) +// @public export type OnYourDataVectorizationSourceType = "endpoint" | "deployment_name" | "model_id"; // @public -export enum OnYourDataVectorizationSourceTypeKnownValues { - deploymentName = "\"deployment_name\"", - endpoint = "\"endpoint\"", - modelId = "\"model_id\"" -} - -// @public (undocumented) export type OnYourDataVectorizationSourceUnion = OnYourDataEndpointVectorizationSource | OnYourDataDeploymentNameVectorizationSource | OnYourDataModelIdVectorizationSource | OnYourDataVectorizationSource; // @public @@ -1102,17 +933,11 @@ export interface OnYourDataVectorSearchAuthenticationOptions { type: OnYourDataVectorSearchAuthenticationType; } -// @public (undocumented) +// @public export type OnYourDataVectorSearchAuthenticationOptionsUnion = OnYourDataVectorSearchApiKeyAuthenticationOptions | OnYourDataVectorSearchAccessTokenAuthenticationOptions | OnYourDataVectorSearchAuthenticationOptions; -// @public (undocumented) -export type OnYourDataVectorSearchAuthenticationType = "api_key" | "access_token"; - // @public -export enum OnYourDataVectorSearchAuthenticationTypeKnownValues { - accessToken = "\"access_token\"", - apiKey = "\"api_key\"" -} +export type OnYourDataVectorSearchAuthenticationType = "api_key" | "access_token"; // @public (undocumented) export class OpenAIClient { @@ -1134,13 +959,6 @@ export interface OpenAIClientOptionalParams extends ClientOptions { apiVersion?: string; } -// @public -export interface OpenAIClientOptions { - apiVersion: string; - credential: KeyCredential | TokenCredential; - endpoint: string | string; -} - // @public export interface PineconeChatExtensionConfiguration extends AzureChatExtensionConfiguration { parameters: PineconeChatExtensionParameters; @@ -1172,20 +990,8 @@ export interface PineconeFieldMappingOptions { urlField?: string; } -// @public (undocumented) -export type ServiceApiVersions = "2022-12-01" | "2023-05-15" | "2024-02-01" | "2024-06-01"; - -// @public (undocumented) -export enum ServiceApiVersionsKnownValues { - // (undocumented) - v2022_12_01 = "\"2022-12-01\"", - // (undocumented) - v2023_05_15 = "\"2023-05-15\"", - // (undocumented) - v2024_02_01 = "\"2024-02-01\"", - // (undocumented) - v2024_06_01 = "\"2024-06-01\"" -} +// @public +export type ServiceApiVersions = "2022-12-01" | "2023-05-15" | "2023-06-01-preview" | "2023-07-01-preview" | "2024-02-01" | "2024-02-15-preview" | "2024-03-01-preview" | "2024-04-01-preview" | "2024-05-01-preview" | "2024-06-01"; // @public export interface SpeechGenerationOptions { @@ -1196,32 +1002,12 @@ export interface SpeechGenerationOptions { voice: SpeechVoice; } -// @public (undocumented) +// @public export type SpeechGenerationResponseFormat = "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm"; // @public -export enum SpeechGenerationResponseFormatKnownValues { - aac = "\"aac\"", - flac = "\"flac\"", - mp3 = "\"mp3\"", - opus = "\"opus\"", - pcm = "\"pcm\"", - wav = "\"wav\"" -} - -// @public (undocumented) export type SpeechVoice = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; -// @public -export enum SpeechVoiceKnownValues { - alloy = "\"alloy\"", - echo = "\"echo\"", - fable = "\"fable\"", - nova = "\"nova\"", - onyx = "\"onyx\"", - shimmer = "\"shimmer\"" -} - // @public export interface StopFinishDetails extends ChatFinishDetails { stop: string; diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/api/operations.ts b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/api/operations.ts index c30d8ebc18..8f51c308fd 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/api/operations.ts +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/api/operations.ts @@ -1,39 +1,39 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { OpenAIContext as Client } from "./index.js"; -import { - StreamableMethod, - operationOptionsToRequestParameters, - PathUncheckedResponse, - createRestError, -} from "@azure-rest/core-client"; -import { serializeRecord } from "../helpers/serializerHelpers.js"; -import { uint8ArrayToString } from "@azure/core-util"; import { + chatRequestMessageUnionSerializer, + functionDefinitionSerializer, + azureChatExtensionConfigurationUnionSerializer, + azureChatEnhancementConfigurationSerializer, + chatCompletionsResponseFormatUnionSerializer, AudioTranscriptionOptions, AudioTranscription, + AudioTaskLabel, AudioTranslationOptions, AudioTranslation, CompletionsOptions, Completions, + ContentFilterSeverity, + CompletionsFinishReason, ChatCompletionsOptions, - azureChatEnhancementConfigurationSerializer, - functionDefinitionSerializer, + ChatRole, ChatCompletions, ImageGenerationOptions, ImageGenerations, SpeechGenerationOptions, EmbeddingsOptions, Embeddings, - AudioTaskLabel, - ContentFilterSeverity, - CompletionsFinishReason, - ChatRole, - azureChatExtensionConfigurationUnionSerializer, - chatCompletionsResponseFormatUnionSerializer, - chatRequestMessageUnionSerializer, } from "../models/models.js"; +import { OpenAIContext as Client } from "./index.js"; +import { + StreamableMethod, + operationOptionsToRequestParameters, + PathUncheckedResponse, + createRestError, +} from "@azure-rest/core-client"; +import { serializeRecord } from "../helpers/serializerHelpers.js"; +import { uint8ArrayToString } from "@azure/core-util"; import { GetAudioTranscriptionAsPlainTextOptionalParams, GetAudioTranscriptionAsResponseObjectOptionalParams, diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/index.ts b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/index.ts index dfb3798411..dad76b6263 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/index.ts +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/index.ts @@ -4,18 +4,22 @@ export { OpenAIClient, OpenAIClientOptionalParams } from "./openAIClient.js"; export { AudioTranscriptionOptions, + AudioTranscriptionFormat, + AudioTranscriptionTimestampGranularity, AudioTranscription, + AudioTaskLabel, AudioTranscriptionSegment, AudioTranscriptionWord, AudioTranslationOptions, + AudioTranslationFormat, AudioTranslation, AudioTranslationSegment, CompletionsOptions, Completions, - CompletionsUsage, ContentFilterResultsForPrompt, ContentFilterResultDetailsForPrompt, ContentFilterResult, + ContentFilterSeverity, ContentFilterDetectionResult, ContentFilterDetailedResults, ContentFilterBlocklistIdResult, @@ -23,39 +27,31 @@ export { ContentFilterResultsForChoice, ContentFilterCitedDetectionResult, CompletionsLogProbabilityModel, + CompletionsFinishReason, + CompletionsUsage, ChatCompletionsOptions, - AzureChatEnhancementConfiguration, - AzureChatGroundingEnhancementConfiguration, - AzureChatOCREnhancementConfiguration, - ChatCompletionsResponseFormat, - ChatCompletionsResponseFormatUnion, ChatRequestMessage, - ChatRequestMessageUnion, ChatRequestSystemMessage, ChatRequestUserMessage, ChatMessageContentItem, - ChatMessageContentItemUnion, ChatMessageTextContentItem, ChatMessageImageContentItem, ChatMessageImageUrl, + ChatMessageImageDetailLevel, ChatRequestAssistantMessage, - FunctionCall, ChatCompletionsToolCall, - ChatCompletionsToolCallUnion, ChatCompletionsFunctionToolCall, + FunctionCall, ChatRequestToolMessage, ChatRequestFunctionMessage, + ChatRole, FunctionDefinition, + FunctionCallPreset, FunctionName, AzureChatExtensionConfiguration, - AzureChatExtensionConfigurationUnion, AzureSearchChatExtensionConfiguration, AzureSearchChatExtensionParameters, OnYourDataAuthenticationOptions, - OnYourDataAuthenticationOptionsUnion, - AzureSearchIndexFieldMappingOptions, - OnYourDataVectorizationSource, - OnYourDataVectorizationSourceUnion, OnYourDataApiKeyAuthenticationOptions, OnYourDataConnectionStringAuthenticationOptions, OnYourDataKeyAndKeyIdAuthenticationOptions, @@ -63,13 +59,19 @@ export { OnYourDataAccessTokenAuthenticationOptions, OnYourDataSystemAssignedManagedIdentityAuthenticationOptions, OnYourDataUserAssignedManagedIdentityAuthenticationOptions, + OnYourDataAuthenticationType, + OnYourDataContextProperty, + AzureSearchIndexFieldMappingOptions, + AzureSearchQueryType, + OnYourDataVectorizationSource, OnYourDataEndpointVectorizationSource, OnYourDataVectorSearchAuthenticationOptions, - OnYourDataVectorSearchAuthenticationOptionsUnion, OnYourDataVectorSearchApiKeyAuthenticationOptions, OnYourDataVectorSearchAccessTokenAuthenticationOptions, + OnYourDataVectorSearchAuthenticationType, OnYourDataDeploymentNameVectorizationSource, OnYourDataModelIdVectorizationSource, + OnYourDataVectorizationSourceType, AzureMachineLearningIndexChatExtensionConfiguration, AzureMachineLearningIndexChatExtensionParameters, AzureCosmosDBChatExtensionConfiguration, @@ -78,100 +80,70 @@ export { ElasticsearchChatExtensionConfiguration, ElasticsearchChatExtensionParameters, ElasticsearchIndexFieldMappingOptions, + ElasticsearchQueryType, PineconeChatExtensionConfiguration, PineconeChatExtensionParameters, PineconeFieldMappingOptions, + AzureChatExtensionType, + AzureChatEnhancementConfiguration, + AzureChatGroundingEnhancementConfiguration, + AzureChatOCREnhancementConfiguration, + ChatCompletionsResponseFormat, ChatCompletionsTextResponseFormat, ChatCompletionsJsonResponseFormat, ChatCompletionsToolDefinition, - ChatCompletionsToolDefinitionUnion, ChatCompletionsFunctionToolDefinition, + ChatCompletionsToolSelectionPreset, ChatCompletionsNamedToolSelection, - ChatCompletionsNamedToolSelectionUnion, ChatCompletionsNamedFunctionToolSelection, ChatCompletionsFunctionToolSelection, ChatCompletions, ChatChoice, ChatResponseMessage, AzureChatExtensionsMessageContext, - ChatFinishDetails, - ChatFinishDetailsUnion, - AzureChatEnhancements, - AzureGroundingEnhancement, AzureChatExtensionDataSourceResponseCitation, AzureChatExtensionRetrievedDocument, + AzureChatExtensionRetrieveDocumentFilterReason, ChatChoiceLogProbabilityInfo, ChatTokenLogProbabilityResult, ChatTokenLogProbabilityInfo, + ChatFinishDetails, StopFinishDetails, MaxTokensFinishDetails, + AzureChatEnhancements, + AzureGroundingEnhancement, AzureGroundingEnhancementLine, AzureGroundingEnhancementLineSpan, AzureGroundingEnhancementCoordinatePoint, ImageGenerationOptions, + ImageSize, + ImageGenerationResponseFormat, + ImageGenerationQuality, + ImageGenerationStyle, ImageGenerations, ImageGenerationData, ImageGenerationContentFilterResults, ImageGenerationPromptFilterResults, SpeechGenerationOptions, - EmbeddingsOptions, - Embeddings, - EmbeddingsUsage, - EmbeddingItem, - AudioTranscriptionFormatKnownValues, - AudioTranscriptionFormat, - AudioTranscriptionTimestampGranularityKnownValues, - AudioTranscriptionTimestampGranularity, - AudioTaskLabelKnownValues, - AudioTaskLabel, - AudioTranslationFormatKnownValues, - AudioTranslationFormat, - ContentFilterSeverityKnownValues, - ContentFilterSeverity, - CompletionsFinishReasonKnownValues, - CompletionsFinishReason, - ChatRoleKnownValues, - ChatRole, - ChatMessageImageDetailLevelKnownValues, - ChatMessageImageDetailLevel, - FunctionCallPresetKnownValues, - FunctionCallPreset, - AzureChatExtensionTypeKnownValues, - AzureChatExtensionType, - OnYourDataAuthenticationTypeKnownValues, - OnYourDataAuthenticationType, - OnYourDataContextPropertyKnownValues, - OnYourDataContextProperty, - AzureSearchQueryTypeKnownValues, - AzureSearchQueryType, - OnYourDataVectorizationSourceTypeKnownValues, - OnYourDataVectorizationSourceType, - OnYourDataVectorSearchAuthenticationTypeKnownValues, - OnYourDataVectorSearchAuthenticationType, - ElasticsearchQueryTypeKnownValues, - ElasticsearchQueryType, - ChatCompletionsToolSelectionPresetKnownValues, - ChatCompletionsToolSelectionPreset, - AzureChatExtensionRetrieveDocumentFilterReasonKnownValues, - AzureChatExtensionRetrieveDocumentFilterReason, - ImageSizeKnownValues, - ImageSize, - ImageGenerationResponseFormatKnownValues, - ImageGenerationResponseFormat, - ImageGenerationQualityKnownValues, - ImageGenerationQuality, - ImageGenerationStyleKnownValues, - ImageGenerationStyle, - SpeechVoiceKnownValues, SpeechVoice, - SpeechGenerationResponseFormatKnownValues, SpeechGenerationResponseFormat, - EmbeddingEncodingFormatKnownValues, + EmbeddingsOptions, EmbeddingEncodingFormat, - ServiceApiVersionsKnownValues, + Embeddings, + EmbeddingItem, + EmbeddingsUsage, ServiceApiVersions, - OpenAIClientOptions, - ErrorResponse, + ChatRequestMessageUnion, + ChatMessageContentItemUnion, + ChatCompletionsToolCallUnion, + AzureChatExtensionConfigurationUnion, + OnYourDataAuthenticationOptionsUnion, + OnYourDataVectorizationSourceUnion, + OnYourDataVectorSearchAuthenticationOptionsUnion, + ChatCompletionsResponseFormatUnion, + ChatCompletionsToolDefinitionUnion, + ChatCompletionsNamedToolSelectionUnion, + ChatFinishDetailsUnion, GetAudioTranscriptionAsPlainTextOptionalParams, GetAudioTranscriptionAsResponseObjectOptionalParams, GetAudioTranslationAsPlainTextOptionalParams, diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/index.ts b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/index.ts index 4f32649e28..e48782c424 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/index.ts +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/index.ts @@ -3,18 +3,22 @@ export { AudioTranscriptionOptions, + AudioTranscriptionFormat, + AudioTranscriptionTimestampGranularity, AudioTranscription, + AudioTaskLabel, AudioTranscriptionSegment, AudioTranscriptionWord, AudioTranslationOptions, + AudioTranslationFormat, AudioTranslation, AudioTranslationSegment, CompletionsOptions, Completions, - CompletionsUsage, ContentFilterResultsForPrompt, ContentFilterResultDetailsForPrompt, ContentFilterResult, + ContentFilterSeverity, ContentFilterDetectionResult, ContentFilterDetailedResults, ContentFilterBlocklistIdResult, @@ -22,39 +26,31 @@ export { ContentFilterResultsForChoice, ContentFilterCitedDetectionResult, CompletionsLogProbabilityModel, + CompletionsFinishReason, + CompletionsUsage, ChatCompletionsOptions, - AzureChatEnhancementConfiguration, - AzureChatGroundingEnhancementConfiguration, - AzureChatOCREnhancementConfiguration, - ChatCompletionsResponseFormat, - ChatCompletionsResponseFormatUnion, ChatRequestMessage, - ChatRequestMessageUnion, ChatRequestSystemMessage, ChatRequestUserMessage, ChatMessageContentItem, - ChatMessageContentItemUnion, ChatMessageTextContentItem, ChatMessageImageContentItem, ChatMessageImageUrl, + ChatMessageImageDetailLevel, ChatRequestAssistantMessage, - FunctionCall, ChatCompletionsToolCall, - ChatCompletionsToolCallUnion, ChatCompletionsFunctionToolCall, + FunctionCall, ChatRequestToolMessage, ChatRequestFunctionMessage, + ChatRole, FunctionDefinition, + FunctionCallPreset, FunctionName, AzureChatExtensionConfiguration, - AzureChatExtensionConfigurationUnion, AzureSearchChatExtensionConfiguration, AzureSearchChatExtensionParameters, OnYourDataAuthenticationOptions, - OnYourDataAuthenticationOptionsUnion, - AzureSearchIndexFieldMappingOptions, - OnYourDataVectorizationSource, - OnYourDataVectorizationSourceUnion, OnYourDataApiKeyAuthenticationOptions, OnYourDataConnectionStringAuthenticationOptions, OnYourDataKeyAndKeyIdAuthenticationOptions, @@ -62,13 +58,19 @@ export { OnYourDataAccessTokenAuthenticationOptions, OnYourDataSystemAssignedManagedIdentityAuthenticationOptions, OnYourDataUserAssignedManagedIdentityAuthenticationOptions, + OnYourDataAuthenticationType, + OnYourDataContextProperty, + AzureSearchIndexFieldMappingOptions, + AzureSearchQueryType, + OnYourDataVectorizationSource, OnYourDataEndpointVectorizationSource, OnYourDataVectorSearchAuthenticationOptions, - OnYourDataVectorSearchAuthenticationOptionsUnion, OnYourDataVectorSearchApiKeyAuthenticationOptions, OnYourDataVectorSearchAccessTokenAuthenticationOptions, + OnYourDataVectorSearchAuthenticationType, OnYourDataDeploymentNameVectorizationSource, OnYourDataModelIdVectorizationSource, + OnYourDataVectorizationSourceType, AzureMachineLearningIndexChatExtensionConfiguration, AzureMachineLearningIndexChatExtensionParameters, AzureCosmosDBChatExtensionConfiguration, @@ -77,100 +79,70 @@ export { ElasticsearchChatExtensionConfiguration, ElasticsearchChatExtensionParameters, ElasticsearchIndexFieldMappingOptions, + ElasticsearchQueryType, PineconeChatExtensionConfiguration, PineconeChatExtensionParameters, PineconeFieldMappingOptions, + AzureChatExtensionType, + AzureChatEnhancementConfiguration, + AzureChatGroundingEnhancementConfiguration, + AzureChatOCREnhancementConfiguration, + ChatCompletionsResponseFormat, ChatCompletionsTextResponseFormat, ChatCompletionsJsonResponseFormat, ChatCompletionsToolDefinition, - ChatCompletionsToolDefinitionUnion, ChatCompletionsFunctionToolDefinition, + ChatCompletionsToolSelectionPreset, ChatCompletionsNamedToolSelection, - ChatCompletionsNamedToolSelectionUnion, ChatCompletionsNamedFunctionToolSelection, ChatCompletionsFunctionToolSelection, ChatCompletions, ChatChoice, ChatResponseMessage, AzureChatExtensionsMessageContext, - ChatFinishDetails, - ChatFinishDetailsUnion, - AzureChatEnhancements, - AzureGroundingEnhancement, AzureChatExtensionDataSourceResponseCitation, AzureChatExtensionRetrievedDocument, + AzureChatExtensionRetrieveDocumentFilterReason, ChatChoiceLogProbabilityInfo, ChatTokenLogProbabilityResult, ChatTokenLogProbabilityInfo, + ChatFinishDetails, StopFinishDetails, MaxTokensFinishDetails, + AzureChatEnhancements, + AzureGroundingEnhancement, AzureGroundingEnhancementLine, AzureGroundingEnhancementLineSpan, AzureGroundingEnhancementCoordinatePoint, ImageGenerationOptions, + ImageSize, + ImageGenerationResponseFormat, + ImageGenerationQuality, + ImageGenerationStyle, ImageGenerations, ImageGenerationData, ImageGenerationContentFilterResults, ImageGenerationPromptFilterResults, SpeechGenerationOptions, - EmbeddingsOptions, - Embeddings, - EmbeddingsUsage, - EmbeddingItem, - AudioTranscriptionFormatKnownValues, - AudioTranscriptionFormat, - AudioTranscriptionTimestampGranularityKnownValues, - AudioTranscriptionTimestampGranularity, - AudioTaskLabelKnownValues, - AudioTaskLabel, - AudioTranslationFormatKnownValues, - AudioTranslationFormat, - ContentFilterSeverityKnownValues, - ContentFilterSeverity, - CompletionsFinishReasonKnownValues, - CompletionsFinishReason, - ChatRoleKnownValues, - ChatRole, - ChatMessageImageDetailLevelKnownValues, - ChatMessageImageDetailLevel, - FunctionCallPresetKnownValues, - FunctionCallPreset, - AzureChatExtensionTypeKnownValues, - AzureChatExtensionType, - OnYourDataAuthenticationTypeKnownValues, - OnYourDataAuthenticationType, - OnYourDataContextPropertyKnownValues, - OnYourDataContextProperty, - AzureSearchQueryTypeKnownValues, - AzureSearchQueryType, - OnYourDataVectorizationSourceTypeKnownValues, - OnYourDataVectorizationSourceType, - OnYourDataVectorSearchAuthenticationTypeKnownValues, - OnYourDataVectorSearchAuthenticationType, - ElasticsearchQueryTypeKnownValues, - ElasticsearchQueryType, - ChatCompletionsToolSelectionPresetKnownValues, - ChatCompletionsToolSelectionPreset, - AzureChatExtensionRetrieveDocumentFilterReasonKnownValues, - AzureChatExtensionRetrieveDocumentFilterReason, - ImageSizeKnownValues, - ImageSize, - ImageGenerationResponseFormatKnownValues, - ImageGenerationResponseFormat, - ImageGenerationQualityKnownValues, - ImageGenerationQuality, - ImageGenerationStyleKnownValues, - ImageGenerationStyle, - SpeechVoiceKnownValues, SpeechVoice, - SpeechGenerationResponseFormatKnownValues, SpeechGenerationResponseFormat, - EmbeddingEncodingFormatKnownValues, + EmbeddingsOptions, EmbeddingEncodingFormat, - ServiceApiVersionsKnownValues, + Embeddings, + EmbeddingItem, + EmbeddingsUsage, ServiceApiVersions, - OpenAIClientOptions, - ErrorResponse, + ChatRequestMessageUnion, + ChatMessageContentItemUnion, + ChatCompletionsToolCallUnion, + AzureChatExtensionConfigurationUnion, + OnYourDataAuthenticationOptionsUnion, + OnYourDataVectorizationSourceUnion, + OnYourDataVectorSearchAuthenticationOptionsUnion, + ChatCompletionsResponseFormatUnion, + ChatCompletionsToolDefinitionUnion, + ChatCompletionsNamedToolSelectionUnion, + ChatFinishDetailsUnion, } from "./models.js"; export { GetAudioTranscriptionAsPlainTextOptionalParams, diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/models.ts b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/models.ts index 9a0ba0a348..860b295b98 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/models.ts +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/models/models.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { KeyCredential, TokenCredential } from "@azure/core-auth"; +import { serializeRecord } from "../helpers/serializerHelpers.js"; import { ErrorModel } from "@azure-rest/core-client"; import { uint8ArrayToString } from "@azure/core-util"; @@ -45,12 +45,30 @@ export interface AudioTranscriptionOptions { } export function audioTranscriptionOptionsSerializer( - input: AudioTranscriptionOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AudioTranscriptionOptions, +): Record { + return { + file: uint8ArrayToString(item["file"], "base64"), + filename: item["filename"], + response_format: item["responseFormat"], + language: item["language"], + prompt: item["prompt"], + temperature: item["temperature"], + timestamp_granularities: item["timestampGranularities"], + model: item["model"], + }; } +/** Defines available options for the underlying response format of output transcription information. */ +export type AudioTranscriptionFormat = + | "json" + | "verbose_json" + | "text" + | "srt" + | "vtt"; +/** Defines the timestamp granularities that can be requested on a verbose transcription response. */ +export type AudioTranscriptionTimestampGranularity = "word" | "segment"; + /** Result information for an operation that transcribed spoken audio into written text. */ export interface AudioTranscription { /** The transcribed text for the provided audio data. */ @@ -70,12 +88,8 @@ export interface AudioTranscription { words?: AudioTranscriptionWord[]; } -export function audioTranscriptionSerializer( - input: AudioTranscription, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} +/** Defines the possible descriptors for available audio operation responses. */ +export type AudioTaskLabel = "transcribe" | "translate"; /** * Extended information about a single segment of transcribed audio data. @@ -111,13 +125,6 @@ export interface AudioTranscriptionSegment { seek: number; } -export function audioTranscriptionSegmentSerializer( - input: AudioTranscriptionSegment, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Extended information about a single transcribed word, as provided on responses when the 'word' timestamp granularity is provided. */ export interface AudioTranscriptionWord { /** The textual content of the word. */ @@ -128,13 +135,6 @@ export interface AudioTranscriptionWord { end: number; } -export function audioTranscriptionWordSerializer( - input: AudioTranscriptionWord, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** The configuration information for an audio translation request. */ export interface AudioTranslationOptions { /** @@ -162,12 +162,26 @@ export interface AudioTranslationOptions { } export function audioTranslationOptionsSerializer( - input: AudioTranslationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AudioTranslationOptions, +): Record { + return { + file: uint8ArrayToString(item["file"], "base64"), + filename: item["filename"], + response_format: item["responseFormat"], + prompt: item["prompt"], + temperature: item["temperature"], + model: item["model"], + }; } +/** Defines available options for the underlying response format of output translation information. */ +export type AudioTranslationFormat = + | "json" + | "verbose_json" + | "text" + | "srt" + | "vtt"; + /** Result information for an operation that translated spoken audio into written text. */ export interface AudioTranslation { /** The translated text for the provided audio data. */ @@ -185,11 +199,6 @@ export interface AudioTranslation { segments?: AudioTranslationSegment[]; } -export function audioTranslationSerializer(input: AudioTranslation): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** * Extended information about a single segment of translated audio data. * Segments generally represent roughly 5-10 seconds of speech. Segment boundaries typically occur between words but not @@ -224,13 +233,6 @@ export interface AudioTranslationSegment { seek: number; } -export function audioTranslationSegmentSerializer( - input: AudioTranslationSegment, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** * The configuration information for a completions request. * Completions support a wide variety of tasks and generate text that continues from or "completes" @@ -326,10 +328,28 @@ export interface CompletionsOptions { } export function completionsOptionsSerializer( - input: CompletionsOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: CompletionsOptions, +): Record { + return { + prompt: item["prompt"], + max_tokens: item["maxTokens"], + temperature: item["temperature"], + top_p: item["topP"], + logit_bias: !item.logitBias + ? item.logitBias + : (serializeRecord(item.logitBias as any) as any), + user: item["user"], + n: item["n"], + logprobs: item["logprobs"], + suffix: item["suffix"], + echo: item["echo"], + stop: item["stop"], + presence_penalty: item["presencePenalty"], + frequency_penalty: item["frequencyPenalty"], + best_of: item["bestOf"], + stream: item["stream"], + model: item["model"], + }; } /** @@ -360,30 +380,6 @@ export interface Completions { usage: CompletionsUsage; } -export function completionsSerializer(input: Completions): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** - * Representation of the token counts processed for a completions request. - * Counts consider all tokens across prompts, choices, choice alternates, best_of generations, and - * other consumers. - */ -export interface CompletionsUsage { - /** The number of tokens generated across all completions emissions. */ - completionTokens: number; - /** The number of tokens in the provided prompts for the completions request. */ - promptTokens: number; - /** The total number of tokens processed for the completions request and response. */ - totalTokens: number; -} - -export function completionsUsageSerializer(input: CompletionsUsage): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Content filtering results for a single prompt in the request. */ export interface ContentFilterResultsForPrompt { /** The index of this prompt in the set of prompt results */ @@ -392,13 +388,6 @@ export interface ContentFilterResultsForPrompt { contentFilterResults: ContentFilterResultDetailsForPrompt; } -export function contentFilterResultsForPromptSerializer( - input: ContentFilterResultsForPrompt, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Information about content filtering evaluated against input data to Azure OpenAI. */ export interface ContentFilterResultDetailsForPrompt { /** @@ -441,13 +430,6 @@ export interface ContentFilterResultDetailsForPrompt { indirectAttack?: ContentFilterDetectionResult; } -export function contentFilterResultDetailsForPromptSerializer( - input: ContentFilterResultDetailsForPrompt, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Information about filtered content severity level and if it has been filtered or not. */ export interface ContentFilterResult { /** A value indicating whether or not the content has been filtered. */ @@ -456,12 +438,8 @@ export interface ContentFilterResult { severity: ContentFilterSeverity; } -export function contentFilterResultSerializer( - input: ContentFilterResult, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} +/** Ratings for the intensity and risk level of harmful content. */ +export type ContentFilterSeverity = "safe" | "low" | "medium" | "high"; /** Represents the outcome of a detection operation performed by content filtering. */ export interface ContentFilterDetectionResult { @@ -471,13 +449,6 @@ export interface ContentFilterDetectionResult { detected: boolean; } -export function contentFilterDetectionResultSerializer( - input: ContentFilterDetectionResult, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Represents a structured collection of result details for content filtering. */ export interface ContentFilterDetailedResults { /** A value indicating whether or not the content has been filtered. */ @@ -486,13 +457,6 @@ export interface ContentFilterDetailedResults { details: ContentFilterBlocklistIdResult[]; } -export function contentFilterDetailedResultsSerializer( - input: ContentFilterDetailedResults, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Represents the outcome of an evaluation against a custom blocklist as performed by content filtering. */ export interface ContentFilterBlocklistIdResult { /** A value indicating whether or not the content has been filtered. */ @@ -501,13 +465,6 @@ export interface ContentFilterBlocklistIdResult { id: string; } -export function contentFilterBlocklistIdResultSerializer( - input: ContentFilterBlocklistIdResult, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** * The representation of a single prompt completion as part of an overall completions request. * Generally, `n` choices are generated per provided prompt with a default value of 1. @@ -530,11 +487,6 @@ export interface Choice { finishReason: CompletionsFinishReason | null; } -export function choiceSerializer(input: Choice): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Information about content filtering evaluated against generated model output. */ export interface ContentFilterResultsForChoice { /** @@ -577,13 +529,6 @@ export interface ContentFilterResultsForChoice { protectedMaterialCode?: ContentFilterCitedDetectionResult; } -export function contentFilterResultsForChoiceSerializer( - input: ContentFilterResultsForChoice, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Represents the outcome of a detection operation against protected resources as performed by content filtering. */ export interface ContentFilterCitedDetectionResult { /** A value indicating whether or not the content has been filtered. */ @@ -596,13 +541,6 @@ export interface ContentFilterCitedDetectionResult { license: string; } -export function contentFilterCitedDetectionResultSerializer( - input: ContentFilterCitedDetectionResult, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Representation of a log probabilities model for a completions generation. */ export interface CompletionsLogProbabilityModel { /** The textual forms of tokens evaluated in this probability model. */ @@ -615,11 +553,26 @@ export interface CompletionsLogProbabilityModel { textOffset: number[]; } -export function completionsLogProbabilityModelSerializer( - input: CompletionsLogProbabilityModel, -): unknown { - console.log(input); - throw new Error("Not implemented"); +/** Representation of the manner in which a completions response concluded. */ +export type CompletionsFinishReason = + | "stop" + | "length" + | "content_filter" + | "function_call" + | "tool_calls"; + +/** + * Representation of the token counts processed for a completions request. + * Counts consider all tokens across prompts, choices, choice alternates, best_of generations, and + * other consumers. + */ +export interface CompletionsUsage { + /** The number of tokens generated across all completions emissions. */ + completionTokens: number; + /** The number of tokens in the provided prompts for the completions request. */ + promptTokens: number; + /** The total number of tokens processed for the completions request and response. */ + totalTokens: number; } /** @@ -735,107 +688,90 @@ export interface ChatCompletionsOptions { } export function chatCompletionsOptionsSerializer( - input: ChatCompletionsOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** A representation of the available Azure OpenAI enhancement configurations. */ -export interface AzureChatEnhancementConfiguration { - /** A representation of the available options for the Azure OpenAI grounding enhancement. */ - grounding?: AzureChatGroundingEnhancementConfiguration; - /** A representation of the available options for the Azure OpenAI optical character recognition (OCR) enhancement. */ - ocr?: AzureChatOCREnhancementConfiguration; -} - -export function azureChatEnhancementConfigurationSerializer( - input: AzureChatEnhancementConfiguration, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** A representation of the available options for the Azure OpenAI grounding enhancement. */ -export interface AzureChatGroundingEnhancementConfiguration { - /** Specifies whether the enhancement is enabled. */ - enabled: boolean; -} - -export function azureChatGroundingEnhancementConfigurationSerializer( - input: AzureChatGroundingEnhancementConfiguration, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** A representation of the available options for the Azure OpenAI optical character recognition (OCR) enhancement. */ -export interface AzureChatOCREnhancementConfiguration { - /** Specifies whether the enhancement is enabled. */ - enabled: boolean; + item: ChatCompletionsOptions, +): Record { + return { + messages: item["messages"].map((p) => chatRequestMessageUnionSerializer(p)), + functions: + item["functions"] === undefined + ? item["functions"] + : item["functions"].map(functionDefinitionSerializer), + function_call: item["functionCall"] as any, + max_tokens: item["maxTokens"], + temperature: item["temperature"], + top_p: item["topP"], + logit_bias: !item.logitBias + ? item.logitBias + : (serializeRecord(item.logitBias as any) as any), + user: item["user"], + n: item["n"], + stop: item["stop"], + presence_penalty: item["presencePenalty"], + frequency_penalty: item["frequencyPenalty"], + stream: item["stream"], + model: item["model"], + data_sources: + item["dataSources"] === undefined + ? item["dataSources"] + : item["dataSources"].map((p) => + azureChatExtensionConfigurationUnionSerializer(p), + ), + enhancements: !item.enhancements + ? item.enhancements + : azureChatEnhancementConfigurationSerializer(item.enhancements), + seed: item["seed"], + logprobs: item["logprobs"], + top_logprobs: item["topLogprobs"], + response_format: !item.responseFormat + ? item.responseFormat + : chatCompletionsResponseFormatUnionSerializer(item.responseFormat), + tools: item["tools"], + tool_choice: item["toolChoice"] as any, + }; } -export function azureChatOCREnhancementConfigurationSerializer( - input: AzureChatOCREnhancementConfiguration, -): unknown { - console.log(input); - throw new Error("Not implemented"); +/** An abstract representation of a chat message as provided in a request. */ +export interface ChatRequestMessage { + /** the discriminator possible values: system, user, assistant, tool, function */ + role: ChatRole; } -/** - * An abstract representation of a response format configuration usable by Chat Completions. Can be used to enable JSON - * mode. - */ -export interface ChatCompletionsResponseFormat { - /** The discriminated type for the response format. */ - type: string; -} +export function chatRequestMessageUnionSerializer( + item: ChatRequestMessageUnion, +) { + switch (item.role) { + case "system": + return chatRequestSystemMessageSerializer( + item as ChatRequestSystemMessage, + ); -export function chatCompletionsResponseFormatUnionSerializer( - input: ChatCompletionsResponseFormatUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} + case "user": + return chatRequestUserMessageSerializer(item as ChatRequestUserMessage); -export type ChatCompletionsResponseFormatUnion = - | ChatCompletionsTextResponseFormat - | ChatCompletionsJsonResponseFormat - | ChatCompletionsResponseFormat; + case "assistant": + return chatRequestAssistantMessageSerializer( + item as ChatRequestAssistantMessage, + ); -export function chatCompletionsResponseFormatSerializer( - input: ChatCompletionsResponseFormat, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} + case "tool": + return chatRequestToolMessageSerializer(item as ChatRequestToolMessage); -/** An abstract representation of a chat message as provided in a request. */ -export interface ChatRequestMessage { - /** The chat role associated with this message. */ - role: ChatRole; -} + case "function": + return chatRequestFunctionMessageSerializer( + item as ChatRequestFunctionMessage, + ); -export function chatRequestMessageUnionSerializer( - input: ChatRequestMessageUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); + default: + return chatRequestMessageSerializer(item); + } } -export type ChatRequestMessageUnion = - | ChatRequestSystemMessage - | ChatRequestUserMessage - | ChatRequestAssistantMessage - | ChatRequestToolMessage - | ChatRequestFunctionMessage - | ChatRequestMessage; - export function chatRequestMessageSerializer( - input: ChatRequestMessage, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatRequestMessageUnion, +): Record { + return { + ...chatRequestMessageUnionSerializer(item), + }; } /** @@ -852,10 +788,13 @@ export interface ChatRequestSystemMessage extends ChatRequestMessage { } export function chatRequestSystemMessageSerializer( - input: ChatRequestSystemMessage, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatRequestSystemMessage, +): Record { + return { + role: item["role"], + content: item["content"], + name: item["name"], + }; } /** A request chat message representing user input to the assistant. */ @@ -869,35 +808,46 @@ export interface ChatRequestUserMessage extends ChatRequestMessage { } export function chatRequestUserMessageSerializer( - input: ChatRequestUserMessage, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatRequestUserMessage, +): Record { + return { + role: item["role"], + content: item["content"] as any, + name: item["name"], + }; } /** An abstract representation of a structured content item within a chat message. */ export interface ChatMessageContentItem { - /** The discriminated object type. */ + /** the discriminator possible values: text, image_url */ type: string; } export function chatMessageContentItemUnionSerializer( - input: ChatMessageContentItemUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} + item: ChatMessageContentItemUnion, +) { + switch (item.type) { + case "text": + return chatMessageTextContentItemSerializer( + item as ChatMessageTextContentItem, + ); -export type ChatMessageContentItemUnion = - | ChatMessageTextContentItem - | ChatMessageImageContentItem - | ChatMessageContentItem; + case "image_url": + return chatMessageImageContentItemSerializer( + item as ChatMessageImageContentItem, + ); + + default: + return chatMessageContentItemSerializer(item); + } +} export function chatMessageContentItemSerializer( - input: ChatMessageContentItem, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatMessageContentItemUnion, +): Record { + return { + ...chatMessageContentItemUnionSerializer(item), + }; } /** A structured chat content item containing plain text. */ @@ -909,10 +859,12 @@ export interface ChatMessageTextContentItem extends ChatMessageContentItem { } export function chatMessageTextContentItemSerializer( - input: ChatMessageTextContentItem, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatMessageTextContentItem, +): Record { + return { + type: item["type"], + text: item["text"], + }; } /** A structured chat content item containing an image reference. */ @@ -924,10 +876,12 @@ export interface ChatMessageImageContentItem extends ChatMessageContentItem { } export function chatMessageImageContentItemSerializer( - input: ChatMessageImageContentItem, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatMessageImageContentItem, +): Record { + return { + type: item["type"], + image_url: chatMessageImageUrlSerializer(item.imageUrl), + }; } /** An internet location from which the model may retrieve an image. */ @@ -942,12 +896,17 @@ export interface ChatMessageImageUrl { } export function chatMessageImageUrlSerializer( - input: ChatMessageImageUrl, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatMessageImageUrl, +): Record { + return { + url: item["url"], + detail: item["detail"], + }; } +/** A representation of the possible image detail levels for image-based chat completions message content. */ +export type ChatMessageImageDetailLevel = "auto" | "low" | "high"; + /** A request chat message representing response or action from the assistant. */ export interface ChatRequestAssistantMessage extends ChatRequestMessage { /** The chat role associated with this message, which is always 'assistant' for assistant messages. */ @@ -969,28 +928,17 @@ export interface ChatRequestAssistantMessage extends ChatRequestMessage { } export function chatRequestAssistantMessageSerializer( - input: ChatRequestAssistantMessage, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** The name and arguments of a function that should be called, as generated by the model. */ -export interface FunctionCall { - /** The name of the function to call. */ - name: string; - /** - * The arguments to call the function with, as generated by the model in JSON format. - * Note that the model does not always generate valid JSON, and may hallucinate parameters - * not defined by your function schema. Validate the arguments in your code before calling - * your function. - */ - arguments: string; -} - -export function functionCallSerializer(input: FunctionCall): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatRequestAssistantMessage, +): Record { + return { + role: item["role"], + content: item["content"], + name: item["name"], + tool_calls: item["toolCalls"], + function_call: !item.functionCall + ? item.functionCall + : functionCallSerializer(item.functionCall), + }; } /** @@ -998,28 +946,33 @@ export function functionCallSerializer(input: FunctionCall): unknown { * chat completion. */ export interface ChatCompletionsToolCall { - /** The object type. */ + /** the discriminator possible values: function */ type: string; /** The ID of the tool call. */ id: string; } export function chatCompletionsToolCallUnionSerializer( - input: ChatCompletionsToolCallUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} + item: ChatCompletionsToolCallUnion, +) { + switch (item.type) { + case "function": + return chatCompletionsFunctionToolCallSerializer( + item as ChatCompletionsFunctionToolCall, + ); -export type ChatCompletionsToolCallUnion = - | ChatCompletionsFunctionToolCall - | ChatCompletionsToolCall; + default: + return chatCompletionsToolCallSerializer(item); + } +} export function chatCompletionsToolCallSerializer( - input: ChatCompletionsToolCall, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatCompletionsToolCallUnion, +): Record { + return { + type: item["type"], + id: item["id"], + }; } /** @@ -1035,10 +988,35 @@ export interface ChatCompletionsFunctionToolCall } export function chatCompletionsFunctionToolCallSerializer( - input: ChatCompletionsFunctionToolCall, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatCompletionsFunctionToolCall, +): Record { + return { + type: item["type"], + id: item["id"], + function: functionCallSerializer(item.function), + }; +} + +/** The name and arguments of a function that should be called, as generated by the model. */ +export interface FunctionCall { + /** The name of the function to call. */ + name: string; + /** + * The arguments to call the function with, as generated by the model in JSON format. + * Note that the model does not always generate valid JSON, and may hallucinate parameters + * not defined by your function schema. Validate the arguments in your code before calling + * your function. + */ + arguments: string; +} + +export function functionCallSerializer( + item: FunctionCall, +): Record { + return { + name: item["name"], + arguments: item["arguments"], + }; } /** A request chat message representing requested output from a configured tool. */ @@ -1052,10 +1030,13 @@ export interface ChatRequestToolMessage extends ChatRequestMessage { } export function chatRequestToolMessageSerializer( - input: ChatRequestToolMessage, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatRequestToolMessage, +): Record { + return { + role: item["role"], + content: item["content"], + tool_call_id: item["toolCallId"], + }; } /** A request chat message representing requested output from a configured function. */ @@ -1069,12 +1050,18 @@ export interface ChatRequestFunctionMessage extends ChatRequestMessage { } export function chatRequestFunctionMessageSerializer( - input: ChatRequestFunctionMessage, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatRequestFunctionMessage, +): Record { + return { + role: item["role"], + name: item["name"], + content: item["content"], + }; } +/** A description of the intended purpose of a message within a chat completions interaction. */ +export type ChatRole = "system" | "assistant" | "user" | "function" | "tool"; + /** The definition of a caller-specified function that chat completions may invoke in response to matching user input. */ export interface FunctionDefinition { /** The name of the function to be called. */ @@ -1089,12 +1076,21 @@ export interface FunctionDefinition { } export function functionDefinitionSerializer( - input: FunctionDefinition, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: FunctionDefinition, +): Record { + return { + name: item["name"], + description: item["description"], + parameters: item["parameters"], + }; } +/** + * The collection of predefined behaviors for handling request-provided function information in a chat completions + * operation. + */ +export type FunctionCallPreset = "auto" | "none"; + /** * A structure that specifies the exact name of a specific, request-provided function to use when processing a chat * completions operation. @@ -1104,9 +1100,12 @@ export interface FunctionName { name: string; } -export function functionNameSerializer(input: FunctionName): unknown { - console.log(input); - throw new Error("Not implemented"); +export function functionNameSerializer( + item: FunctionName, +): Record { + return { + name: item["name"], + }; } /** @@ -1115,33 +1114,50 @@ export function functionNameSerializer(input: FunctionName): unknown { * The use of this configuration is compatible only with Azure OpenAI. */ export interface AzureChatExtensionConfiguration { - /** - * The label for the type of an Azure chat extension. This typically corresponds to a matching Azure resource. - * Azure chat extensions are only compatible with Azure OpenAI. - */ + /** the discriminator possible values: azure_search, azure_ml_index, azure_cosmos_db, elasticsearch, pinecone */ type: AzureChatExtensionType; } export function azureChatExtensionConfigurationUnionSerializer( - input: AzureChatExtensionConfigurationUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AzureChatExtensionConfigurationUnion, +) { + switch (item.type) { + case "azure_search": + return azureSearchChatExtensionConfigurationSerializer( + item as AzureSearchChatExtensionConfiguration, + ); + + case "azure_ml_index": + return azureMachineLearningIndexChatExtensionConfigurationSerializer( + item as AzureMachineLearningIndexChatExtensionConfiguration, + ); + + case "azure_cosmos_db": + return azureCosmosDBChatExtensionConfigurationSerializer( + item as AzureCosmosDBChatExtensionConfiguration, + ); + + case "elasticsearch": + return elasticsearchChatExtensionConfigurationSerializer( + item as ElasticsearchChatExtensionConfiguration, + ); + + case "pinecone": + return pineconeChatExtensionConfigurationSerializer( + item as PineconeChatExtensionConfiguration, + ); + + default: + return azureChatExtensionConfigurationSerializer(item); + } } -export type AzureChatExtensionConfigurationUnion = - | AzureSearchChatExtensionConfiguration - | AzureMachineLearningIndexChatExtensionConfiguration - | AzureCosmosDBChatExtensionConfiguration - | ElasticsearchChatExtensionConfiguration - | PineconeChatExtensionConfiguration - | AzureChatExtensionConfiguration; - export function azureChatExtensionConfigurationSerializer( - input: AzureChatExtensionConfiguration, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AzureChatExtensionConfigurationUnion, +): Record { + return { + ...azureChatExtensionConfigurationUnionSerializer(item), + }; } /** @@ -1160,10 +1176,12 @@ export interface AzureSearchChatExtensionConfiguration } export function azureSearchChatExtensionConfigurationSerializer( - input: AzureSearchChatExtensionConfiguration, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AzureSearchChatExtensionConfiguration, +): Record { + return { + type: item["type"], + parameters: azureSearchChatExtensionParametersSerializer(item.parameters), + }; } /** Parameters for Azure Cognitive Search when used as an Azure OpenAI chat extension. The supported authentication types are APIKey, SystemAssignedManagedIdentity and UserAssignedManagedIdentity. */ @@ -1213,123 +1231,125 @@ export interface AzureSearchChatExtensionParameters { } export function azureSearchChatExtensionParametersSerializer( - input: AzureSearchChatExtensionParameters, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AzureSearchChatExtensionParameters, +): Record { + return { + authentication: !item.authentication + ? item.authentication + : onYourDataAuthenticationOptionsUnionSerializer(item.authentication), + top_n_documents: item["topNDocuments"], + in_scope: item["inScope"], + strictness: item["strictness"], + role_information: item["roleInformation"], + max_search_queries: item["maxSearchQueries"], + allow_partial_result: item["allowPartialResult"], + include_contexts: item["includeContexts"], + endpoint: item["endpoint"], + index_name: item["indexName"], + fields_mapping: !item.fieldsMapping + ? item.fieldsMapping + : azureSearchIndexFieldMappingOptionsSerializer(item.fieldsMapping), + query_type: item["queryType"], + semantic_configuration: item["semanticConfiguration"], + filter: item["filter"], + embedding_dependency: !item.embeddingDependency + ? item.embeddingDependency + : onYourDataVectorizationSourceUnionSerializer(item.embeddingDependency), + }; } /** The authentication options for Azure OpenAI On Your Data. */ export interface OnYourDataAuthenticationOptions { - /** The authentication type. */ + /** the discriminator possible values: api_key, connection_string, key_and_key_id, encoded_api_key, access_token, system_assigned_managed_identity, user_assigned_managed_identity */ type: OnYourDataAuthenticationType; } export function onYourDataAuthenticationOptionsUnionSerializer( - input: OnYourDataAuthenticationOptionsUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataAuthenticationOptionsUnion, +) { + switch (item.type) { + case "api_key": + return onYourDataApiKeyAuthenticationOptionsSerializer( + item as OnYourDataApiKeyAuthenticationOptions, + ); + + case "connection_string": + return onYourDataConnectionStringAuthenticationOptionsSerializer( + item as OnYourDataConnectionStringAuthenticationOptions, + ); + + case "key_and_key_id": + return onYourDataKeyAndKeyIdAuthenticationOptionsSerializer( + item as OnYourDataKeyAndKeyIdAuthenticationOptions, + ); + + case "encoded_api_key": + return onYourDataEncodedApiKeyAuthenticationOptionsSerializer( + item as OnYourDataEncodedApiKeyAuthenticationOptions, + ); + + case "access_token": + return onYourDataAccessTokenAuthenticationOptionsSerializer( + item as OnYourDataAccessTokenAuthenticationOptions, + ); + + case "system_assigned_managed_identity": + return onYourDataSystemAssignedManagedIdentityAuthenticationOptionsSerializer( + item as OnYourDataSystemAssignedManagedIdentityAuthenticationOptions, + ); + + case "user_assigned_managed_identity": + return onYourDataUserAssignedManagedIdentityAuthenticationOptionsSerializer( + item as OnYourDataUserAssignedManagedIdentityAuthenticationOptions, + ); + + default: + return onYourDataAuthenticationOptionsSerializer(item); + } } -export type OnYourDataAuthenticationOptionsUnion = - | OnYourDataApiKeyAuthenticationOptions - | OnYourDataConnectionStringAuthenticationOptions - | OnYourDataKeyAndKeyIdAuthenticationOptions - | OnYourDataEncodedApiKeyAuthenticationOptions - | OnYourDataAccessTokenAuthenticationOptions - | OnYourDataSystemAssignedManagedIdentityAuthenticationOptions - | OnYourDataUserAssignedManagedIdentityAuthenticationOptions - | OnYourDataAuthenticationOptions; - export function onYourDataAuthenticationOptionsSerializer( - input: OnYourDataAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataAuthenticationOptionsUnion, +): Record { + return { + ...onYourDataAuthenticationOptionsUnionSerializer(item), + }; } -/** Optional settings to control how fields are processed when using a configured Azure Search resource. */ -export interface AzureSearchIndexFieldMappingOptions { - /** The name of the index field to use as a title. */ - titleField?: string; - /** The name of the index field to use as a URL. */ - urlField?: string; - /** The name of the index field to use as a filepath. */ - filepathField?: string; - /** The names of index fields that should be treated as content. */ - contentFields?: string[]; - /** The separator pattern that content fields should use. */ - contentFieldsSeparator?: string; - /** The names of fields that represent vector data. */ - vectorFields?: string[]; - /** The names of fields that represent image vector data. */ - imageVectorFields?: string[]; +/** The authentication options for Azure OpenAI On Your Data when using an API key. */ +export interface OnYourDataApiKeyAuthenticationOptions + extends OnYourDataAuthenticationOptions { + /** The authentication type of API key. */ + type: "api_key"; + /** The API key to use for authentication. */ + key: string; } -export function azureSearchIndexFieldMappingOptionsSerializer( - input: AzureSearchIndexFieldMappingOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); +export function onYourDataApiKeyAuthenticationOptionsSerializer( + item: OnYourDataApiKeyAuthenticationOptions, +): Record { + return { + type: item["type"], + key: item["key"], + }; } -/** An abstract representation of a vectorization source for Azure OpenAI On Your Data with vector search. */ -export interface OnYourDataVectorizationSource { - /** The type of vectorization source to use. */ - type: OnYourDataVectorizationSourceType; +/** The authentication options for Azure OpenAI On Your Data when using a connection string. */ +export interface OnYourDataConnectionStringAuthenticationOptions + extends OnYourDataAuthenticationOptions { + /** The authentication type of connection string. */ + type: "connection_string"; + /** The connection string to use for authentication. */ + connectionString: string; } -export function onYourDataVectorizationSourceUnionSerializer( - input: OnYourDataVectorizationSourceUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -export type OnYourDataVectorizationSourceUnion = - | OnYourDataEndpointVectorizationSource - | OnYourDataDeploymentNameVectorizationSource - | OnYourDataModelIdVectorizationSource - | OnYourDataVectorizationSource; - -export function onYourDataVectorizationSourceSerializer( - input: OnYourDataVectorizationSource, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** The authentication options for Azure OpenAI On Your Data when using an API key. */ -export interface OnYourDataApiKeyAuthenticationOptions - extends OnYourDataAuthenticationOptions { - /** The authentication type of API key. */ - type: "api_key"; - /** The API key to use for authentication. */ - key: string; -} - -export function onYourDataApiKeyAuthenticationOptionsSerializer( - input: OnYourDataApiKeyAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** The authentication options for Azure OpenAI On Your Data when using a connection string. */ -export interface OnYourDataConnectionStringAuthenticationOptions - extends OnYourDataAuthenticationOptions { - /** The authentication type of connection string. */ - type: "connection_string"; - /** The connection string to use for authentication. */ - connectionString: string; -} - -export function onYourDataConnectionStringAuthenticationOptionsSerializer( - input: OnYourDataConnectionStringAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); +export function onYourDataConnectionStringAuthenticationOptionsSerializer( + item: OnYourDataConnectionStringAuthenticationOptions, +): Record { + return { + type: item["type"], + connection_string: item["connectionString"], + }; } /** The authentication options for Azure OpenAI On Your Data when using an Elasticsearch key and key ID pair. */ @@ -1344,10 +1364,13 @@ export interface OnYourDataKeyAndKeyIdAuthenticationOptions } export function onYourDataKeyAndKeyIdAuthenticationOptionsSerializer( - input: OnYourDataKeyAndKeyIdAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataKeyAndKeyIdAuthenticationOptions, +): Record { + return { + type: item["type"], + key: item["key"], + key_id: item["keyId"], + }; } /** The authentication options for Azure OpenAI On Your Data when using an Elasticsearch encoded API key. */ @@ -1360,10 +1383,12 @@ export interface OnYourDataEncodedApiKeyAuthenticationOptions } export function onYourDataEncodedApiKeyAuthenticationOptionsSerializer( - input: OnYourDataEncodedApiKeyAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataEncodedApiKeyAuthenticationOptions, +): Record { + return { + type: item["type"], + encoded_api_key: item["encodedApiKey"], + }; } /** The authentication options for Azure OpenAI On Your Data when using access token. */ @@ -1376,10 +1401,12 @@ export interface OnYourDataAccessTokenAuthenticationOptions } export function onYourDataAccessTokenAuthenticationOptionsSerializer( - input: OnYourDataAccessTokenAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataAccessTokenAuthenticationOptions, +): Record { + return { + type: item["type"], + access_token: item["accessToken"], + }; } /** The authentication options for Azure OpenAI On Your Data when using a system-assigned managed identity. */ @@ -1390,10 +1417,11 @@ export interface OnYourDataSystemAssignedManagedIdentityAuthenticationOptions } export function onYourDataSystemAssignedManagedIdentityAuthenticationOptionsSerializer( - input: OnYourDataSystemAssignedManagedIdentityAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataSystemAssignedManagedIdentityAuthenticationOptions, +): Record { + return { + type: item["type"], + }; } /** The authentication options for Azure OpenAI On Your Data when using a user-assigned managed identity. */ @@ -1406,10 +1434,105 @@ export interface OnYourDataUserAssignedManagedIdentityAuthenticationOptions } export function onYourDataUserAssignedManagedIdentityAuthenticationOptionsSerializer( - input: OnYourDataUserAssignedManagedIdentityAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataUserAssignedManagedIdentityAuthenticationOptions, +): Record { + return { + type: item["type"], + managed_identity_resource_id: item["managedIdentityResourceId"], + }; +} + +/** The authentication types supported with Azure OpenAI On Your Data. */ +export type OnYourDataAuthenticationType = + | "api_key" + | "connection_string" + | "key_and_key_id" + | "encoded_api_key" + | "access_token" + | "system_assigned_managed_identity" + | "user_assigned_managed_identity"; +/** The context property. */ +export type OnYourDataContextProperty = + | "citations" + | "intent" + | "all_retrieved_documents"; + +/** Optional settings to control how fields are processed when using a configured Azure Search resource. */ +export interface AzureSearchIndexFieldMappingOptions { + /** The name of the index field to use as a title. */ + titleField?: string; + /** The name of the index field to use as a URL. */ + urlField?: string; + /** The name of the index field to use as a filepath. */ + filepathField?: string; + /** The names of index fields that should be treated as content. */ + contentFields?: string[]; + /** The separator pattern that content fields should use. */ + contentFieldsSeparator?: string; + /** The names of fields that represent vector data. */ + vectorFields?: string[]; + /** The names of fields that represent image vector data. */ + imageVectorFields?: string[]; +} + +export function azureSearchIndexFieldMappingOptionsSerializer( + item: AzureSearchIndexFieldMappingOptions, +): Record { + return { + title_field: item["titleField"], + url_field: item["urlField"], + filepath_field: item["filepathField"], + content_fields: item["contentFields"], + content_fields_separator: item["contentFieldsSeparator"], + vector_fields: item["vectorFields"], + image_vector_fields: item["imageVectorFields"], + }; +} + +/** The type of Azure Search retrieval query that should be executed when using it as an Azure OpenAI chat extension. */ +export type AzureSearchQueryType = + | "simple" + | "semantic" + | "vector" + | "vector_simple_hybrid" + | "vector_semantic_hybrid"; + +/** An abstract representation of a vectorization source for Azure OpenAI On Your Data with vector search. */ +export interface OnYourDataVectorizationSource { + /** the discriminator possible values: endpoint, deployment_name, model_id */ + type: OnYourDataVectorizationSourceType; +} + +export function onYourDataVectorizationSourceUnionSerializer( + item: OnYourDataVectorizationSourceUnion, +) { + switch (item.type) { + case "endpoint": + return onYourDataEndpointVectorizationSourceSerializer( + item as OnYourDataEndpointVectorizationSource, + ); + + case "deployment_name": + return onYourDataDeploymentNameVectorizationSourceSerializer( + item as OnYourDataDeploymentNameVectorizationSource, + ); + + case "model_id": + return onYourDataModelIdVectorizationSourceSerializer( + item as OnYourDataModelIdVectorizationSource, + ); + + default: + return onYourDataVectorizationSourceSerializer(item); + } +} + +export function onYourDataVectorizationSourceSerializer( + item: OnYourDataVectorizationSourceUnion, +): Record { + return { + ...onYourDataVectorizationSourceUnionSerializer(item), + }; } /** @@ -1427,35 +1550,48 @@ export interface OnYourDataEndpointVectorizationSource } export function onYourDataEndpointVectorizationSourceSerializer( - input: OnYourDataEndpointVectorizationSource, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataEndpointVectorizationSource, +): Record { + return { + type: item["type"], + endpoint: item["endpoint"], + authentication: onYourDataVectorSearchAuthenticationOptionsUnionSerializer( + item.authentication, + ), + }; } /** The authentication options for Azure OpenAI On Your Data vector search. */ export interface OnYourDataVectorSearchAuthenticationOptions { - /** The type of authentication to use. */ + /** the discriminator possible values: api_key, access_token */ type: OnYourDataVectorSearchAuthenticationType; } export function onYourDataVectorSearchAuthenticationOptionsUnionSerializer( - input: OnYourDataVectorSearchAuthenticationOptionsUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} + item: OnYourDataVectorSearchAuthenticationOptionsUnion, +) { + switch (item.type) { + case "api_key": + return onYourDataVectorSearchApiKeyAuthenticationOptionsSerializer( + item as OnYourDataVectorSearchApiKeyAuthenticationOptions, + ); -export type OnYourDataVectorSearchAuthenticationOptionsUnion = - | OnYourDataVectorSearchApiKeyAuthenticationOptions - | OnYourDataVectorSearchAccessTokenAuthenticationOptions - | OnYourDataVectorSearchAuthenticationOptions; + case "access_token": + return onYourDataVectorSearchAccessTokenAuthenticationOptionsSerializer( + item as OnYourDataVectorSearchAccessTokenAuthenticationOptions, + ); + + default: + return onYourDataVectorSearchAuthenticationOptionsSerializer(item); + } +} export function onYourDataVectorSearchAuthenticationOptionsSerializer( - input: OnYourDataVectorSearchAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataVectorSearchAuthenticationOptionsUnion, +): Record { + return { + ...onYourDataVectorSearchAuthenticationOptionsUnionSerializer(item), + }; } /** The authentication options for Azure OpenAI On Your Data when using an API key. */ @@ -1468,10 +1604,12 @@ export interface OnYourDataVectorSearchApiKeyAuthenticationOptions } export function onYourDataVectorSearchApiKeyAuthenticationOptionsSerializer( - input: OnYourDataVectorSearchApiKeyAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataVectorSearchApiKeyAuthenticationOptions, +): Record { + return { + type: item["type"], + key: item["key"], + }; } /** The authentication options for Azure OpenAI On Your Data vector search when using access token. */ @@ -1484,12 +1622,19 @@ export interface OnYourDataVectorSearchAccessTokenAuthenticationOptions } export function onYourDataVectorSearchAccessTokenAuthenticationOptionsSerializer( - input: OnYourDataVectorSearchAccessTokenAuthenticationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataVectorSearchAccessTokenAuthenticationOptions, +): Record { + return { + type: item["type"], + access_token: item["accessToken"], + }; } +/** The authentication types supported with Azure OpenAI On Your Data vector search. */ +export type OnYourDataVectorSearchAuthenticationType = + | "api_key" + | "access_token"; + /** * The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based * on an internal embeddings model deployment name in the same Azure OpenAI resource. @@ -1505,10 +1650,13 @@ export interface OnYourDataDeploymentNameVectorizationSource } export function onYourDataDeploymentNameVectorizationSourceSerializer( - input: OnYourDataDeploymentNameVectorizationSource, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataDeploymentNameVectorizationSource, +): Record { + return { + type: item["type"], + deployment_name: item["deploymentName"], + dimensions: item["dimensions"], + }; } /** @@ -1524,12 +1672,23 @@ export interface OnYourDataModelIdVectorizationSource } export function onYourDataModelIdVectorizationSourceSerializer( - input: OnYourDataModelIdVectorizationSource, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: OnYourDataModelIdVectorizationSource, +): Record { + return { + type: item["type"], + model_id: item["modelId"], + }; } +/** + * Represents the available sources Azure OpenAI On Your Data can use to configure vectorization of data for use with + * vector search. + */ +export type OnYourDataVectorizationSourceType = + | "endpoint" + | "deployment_name" + | "model_id"; + /** * A specific representation of configurable options for Azure Machine Learning vector index when using it as an Azure * OpenAI chat extension. @@ -1546,10 +1705,14 @@ export interface AzureMachineLearningIndexChatExtensionConfiguration } export function azureMachineLearningIndexChatExtensionConfigurationSerializer( - input: AzureMachineLearningIndexChatExtensionConfiguration, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AzureMachineLearningIndexChatExtensionConfiguration, +): Record { + return { + type: item["type"], + parameters: azureMachineLearningIndexChatExtensionParametersSerializer( + item.parameters, + ), + }; } /** Parameters for the Azure Machine Learning vector index chat extension. The supported authentication types are AccessToken, SystemAssignedManagedIdentity and UserAssignedManagedIdentity. */ @@ -1593,10 +1756,24 @@ export interface AzureMachineLearningIndexChatExtensionParameters { } export function azureMachineLearningIndexChatExtensionParametersSerializer( - input: AzureMachineLearningIndexChatExtensionParameters, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AzureMachineLearningIndexChatExtensionParameters, +): Record { + return { + authentication: !item.authentication + ? item.authentication + : onYourDataAuthenticationOptionsUnionSerializer(item.authentication), + top_n_documents: item["topNDocuments"], + in_scope: item["inScope"], + strictness: item["strictness"], + role_information: item["roleInformation"], + max_search_queries: item["maxSearchQueries"], + allow_partial_result: item["allowPartialResult"], + include_contexts: item["includeContexts"], + project_resource_id: item["projectResourceId"], + name: item["name"], + version: item["version"], + filter: item["filter"], + }; } /** @@ -1615,10 +1792,12 @@ export interface AzureCosmosDBChatExtensionConfiguration } export function azureCosmosDBChatExtensionConfigurationSerializer( - input: AzureCosmosDBChatExtensionConfiguration, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AzureCosmosDBChatExtensionConfiguration, +): Record { + return { + type: item["type"], + parameters: azureCosmosDBChatExtensionParametersSerializer(item.parameters), + }; } /** @@ -1667,10 +1846,29 @@ export interface AzureCosmosDBChatExtensionParameters { } export function azureCosmosDBChatExtensionParametersSerializer( - input: AzureCosmosDBChatExtensionParameters, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AzureCosmosDBChatExtensionParameters, +): Record { + return { + authentication: !item.authentication + ? item.authentication + : onYourDataAuthenticationOptionsUnionSerializer(item.authentication), + top_n_documents: item["topNDocuments"], + in_scope: item["inScope"], + strictness: item["strictness"], + role_information: item["roleInformation"], + max_search_queries: item["maxSearchQueries"], + allow_partial_result: item["allowPartialResult"], + include_contexts: item["includeContexts"], + database_name: item["databaseName"], + container_name: item["containerName"], + index_name: item["indexName"], + fields_mapping: azureCosmosDBFieldMappingOptionsSerializer( + item.fieldsMapping, + ), + embedding_dependency: onYourDataVectorizationSourceUnionSerializer( + item.embeddingDependency, + ), + }; } /** Optional settings to control how fields are processed when using a configured Azure Cosmos DB resource. */ @@ -1690,10 +1888,16 @@ export interface AzureCosmosDBFieldMappingOptions { } export function azureCosmosDBFieldMappingOptionsSerializer( - input: AzureCosmosDBFieldMappingOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: AzureCosmosDBFieldMappingOptions, +): Record { + return { + title_field: item["titleField"], + url_field: item["urlField"], + filepath_field: item["filepathField"], + content_fields: item["contentFields"], + content_fields_separator: item["contentFieldsSeparator"], + vector_fields: item["vectorFields"], + }; } /** @@ -1712,10 +1916,12 @@ export interface ElasticsearchChatExtensionConfiguration } export function elasticsearchChatExtensionConfigurationSerializer( - input: ElasticsearchChatExtensionConfiguration, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ElasticsearchChatExtensionConfiguration, +): Record { + return { + type: item["type"], + parameters: elasticsearchChatExtensionParametersSerializer(item.parameters), + }; } /** Parameters to use when configuring Elasticsearch® as an Azure OpenAI chat extension. The supported authentication types are KeyAndKeyId and EncodedAPIKey. */ @@ -1761,10 +1967,29 @@ export interface ElasticsearchChatExtensionParameters { } export function elasticsearchChatExtensionParametersSerializer( - input: ElasticsearchChatExtensionParameters, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ElasticsearchChatExtensionParameters, +): Record { + return { + authentication: !item.authentication + ? item.authentication + : onYourDataAuthenticationOptionsUnionSerializer(item.authentication), + top_n_documents: item["topNDocuments"], + in_scope: item["inScope"], + strictness: item["strictness"], + role_information: item["roleInformation"], + max_search_queries: item["maxSearchQueries"], + allow_partial_result: item["allowPartialResult"], + include_contexts: item["includeContexts"], + endpoint: item["endpoint"], + index_name: item["indexName"], + fields_mapping: !item.fieldsMapping + ? item.fieldsMapping + : elasticsearchIndexFieldMappingOptionsSerializer(item.fieldsMapping), + query_type: item["queryType"], + embedding_dependency: !item.embeddingDependency + ? item.embeddingDependency + : onYourDataVectorizationSourceUnionSerializer(item.embeddingDependency), + }; } /** Optional settings to control how fields are processed when using a configured Elasticsearch® resource. */ @@ -1784,12 +2009,21 @@ export interface ElasticsearchIndexFieldMappingOptions { } export function elasticsearchIndexFieldMappingOptionsSerializer( - input: ElasticsearchIndexFieldMappingOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ElasticsearchIndexFieldMappingOptions, +): Record { + return { + title_field: item["titleField"], + url_field: item["urlField"], + filepath_field: item["filepathField"], + content_fields: item["contentFields"], + content_fields_separator: item["contentFieldsSeparator"], + vector_fields: item["vectorFields"], + }; } +/** The type of Elasticsearch® retrieval query that should be executed when using it as an Azure OpenAI chat extension. */ +export type ElasticsearchQueryType = "simple" | "vector"; + /** * A specific representation of configurable options for Pinecone when using it as an Azure OpenAI chat * extension. @@ -1806,10 +2040,12 @@ export interface PineconeChatExtensionConfiguration } export function pineconeChatExtensionConfigurationSerializer( - input: PineconeChatExtensionConfiguration, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: PineconeChatExtensionConfiguration, +): Record { + return { + type: item["type"], + parameters: pineconeChatExtensionParametersSerializer(item.parameters), + }; } /** Parameters for configuring Azure OpenAI Pinecone chat extensions. The supported authentication type is APIKey. */ @@ -1853,10 +2089,26 @@ export interface PineconeChatExtensionParameters { } export function pineconeChatExtensionParametersSerializer( - input: PineconeChatExtensionParameters, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: PineconeChatExtensionParameters, +): Record { + return { + authentication: !item.authentication + ? item.authentication + : onYourDataAuthenticationOptionsUnionSerializer(item.authentication), + top_n_documents: item["topNDocuments"], + in_scope: item["inScope"], + strictness: item["strictness"], + role_information: item["roleInformation"], + max_search_queries: item["maxSearchQueries"], + allow_partial_result: item["allowPartialResult"], + include_contexts: item["includeContexts"], + environment: item["environment"], + index_name: item["indexName"], + fields_mapping: pineconeFieldMappingOptionsSerializer(item.fieldsMapping), + embedding_dependency: onYourDataVectorizationSourceUnionSerializer( + item.embeddingDependency, + ), + }; } /** Optional settings to control how fields are processed when using a configured Pinecone resource. */ @@ -1874,10 +2126,112 @@ export interface PineconeFieldMappingOptions { } export function pineconeFieldMappingOptionsSerializer( - input: PineconeFieldMappingOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: PineconeFieldMappingOptions, +): Record { + return { + title_field: item["titleField"], + url_field: item["urlField"], + filepath_field: item["filepathField"], + content_fields: item["contentFields"], + content_fields_separator: item["contentFieldsSeparator"], + }; +} + +/** + * A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat + * completions request that should use Azure OpenAI chat extensions to augment the response behavior. + * The use of this configuration is compatible only with Azure OpenAI. + */ +export type AzureChatExtensionType = + | "azure_search" + | "azure_ml_index" + | "azure_cosmos_db" + | "elasticsearch" + | "pinecone"; + +/** A representation of the available Azure OpenAI enhancement configurations. */ +export interface AzureChatEnhancementConfiguration { + /** A representation of the available options for the Azure OpenAI grounding enhancement. */ + grounding?: AzureChatGroundingEnhancementConfiguration; + /** A representation of the available options for the Azure OpenAI optical character recognition (OCR) enhancement. */ + ocr?: AzureChatOCREnhancementConfiguration; +} + +export function azureChatEnhancementConfigurationSerializer( + item: AzureChatEnhancementConfiguration, +): Record { + return { + grounding: !item.grounding + ? item.grounding + : azureChatGroundingEnhancementConfigurationSerializer(item.grounding), + ocr: !item.ocr + ? item.ocr + : azureChatOCREnhancementConfigurationSerializer(item.ocr), + }; +} + +/** A representation of the available options for the Azure OpenAI grounding enhancement. */ +export interface AzureChatGroundingEnhancementConfiguration { + /** Specifies whether the enhancement is enabled. */ + enabled: boolean; +} + +export function azureChatGroundingEnhancementConfigurationSerializer( + item: AzureChatGroundingEnhancementConfiguration, +): Record { + return { + enabled: item["enabled"], + }; +} + +/** A representation of the available options for the Azure OpenAI optical character recognition (OCR) enhancement. */ +export interface AzureChatOCREnhancementConfiguration { + /** Specifies whether the enhancement is enabled. */ + enabled: boolean; +} + +export function azureChatOCREnhancementConfigurationSerializer( + item: AzureChatOCREnhancementConfiguration, +): Record { + return { + enabled: item["enabled"], + }; +} + +/** + * An abstract representation of a response format configuration usable by Chat Completions. Can be used to enable JSON + * mode. + */ +export interface ChatCompletionsResponseFormat { + /** the discriminator possible values: text, json_object */ + type: string; +} + +export function chatCompletionsResponseFormatUnionSerializer( + item: ChatCompletionsResponseFormatUnion, +) { + switch (item.type) { + case "text": + return chatCompletionsTextResponseFormatSerializer( + item as ChatCompletionsTextResponseFormat, + ); + + case "json_object": + return chatCompletionsJsonResponseFormatSerializer( + item as ChatCompletionsJsonResponseFormat, + ); + + default: + return chatCompletionsResponseFormatSerializer(item); + } +} + +export function chatCompletionsResponseFormatSerializer( + item: ChatCompletionsResponseFormatUnion, +): Record { + return { + type: item["type"], + }; } /** @@ -1891,10 +2245,11 @@ export interface ChatCompletionsTextResponseFormat } export function chatCompletionsTextResponseFormatSerializer( - input: ChatCompletionsTextResponseFormat, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatCompletionsTextResponseFormat, +): Record { + return { + type: item["type"], + }; } /** A response format for Chat Completions that restricts responses to emitting valid JSON objects. */ @@ -1905,34 +2260,39 @@ export interface ChatCompletionsJsonResponseFormat } export function chatCompletionsJsonResponseFormatSerializer( - input: ChatCompletionsJsonResponseFormat, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatCompletionsJsonResponseFormat, +): Record { + return { + type: item["type"], + }; } /** An abstract representation of a tool that can be used by the model to improve a chat completions response. */ export interface ChatCompletionsToolDefinition { - /** The object type. */ + /** the discriminator possible values: function */ type: string; } export function chatCompletionsToolDefinitionUnionSerializer( - input: ChatCompletionsToolDefinitionUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} + item: ChatCompletionsToolDefinitionUnion, +) { + switch (item.type) { + case "function": + return chatCompletionsFunctionToolDefinitionSerializer( + item as ChatCompletionsFunctionToolDefinition, + ); -export type ChatCompletionsToolDefinitionUnion = - | ChatCompletionsFunctionToolDefinition - | ChatCompletionsToolDefinition; + default: + return chatCompletionsToolDefinitionSerializer(item); + } +} export function chatCompletionsToolDefinitionSerializer( - input: ChatCompletionsToolDefinition, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatCompletionsToolDefinitionUnion, +): Record { + return { + type: item["type"], + }; } /** The definition information for a chat completions function tool that can call a function in response to a tool call. */ @@ -1945,34 +2305,43 @@ export interface ChatCompletionsFunctionToolDefinition } export function chatCompletionsFunctionToolDefinitionSerializer( - input: ChatCompletionsFunctionToolDefinition, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatCompletionsFunctionToolDefinition, +): Record { + return { + type: item["type"], + function: functionDefinitionSerializer(item.function), + }; } +/** Represents a generic policy for how a chat completions tool may be selected. */ +export type ChatCompletionsToolSelectionPreset = "auto" | "none"; + /** An abstract representation of an explicit, named tool selection to use for a chat completions request. */ export interface ChatCompletionsNamedToolSelection { - /** The object type. */ + /** the discriminator possible values: function */ type: string; } export function chatCompletionsNamedToolSelectionUnionSerializer( - input: ChatCompletionsNamedToolSelectionUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} + item: ChatCompletionsNamedToolSelectionUnion, +) { + switch (item.type) { + case "function": + return chatCompletionsNamedFunctionToolSelectionSerializer( + item as ChatCompletionsNamedFunctionToolSelection, + ); -export type ChatCompletionsNamedToolSelectionUnion = - | ChatCompletionsNamedFunctionToolSelection - | ChatCompletionsNamedToolSelection; + default: + return chatCompletionsNamedToolSelectionSerializer(item); + } +} export function chatCompletionsNamedToolSelectionSerializer( - input: ChatCompletionsNamedToolSelection, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatCompletionsNamedToolSelectionUnion, +): Record { + return { + type: item["type"], + }; } /** A tool selection of a specific, named function tool that will limit chat completions to using the named function. */ @@ -1985,10 +2354,12 @@ export interface ChatCompletionsNamedFunctionToolSelection } export function chatCompletionsNamedFunctionToolSelectionSerializer( - input: ChatCompletionsNamedFunctionToolSelection, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatCompletionsNamedFunctionToolSelection, +): Record { + return { + type: item["type"], + function: chatCompletionsFunctionToolSelectionSerializer(item.function), + }; } /** A tool selection of a specific, named function tool that will limit chat completions to using the named function. */ @@ -1998,10 +2369,11 @@ export interface ChatCompletionsFunctionToolSelection { } export function chatCompletionsFunctionToolSelectionSerializer( - input: ChatCompletionsFunctionToolSelection, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ChatCompletionsFunctionToolSelection, +): Record { + return { + name: item["name"], + }; } /** @@ -2039,11 +2411,6 @@ export interface ChatCompletions { usage: CompletionsUsage; } -export function chatCompletionsSerializer(input: ChatCompletions): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** * The representation of a single prompt completion as part of an overall chat completions request. * Generally, `n` choices are generated per provided prompt with a default value of 1. @@ -2079,11 +2446,6 @@ export interface ChatChoice { enhancements?: AzureChatEnhancements; } -export function chatChoiceSerializer(input: ChatChoice): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** A representation of a chat message as received in a response. */ export interface ChatResponseMessage { /** The chat role associated with the message. */ @@ -2107,13 +2469,6 @@ export interface ChatResponseMessage { context?: AzureChatExtensionsMessageContext; } -export function chatResponseMessageSerializer( - input: ChatResponseMessage, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** * A representation of the additional context information available when Azure OpenAI chat extensions are involved * in the generation of a corresponding chat completions response. This context information is only populated when @@ -2133,65 +2488,6 @@ export interface AzureChatExtensionsMessageContext { allRetrievedDocuments?: AzureChatExtensionRetrievedDocument[]; } -export function azureChatExtensionsMessageContextSerializer( - input: AzureChatExtensionsMessageContext, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** An abstract representation of structured information about why a chat completions response terminated. */ -export interface ChatFinishDetails { - /** The object type. */ - type: string; -} - -export function chatFinishDetailsUnionSerializer( - input: ChatFinishDetailsUnion, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -export type ChatFinishDetailsUnion = - | StopFinishDetails - | MaxTokensFinishDetails - | ChatFinishDetails; - -export function chatFinishDetailsSerializer(input: ChatFinishDetails): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** - * Represents the output results of Azure enhancements to chat completions, as configured via the matching input provided - * in the request. - */ -export interface AzureChatEnhancements { - /** The grounding enhancement that returns the bounding box of the objects detected in the image. */ - grounding?: AzureGroundingEnhancement; -} - -export function azureChatEnhancementsSerializer( - input: AzureChatEnhancements, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** The grounding enhancement that returns the bounding box of the objects detected in the image. */ -export interface AzureGroundingEnhancement { - /** The lines of text detected by the grounding enhancement. */ - lines: AzureGroundingEnhancementLine[]; -} - -export function azureGroundingEnhancementSerializer( - input: AzureGroundingEnhancement, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** * A single instance of additional context information available when Azure OpenAI chat extensions are involved * in the generation of a corresponding chat completions response. This context information is only populated when @@ -2210,13 +2506,6 @@ export interface AzureChatExtensionDataSourceResponseCitation { chunkId?: string; } -export function azureChatExtensionDataSourceResponseCitationSerializer( - input: AzureChatExtensionDataSourceResponseCitation, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** The retrieved document. */ export interface AzureChatExtensionRetrievedDocument { /** The content of the citation. */ @@ -2244,12 +2533,8 @@ export interface AzureChatExtensionRetrievedDocument { filterReason?: AzureChatExtensionRetrieveDocumentFilterReason; } -export function azureChatExtensionRetrievedDocumentSerializer( - input: AzureChatExtensionRetrievedDocument, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} +/** The reason for filtering the retrieved document. */ +export type AzureChatExtensionRetrieveDocumentFilterReason = "score" | "rerank"; /** Log probability information for a choice, as requested via 'logprobs' and 'top_logprobs'. */ export interface ChatChoiceLogProbabilityInfo { @@ -2257,13 +2542,6 @@ export interface ChatChoiceLogProbabilityInfo { content: ChatTokenLogProbabilityResult[] | null; } -export function chatChoiceLogProbabilityInfoSerializer( - input: ChatChoiceLogProbabilityInfo, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** A representation of the log probability information for a single content token, including a list of most likely tokens if 'top_logprobs' were requested. */ export interface ChatTokenLogProbabilityResult { /** The message content token. */ @@ -2276,13 +2554,6 @@ export interface ChatTokenLogProbabilityResult { topLogprobs: ChatTokenLogProbabilityInfo[] | null; } -export function chatTokenLogProbabilityResultSerializer( - input: ChatTokenLogProbabilityResult, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** A representation of the log probability information for a single message content token. */ export interface ChatTokenLogProbabilityInfo { /** The message content token. */ @@ -2293,11 +2564,10 @@ export interface ChatTokenLogProbabilityInfo { bytes: number[] | null; } -export function chatTokenLogProbabilityInfoSerializer( - input: ChatTokenLogProbabilityInfo, -): unknown { - console.log(input); - throw new Error("Not implemented"); +/** An abstract representation of structured information about why a chat completions response terminated. */ +export interface ChatFinishDetails { + /** the discriminator possible values: stop, max_tokens */ + type: string; } /** A structured representation of a stop reason that signifies natural termination by the model. */ @@ -2308,11 +2578,6 @@ export interface StopFinishDetails extends ChatFinishDetails { stop: string; } -export function stopFinishDetailsSerializer(input: StopFinishDetails): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** * A structured representation of a stop reason that signifies a token limit was reached before the model could naturally * complete. @@ -2322,11 +2587,19 @@ export interface MaxTokensFinishDetails extends ChatFinishDetails { type: "max_tokens"; } -export function maxTokensFinishDetailsSerializer( - input: MaxTokensFinishDetails, -): unknown { - console.log(input); - throw new Error("Not implemented"); +/** + * Represents the output results of Azure enhancements to chat completions, as configured via the matching input provided + * in the request. + */ +export interface AzureChatEnhancements { + /** The grounding enhancement that returns the bounding box of the objects detected in the image. */ + grounding?: AzureGroundingEnhancement; +} + +/** The grounding enhancement that returns the bounding box of the objects detected in the image. */ +export interface AzureGroundingEnhancement { + /** The lines of text detected by the grounding enhancement. */ + lines: AzureGroundingEnhancementLine[]; } /** A content line object consisting of an adjacent sequence of content elements, such as words and selection marks. */ @@ -2337,13 +2610,6 @@ export interface AzureGroundingEnhancementLine { spans: AzureGroundingEnhancementLineSpan[]; } -export function azureGroundingEnhancementLineSerializer( - input: AzureGroundingEnhancementLine, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** A span object that represents a detected object and its bounding box information. */ export interface AzureGroundingEnhancementLineSpan { /** The text content of the span that represents the detected object. */ @@ -2359,13 +2625,6 @@ export interface AzureGroundingEnhancementLineSpan { polygon: AzureGroundingEnhancementCoordinatePoint[]; } -export function azureGroundingEnhancementLineSpanSerializer( - input: AzureGroundingEnhancementLineSpan, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** A representation of a single polygon point as used by the Azure grounding enhancement. */ export interface AzureGroundingEnhancementCoordinatePoint { /** The x-coordinate (horizontal axis) of the point. */ @@ -2374,13 +2633,6 @@ export interface AzureGroundingEnhancementCoordinatePoint { y: number; } -export function azureGroundingEnhancementCoordinatePointSerializer( - input: AzureGroundingEnhancementCoordinatePoint, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Represents the request data used to generate images. */ export interface ImageGenerationOptions { /** @@ -2419,12 +2671,40 @@ export interface ImageGenerationOptions { } export function imageGenerationOptionsSerializer( - input: ImageGenerationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: ImageGenerationOptions, +): Record { + return { + model: item["model"], + prompt: item["prompt"], + n: item["n"], + size: item["size"], + response_format: item["responseFormat"], + quality: item["quality"], + style: item["style"], + user: item["user"], + }; } +/** The desired size of generated images. */ +export type ImageSize = + | "256x256" + | "512x512" + | "1024x1024" + | "1792x1024" + | "1024x1792"; +/** The format in which the generated images are returned. */ +export type ImageGenerationResponseFormat = "url" | "b64_json"; +/** + * An image generation configuration that specifies how the model should prioritize quality, cost, and speed. + * Only configurable with dall-e-3 models. + */ +export type ImageGenerationQuality = "standard" | "hd"; +/** + * An image generation configuration that specifies how the model should incorporate realism and other visual characteristics. + * Only configurable with dall-e-3 models. + */ +export type ImageGenerationStyle = "natural" | "vivid"; + /** The result of a successful image generation operation. */ export interface ImageGenerations { /** @@ -2436,11 +2716,6 @@ export interface ImageGenerations { data: ImageGenerationData[]; } -export function imageGenerationsSerializer(input: ImageGenerations): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** * A representation of a single generated image, provided as either base64-encoded data or as a URL from which the image * may be retrieved. @@ -2468,13 +2743,6 @@ export interface ImageGenerationData { promptFilterResults?: ImageGenerationPromptFilterResults; } -export function imageGenerationDataSerializer( - input: ImageGenerationData, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Describes the content filtering result for the image generation request. */ export interface ImageGenerationContentFilterResults { /** @@ -2504,13 +2772,6 @@ export interface ImageGenerationContentFilterResults { selfHarm?: ContentFilterResult; } -export function imageGenerationContentFilterResultsSerializer( - input: ImageGenerationContentFilterResults, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Describes the content filtering results for the prompt of a image generation request. */ export interface ImageGenerationPromptFilterResults { /** @@ -2546,13 +2807,6 @@ export interface ImageGenerationPromptFilterResults { customBlocklists?: ContentFilterDetailedResults; } -export function imageGenerationPromptFilterResultsSerializer( - input: ImageGenerationPromptFilterResults, -): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** A representation of the request options that control the behavior of a text-to-speech operation. */ export interface SpeechGenerationOptions { /** The text to generate audio for. The maximum length is 4096 characters. */ @@ -2568,12 +2822,34 @@ export interface SpeechGenerationOptions { } export function speechGenerationOptionsSerializer( - input: SpeechGenerationOptions, -): unknown { - console.log(input); - throw new Error("Not implemented"); + item: SpeechGenerationOptions, +): Record { + return { + input: item["input"], + voice: item["voice"], + response_format: item["responseFormat"], + speed: item["speed"], + model: item["model"], + }; } +/** The available voices for text-to-speech. */ +export type SpeechVoice = + | "alloy" + | "echo" + | "fable" + | "onyx" + | "nova" + | "shimmer"; +/** The supported audio output formats for text-to-speech. */ +export type SpeechGenerationResponseFormat = + | "mp3" + | "opus" + | "aac" + | "flac" + | "wav" + | "pcm"; + /** * The configuration information for an embeddings request. * Embeddings measure the relatedness of text strings and are commonly used for search, clustering, @@ -2607,11 +2883,22 @@ export interface EmbeddingsOptions { inputType?: string; } -export function embeddingsOptionsSerializer(input: EmbeddingsOptions): unknown { - console.log(input); - throw new Error("Not implemented"); +export function embeddingsOptionsSerializer( + item: EmbeddingsOptions, +): Record { + return { + user: item["user"], + model: item["model"], + input: item["input"], + encoding_format: item["encodingFormat"], + dimensions: item["dimensions"], + input_type: item["inputType"], + }; } +/** Represents the available formats for embeddings data on responses. */ +export type EmbeddingEncodingFormat = "float" | "base64"; + /** * Representation of the response data from an embeddings request. * Embeddings measure the relatedness of text strings and are commonly used for search, clustering, @@ -2624,24 +2911,6 @@ export interface Embeddings { usage: EmbeddingsUsage; } -export function embeddingsSerializer(input: Embeddings): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** Measurement of the amount of tokens used in this request and response. */ -export interface EmbeddingsUsage { - /** Number of tokens sent in the original request. */ - promptTokens: number; - /** Total number of tokens transacted in this request/response. */ - totalTokens: number; -} - -export function embeddingsUsageSerializer(input: EmbeddingsUsage): unknown { - console.log(input); - throw new Error("Not implemented"); -} - /** Representation of a single embeddings relatedness comparison. */ export interface EmbeddingItem { /** @@ -2653,528 +2922,87 @@ export interface EmbeddingItem { index: number; } -export function embeddingItemSerializer(input: EmbeddingItem): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** Defines available options for the underlying response format of output transcription information. */ -export enum AudioTranscriptionFormatKnownValues { - /** Use a response body that is a JSON object containing a single 'text' field for the transcription. */ - json = '"json"', - /** - * Use a response body that is a JSON object containing transcription text along with timing, segments, and other - * metadata. - */ - verbose_json = '"verbose_json"', - /** Use a response body that is plain text containing the raw, unannotated transcription. */ - text = '"text"', - /** Use a response body that is plain text in SubRip (SRT) format that also includes timing information. */ - srt = '"srt"', - /** Use a response body that is plain text in Web Video Text Tracks (VTT) format that also includes timing information. */ - vtt = '"vtt"', -} - -export type AudioTranscriptionFormat = - | "json" - | "verbose_json" - | "text" - | "srt" - | "vtt"; - -/** Defines the timestamp granularities that can be requested on a verbose transcription response. */ -export enum AudioTranscriptionTimestampGranularityKnownValues { - /** - * Indicates that responses should include timing information about each transcribed word. Note that generating word - * timestamp information will incur additional response latency. - */ - word = '"word"', - /** - * Indicates that responses should include timing and other information about each transcribed audio segment. Audio - * segment timestamp information does not incur any additional latency. - */ - segment = '"segment"', -} - -export type AudioTranscriptionTimestampGranularity = "word" | "segment"; - -/** Defines the possible descriptors for available audio operation responses. */ -export enum AudioTaskLabelKnownValues { - /** Accompanying response data resulted from an audio transcription task. */ - transcribe = '"transcribe"', - /** Accompanying response data resulted from an audio translation task. */ - translate = '"translate"', -} - -export type AudioTaskLabel = "transcribe" | "translate"; - -/** Defines available options for the underlying response format of output translation information. */ -export enum AudioTranslationFormatKnownValues { - /** Use a response body that is a JSON object containing a single 'text' field for the translation. */ - json = '"json"', - /** - * Use a response body that is a JSON object containing translation text along with timing, segments, and other - * metadata. - */ - verbose_json = '"verbose_json"', - /** Use a response body that is plain text containing the raw, unannotated translation. */ - text = '"text"', - /** Use a response body that is plain text in SubRip (SRT) format that also includes timing information. */ - srt = '"srt"', - /** Use a response body that is plain text in Web Video Text Tracks (VTT) format that also includes timing information. */ - vtt = '"vtt"', -} - -export type AudioTranslationFormat = - | "json" - | "verbose_json" - | "text" - | "srt" - | "vtt"; - -/** Ratings for the intensity and risk level of harmful content. */ -export enum ContentFilterSeverityKnownValues { - /** - * Content may be related to violence, self-harm, sexual, or hate categories but the terms - * are used in general, journalistic, scientific, medical, and similar professional contexts, - * which are appropriate for most audiences. - */ - safe = '"safe"', - /** - * Content that expresses prejudiced, judgmental, or opinionated views, includes offensive - * use of language, stereotyping, use cases exploring a fictional world (for example, gaming, - * literature) and depictions at low intensity. - */ - low = '"low"', - /** - * Content that uses offensive, insulting, mocking, intimidating, or demeaning language - * towards specific identity groups, includes depictions of seeking and executing harmful - * instructions, fantasies, glorification, promotion of harm at medium intensity. - */ - medium = '"medium"', - /** - * Content that displays explicit and severe harmful instructions, actions, - * damage, or abuse; includes endorsement, glorification, or promotion of severe - * harmful acts, extreme or illegal forms of harm, radicalization, or non-consensual - * power exchange or abuse. - */ - high = '"high"', -} - -export type ContentFilterSeverity = "safe" | "low" | "medium" | "high"; - -/** Representation of the manner in which a completions response concluded. */ -export enum CompletionsFinishReasonKnownValues { - /** Completions ended normally and reached its end of token generation. */ - stopped = '"stop"', - /** Completions exhausted available token limits before generation could complete. */ - tokenLimitReached = '"length"', - /** - * Completions generated a response that was identified as potentially sensitive per content - * moderation policies. - */ - contentFiltered = '"content_filter"', - /** Completion ended normally, with the model requesting a function to be called. */ - functionCall = '"function_call"', - /** Completion ended with the model calling a provided tool for output. */ - toolCalls = '"tool_calls"', -} - -export type CompletionsFinishReason = - | "stop" - | "length" - | "content_filter" - | "function_call" - | "tool_calls"; - -/** A description of the intended purpose of a message within a chat completions interaction. */ -export enum ChatRoleKnownValues { - /** The role that instructs or sets the behavior of the assistant. */ - system = '"system"', - /** The role that provides responses to system-instructed, user-prompted input. */ - assistant = '"assistant"', - /** The role that provides input for chat completions. */ - user = '"user"', - /** The role that provides function results for chat completions. */ - "function" = '"function"', - /** The role that represents extension tool activity within a chat completions operation. */ - tool = '"tool"', -} - -export type ChatRole = "system" | "assistant" | "user" | "function" | "tool"; - -/** A representation of the possible image detail levels for image-based chat completions message content. */ -export enum ChatMessageImageDetailLevelKnownValues { - /** Specifies that the model should determine which detail level to apply using heuristics like image size. */ - auto = '"auto"', - /** - * Specifies that image evaluation should be constrained to the 'low-res' model that may be faster and consume fewer - * tokens but may also be less accurate for highly detailed images. - */ - low = '"low"', - /** - * Specifies that image evaluation should enable the 'high-res' model that may be more accurate for highly detailed - * images but may also be slower and consume more tokens. - */ - high = '"high"', -} - -export type ChatMessageImageDetailLevel = "auto" | "low" | "high"; - -/** - * The collection of predefined behaviors for handling request-provided function information in a chat completions - * operation. - */ -export enum FunctionCallPresetKnownValues { - /** - * Specifies that the model may either use any of the functions provided in this chat completions request or - * instead return a standard chat completions response as if no functions were provided. - */ - auto = '"auto"', - /** - * Specifies that the model should not respond with a function call and should instead provide a standard chat - * completions response. Response content may still be influenced by the provided function information. - */ - none = '"none"', -} - -export type FunctionCallPreset = "auto" | "none"; - -/** - * A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat - * completions request that should use Azure OpenAI chat extensions to augment the response behavior. - * The use of this configuration is compatible only with Azure OpenAI. - */ -export enum AzureChatExtensionTypeKnownValues { - /** Represents the use of Azure AI Search as an Azure OpenAI chat extension. */ - azureSearch = '"azure_search"', - /** Represents the use of Azure Machine Learning index as an Azure OpenAI chat extension. */ - azureMachineLearningIndex = '"azure_ml_index"', - /** Represents the use of Azure Cosmos DB as an Azure OpenAI chat extension. */ - azureCosmosDB = '"azure_cosmos_db"', - /** Represents the use of Elasticsearch® index as an Azure OpenAI chat extension. */ - elasticsearch = '"elasticsearch"', - /** Represents the use of Pinecone index as an Azure OpenAI chat extension. */ - pinecone = '"pinecone"', -} - -export type AzureChatExtensionType = - | "azure_search" - | "azure_ml_index" - | "azure_cosmos_db" - | "elasticsearch" - | "pinecone"; - -/** The authentication types supported with Azure OpenAI On Your Data. */ -export enum OnYourDataAuthenticationTypeKnownValues { - /** Authentication via API key. */ - apiKey = '"api_key"', - /** Authentication via connection string. */ - connectionString = '"connection_string"', - /** Authentication via key and key ID pair. */ - keyAndKeyId = '"key_and_key_id"', - /** Authentication via encoded API key. */ - encodedApiKey = '"encoded_api_key"', - /** Authentication via access token. */ - accessToken = '"access_token"', - /** Authentication via system-assigned managed identity. */ - systemAssignedManagedIdentity = '"system_assigned_managed_identity"', - /** Authentication via user-assigned managed identity. */ - userAssignedManagedIdentity = '"user_assigned_managed_identity"', -} - -export type OnYourDataAuthenticationType = - | "api_key" - | "connection_string" - | "key_and_key_id" - | "encoded_api_key" - | "access_token" - | "system_assigned_managed_identity" - | "user_assigned_managed_identity"; - -/** The context property. */ -export enum OnYourDataContextPropertyKnownValues { - /** The `citations` property. */ - citations = '"citations"', - /** The `intent` property. */ - intent = '"intent"', - /** The `all_retrieved_documents` property. */ - allRetrievedDocuments = '"all_retrieved_documents"', -} - -export type OnYourDataContextProperty = - | "citations" - | "intent" - | "all_retrieved_documents"; - -/** The type of Azure Search retrieval query that should be executed when using it as an Azure OpenAI chat extension. */ -export enum AzureSearchQueryTypeKnownValues { - /** Represents the default, simple query parser. */ - simple = '"simple"', - /** Represents the semantic query parser for advanced semantic modeling. */ - semantic = '"semantic"', - /** Represents vector search over computed data. */ - vector = '"vector"', - /** Represents a combination of the simple query strategy with vector data. */ - vectorSimpleHybrid = '"vector_simple_hybrid"', - /** Represents a combination of semantic search and vector data querying. */ - vectorSemanticHybrid = '"vector_semantic_hybrid"', -} - -export type AzureSearchQueryType = - | "simple" - | "semantic" - | "vector" - | "vector_simple_hybrid" - | "vector_semantic_hybrid"; - -/** - * Represents the available sources Azure OpenAI On Your Data can use to configure vectorization of data for use with - * vector search. - */ -export enum OnYourDataVectorizationSourceTypeKnownValues { - /** Represents vectorization performed by public service calls to an Azure OpenAI embedding model. */ - endpoint = '"endpoint"', - /** - * Represents an Ada model deployment name to use. This model deployment must be in the same Azure OpenAI resource, but - * On Your Data will use this model deployment via an internal call rather than a public one, which enables vector - * search even in private networks. - */ - deploymentName = '"deployment_name"', - /** - * Represents a specific embedding model ID as defined in the search service. - * Currently only supported by Elasticsearch®. - */ - modelId = '"model_id"', -} - -export type OnYourDataVectorizationSourceType = - | "endpoint" - | "deployment_name" - | "model_id"; - -/** The authentication types supported with Azure OpenAI On Your Data vector search. */ -export enum OnYourDataVectorSearchAuthenticationTypeKnownValues { - /** Authentication via API key. */ - apiKey = '"api_key"', - /** Authentication via access token. */ - accessToken = '"access_token"', -} - -export type OnYourDataVectorSearchAuthenticationType = - | "api_key" - | "access_token"; - -/** The type of Elasticsearch® retrieval query that should be executed when using it as an Azure OpenAI chat extension. */ -export enum ElasticsearchQueryTypeKnownValues { - /** Represents the default, simple query parser. */ - simple = '"simple"', - /** Represents vector search over computed data. */ - vector = '"vector"', -} - -export type ElasticsearchQueryType = "simple" | "vector"; - -/** Represents a generic policy for how a chat completions tool may be selected. */ -export enum ChatCompletionsToolSelectionPresetKnownValues { - /** - * Specifies that the model may either use any of the tools provided in this chat completions request or - * instead return a standard chat completions response as if no tools were provided. - */ - auto = '"auto"', - /** - * Specifies that the model should not respond with a tool call and should instead provide a standard chat - * completions response. Response content may still be influenced by the provided tool definitions. - */ - none = '"none"', -} - -export type ChatCompletionsToolSelectionPreset = "auto" | "none"; - -/** The reason for filtering the retrieved document. */ -export enum AzureChatExtensionRetrieveDocumentFilterReasonKnownValues { - /** The document is filtered by original search score threshold defined by `strictness` configure. */ - score = '"score"', - /** The document is not filtered by original search score threshold, but is filtered by rerank score and `top_n_documents` configure. */ - rerank = '"rerank"', -} - -export type AzureChatExtensionRetrieveDocumentFilterReason = "score" | "rerank"; - -/** The desired size of generated images. */ -export enum ImageSizeKnownValues { - /** - * Very small image size of 256x256 pixels. - * Only supported with dall-e-2 models. - */ - size256x256 = '"256x256"', - /** - * A smaller image size of 512x512 pixels. - * Only supported with dall-e-2 models. - */ - size512x512 = '"512x512"', - /** - * A standard, square image size of 1024x1024 pixels. - * Supported by both dall-e-2 and dall-e-3 models. - */ - size1024x1024 = '"1024x1024"', - /** - * A wider image size of 1024x1792 pixels. - * Only supported with dall-e-3 models. - */ - size1792x1024 = '"1792x1024"', - /** - * A taller image size of 1792x1024 pixels. - * Only supported with dall-e-3 models. - */ - size1024x1792 = '"1024x1792"', -} - -export type ImageSize = - | "256x256" - | "512x512" - | "1024x1024" - | "1792x1024" - | "1024x1792"; - -/** The format in which the generated images are returned. */ -export enum ImageGenerationResponseFormatKnownValues { - /** Image generation response items should provide a URL from which the image may be retrieved. */ - url = '"url"', - /** Image generation response items should provide image data as a base64-encoded string. */ - base64 = '"b64_json"', -} - -export type ImageGenerationResponseFormat = "url" | "b64_json"; - -/** - * An image generation configuration that specifies how the model should prioritize quality, cost, and speed. - * Only configurable with dall-e-3 models. - */ -export enum ImageGenerationQualityKnownValues { - /** Requests image generation with standard, balanced characteristics of quality, cost, and speed. */ - standard = '"standard"', - /** Requests image generation with higher quality, higher cost and lower speed relative to standard. */ - hd = '"hd"', -} - -export type ImageGenerationQuality = "standard" | "hd"; - -/** - * An image generation configuration that specifies how the model should incorporate realism and other visual characteristics. - * Only configurable with dall-e-3 models. - */ -export enum ImageGenerationStyleKnownValues { - /** Requests image generation in a natural style with less preference for dramatic and hyper-realistic characteristics. */ - natural = '"natural"', - /** - * Requests image generation in a vivid style with a higher preference for dramatic and hyper-realistic - * characteristics. - */ - vivid = '"vivid"', -} - -export type ImageGenerationStyle = "natural" | "vivid"; - -/** The available voices for text-to-speech. */ -export enum SpeechVoiceKnownValues { - /** The Alloy voice. */ - alloy = '"alloy"', - /** The Echo voice. */ - echo = '"echo"', - /** The Fable voice. */ - fable = '"fable"', - /** The Onyx voice. */ - onyx = '"onyx"', - /** The Nova voice. */ - nova = '"nova"', - /** The Shimmer voice. */ - shimmer = '"shimmer"', -} - -export type SpeechVoice = - | "alloy" - | "echo" - | "fable" - | "onyx" - | "nova" - | "shimmer"; - -/** The supported audio output formats for text-to-speech. */ -export enum SpeechGenerationResponseFormatKnownValues { - /** Use MP3 as the audio output format. MP3 is the default, general-purpose format. */ - mp3 = '"mp3"', - /** Use Opus as the audio output format. Opus is optimized for internet streaming and low latency. */ - opus = '"opus"', - /** Use AAC as the audio output format. AAC is optimized for digital audio compression and is preferred by YouTube, Android, and iOS. */ - aac = '"aac"', - /** Use FLAC as the audio output format. FLAC is a fully lossless format optimized for maximum quality at the expense of size. */ - flac = '"flac"', - /** Use uncompressed WAV as the audio output format, suitable for low-latency applications to avoid decoding overhead. */ - wav = '"wav"', - /** Use uncompressed PCM as the audio output format, which is similar to WAV but contains raw samples in 24kHz (16-bit signed, low-endian), without the header. */ - pcm = '"pcm"', -} - -export type SpeechGenerationResponseFormat = - | "mp3" - | "opus" - | "aac" - | "flac" - | "wav" - | "pcm"; - -/** Represents the available formats for embeddings data on responses. */ -export enum EmbeddingEncodingFormatKnownValues { - /** Specifies that responses should provide arrays of floats for each embedding. */ - float = '"float"', - /** Specifies that responses should provide a base64-encoded string for each embedding. */ - base64 = '"base64"', -} - -export type EmbeddingEncodingFormat = "float" | "base64"; - -export enum ServiceApiVersionsKnownValues { - v2022_12_01 = '"2022-12-01"', - v2023_05_15 = '"2023-05-15"', - v2024_02_01 = '"2024-02-01"', - v2024_06_01 = '"2024-06-01"', +/** Measurement of the amount of tokens used in this request and response. */ +export interface EmbeddingsUsage { + /** Number of tokens sent in the original request. */ + promptTokens: number; + /** Total number of tokens transacted in this request/response. */ + totalTokens: number; } +/** Type of ServiceApiVersions */ export type ServiceApiVersions = | "2022-12-01" | "2023-05-15" + | "2023-06-01-preview" + | "2023-07-01-preview" | "2024-02-01" + | "2024-02-15-preview" + | "2024-03-01-preview" + | "2024-04-01-preview" + | "2024-05-01-preview" | "2024-06-01"; - -/** Initialization class for the client */ -export interface OpenAIClientOptions { - /** Service host */ - endpoint: string | string; - /** Credential used to authenticate requests to the service. */ - credential: KeyCredential | TokenCredential; - /** The API version to use for this operation. */ - apiVersion: string; -} - -export function openAIClientOptionsSerializer(input: { - endpoint: string | string; - credential: KeyCredential | TokenCredential; - apiVersion: string; -}): unknown { - console.log(input); - throw new Error("Not implemented"); -} - -/** A response containing error details. */ -export interface ErrorResponse { - /** The error object. */ - error: ErrorModel; - /** String error code indicating what went wrong. */ - errorCode?: string; -} - -export function errorResponseSerializer(input: ErrorResponse): unknown { - console.log(input); - throw new Error("Not implemented"); -} +/** Alias for ChatRequestMessageUnion */ +export type ChatRequestMessageUnion = + | ChatRequestSystemMessage + | ChatRequestUserMessage + | ChatRequestAssistantMessage + | ChatRequestToolMessage + | ChatRequestFunctionMessage + | ChatRequestMessage; +/** Alias for ChatMessageContentItemUnion */ +export type ChatMessageContentItemUnion = + | ChatMessageTextContentItem + | ChatMessageImageContentItem + | ChatMessageContentItem; +/** Alias for ChatCompletionsToolCallUnion */ +export type ChatCompletionsToolCallUnion = + | ChatCompletionsFunctionToolCall + | ChatCompletionsToolCall; +/** Alias for AzureChatExtensionConfigurationUnion */ +export type AzureChatExtensionConfigurationUnion = + | AzureSearchChatExtensionConfiguration + | AzureMachineLearningIndexChatExtensionConfiguration + | AzureCosmosDBChatExtensionConfiguration + | ElasticsearchChatExtensionConfiguration + | PineconeChatExtensionConfiguration + | AzureChatExtensionConfiguration; +/** Alias for OnYourDataAuthenticationOptionsUnion */ +export type OnYourDataAuthenticationOptionsUnion = + | OnYourDataApiKeyAuthenticationOptions + | OnYourDataConnectionStringAuthenticationOptions + | OnYourDataKeyAndKeyIdAuthenticationOptions + | OnYourDataEncodedApiKeyAuthenticationOptions + | OnYourDataAccessTokenAuthenticationOptions + | OnYourDataSystemAssignedManagedIdentityAuthenticationOptions + | OnYourDataUserAssignedManagedIdentityAuthenticationOptions + | OnYourDataAuthenticationOptions; +/** Alias for OnYourDataVectorizationSourceUnion */ +export type OnYourDataVectorizationSourceUnion = + | OnYourDataEndpointVectorizationSource + | OnYourDataDeploymentNameVectorizationSource + | OnYourDataModelIdVectorizationSource + | OnYourDataVectorizationSource; +/** Alias for OnYourDataVectorSearchAuthenticationOptionsUnion */ +export type OnYourDataVectorSearchAuthenticationOptionsUnion = + | OnYourDataVectorSearchApiKeyAuthenticationOptions + | OnYourDataVectorSearchAccessTokenAuthenticationOptions + | OnYourDataVectorSearchAuthenticationOptions; +/** Alias for ChatCompletionsResponseFormatUnion */ +export type ChatCompletionsResponseFormatUnion = + | ChatCompletionsTextResponseFormat + | ChatCompletionsJsonResponseFormat + | ChatCompletionsResponseFormat; +/** Alias for ChatCompletionsToolDefinitionUnion */ +export type ChatCompletionsToolDefinitionUnion = + | ChatCompletionsFunctionToolDefinition + | ChatCompletionsToolDefinition; +/** Alias for ChatCompletionsNamedToolSelectionUnion */ +export type ChatCompletionsNamedToolSelectionUnion = + | ChatCompletionsNamedFunctionToolSelection + | ChatCompletionsNamedToolSelection; +/** Alias for ChatFinishDetailsUnion */ +export type ChatFinishDetailsUnion = + | StopFinishDetails + | MaxTokensFinishDetails + | ChatFinishDetails; From b6da9242f5334ecd34d495c9e8c1b24bc505da40 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 25 Aug 2024 18:47:24 +0800 Subject: [PATCH 40/83] update to the latest main --- .../unit/static-helpers/serialization.test.ts | 141 ------------------ 1 file changed, 141 deletions(-) delete mode 100644 packages/typespec-ts/test-next/unit/static-helpers/serialization.test.ts diff --git a/packages/typespec-ts/test-next/unit/static-helpers/serialization.test.ts b/packages/typespec-ts/test-next/unit/static-helpers/serialization.test.ts deleted file mode 100644 index 47cdd6e4ed..0000000000 --- a/packages/typespec-ts/test-next/unit/static-helpers/serialization.test.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { describe, it, expect, vi } from "vitest"; -import { - serializeRecord, - serializePassthrough, - serializeArray, - serializeUtcDateTime, - serializeBytes, - withNullChecks, - isPassthroughElement -} from "../../../static/static-helpers/serialization/serializers.js"; -import { EncodingType } from "@typespec/ts-http-runtime"; - -describe("serializeRecord", () => { - it("should serialize a record using the provided serializer", () => { - const input = { a: 1, b: 2 }; - const serializer = (item: number) => item.toString(); - const result = serializeRecord(input, serializer); - expect(result).toEqual({ a: 1, b: 2 }); - }); - - it("should handle null and undefined correctly", () => { - const input = { a: 1, b: null, c: undefined }; - const serializer = (item: number | null) => item?.toString() ?? "null"; - const result = serializeRecord(input, serializer); - expect(result).toEqual({ a: 1, b: "null" }); - }); - - it("should use passthrough for passthrough elements", () => { - const input = { a: 1, b: "string", c: new Date("2023-08-01") }; - const result = serializeRecord(input); - expect(result).toEqual(input); - }); - - it("should warn and passthrough unhandled types", () => { - const input = { a: {}, b: [] }; - console.warn = vi.fn(); // Mock console.warn - const result = serializeRecord(input); - expect(result).toEqual(input); - expect(console.warn).toHaveBeenCalledWith( - "Don't know how to serialize [object Object]" - ); - expect(console.warn).toHaveBeenCalledWith("Don't know how to serialize "); - }); -}); - -describe("serializePassthrough", () => { - it("should return the input as-is", () => { - const input = { a: 1, b: "test" }; - const result = serializePassthrough(input); - expect(result).toBe(input); - }); - - it("should handle null and undefined correctly", () => { - const nullResult = serializePassthrough(null); - const undefinedResult = serializePassthrough(undefined); - expect(nullResult).toBeNull(); - expect(undefinedResult).toBeUndefined(); - }); -}); - -describe("serializeArray", () => { - it("should serialize an array using the provided serializer", () => { - const input = [1, 2, 3]; - const serializer = (item: number) => item.toString(); - const result = serializeArray(input, serializer); - expect(result).toEqual([1, 2, 3]); - }); - - it("should use passthrough for passthrough elements", () => { - const input = [1, "string", new Date("2023-08-01")]; - const result = serializeArray(input, (item) => item); - expect(result).toEqual(input); - }); - - it("should handle empty arrays correctly", () => { - const input: any[] = []; - const serializer = (item: any) => item.toString(); - const result = serializeArray(input, serializer); - expect(result).toEqual([]); - }); -}); - -describe("serializeUtcDateTime", () => { - it("should serialize a Date object to UTC string", () => { - const input = new Date("2023-08-01T00:00:00Z"); - const result = serializeUtcDateTime(input); - expect(result).toBe("2023-08-01T00:00:00.000Z"); - }); - - it("should handle null and undefined correctly", () => { - const nullResult = serializeUtcDateTime(null); - const undefinedResult = serializeUtcDateTime(undefined); - expect(nullResult).toBeNull(); - expect(undefinedResult).toBeUndefined(); - }); -}); - -describe("serializeBytes", () => { - it("should serialize a Uint8Array to a string with given encoding", () => { - const input = new Uint8Array([72, 101, 108, 108, 111]); // 'Hello' - const encoding: EncodingType = "utf-8"; - const result = serializeBytes(input, encoding); - expect(result).toBe("Hello"); - }); - - it("should handle null and undefined correctly", () => { - const nullResult = serializeBytes(null, "utf-8"); - const undefinedResult = serializeBytes(undefined, "utf-8"); - expect(nullResult).toBeNull(); - expect(undefinedResult).toBeUndefined(); - }); -}); - -describe("withNullChecks", () => { - it("should return null or undefined if input is null or undefined", () => { - const fn = withNullChecks((input: number) => input + 1); - expect(fn(null)).toBeNull(); - expect(fn(undefined)).toBeUndefined(); - }); - - it("should apply the function if input is not null or undefined", () => { - const fn = withNullChecks((input: number) => input + 1); - expect(fn(1)).toBe(2); - }); -}); - -describe("isPassthroughElement", () => { - it("should return true for numbers, strings, booleans, null, and dates", () => { - expect(isPassthroughElement(1)).toBe(true); - expect(isPassthroughElement("string")).toBe(true); - expect(isPassthroughElement(true)).toBe(true); - expect(isPassthroughElement(new Date())).toBe(true); - }); - - it("should return false for other types", () => { - expect(isPassthroughElement({})).toBe(false); - expect(isPassthroughElement([])).toBe(false); - expect(isPassthroughElement(() => {})).toBe(false); - expect(isPassthroughElement(null)).toBe(false); - }); -}); From ecc15312b5e8ed49eb620c20e09a39cb4e3bd627 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 25 Aug 2024 18:56:17 +0800 Subject: [PATCH 41/83] update to the latest main --- .../typespec-ts/src/modular/emitSamples.ts | 18 ++-- .../src/modular/external-dependencies.ts | 8 ++ .../get-credential-expression.ts | 18 ---- .../type-expressions/get-enum-expression.ts | 17 ---- .../type-expressions/get-model-expression.ts | 49 ----------- .../type-expressions/get-type-expression.ts | 87 ------------------- .../type-expressions/get-union-expression.ts | 17 ---- .../src/modular/type-expressions/utils.ts | 15 ---- 8 files changed, 20 insertions(+), 209 deletions(-) delete mode 100644 packages/typespec-ts/src/modular/type-expressions/get-credential-expression.ts delete mode 100644 packages/typespec-ts/src/modular/type-expressions/get-enum-expression.ts delete mode 100644 packages/typespec-ts/src/modular/type-expressions/get-model-expression.ts delete mode 100644 packages/typespec-ts/src/modular/type-expressions/get-type-expression.ts delete mode 100644 packages/typespec-ts/src/modular/type-expressions/get-union-expression.ts delete mode 100644 packages/typespec-ts/src/modular/type-expressions/utils.ts diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 0e3f33591b..83934bf1f2 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -8,6 +8,7 @@ import { resolveReference } from "../framework/reference.js"; import { SdkContext } from "../utils/interfaces.js"; import { SdkClientType, + SdkInitializationType, SdkServiceMethod, SdkServiceOperation, SdkType, @@ -35,12 +36,7 @@ function emitClassicalClientSamples( ) { // build client-level parameters const clientName = client.name; - const credentialParameter = client.initialization.properties.find( - (p) => p.kind === "credential" - )?.type; - const credentialParameterType = credentialParameter - ? getTypeExpression(credentialParameter!) - : undefined; + const credentialParameterType = getCredentialType(client.initialization); const generatedFiles: SourceFile[] = []; emitClassicalClientSamplesDfs( dpgContext, @@ -329,3 +325,13 @@ function escapeSpecialCharToSpace(str: string) { .replace(/\[/g, " ") .replace(/\]/g, " "); } + +// FIXME: This is a temporary solution to get the credential type +function getCredentialType( + initialization: SdkInitializationType +): string | undefined { + const credentialParameter = initialization.properties.find( + (p) => p.kind === "credential" + )?.type; + return credentialParameter ? "Credential" : undefined; +} diff --git a/packages/typespec-ts/src/modular/external-dependencies.ts b/packages/typespec-ts/src/modular/external-dependencies.ts index 356b64056a..4d57bfeee2 100644 --- a/packages/typespec-ts/src/modular/external-dependencies.ts +++ b/packages/typespec-ts/src/modular/external-dependencies.ts @@ -148,3 +148,11 @@ export const AzureCoreDependencies: CoreDependencies = { name: "stringToUint8Array" } }; + +export const AzureIdentityDependencies = { + DefaultAzureCredential: { + kind: "externalDependency", + module: "@azure/identity", + name: "DefaultAzureCredential" + } +}; diff --git a/packages/typespec-ts/src/modular/type-expressions/get-credential-expression.ts b/packages/typespec-ts/src/modular/type-expressions/get-credential-expression.ts deleted file mode 100644 index a8037dd831..0000000000 --- a/packages/typespec-ts/src/modular/type-expressions/get-credential-expression.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { SdkCredentialType } from "@azure-tools/typespec-client-generator-core"; -import { resolveReference } from "../../framework/reference.js"; -import { useDependencies } from "../../framework/hooks/useDependencies.js"; - -export function getCredentialExpression(type: SdkCredentialType): string { - const dependencies = useDependencies(); - switch (type.scheme.type) { - case "apiKey": - case "http": - return resolveReference(dependencies.KeyCredential); - case "oauth2": - case "openIdConnect": - return resolveReference(dependencies.TokenCredential); - default: - // TODO: Add diagnostics about unknown credential type - return "any"; - } -} diff --git a/packages/typespec-ts/src/modular/type-expressions/get-enum-expression.ts b/packages/typespec-ts/src/modular/type-expressions/get-enum-expression.ts deleted file mode 100644 index b1dc1402a9..0000000000 --- a/packages/typespec-ts/src/modular/type-expressions/get-enum-expression.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { SdkEnumType } from "@azure-tools/typespec-client-generator-core"; -import { resolveReference } from "../../framework/reference.js"; -import { getTypeExpression, EmitTypeOptions } from "./get-type-expression.js"; -import { shouldEmitInline } from "./utils.js"; - -export function getEnumExpression( - type: SdkEnumType, - options: EmitTypeOptions = {} -): string { - if (shouldEmitInline(type, options)) { - return `(${type.values - .map((v) => `${getTypeExpression(v, options)}`) - .join(" | ")})`; - } else { - return resolveReference(type); - } -} diff --git a/packages/typespec-ts/src/modular/type-expressions/get-model-expression.ts b/packages/typespec-ts/src/modular/type-expressions/get-model-expression.ts deleted file mode 100644 index daaeea634f..0000000000 --- a/packages/typespec-ts/src/modular/type-expressions/get-model-expression.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { SdkModelType } from "@azure-tools/typespec-client-generator-core"; -import { resolveReference } from "../../framework/reference.js"; -import { getTypeExpression, EmitTypeOptions } from "./get-type-expression.js"; -import { shouldEmitInline } from "./utils.js"; -import { refkey } from "../../framework/refkey.js"; -import { useContext } from "../../contextManager.js"; - -export interface ModelExpressionOptions extends EmitTypeOptions { - skipPolymorphicUnion?: boolean; -} - -export function getModelExpression( - type: SdkModelType, - options: ModelExpressionOptions = {} -): string { - const externalModel = getExternalModel(type); - if (externalModel) { - return resolveReference(externalModel); - } - - if (shouldEmitInline(type, options)) { - return `{ - ${type.properties - .map((p) => `"${p.name}": ${getTypeExpression(p.type, options)}`) - .join(",\n")} - }`; - } else { - if (!options.skipPolymorphicUnion && type.discriminatedSubtypes) { - return resolveReference(refkey(type, "polymorphicType")); - } else { - return resolveReference(type); - } - } -} - -const externalModels: Record = { - "Azure.Core.Foundations.Error": "ErrorModel" -}; - -export function getExternalModel(type: SdkModelType) { - const commonName = externalModels[type.crossLanguageDefinitionId]; - - if (!commonName) { - return undefined; - } - - const externalDependencies = useContext("dependencies"); - return externalDependencies[commonName]; -} diff --git a/packages/typespec-ts/src/modular/type-expressions/get-type-expression.ts b/packages/typespec-ts/src/modular/type-expressions/get-type-expression.ts deleted file mode 100644 index f565073a7e..0000000000 --- a/packages/typespec-ts/src/modular/type-expressions/get-type-expression.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { SdkType } from "@azure-tools/typespec-client-generator-core"; -import { getCredentialExpression } from "./get-credential-expression.js"; -import { getModelExpression } from "./get-model-expression.js"; -import { getEnumExpression } from "./get-enum-expression.js"; -import { getUnionExpression } from "./get-union-expression.js"; - -export interface EmitTypeOptions { - emitInline?: boolean; -} - -export function getTypeExpression( - type: SdkType, - options?: EmitTypeOptions -): string { - switch (type.kind) { - case "array": { - const valueType = getTypeExpression(type.valueType, options); - return `(${valueType})[]`; - } - case "enum": - return getEnumExpression(type, options); - case "any": - return "any"; - case "boolean": - return "boolean"; - case "decimal": - case "decimal128": - case "float": - case "float32": - case "float64": - case "integer": - case "int16": - case "int32": - case "int64": - case "int8": - case "uint16": - case "uint32": - case "uint64": - case "uint8": - case "numeric": - case "safeint": - return "number"; - case "endpoint": - case "plainDate": - case "plainTime": - case "string": - case "url": - // TODO - what typespec produces uri, password? - return "string"; - case "bytes": - return "Uint8Array"; - case "constant": - return String(type.value); - case "duration": - return getTypeExpression(type.wireType, options); - case "credential": - // Credential comes from @useAuth decorator - return getCredentialExpression(type); - case "dict": { - const valueType = getTypeExpression(type.valueType, options); - return `Record`; - } - case "enumvalue": - return String(type.value); - case "model": - return getModelExpression(type, options); - case "nullable": { - const nonNullableType = getTypeExpression(type.type, options); - return `(${nonNullableType}) | null`; - } - case "offsetDateTime": - return "string"; - case "tuple": { - const types = type.values - .map((v) => getTypeExpression(v, options)) - .join(", "); - return `[${types}]`; - } - case "union": - return getUnionExpression(type, options); - case "utcDateTime": - return "Date"; - - default: - return "any"; - } -} diff --git a/packages/typespec-ts/src/modular/type-expressions/get-union-expression.ts b/packages/typespec-ts/src/modular/type-expressions/get-union-expression.ts deleted file mode 100644 index e60d824d46..0000000000 --- a/packages/typespec-ts/src/modular/type-expressions/get-union-expression.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { SdkUnionType } from "@azure-tools/typespec-client-generator-core"; -import { resolveReference } from "../../framework/reference.js"; -import { getTypeExpression, EmitTypeOptions } from "./get-type-expression.js"; -import { shouldEmitInline } from "./utils.js"; - -export function getUnionExpression( - type: SdkUnionType, - options: EmitTypeOptions = {} -): string { - if (shouldEmitInline(type, options)) { - return `(${type.values - .map((v) => `${getTypeExpression(v, options)}`) - .join(" | ")})`; - } else { - return resolveReference(type); - } -} diff --git a/packages/typespec-ts/src/modular/type-expressions/utils.ts b/packages/typespec-ts/src/modular/type-expressions/utils.ts deleted file mode 100644 index 77d32033a5..0000000000 --- a/packages/typespec-ts/src/modular/type-expressions/utils.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { EmitTypeOptions } from "./get-type-expression.js"; - -export function shouldEmitInline( - type: { isGeneratedName?: boolean }, - options: EmitTypeOptions = {} -): boolean { - const emitInline = options.emitInline; - - if (emitInline === undefined && "isGeneratedName" in type) { - // If not explicitly set, default to emitting inline for anonymous types - return Boolean(type.isGeneratedName); - } - - return Boolean(emitInline); -} From 878e1f9258f2838c460b2579f33399ede47f29d7 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 25 Aug 2024 21:55:58 +0800 Subject: [PATCH 42/83] Update the samples with cases for operation level parameters --- packages/typespec-ts/src/lib.ts | 6 +++ .../typespec-ts/src/modular/emitSamples.ts | 52 +++++++++++++++++-- .../test/modularUnit/scenarios.spec.ts | 28 ++++++---- .../parameters/paramaterSpreadCheck.md | 23 +++++--- .../samples/parameters/parameterTypesCheck.md | 4 +- packages/typespec-ts/test/util/emitUtil.ts | 20 ++++++- 6 files changed, 109 insertions(+), 24 deletions(-) diff --git a/packages/typespec-ts/src/lib.ts b/packages/typespec-ts/src/lib.ts index 8ab6b24f59..09f971bdc6 100644 --- a/packages/typespec-ts/src/lib.ts +++ b/packages/typespec-ts/src/lib.ts @@ -244,6 +244,12 @@ const libDef = { messages: { default: paramMessage`Authentication type ${"credentialType"} is not supported.` } + }, + "required-sample-parameter": { + severity: "warning", + messages: { + default: paramMessage`The parameter ${"paramName"} in ${"exampleName"} is required but no value provided.` + } } }, emitter: { diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 83934bf1f2..2c1bacde9e 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -8,6 +8,7 @@ import { resolveReference } from "../framework/reference.js"; import { SdkContext } from "../utils/interfaces.js"; import { SdkClientType, + SdkHttpParameterExample, SdkInitializationType, SdkServiceMethod, SdkServiceOperation, @@ -18,7 +19,8 @@ import { NameType, normalizeName } from "@azure-tools/rlc-common"; import { useContext } from "../contextManager.js"; import { join } from "path"; import { AzureIdentityDependencies } from "../modular/external-dependencies.js"; -import { getTypeExpression } from "./type-expressions/get-type-expression.js"; +import { reportDiagnostic } from "../index.js"; +import { NoTarget } from "@typespec/compiler"; export function emitSamples(dpgContext: SdkContext): SourceFile[] { const generatedFiles: SourceFile[] = []; @@ -141,6 +143,10 @@ function emitMethodSamples( returnType: "void", body: exampleFunctionBody }; + const parameterMap: Record = {}; + example.parameters.forEach( + (param) => (parameterMap[param.parameter.name] = param) + ); // prepare client-level parameters if (options.credentialType) { // Only support DefaultAzureCredential for now @@ -184,12 +190,48 @@ function emitMethodSamples( ); // prepare operation-level parameters - for (const param of example.parameters) { - if (param.parameter.onClient === true) { + // required path, header, query parameters + for (const param of method.operation.parameters) { + if (param.optional === true || param.clientDefaultValue !== undefined) { + continue; + } + const example = parameterMap[param.serializedName]; + if (!example || !example.value) { + // report diagnostic if required parameter is missing + reportDiagnostic(dpgContext.program, { + code: "required-sample-parameter", + format: { + exampleName: exampleName, + paramName: param.serializedName + }, + target: NoTarget + }); + continue; + } + if (example.parameter.onClient === true) { continue; } - const paramValue = `${getParameterValue(param.value)}`; - methodParams.push(paramValue); + methodParams.push(`${getParameterValue(example.value)}`); + } + // required body parameters + const bodySerializedName = method.operation.bodyParam?.name; + if (bodySerializedName && parameterMap[bodySerializedName]) { + const example = parameterMap[bodySerializedName]; + if (example && example.value) { + methodParams.push(`${getParameterValue(example.value)}`); + } + } + // optional parameters + const optionalParams = method.operation.parameters + .filter( + (param) => param.optional === true && parameterMap[param.serializedName] + ) + .map((param) => parameterMap[param.serializedName]!) + .map( + (param) => `${param.parameter.name}: ${getParameterValue(param.value)}` + ); + if (optionalParams.length > 0) { + methodParams.push(`{${optionalParams.join(", ")}}`); } const prefix = options.operationGroupPrefix ? `${options.operationGroupPrefix}.` diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index 9fabb45bdb..68661aa402 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -3,19 +3,21 @@ import { readdirSync, readFileSync, statSync, writeFileSync } from "fs"; import path from "path"; import { emitModularModelsFromTypeSpec, - emitModularOperationsFromTypeSpec + emitModularOperationsFromTypeSpec, + emitSamplesFromTypeSpec } from "../util/emitUtil.js"; import { assertEqualContent } from "../util/testUtil.js"; import { format } from "prettier"; import { prettierTypeScriptOptions } from "../../src/lib.js"; -const SCENARIOS_LOCATION = "./test/modularUnit/scenarios"; +const SCENARIOS_LOCATION = "./test/modularUnit/scenarios/samples"; const SCENARIOS_UPDATE = process.env["SCENARIOS_UPDATE"] === "true"; type EmitterFunction = ( tsp: string, - namedArgs: Record + namedStringArgs: Record, + namedUnknownArgs?: Record ) => Promise; /** @@ -97,18 +99,19 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { // Snapshot of a specific example generation // Throws if more than one example generated - "(ts|typescript) samples": async (tsp, {}, example) => { - if (!example) { + "(ts|typescript) samples": async (tsp, {}, unknownArgs) => { + if (!unknownArgs || !unknownArgs["examples"]) { throw new Error("No example provided for samples"); } - const result = await emitSamplesFromTypeSpec(tsp, example); + const examples = unknownArgs["examples"] as Record; + const result = await emitSamplesFromTypeSpec(tsp, examples); assert.equal(result?.length, 1, "Expected exactly 1 source file"); console.log("Result: ", result![0]!.getFullText()); return result![0]!.getFullText(); } }; -describe("Scenarios", function () { +describe.only("Scenarios", function () { describeScenarios(SCENARIOS_LOCATION); }); @@ -134,8 +137,15 @@ function describeScenarioFile(scenarioFile: string): void { const tspBlocks = codeBlocks.filter( (x) => x.heading.startsWith("tsp") || x.heading.startsWith("typespec") ); + const jsonBlocks = codeBlocks.filter((x) => + x.heading.startsWith("json") + ); + const examples: Record = {}; + for (const block of jsonBlocks) { + examples[block.heading] = block.content; + } const outputCodeBlocks = codeBlocks.filter( - (x) => !tspBlocks.includes(x) + (x) => !tspBlocks.includes(x) && !jsonBlocks.includes(x) ); const inputTsp = tspBlocks.map((x) => x.content).join("\n"); @@ -156,7 +166,7 @@ function describeScenarioFile(scenarioFile: string): void { if (match !== null) { return { block: x, - fn: () => fn(inputTsp, match.groups!) + fn: () => fn(inputTsp, match.groups! ?? {}, { examples }) }; } } diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md index 34e190fec1..4ad9004a08 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md @@ -1,9 +1,11 @@ # Should generate samples for spread cases -The return type for an empty anonymous model `{}` should be Record +Sample generation should handle operation-level parameter order successfully. ## TypeSpec +This is tsp definition. + ```tsp @doc("This is a simple model.") model BodyParameter { @@ -15,9 +17,12 @@ model CompositeRequest { name: string; @header - testHeader: string; + header: string; - @header + @query + requiredQuery: string; + + @query optionalQuery?: string; @body @@ -30,14 +35,17 @@ op read(...CompositeRequest): void; ## Example +Raw json files. + ```json { "title": "read", "operationId": "read", "parameters": { - "name": "foo", + "name": "required path param", "optionalQuery": "optional query", - "testHeader": "xxx-header", + "header": "required header", + "requiredQuery": "required query", "body": { "name": "body name" } @@ -62,8 +70,9 @@ Generate samples for spread cases: async function read() { const client = new TestingClient(); const result = await client.read( - "foo", - "xxx-header", + "required path param", + "required header", + "required query", { name: "body name" }, { optionalQuery: "optional query" diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index 2415e1a983..07a5143a81 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -1,6 +1,6 @@ # Should generate samples for different types -The return type for an empty anonymous model `{}` should be Record +Sample generation should handle different types in body. ## TypeSpec @@ -76,7 +76,7 @@ async function read() { arrValue: ["x", "y"], unionValue: test, nullValue: null, - additionalProp: "additional prop", + additionalProp: "additional prop" }); console.log(result); } diff --git a/packages/typespec-ts/test/util/emitUtil.ts b/packages/typespec-ts/test/util/emitUtil.ts index b0fabfa268..060e36b44e 100644 --- a/packages/typespec-ts/test/util/emitUtil.ts +++ b/packages/typespec-ts/test/util/emitUtil.ts @@ -324,7 +324,7 @@ export async function emitModularModelsFromTypeSpec( RLCModel >(); const project = useContext("outputProject"); - const binder = useBinder(); + const binder = useBinder(); const clients = getRLCClients(dpgContext); let modelFile = undefined; if (clients && clients[0]) { @@ -579,6 +579,24 @@ export async function emitSamplesFromTypeSpec( examples ); const dpgContext = await createDpgContextTestHelper(context.program); + const project = new Project(); + const serviceNameToRlcModelsMap: Map = new Map< + string, + RLCModel + >(); + const clients = getRLCClients(dpgContext); + const rlcModels = await transformRLCModel(clients[0]!, dpgContext); + serviceNameToRlcModelsMap.set(clients[0]!.service.name, rlcModels); + const modularCodeModel = await emitCodeModel( + dpgContext, + serviceNameToRlcModelsMap, + "", + project, + { + casing: "camel" + } + ); + modularCodeModel; const files = await emitSamples(dpgContext); useBinder().resolveAllReferences(); return files; From 343bf890252c98815c26d7086aeabf529400cce3 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Sun, 25 Aug 2024 23:35:27 +0800 Subject: [PATCH 43/83] Update the hierarchyClientOperations --- .../typespec-ts/src/modular/emitSamples.ts | 16 +- .../test/modularUnit/scenarios.spec.ts | 16 +- .../client/hierarchyClientOperations.md | 144 ++++++++++++++++++ packages/typespec-ts/test/util/testUtil.ts | 6 +- 4 files changed, 166 insertions(+), 16 deletions(-) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierarchyClientOperations.md diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 2c1bacde9e..80a4c53380 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -44,9 +44,9 @@ function emitClassicalClientSamples( dpgContext, client, clientName, + generatedFiles, credentialParameterType, - operationGroupPrefix ?? "", - generatedFiles + operationGroupPrefix ?? "" ); return generatedFiles; } @@ -55,9 +55,9 @@ function emitClassicalClientSamplesDfs( dpgContext: SdkContext, client: SdkClientType, clientName: string, + generatedFiles: SourceFile[], credentialParameterType?: string, - operationGroupPrefix?: string, - generatedFiles: SourceFile[] = [] + operationGroupPrefix?: string ) { for (const operationOrGroup of client.methods) { if (operationOrGroup.kind === "clientaccessor") { @@ -75,6 +75,7 @@ function emitClassicalClientSamplesDfs( dpgContext, operationOrGroup.response, clientName, + generatedFiles, credentialParameterType, prefix ); @@ -265,13 +266,10 @@ function emitMethodSamples( ] }; addDeclaration(sourceFile, functionDeclaration, exampleFunctionType); - exampleFunctions.push(exampleFunctionType); + exampleFunctions.push(exampleFunctionType.name); } // Add statements referencing the tracked declarations - const functions = exampleFunctions - .map((f) => resolveReference(f)) - .map((f) => `${f}();`) - .join("\n"); + const functions = exampleFunctions.map((f) => `${f}();`).join("\n"); sourceFile.addStatements(` async function main() { ${functions} diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index 68661aa402..61e1f87df5 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -10,7 +10,7 @@ import { assertEqualContent } from "../util/testUtil.js"; import { format } from "prettier"; import { prettierTypeScriptOptions } from "../../src/lib.js"; -const SCENARIOS_LOCATION = "./test/modularUnit/scenarios/samples"; +const SCENARIOS_LOCATION = "./test/modularUnit/scenarios/samples/client"; const SCENARIOS_UPDATE = process.env["SCENARIOS_UPDATE"] === "true"; @@ -104,10 +104,12 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { throw new Error("No example provided for samples"); } const examples = unknownArgs["examples"] as Record; + const counts = Object.keys(examples).length; const result = await emitSamplesFromTypeSpec(tsp, examples); - assert.equal(result?.length, 1, "Expected exactly 1 source file"); - console.log("Result: ", result![0]!.getFullText()); - return result![0]!.getFullText(); + assert.equal(result?.length, counts, "Expected exactly 1 source file"); + const text = result.map((x) => x.getFullText()).join("\n"); + console.log("Result: ", text); + return text; } }; @@ -142,7 +144,7 @@ function describeScenarioFile(scenarioFile: string): void { ); const examples: Record = {}; for (const block of jsonBlocks) { - examples[block.heading] = block.content; + examples[block.heading.trim().replace(/ /g, "_")] = block.content; } const outputCodeBlocks = codeBlocks.filter( (x) => !tspBlocks.includes(x) && !jsonBlocks.includes(x) @@ -162,7 +164,9 @@ function describeScenarioFile(scenarioFile: string): void { "^" + template.replace(/\{(\w+)\}/g, "(?<$1>\\w+)") + "$" ); - const match = x.heading.match(templateRegex); + const match = x.heading + .replace(/(\r\n|\n|\r)/gm, "") + .match(templateRegex); if (match !== null) { return { block: x, diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierarchyClientOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierarchyClientOperations.md new file mode 100644 index 0000000000..045b2fad8a --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierarchyClientOperations.md @@ -0,0 +1,144 @@ +# Should generate samples for hierarchy client + +Sample generation should handle hierarchy client successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +model A { + prop1: string; +} + +@route("b") +namespace B { + @route("e") + namespace E { + model A { + prop3: string; + } + interface C { + op opBEC(@body body: A): void + } + } + op opB(@body body: A): void; +} + +@route("/d") +interface D { + @doc("show example opD") + op opD(@body body: A): void; +} +@doc("show example opTopLevel") +op opTopLevel(@body body: A): void; +``` + +## Example + +Raw json files. + +```json for opTopLevel +{ + "title": "opTopLevel", + "operationId": "opTopLevel", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for opD +{ + "title": "opD", + "operationId": "D_opD", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for opBEC +{ + "title": "opBEC", + "operationId": "C_opBEC", + "parameters": { + "body": { + "prop3": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for spread cases: + +```ts samples +/** + * This sample demonstrates how to show example opTopLevel + * + * @summary show example opTopLevel + * x-ms-original-file: json_for_opTopLevel.json + */ +async function opTopLevel() { + const client = new TestingClient(); + const result = await client.opTopLevel({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opTopLevel(); +} + +main().catch(console.error); + +/** + * This sample demonstrates how to undefined + * + * @summary undefined + * x-ms-original-file: json_for_opBEC.json + */ +async function opBEC() { + const client = new TestingClient(); + const result = await client.b.e.c.opBEC({ prop3: "body name" }); + console.log(result); +} + +async function main() { + opBEC(); +} + +main().catch(console.error); + +/** + * This sample demonstrates how to show example opD + * + * @summary show example opD + * x-ms-original-file: json_for_opD.json + */ +async function opD() { + const client = new TestingClient(); + const result = await client.d.opD({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opD(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/util/testUtil.ts b/packages/typespec-ts/test/util/testUtil.ts index 27d85ea034..51c0b5afa8 100644 --- a/packages/typespec-ts/test/util/testUtil.ts +++ b/packages/typespec-ts/test/util/testUtil.ts @@ -127,7 +127,11 @@ export async function createDpgContextTestHelper( const sdkContext = { ...context, program, - rlcOptions: { flavor: "azure", enableModelNamespace }, + rlcOptions: { + flavor: "azure", + enableModelNamespace, + hierarchyClient: true + }, generationPathDetail: {}, emitterName: "@azure-tools/typespec-ts", originalProgram: program From cdc2bba2168678a13246ac636e5e5f404cd849ad Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 26 Aug 2024 08:29:00 +0800 Subject: [PATCH 44/83] Update the hierachyClientOperations cases --- .../test/modularUnit/scenarios.spec.ts | 38 ++++- .../samples/client/disableHierarchyClient.md | 150 ++++++++++++++++++ ...Operations.md => enableHierarchyClient.md} | 6 + .../client/hierachyClientOperations.md | 0 packages/typespec-ts/test/util/emitUtil.ts | 13 +- packages/typespec-ts/test/util/testUtil.ts | 9 +- 6 files changed, 206 insertions(+), 10 deletions(-) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md rename packages/typespec-ts/test/modularUnit/scenarios/samples/client/{hierarchyClientOperations.md => enableHierarchyClient.md} (97%) delete mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierachyClientOperations.md diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index 61e1f87df5..f65b237c7c 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -103,9 +103,10 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { if (!unknownArgs || !unknownArgs["examples"]) { throw new Error("No example provided for samples"); } + const configs = unknownArgs["configs"] as Record; const examples = unknownArgs["examples"] as Record; const counts = Object.keys(examples).length; - const result = await emitSamplesFromTypeSpec(tsp, examples); + const result = await emitSamplesFromTypeSpec(tsp, examples, configs); assert.equal(result?.length, counts, "Expected exactly 1 source file"); const text = result.map((x) => x.getFullText()).join("\n"); console.log("Result: ", text); @@ -146,8 +147,15 @@ function describeScenarioFile(scenarioFile: string): void { for (const block of jsonBlocks) { examples[block.heading.trim().replace(/ /g, "_")] = block.content; } + const yamlConfigs = codeBlocks.filter((x) => + x.heading.startsWith("yaml") + ); + const configs = parseSimpleYaml(yamlConfigs.map((x) => x.content)); const outputCodeBlocks = codeBlocks.filter( - (x) => !tspBlocks.includes(x) && !jsonBlocks.includes(x) + (x) => + !tspBlocks.includes(x) && + !jsonBlocks.includes(x) && + !yamlConfigs.includes(x) ); const inputTsp = tspBlocks.map((x) => x.content).join("\n"); @@ -170,7 +178,8 @@ function describeScenarioFile(scenarioFile: string): void { if (match !== null) { return { block: x, - fn: () => fn(inputTsp, match.groups! ?? {}, { examples }) + fn: () => + fn(inputTsp, match.groups! ?? {}, { examples, configs }) }; } } @@ -284,3 +293,26 @@ function writeScenarios(file: ScenarioFile): string { return output; } + +function parseSimpleYaml(yamlConfigs: string[]): Record { + // This is a simple yaml parser that assumes that there are no nested objects. + // It splits the yaml into lines, then splits each line by the colon and + // creates a record from the key-value pairs. + // This is a very simple parser and will not work for all yaml files. + let record: Record = {}; + for (const yaml of yamlConfigs) { + const each = yaml + .split("\n") + .map((x) => x.split(":")) + .filter((x) => x.length === 2) + .reduce( + (acc, [key, value]) => { + acc[key!] = JSON.parse(value!); + return acc; + }, + {} as Record + ); + record = { ...record, ...each }; + } + return record; +} diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md new file mode 100644 index 0000000000..6aad547537 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md @@ -0,0 +1,150 @@ +# Should generate samples for hierarchy client + +Sample generation should handle hierarchy client successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +model A { + prop1: string; +} + +@route("b") +namespace B { + @route("e") + namespace E { + model A { + prop3: string; + } + interface C { + op opBEC(@body body: A): void + } + } + op opB(@body body: A): void; +} + +@route("/d") +interface D { + @doc("show example opD") + op opD(@body body: A): void; +} +@doc("show example opTopLevel") +op opTopLevel(@body body: A): void; +``` + +This is the tspconfig.yaml. + +```yaml +hierarchyClient: false +``` + +## Example + +Raw json files. + +```json for opTopLevel +{ + "title": "opTopLevel", + "operationId": "opTopLevel", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for opD +{ + "title": "opD", + "operationId": "D_opD", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for opBEC +{ + "title": "opBEC", + "operationId": "C_opBEC", + "parameters": { + "body": { + "prop3": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for spread cases: + +```ts samples +/** + * This sample demonstrates how to show example opTopLevel + * + * @summary show example opTopLevel + * x-ms-original-file: json_for_opTopLevel.json + */ +async function opTopLevel() { + const client = new TestingClient(); + const result = await client.opTopLevel({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opTopLevel(); +} + +main().catch(console.error); + +/** + * This sample demonstrates how to undefined + * + * @summary undefined + * x-ms-original-file: json_for_opBEC.json + */ +async function opBEC() { + const client = new TestingClient(); + const result = await client.c.opBEC({ prop3: "body name" }); + console.log(result); +} + +async function main() { + opBEC(); +} + +main().catch(console.error); + +/** + * This sample demonstrates how to show example opD + * + * @summary show example opD + * x-ms-original-file: json_for_opD.json + */ +async function opD() { + const client = new TestingClient(); + const result = await client.d.opD({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opD(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierarchyClientOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md similarity index 97% rename from packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierarchyClientOperations.md rename to packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md index 045b2fad8a..118c66a8b3 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierarchyClientOperations.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md @@ -34,6 +34,12 @@ interface D { op opTopLevel(@body body: A): void; ``` +This is the tspconfig.yaml. + +```yaml +hierarchyClient: true +``` + ## Example Raw json files. diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierachyClientOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/hierachyClientOperations.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/typespec-ts/test/util/emitUtil.ts b/packages/typespec-ts/test/util/emitUtil.ts index 060e36b44e..bfa0feaa9d 100644 --- a/packages/typespec-ts/test/util/emitUtil.ts +++ b/packages/typespec-ts/test/util/emitUtil.ts @@ -566,7 +566,8 @@ export async function emitModularClientFromTypeSpec( export async function emitSamplesFromTypeSpec( tspContent: string, - examples: Record + examples: Record, + configs: Record = {} ) { const context = await rlcEmitterFor( tspContent, @@ -578,7 +579,15 @@ export async function emitSamplesFromTypeSpec( false, examples ); - const dpgContext = await createDpgContextTestHelper(context.program); + configs = { + "examples-directory": `./examples`, + ...configs + }; + const dpgContext = await createDpgContextTestHelper( + context.program, + false, + configs + ); const project = new Project(); const serviceNameToRlcModelsMap: Map = new Map< string, diff --git a/packages/typespec-ts/test/util/testUtil.ts b/packages/typespec-ts/test/util/testUtil.ts index 51c0b5afa8..15e64a87d4 100644 --- a/packages/typespec-ts/test/util/testUtil.ts +++ b/packages/typespec-ts/test/util/testUtil.ts @@ -109,7 +109,8 @@ ${code} export async function createDpgContextTestHelper( program: Program, - enableModelNamespace = false + enableModelNamespace = false, + configs: Record = {} ): Promise { const outputProject = new Project({ useInMemoryFileSystem: true }); provideContext("rlcMetaTree", new Map()); @@ -119,9 +120,7 @@ export async function createDpgContextTestHelper( const context = await createContextWithDefaultOptions({ program, - options: { - "examples-directory": `./examples` - } as any + options: configs as any } as EmitContext); const sdkContext = { @@ -130,7 +129,7 @@ export async function createDpgContextTestHelper( rlcOptions: { flavor: "azure", enableModelNamespace, - hierarchyClient: true + ...configs }, generationPathDetail: {}, emitterName: "@azure-tools/typespec-ts", From 0e83e7c12e8cb9b4a5eb5f0f78ba2f15ee8425ac Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 26 Aug 2024 11:06:08 +0800 Subject: [PATCH 45/83] update the samples --- .../typespec-ts/src/modular/emitSamples.ts | 17 +- .../test/modularUnit/scenarios.spec.ts | 2 +- .../samples/client/disableHierarchyClient.md | 14 +- .../samples/client/enableHierarchyClient.md | 14 +- .../samples/operations/armCurdOperations.md | 245 ++++++++++++++++++ .../samples/operations/dpgCurdOperations.md | 204 +++++++++++++++ .../parameters/paramaterSpreadCheck.md | 16 +- .../samples/parameters/parameterTypesCheck.md | 6 +- packages/typespec-ts/test/util/emitUtil.ts | 47 +--- packages/typespec-ts/test/util/testUtil.ts | 65 ++++- 10 files changed, 569 insertions(+), 61 deletions(-) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 80a4c53380..ed873b1d46 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -3,7 +3,6 @@ import { FunctionDeclarationStructure, SourceFile } from "ts-morph"; -import { addDeclaration } from "../framework/declaration.js"; import { resolveReference } from "../framework/reference.js"; import { SdkContext } from "../utils/interfaces.js"; import { @@ -146,7 +145,9 @@ function emitMethodSamples( }; const parameterMap: Record = {}; example.parameters.forEach( - (param) => (parameterMap[param.parameter.name] = param) + (param) => + (parameterMap[(param.parameter as any).serializedName ?? param.parameter.name] = + param) ); // prepare client-level parameters if (options.credentialType) { @@ -161,8 +162,8 @@ function emitMethodSamples( let subscriptionIdValue = `"00000000-0000-0000-0000-00000000000"`; for (const param of example.parameters) { if ( - param.parameter.name === "subscriptionId" && - dpgContext.rlcOptions?.azureArm + param.parameter.name.toLowerCase() === "subscriptionid" && + isArm(dpgContext) ) { subscriptionIdValue = getParameterValue(param.value); continue; @@ -180,7 +181,7 @@ function emitMethodSamples( clientParams.push(paramName); } // always add subscriptionId for ARM clients - if (dpgContext.rlcOptions?.azureArm) { + if (isArm(dpgContext)) { exampleFunctionBody.push( `const subscriptionId = ${subscriptionIdValue};` ); @@ -265,7 +266,7 @@ function emitMethodSamples( `This sample demonstrates how to ${normalizedDescription}\n\n@summary ${normalizedDescription}\nx-ms-original-file: ${example.filePath}` ] }; - addDeclaration(sourceFile, functionDeclaration, exampleFunctionType); + sourceFile.addFunction(functionDeclaration); exampleFunctions.push(exampleFunctionType.name); } // Add statements referencing the tracked declarations @@ -375,3 +376,7 @@ function getCredentialType( )?.type; return credentialParameter ? "Credential" : undefined; } + +function isArm(dpgContext: SdkContext): boolean { + return dpgContext.rlcOptions?.azureArm ?? dpgContext.arm ?? false; +} diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index f65b237c7c..9b7294857a 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -10,7 +10,7 @@ import { assertEqualContent } from "../util/testUtil.js"; import { format } from "prettier"; import { prettierTypeScriptOptions } from "../../src/lib.js"; -const SCENARIOS_LOCATION = "./test/modularUnit/scenarios/samples/client"; +const SCENARIOS_LOCATION = "./test/modularUnit/scenarios/samples"; const SCENARIOS_UPDATE = process.env["SCENARIOS_UPDATE"] === "true"; diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md index 6aad547537..b7cce84e73 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md @@ -91,14 +91,16 @@ Raw json files. ## Samples -Generate samples for spread cases: +Generate samples for non-hierarchy cases: ```ts samples +import { TestingClient } from "@azure/internal-test"; + /** * This sample demonstrates how to show example opTopLevel * * @summary show example opTopLevel - * x-ms-original-file: json_for_opTopLevel.json + * x-ms-original-file: 2021-10-01-preview/json_for_opTopLevel.json */ async function opTopLevel() { const client = new TestingClient(); @@ -112,11 +114,13 @@ async function main() { main().catch(console.error); +import { TestingClient } from "@azure/internal-test"; + /** * This sample demonstrates how to undefined * * @summary undefined - * x-ms-original-file: json_for_opBEC.json + * x-ms-original-file: 2021-10-01-preview/json_for_opBEC.json */ async function opBEC() { const client = new TestingClient(); @@ -130,11 +134,13 @@ async function main() { main().catch(console.error); +import { TestingClient } from "@azure/internal-test"; + /** * This sample demonstrates how to show example opD * * @summary show example opD - * x-ms-original-file: json_for_opD.json + * x-ms-original-file: 2021-10-01-preview/json_for_opD.json */ async function opD() { const client = new TestingClient(); diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md index 118c66a8b3..1c08e03a68 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md @@ -91,14 +91,16 @@ Raw json files. ## Samples -Generate samples for spread cases: +Generate samples for hierarchy cases: ```ts samples +import { TestingClient } from "@azure/internal-test"; + /** * This sample demonstrates how to show example opTopLevel * * @summary show example opTopLevel - * x-ms-original-file: json_for_opTopLevel.json + * x-ms-original-file: 2021-10-01-preview/json_for_opTopLevel.json */ async function opTopLevel() { const client = new TestingClient(); @@ -112,11 +114,13 @@ async function main() { main().catch(console.error); +import { TestingClient } from "@azure/internal-test"; + /** * This sample demonstrates how to undefined * * @summary undefined - * x-ms-original-file: json_for_opBEC.json + * x-ms-original-file: 2021-10-01-preview/json_for_opBEC.json */ async function opBEC() { const client = new TestingClient(); @@ -130,11 +134,13 @@ async function main() { main().catch(console.error); +import { TestingClient } from "@azure/internal-test"; + /** * This sample demonstrates how to show example opD * * @summary show example opD - * x-ms-original-file: json_for_opD.json + * x-ms-original-file: 2021-10-01-preview/json_for_opD.json */ async function opD() { const client = new TestingClient(); diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md index e69de29bb2..1c57934e2a 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md @@ -0,0 +1,245 @@ +# Should generate samples for ARM operations + +Sample generation should arm template and operations successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.ResourceManager; + +/** Microsoft.Contoso Resource Provider management API. */ +@armProviderNamespace +@service({ + title: "Microsoft.Contoso management service", +}) +@versioned(Microsoft.Contoso.Versions) +namespace Microsoft.Contoso; + +/** The available API versions. */ +enum Versions { + /** 2021-10-01-preview version */ + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) + v2021_10_01_preview: "2021-10-01-preview", +} + +interface Operations extends Azure.ResourceManager.Operations {} + +/** Employee resource */ +model Employee is TrackedResource { + ...ResourceNameParameter; +} + +/** Employee properties */ +model EmployeeProperties { + /** Age of employee */ + age?: int32; + + /** City of employee */ + city?: string; + + /** Profile of employee */ + @encode("base64url") + profile?: bytes; + + /** The status of the last operation. */ + @visibility("read") + provisioningState?: ProvisioningState; +} + +/** The resource provisioning state. */ +@lroStatus +union ProvisioningState { + ResourceProvisioningState, + + /** The resource is being provisioned */ + Provisioning: "Provisioning", + + /** The resource is updating */ + Updating: "Updating", + + /** The resource is being deleted */ + Deleting: "Deleting", + + /** The resource create request has been accepted */ + Accepted: "Accepted", + + string, +} + +@armResourceOperations +interface Employees { + get is ArmResourceRead; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + delete is ArmResourceDeleteWithoutOkAsync; +} +``` + +## Example + +Raw json files. + +```json for Operations_List +{ + "title": "Operations_List", + "operationId": "Operations_List", + "parameters": { + "api-version": "2021-10-01-preview" + }, + "responses": { + "200": { + "body": {} + } + } +} +``` + +```json for Employees_CreateOrUpdate +{ + "title": "Employees_CreateOrUpdate", + "operationId": "Employees_CreateOrUpdate", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgopenapi", + "employeeName": "9KF-f-8b", + "resource": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms" + }, + "tags": { + "key2913": "urperxmkkhhkp" + }, + "location": "itajgxyqozseoygnl" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for Employees_Delete +{ + "title": "Employees_Delete", + "operationId": "Employees_Delete", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgopenapi", + "employeeName": "5vX--BxSu3ux48rI4O9OQ569" + }, + "responses": { + "202": {} + } +} +``` + +## Samples + +Generate samples for arm cases: + +```ts samples +import { ContosoClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list the operations for the provider + * + * @summary list the operations for the provider + * x-ms-original-file: 2021-10-01-preview/json_for_Operations_List.json + */ +async function operationsList() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new ContosoClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + operationsList(); +} + +main().catch(console.error); + +import { ContosoClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a Employee + * + * @summary create a Employee + * x-ms-original-file: 2021-10-01-preview/json_for_Employees_CreateOrUpdate.json + */ +async function employeesCreateOrUpdate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + const client = new ContosoClient(credential, subscriptionId); + const result = await client.employees.createOrUpdate( + "rgopenapi", + "9KF-f-8b", + { + properties: { + age: 30, + city: "gydhnntudughbmxlkyzrskcdkotrxn", + profile: "ms", + }, + tags: { key2913: "urperxmkkhhkp" }, + location: "itajgxyqozseoygnl", + }, + ); + console.log(result); +} + +async function main() { + employeesCreateOrUpdate(); +} + +main().catch(console.error); + +import { ContosoClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a Employee + * + * @summary delete a Employee + * x-ms-original-file: 2021-10-01-preview/json_for_Employees_Delete.json + */ +async function employeesDelete() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + const client = new ContosoClient(credential, subscriptionId); + const result = await client.employees.delete( + "rgopenapi", + "5vX--BxSu3ux48rI4O9OQ569", + ); + console.log(result); +} + +async function main() { + employeesDelete(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md new file mode 100644 index 0000000000..b1e6fc0729 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md @@ -0,0 +1,204 @@ +# Should generate samples for data-plane operations + +Sample generation should dpg template and operations successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.Core.Traits; + +@useAuth(AadOauth2Auth<["https://contoso.azure.com/.default"]>) +@service({ + title: "Contoso Widget Manager", +}) +@versioned(Contoso.WidgetManager.Versions) +namespace Azure.Contoso.WidgetManager; + +@doc("Versions info.") +enum Versions { + @doc("The 2021-10-01-preview version.") + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2021_10_01_preview: "2021-10-01-preview", +} + +@doc("A widget.") +@resource("widgets") +model WidgetSuite { + @key("widgetName") + @doc("The widget name.") + @visibility("read") + name: string; + + @doc("The ID of the widget's manufacturer.") + manufacturerId: string; + +} + +interface Widgets { + @doc("Fetch a Widget by name.") + getWidget is ResourceRead; + + @doc("Gets status of a Widget operation.") + getWidgetOperationStatus is GetResourceOperationStatus; + + @doc("Creates or updates a Widget asynchronously.") + @pollingOperation(Widgets.getWidgetOperationStatus) + createOrUpdateWidget is StandardResourceOperations.LongRunningResourceCreateOrUpdate; + + @doc("Delete a Widget asynchronously.") + @pollingOperation(Widgets.getWidgetOperationStatus) + deleteWidget is LongRunningResourceDelete; + + @doc("List Widget resources") + listWidgets is ResourceList< + WidgetSuite, + ListQueryParametersTrait + >; +} +``` + +## Example + +Raw json files. + +```json for Widgets_ListWidgets +{ + "title": "Widgets_ListWidgets", + "operationId": "Widgets_ListWidgets", + "parameters": { + "top": 8, + "skip": 15, + "maxpagesize": 27, + "api-version": "2021-10-01-preview" + }, + "responses": { + "200": { + "body": {} + } + } +} +``` + +```json for Widgets_CreateOrUpdateWidget +{ + "title": "Widgets_CreateOrUpdateWidget", + "operationId": "Widgets_CreateOrUpdateWidget", + "parameters": { + "widgetName": "name1", + "api-version": "2021-10-01-preview", + "resource": { + "manufacturerId": "manufacturer id1" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for Widgets_DeleteWidget +{ + "operationId": "Widgets_DeleteWidget", + "title": "Delete widget by widget name using long-running operation.", + "parameters": { + "api-version": "2021-10-01-preview", + "widgetName": "searchbox" + }, + "responses": { + "202": {} + } +} +``` + +## Samples + +Generate samples for dpg cases: + +```ts samples +import { WidgetManagerClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates a Widget asynchronously. + * + * @summary creates or updates a Widget asynchronously. + * x-ms-original-file: 2021-10-01-preview/json_for_Widgets_CreateOrUpdateWidget.json + */ +async function widgetsCreateOrUpdateWidget() { + const credential = new DefaultAzureCredential(); + const client = new WidgetManagerClient(credential); + const result = await client.widgets.createOrUpdateWidget("name1", { + manufacturerId: "manufacturer id1", + }); + console.log(result); +} + +async function main() { + widgetsCreateOrUpdateWidget(); +} + +main().catch(console.error); + +import { WidgetManagerClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a Widget asynchronously. + * + * @summary delete a Widget asynchronously. + * x-ms-original-file: 2021-10-01-preview/json_for_Widgets_DeleteWidget.json + */ +async function deleteWidgetByWidgetNameUsingLongRunningOperation() { + const credential = new DefaultAzureCredential(); + const client = new WidgetManagerClient(credential); + const result = await client.widgets.deleteWidget("searchbox"); + console.log(result); +} + +async function main() { + deleteWidgetByWidgetNameUsingLongRunningOperation(); +} + +main().catch(console.error); + +import { WidgetManagerClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list Widget resources + * + * @summary list Widget resources + * x-ms-original-file: 2021-10-01-preview/json_for_Widgets_ListWidgets.json + */ +async function widgetsListWidgets() { + const credential = new DefaultAzureCredential(); + const client = new WidgetManagerClient(credential); + const resArray = new Array(); + for await (let item of client.widgets.listWidgets({ + top: 8, + skip: 15, + maxpagesize: 27, + })) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + widgetsListWidgets(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md index 4ad9004a08..174a8a3ef2 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md @@ -17,7 +17,10 @@ model CompositeRequest { name: string; @header - header: string; + requiredHeader: string; // requiredHeader + + @header + optionalHeader?: string; @query requiredQuery: string; @@ -44,7 +47,8 @@ Raw json files. "parameters": { "name": "required path param", "optionalQuery": "optional query", - "header": "required header", + "requiredHeader": "required header", + "optionalHeader": "optional header", "requiredQuery": "required query", "body": { "name": "body name" @@ -61,11 +65,13 @@ Raw json files. Generate samples for spread cases: ```ts samples +import { TestingClient } from "@azure/internal-test"; + /** * This sample demonstrates how to show example demo * * @summary show example demo - * x-ms-original-file: json.json + * x-ms-original-file: 2021-10-01-preview/json.json */ async function read() { const client = new TestingClient(); @@ -74,9 +80,7 @@ async function read() { "required header", "required query", { name: "body name" }, - { - optionalQuery: "optional query" - } + { optionalHeader: "optional header", optionalQuery: "optional query" }, ); console.log(result); } diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index 07a5143a81..b7819f658f 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -59,11 +59,13 @@ op read(@bodyRoot body: Widget): void; Generate samples for for different types: ```ts samples +import { TestingClient } from "@azure/internal-test"; + /** * This sample demonstrates how to show example demo * * @summary show example demo - * x-ms-original-file: json.json + * x-ms-original-file: 2021-10-01-preview/json.json */ async function read() { const client = new TestingClient(); @@ -76,7 +78,7 @@ async function read() { arrValue: ["x", "y"], unionValue: test, nullValue: null, - additionalProp: "additional prop" + additionalProp: "additional prop", }); console.log(result); } diff --git a/packages/typespec-ts/test/util/emitUtil.ts b/packages/typespec-ts/test/util/emitUtil.ts index bfa0feaa9d..31b062b070 100644 --- a/packages/typespec-ts/test/util/emitUtil.ts +++ b/packages/typespec-ts/test/util/emitUtil.ts @@ -14,7 +14,11 @@ import { buildModels, buildModelsOptions } from "../../src/modular/emitModels.js"; -import { createDpgContextTestHelper, rlcEmitterFor } from "./testUtil.js"; +import { + compileTypeSpecFor, + createDpgContextTestHelper, + rlcEmitterFor +} from "./testUtil.js"; import { transformRLCModel, transformUrlInfo @@ -569,43 +573,14 @@ export async function emitSamplesFromTypeSpec( examples: Record, configs: Record = {} ) { - const context = await rlcEmitterFor( - tspContent, - true, - false, - false, - false, - false, - false, - examples - ); - configs = { + const context = await compileTypeSpecFor(tspContent, examples); + const dpgContext = await createDpgContextTestHelper(context.program, false, { "examples-directory": `./examples`, + packageDetails: { + name: "@azure/internal-test" + }, ...configs - }; - const dpgContext = await createDpgContextTestHelper( - context.program, - false, - configs - ); - const project = new Project(); - const serviceNameToRlcModelsMap: Map = new Map< - string, - RLCModel - >(); - const clients = getRLCClients(dpgContext); - const rlcModels = await transformRLCModel(clients[0]!, dpgContext); - serviceNameToRlcModelsMap.set(clients[0]!.service.name, rlcModels); - const modularCodeModel = await emitCodeModel( - dpgContext, - serviceNameToRlcModelsMap, - "", - project, - { - casing: "camel" - } - ); - modularCodeModel; + }); const files = await emitSamples(dpgContext); useBinder().resolveAllReferences(); return files; diff --git a/packages/typespec-ts/test/util/testUtil.ts b/packages/typespec-ts/test/util/testUtil.ts index 15e64a87d4..9c75cdd359 100644 --- a/packages/typespec-ts/test/util/testUtil.ts +++ b/packages/typespec-ts/test/util/testUtil.ts @@ -28,6 +28,7 @@ import { } from "../../src/modular/static-helpers-metadata.js"; import { AzureCoreDependencies, + AzureIdentityDependencies, AzurePollingDependencies } from "../../src/modular/external-dependencies.js"; @@ -107,10 +108,69 @@ ${code} return host; } +export async function compileTypeSpecFor( + code: string, + exampleJson: Record = {} +) { + let prefix = ""; + if (!code.includes("import")) { + prefix = prefix + importStatement(); + if (!code.includes("@service")) { + prefix = prefix + serviceStatement(); + } + } + const host: TestHost = await createRLCEmitterTestHost(); + host.addTypeSpecFile("main.tsp", `${prefix}${code}`); + console.log(`${prefix}${code}`); + for (const example in exampleJson) { + host.addTypeSpecFile( + `./examples/2021-10-01-preview/${example}.json`, + exampleJson[example] + ); + } + await host.compile("./", { + warningAsError: false + }); + return host; +} + +function importStatement() { + return ` +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.Versioning; +using Azure.ClientGenerator.Core; +using Azure.Core; +using Azure.ResourceManager;`; +} + +function serviceStatement() { + return ` + @versioned(Azure.TypeScript.Testing.Versions) + @service({ + title: "Azure TypeScript Testing", + }) + + namespace Azure.TypeScript.Testing; + enum Versions { + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2021_10_01_preview: "2021-10-01-preview", + } + + `; +} + export async function createDpgContextTestHelper( program: Program, enableModelNamespace = false, - configs: Record = {} + configs: Record = {} ): Promise { const outputProject = new Project({ useInMemoryFileSystem: true }); provideContext("rlcMetaTree", new Map()); @@ -183,7 +243,8 @@ export async function provideBinderWithAzureDependencies(project: Project) { const extraDependencies = { ...AzurePollingDependencies, - ...AzureCoreDependencies + ...AzureCoreDependencies, + ...AzureIdentityDependencies }; const staticHelpers = { From aa9f203c05cfc6c05673af9059e80e1072d94168 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 26 Aug 2024 15:43:40 +0800 Subject: [PATCH 46/83] Update the test cases and refactor code a little --- packages/typespec-ts/src/index.ts | 5 +- .../typespec-ts/src/modular/emitSamples.ts | 282 ++++++++++++------ .../test/modularUnit/scenarios.spec.ts | 16 +- .../modularUnit/scenarios/example/example.md | 22 +- .../samples/client/disableHierarchyClient.md | 2 +- .../samples/client/enableHierarchyClient.md | 2 +- .../samples/client/multipleClientSamples.md | 0 .../samples/client/parameterizedHost.md | 117 ++++++++ .../samples/operations/armCurdOperations.md | 8 +- .../parameters/paramaterSpreadCheck.md | 15 +- .../parameters/parameterPositionCheck.md | 0 .../samples/parameters/parameterTypesCheck.md | 8 +- packages/typespec-ts/test/util/testUtil.ts | 1 - 13 files changed, 351 insertions(+), 127 deletions(-) delete mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClientSamples.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/parameterizedHost.md delete mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index e07972dde8..1791da6f2e 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -410,5 +410,8 @@ export async function createContextWithDefaultOptions( ...tcgcSettings }; - return (await createSdkContext(context)) as SdkContext; + return (await createSdkContext( + context, + context.program.emitters[0]?.metadata.name ?? "@azure-tools/typespec-ts" + )) as SdkContext; } diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index ed873b1d46..80c7d6f454 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -7,6 +7,7 @@ import { resolveReference } from "../framework/reference.js"; import { SdkContext } from "../utils/interfaces.js"; import { SdkClientType, + SdkHttpOperationExample, SdkHttpParameterExample, SdkInitializationType, SdkServiceMethod, @@ -21,6 +22,11 @@ import { AzureIdentityDependencies } from "../modular/external-dependencies.js"; import { reportDiagnostic } from "../index.js"; import { NoTarget } from "@typespec/compiler"; +interface ExampleValue { + name: string; + value: string; + isOptional: boolean; +} export function emitSamples(dpgContext: SdkContext): SourceFile[] { const generatedFiles: SourceFile[] = []; for (const client of dpgContext.sdkPackage.clients) { @@ -131,9 +137,7 @@ function emitMethodSamples( for (const example of examples) { // build example - const exampleFunctionBody: string[] = [], - clientParams: string[] = [], - methodParams: string[] = []; + const exampleFunctionBody: string[] = []; const exampleName = normalizeName( escapeSpecialCharToSpace(example.name), NameType.Method @@ -143,95 +147,47 @@ function emitMethodSamples( returnType: "void", body: exampleFunctionBody }; - const parameterMap: Record = {}; - example.parameters.forEach( - (param) => - (parameterMap[(param.parameter as any).serializedName ?? param.parameter.name] = - param) - ); + const parameterMap: Record = + buildParameterValueMap(example); // prepare client-level parameters - if (options.credentialType) { - // Only support DefaultAzureCredential for now - exampleFunctionBody.push( - `const credential = new ${resolveReference( - AzureIdentityDependencies.DefaultAzureCredential - )}();` - ); - clientParams.push("credential"); - } - let subscriptionIdValue = `"00000000-0000-0000-0000-00000000000"`; - for (const param of example.parameters) { - if ( - param.parameter.name.toLowerCase() === "subscriptionid" && - isArm(dpgContext) - ) { - subscriptionIdValue = getParameterValue(param.value); - continue; - } - if ( - param.parameter.type.kind === "constant" || - param.parameter.onClient === false - ) { - continue; - } - const paramName = param.parameter.name; - exampleFunctionBody.push( - `const ${paramName} = ${getParameterValue(param.value)};` - ); - clientParams.push(paramName); - } - // always add subscriptionId for ARM clients - if (isArm(dpgContext)) { + const clientParamValues = prepareClientExampleParameters( + dpgContext, + method, + parameterMap, + options.credentialType + ); + const clientParams: string[] = clientParamValues + .filter((p) => !p.isOptional) + .map((param) => { + exampleFunctionBody.push(`const ${param.name} = ${param.value};`); + return param.name; + }); + const optionalClientParams = clientParamValues + .filter((p) => p.isOptional) + .map((param) => `${param.name}: ${param.value}`); + if (optionalClientParams.length > 0) { exampleFunctionBody.push( - `const subscriptionId = ${subscriptionIdValue};` + `const clientOptions = {${optionalClientParams.join(", ")}};` ); - clientParams.push("subscriptionId"); + clientParams.push("clientOptions"); } exampleFunctionBody.push( `const client = new ${options.clientName}(${clientParams.join(", ")});` ); // prepare operation-level parameters - // required path, header, query parameters - for (const param of method.operation.parameters) { - if (param.optional === true || param.clientDefaultValue !== undefined) { - continue; - } - const example = parameterMap[param.serializedName]; - if (!example || !example.value) { - // report diagnostic if required parameter is missing - reportDiagnostic(dpgContext.program, { - code: "required-sample-parameter", - format: { - exampleName: exampleName, - paramName: param.serializedName - }, - target: NoTarget - }); - continue; - } - if (example.parameter.onClient === true) { - continue; - } - methodParams.push(`${getParameterValue(example.value)}`); - } - // required body parameters - const bodySerializedName = method.operation.bodyParam?.name; - if (bodySerializedName && parameterMap[bodySerializedName]) { - const example = parameterMap[bodySerializedName]; - if (example && example.value) { - methodParams.push(`${getParameterValue(example.value)}`); - } - } - // optional parameters - const optionalParams = method.operation.parameters - .filter( - (param) => param.optional === true && parameterMap[param.serializedName] - ) - .map((param) => parameterMap[param.serializedName]!) - .map( - (param) => `${param.parameter.name}: ${getParameterValue(param.value)}` - ); + const methodParamValues = prepareMethodExampleParameters( + dpgContext, + exampleName, + method, + parameterMap + ); + const methodParams = methodParamValues + .filter((p) => !p.isOptional) + .map((p) => `${p.value}`); + const optionalParams = methodParamValues + .filter((p) => p.isOptional) + .map((param) => `${param.name}: ${param.value}`); if (optionalParams.length > 0) { methodParams.push(`{${optionalParams.join(", ")}}`); } @@ -280,6 +236,158 @@ function emitMethodSamples( return sourceFile; } +function buildParameterValueMap(example: SdkHttpOperationExample) { + const parameterMap: Record = {}; + example.parameters.forEach( + (param) => + (parameterMap[ + (param.parameter as any).serializedName ?? param.parameter.name + ] = param) + ); + return parameterMap; +} + +function prepareMethodExampleParameters( + dpgContext: SdkContext, + exampleName: string, + method: SdkServiceMethod, + parameterMap: Record +): ExampleValue[] { + const parameters: ExampleValue[] = []; + for (const param of method.operation.parameters) { + if (param.optional === true || param.onClient === true) { + continue; + } + const exampleValue = parameterMap[param.serializedName]; + if (!exampleValue || !exampleValue.value) { + // report diagnostic if required parameter is missing + reportDiagnostic(dpgContext.program, { + code: "required-sample-parameter", + format: { + exampleName: exampleName, + paramName: param.name + }, + target: NoTarget + }); + continue; + } + + parameters.push({ + name: param.name, + value: getParameterValue(exampleValue.value), + isOptional: false + }); + } + // required/optional body parameters + const bodyName = method.operation.bodyParam?.name; + if (bodyName && parameterMap[bodyName]) { + const example = parameterMap[bodyName]; + if (example && example.value) { + parameters.push({ + name: bodyName, + value: getParameterValue(example.value), + isOptional: Boolean(method.operation.bodyParam?.optional) + }); + } + } + // optional parameters + method.operation.parameters + .filter( + (param) => param.optional === true && parameterMap[param.serializedName] + ) + .map((param) => parameterMap[param.serializedName]!) + .forEach((param) => { + parameters.push({ + name: param.parameter.name, + value: getParameterValue(param.value), + isOptional: true + }); + }); + return parameters; +} + +function prepareClientExampleParameters( + dpgContext: SdkContext, + method: SdkServiceMethod, + parameterMap: Record, + credentialType?: string +): ExampleValue[] { + // TODO: blocked by tcgc issue: https://github.com/Azure/typespec-azure/issues/1419 + const result: ExampleValue[] = []; + if (credentialType) { + // Only support DefaultAzureCredential for now + result.push({ + name: "credential", + value: `new ${resolveReference( + AzureIdentityDependencies.DefaultAzureCredential + )}()`, + isOptional: false + }); + } + let subscriptionIdValue = `"00000000-0000-0000-0000-00000000000"`; + // required client-level parameters + for (const param of method.operation.parameters) { + if (param.onClient === false || param.optional === true) { + continue; + } + const exampleValue = parameterMap[param.serializedName]; + if (!exampleValue || !exampleValue.value) { + // report diagnostic if required parameter is missing + reportDiagnostic(dpgContext.program, { + code: "required-sample-parameter", + format: { + exampleName: method.name, + paramName: param.name + }, + target: NoTarget + }); + continue; + } + if ( + param.name.toLowerCase() === "subscriptionid" && + isArm(dpgContext) && + exampleValue + ) { + subscriptionIdValue = getParameterValue(exampleValue.value); + continue; + } + if (exampleValue?.parameter.type.kind === "constant") { + continue; + } + result.push({ + name: exampleValue.parameter.name, + value: getParameterValue(exampleValue.value), + isOptional: Boolean(param.optional) + }); + } + // always add subscriptionId for ARM clients + if (isArm(dpgContext)) { + result.push({ + name: "subscriptionId", + value: subscriptionIdValue, + isOptional: false + }); + } + // optional parameters + method.operation.parameters + .filter( + (param) => + param.onClient === true && + param.optional === true && + parameterMap[param.serializedName] + ) + .map((param) => parameterMap[param.serializedName]!) + .forEach((param) => { + result.push({ + name: param.parameter.name, + value: getParameterValue(param.value), + isOptional: true + }); + }); + + return result; +} + function getParameterValue(value: SdkTypeExample): string { let retValue = `{} as any`; switch (value.kind) { @@ -358,13 +466,7 @@ function escapeSpecialCharToSpace(str: string) { if (!str) { return str; } - return str - .replace(/_/g, " ") - .replace(/\//g, " Or ") - .replace(/,|\.|\(|\)/g, " ") - .replace("'s ", " ") - .replace(/\[/g, " ") - .replace(/\]/g, " "); + return str.replace(/_|,|\.|\(|\)|'s |\[|\]/g, " ").replace(/\//g, " Or "); } // FIXME: This is a temporary solution to get the credential type diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index 9b7294857a..0e035544a8 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -10,7 +10,7 @@ import { assertEqualContent } from "../util/testUtil.js"; import { format } from "prettier"; import { prettierTypeScriptOptions } from "../../src/lib.js"; -const SCENARIOS_LOCATION = "./test/modularUnit/scenarios/samples"; +const SCENARIOS_LOCATION = "./test/modularUnit/scenarios"; const SCENARIOS_UPDATE = process.env["SCENARIOS_UPDATE"] === "true"; @@ -97,24 +97,21 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { return result![0]!.getFunctionOrThrow(name!).getText(); }, - // Snapshot of a specific example generation - // Throws if more than one example generated "(ts|typescript) samples": async (tsp, {}, unknownArgs) => { if (!unknownArgs || !unknownArgs["examples"]) { - throw new Error("No example provided for samples"); + throw new Error(`Expected 'examples' to be passed in as an argument`); } const configs = unknownArgs["configs"] as Record; const examples = unknownArgs["examples"] as Record; const counts = Object.keys(examples).length; const result = await emitSamplesFromTypeSpec(tsp, examples, configs); - assert.equal(result?.length, counts, "Expected exactly 1 source file"); + assert.equal(result?.length, counts, `Expected exactly ${counts} files`); const text = result.map((x) => x.getFullText()).join("\n"); - console.log("Result: ", text); return text; } }; -describe.only("Scenarios", function () { +describe("Scenarios", function () { describeScenarios(SCENARIOS_LOCATION); }); @@ -241,6 +238,11 @@ function readScenarios(fileContent: string): ScenarioFile { for (const part of rawParts) { const [rawHeading, ...lines] = part.split("\n"); const isOnly = rawHeading!.startsWith("only: "); + const isSkip = rawHeading!.startsWith("skip: "); + if (isSkip) { + console.log("Skipping scenario: ", rawHeading); + continue; + } const heading = isOnly ? rawHeading!.substring("only: ".length) : rawHeading!; diff --git a/packages/typespec-ts/test/modularUnit/scenarios/example/example.md b/packages/typespec-ts/test/modularUnit/scenarios/example/example.md index 04b08f74d8..b89ec992df 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/example/example.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/example/example.md @@ -10,13 +10,7 @@ You can set the environment variable `SCENARIOS_UPDATE` to `true` to run the sna ## Only running specific scenarios -You can add `only:` to the top-level heading of the scenario document to run only that scenario. This is useful when you are working on a specific scenario and want to run only that scenario. For example, the heading for this test would be changed to - -``` -# only: Example scenario -``` - -This is the equivalent of using `it.only` for a Mocha/vitest test. +You can add `only:` to the top-level heading of the scenario document to run only that scenario. This is useful when you are working on a specific scenario and want to run only that scenario. For example, the heading for this test would be changed to `# only: Example scenario`. This is the equivalent of using `it.only` for a Mocha/vitest test. ## TypeSpec @@ -76,13 +70,13 @@ import { StreamableMethod, operationOptionsToRequestParameters, PathUncheckedResponse, - createRestError, + createRestError } from "@azure-rest/core-client"; export function _readSend( context: Client, id: string, - options: ReadOptionalParams = { requestOptions: {} }, + options: ReadOptionalParams = { requestOptions: {} } ): StreamableMethod { return context .path("/{id}", id) @@ -90,7 +84,7 @@ export function _readSend( } export async function _readDeserialize( - result: PathUncheckedResponse, + result: PathUncheckedResponse ): Promise { const expectedStatuses = ["200"]; if (!expectedStatuses.includes(result.status)) { @@ -98,14 +92,14 @@ export async function _readDeserialize( } return { - id: result.body["id"], + id: result.body["id"] }; } export async function read( context: Client, id: string, - options: ReadOptionalParams = { requestOptions: {} }, + options: ReadOptionalParams = { requestOptions: {} } ): Promise { const result = await _readSend(context, id, options); return _readDeserialize(result); @@ -118,9 +112,9 @@ Or you can extract a specific operation using `ts operations function { const result = await _readSend(context, id, options); return _readDeserialize(result); } -``` \ No newline at end of file +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md index b7cce84e73..0548ebf6c2 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md @@ -1,4 +1,4 @@ -# Should generate samples for hierarchy client +# Should generate samples for disabled hierarchy client Sample generation should handle hierarchy client successfully. diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md index 1c08e03a68..ab67ab60a8 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md @@ -1,4 +1,4 @@ -# Should generate samples for hierarchy client +# Should generate samples for enabled hierarchy client Sample generation should handle hierarchy client successfully. diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClientSamples.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClientSamples.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/parameterizedHost.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/parameterizedHost.md new file mode 100644 index 0000000000..b377583fd7 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/parameterizedHost.md @@ -0,0 +1,117 @@ +# skip: Should generate samples for parameterized host client + +// FIXME: issue tracked in tcgc: https://github.com/Azure/typespec-azure/issues/1419 + +Sample generation should handle parameterized host client successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +import "@typespec/rest"; +import "@typespec/versioning"; +import "@typespec/openapi"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-autorest"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using OpenAPI; + +@service({title: "ParametrizedHost"}) +@useAuth(OAuth2Auth<[MyFlow]>) +@versioned(Versions) +@server( + "{host}.{subdomain}.{sufix}.com", + "Confidential Ledger Service", + { + @path + host?: string = "one", + @path + subdomain?: string = "two", + @path + sufix?: string = "three", + } +) +namespace Azure.Test.ParametrizedHost; + +/** The Contoso Widget Manager service version. */ +enum Versions { + /** Version 2021-10-01-preview */ + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + `2021-10-01-preview`, +} + +model MyFlow { + type: OAuth2FlowType.implicit; + authorizationUrl: "https://login.microsoftonline.com/common/v2.0/oauth2/authorize"; + tokenUrl: "https://login.microsoftonline.com/common/v2.0/oauth2/token"; + scopes: ["https://parametrized-host.azure.com/.default"]; +} + +@resource("collections") +@doc("Identifier for collections.") +model Collection { + @key + @visibility("read") + collectionId: string; +} + +@route("/app") +namespace ConfidentialLedger { + @summary("Retrieves a list of collection ids present in the Confidential Ledger") + @doc("Collection ids are user-created collections of ledger entries") + op listCollections is Azure.Core.Foundations.NonPagedResourceList; +} +``` + +## Example + +Raw json files. + +```json for listCollections +{ + "title": "listCollections", + "operationId": "ConfidentialLedger_listCollections", + "parameters": { + "host": "one", + "subdomain": "two", + "sufix": "three", + "apiVersion": "v1" + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for parameterized host cases: + +```ts samples +import { ParametrizedHostClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves a list of collection ids present in the Confidential Ledger + * + * @summary retrieves a list of collection ids present in the Confidential Ledger + * x-ms-original-file: 2021-10-01-preview/json_for_listCollections.json + */ +async function listCollections() { + const credential = new DefaultAzureCredential(); + const client = new ParametrizedHostClient(credential); + const result = await client.confidentialLedger.listCollections(); + console.log(result); +} + +async function main() { + listCollections(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md index 1c57934e2a..151132dc53 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md @@ -202,11 +202,11 @@ async function employeesCreateOrUpdate() { properties: { age: 30, city: "gydhnntudughbmxlkyzrskcdkotrxn", - profile: "ms", + profile: "ms" }, tags: { key2913: "urperxmkkhhkp" }, - location: "itajgxyqozseoygnl", - }, + location: "itajgxyqozseoygnl" + } ); console.log(result); } @@ -232,7 +232,7 @@ async function employeesDelete() { const client = new ContosoClient(credential, subscriptionId); const result = await client.employees.delete( "rgopenapi", - "5vX--BxSu3ux48rI4O9OQ569", + "5vX--BxSu3ux48rI4O9OQ569" ); console.log(result); } diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md index 174a8a3ef2..d1ec8d7ecd 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md @@ -1,4 +1,6 @@ -# Should generate samples for spread cases +# skip: Should generate samples for spread cases + +// FIXME: issue tracked in tcgc: https://github.com/Azure/typespec-azure/issues/1421 Sample generation should handle operation-level parameter order successfully. @@ -17,7 +19,7 @@ model CompositeRequest { name: string; @header - requiredHeader: string; // requiredHeader + requiredHeader: string; // required-header @header optionalHeader?: string; @@ -26,6 +28,7 @@ model CompositeRequest { requiredQuery: string; @query + @clientName("renamedOptional", "javascript") optionalQuery?: string; @body @@ -46,9 +49,9 @@ Raw json files. "operationId": "read", "parameters": { "name": "required path param", - "optionalQuery": "optional query", - "requiredHeader": "required header", - "optionalHeader": "optional header", + "optionalQuery": "renamed optional query", + "required-header": "required header", + "optional-header": "optional header", "requiredQuery": "required query", "body": { "name": "body name" @@ -80,7 +83,7 @@ async function read() { "required header", "required query", { name: "body name" }, - { optionalHeader: "optional header", optionalQuery: "optional query" }, + { optionalHeader: "optional header", optionalQuery: "optional query" } ); console.log(result); } diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterPositionCheck.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index b7819f658f..50021856f0 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -19,6 +19,8 @@ model Widget { arrValue: string[]; unionValue: Foo | string; nullValue: null; + @clientName("jsClientName", "javascript") + renamedProp: string; ...Record; } @@ -45,7 +47,8 @@ op read(@bodyRoot body: Widget): void; "arrValue": ["x", "y"], "unionValue": "test", "nullValue": null, - "additionalProp": "additional prop" + "additionalProp": "additional prop", + "renamedProp": "prop renamed" } }, "responses": { @@ -78,7 +81,8 @@ async function read() { arrValue: ["x", "y"], unionValue: test, nullValue: null, - additionalProp: "additional prop", + jsClientName: "prop renamed", + additionalProp: "additional prop" }); console.log(result); } diff --git a/packages/typespec-ts/test/util/testUtil.ts b/packages/typespec-ts/test/util/testUtil.ts index 9c75cdd359..f545f8e3a5 100644 --- a/packages/typespec-ts/test/util/testUtil.ts +++ b/packages/typespec-ts/test/util/testUtil.ts @@ -121,7 +121,6 @@ export async function compileTypeSpecFor( } const host: TestHost = await createRLCEmitterTestHost(); host.addTypeSpecFile("main.tsp", `${prefix}${code}`); - console.log(`${prefix}${code}`); for (const example in exampleJson) { host.addTypeSpecFile( `./examples/2021-10-01-preview/${example}.json`, From deb464b5564d353ce192152f37b05591fe883df0 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 26 Aug 2024 16:03:47 +0800 Subject: [PATCH 47/83] Remove useless samples in smoke test --- .vscode/launch.json | 2 +- .../generated/typespec-ts/package.json | 169 +----------------- ...le.ts => dataProductsAddUserRoleSample.ts} | 28 +-- ...le.ts => dataProductsCatalogsGetSample.ts} | 17 +- ...ductsCatalogsListByResourceGroupSample.ts} | 23 +-- ...oductsCatalogsListBySubscriptionSample.ts} | 21 +-- ...eSample.ts => dataProductsCreateSample.ts} | 29 +-- ...eSample.ts => dataProductsDeleteSample.ts} | 20 +-- ...tsGenerateStorageAccountSasTokenSample.ts} | 25 +-- ... dataProductsListByResourceGroupSample.ts} | 23 +-- ...> dataProductsListBySubscriptionSample.ts} | 21 +-- ...mple.ts => dataProductsRotateKeySample.ts} | 21 +-- ...eSample.ts => dataProductsUpdateSample.ts} | 21 +-- .../samples-dev/dataproductsGetSample.ts | 46 ----- .../dataproductsListRolesAssignmentsSample.ts | 48 ----- .../dataproductsRemoveUserRoleSample.ts | 64 ------- .../samples-dev/datatypesCreateSample.ts | 57 ------ .../samples-dev/datatypesDeleteDataSample.ts | 50 ------ .../samples-dev/datatypesDeleteSample.ts | 48 ----- ...sGenerateStorageContainerSasTokenSample.ts | 58 ------ .../samples-dev/datatypesGetSample.ts | 48 ----- .../datatypesListByDataProductSample.ts | 54 ------ .../samples-dev/datatypesUpdateSample.ts | 56 ------ .../samples-dev/operationsListSample.ts | 48 ----- ...taProductsCatalogs_Get_MinimumSet_Gen.json | 16 -- ...gs_ListByResourceGroup_MinimumSet_Gen.json | 20 --- ...ogs_ListBySubscription_MinimumSet_Gen.json | 19 -- ...taProducts_AddUserRole_MinimumSet_Gen.json | 35 ---- .../DataProducts_Create_MinimumSet_Gen.json | 38 ---- .../DataProducts_Delete_MinimumSet_Gen.json | 18 -- ...StorageAccountSasToken_MinimumSet_Gen.json | 22 --- .../DataProducts_Get_MaximumSet_Gen.json | 102 ----------- .../DataProducts_Get_MinimumSet_Gen.json | 18 -- ...ts_ListByResourceGroup_MaximumSet_Gen.json | 106 ----------- ...cts_ListBySubscription_MaximumSet_Gen.json | 105 ----------- ...s_ListRolesAssignments_MaximumSet_Gen.json | 31 ---- ...s_ListRolesAssignments_MinimumSet_Gen.json | 31 ---- ...roducts_RemoveUserRole_MaximumSet_Gen.json | 24 --- ...roducts_RemoveUserRole_MinimumSet_Gen.json | 24 --- ...DataProducts_RotateKey_MinimumSet_Gen.json | 16 -- .../DataProducts_Update_MinimumSet_Gen.json | 23 --- .../DataTypes_Create_MaximumSet_Gen.json | 73 -------- .../DataTypes_Create_MinimumSet_Gen.json | 23 --- .../DataTypes_DeleteData_MaximumSet_Gen.json | 20 --- .../DataTypes_DeleteData_MinimumSet_Gen.json | 20 --- .../DataTypes_Delete_MaximumSet_Gen.json | 19 -- .../DataTypes_Delete_MinimumSet_Gen.json | 19 -- ...orageContainerSasToken_MaximumSet_Gen.json | 23 --- ...orageContainerSasToken_MinimumSet_Gen.json | 23 --- .../DataTypes_Get_MaximumSet_Gen.json | 37 ---- .../DataTypes_Get_MinimumSet_Gen.json | 18 -- ...ypes_ListByDataProduct_MaximumSet_Gen.json | 41 ----- ...ypes_ListByDataProduct_MinimumSet_Gen.json | 21 --- .../DataTypes_Update_MaximumSet_Gen.json | 50 ------ .../DataTypes_Update_MinimumSet_Gen.json | 22 --- .../Operations_List_MaximumSet_Gen.json | 28 --- .../Operations_List_MinimumSet_Gen.json | 12 -- .../tspconfig.yaml | 7 +- .../typespec-ts/samples-dev/bCOp1Sample.ts | 24 --- .../typespec-ts/samples-dev/bECOp1Sample.ts | 22 --- .../typespec-ts/samples-dev/bOp1Sample.ts | 24 --- .../typespec-ts/samples-dev/op1Sample.ts | 24 --- .../hierarchy_generic/spec/examples/bOp1.json | 22 --- .../hierarchy_generic/spec/examples/cOp1.json | 22 --- .../hierarchy_generic/spec/examples/op1.json | 22 --- packages/typespec-ts/src/index.ts | 12 +- .../typespec-ts/src/modular/emitSamples.ts | 3 +- 67 files changed, 36 insertions(+), 2240 deletions(-) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductsAddUserRoleSample.ts => dataProductsAddUserRoleSample.ts} (51%) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductscatalogsGetSample.ts => dataProductsCatalogsGetSample.ts} (52%) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductscatalogsListByResourceGroupSample.ts => dataProductsCatalogsListByResourceGroupSample.ts} (56%) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductscatalogsListBySubscriptionSample.ts => dataProductsCatalogsListBySubscriptionSample.ts} (56%) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductsCreateSample.ts => dataProductsCreateSample.ts} (71%) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductsDeleteSample.ts => dataProductsDeleteSample.ts} (52%) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductsGenerateStorageAccountSasTokenSample.ts => dataProductsGenerateStorageAccountSasTokenSample.ts} (53%) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductsListByResourceGroupSample.ts => dataProductsListByResourceGroupSample.ts} (57%) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductsListBySubscriptionSample.ts => dataProductsListBySubscriptionSample.ts} (57%) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductsRotateKeySample.ts => dataProductsRotateKeySample.ts} (51%) rename packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/{dataproductsUpdateSample.ts => dataProductsUpdateSample.ts} (64%) delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MinimumSet_Gen.json delete mode 100644 packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bCOp1Sample.ts delete mode 100644 packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bECOp1Sample.ts delete mode 100644 packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bOp1Sample.ts delete mode 100644 packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts delete mode 100644 packages/typespec-test/test/hierarchy_generic/spec/examples/bOp1.json delete mode 100644 packages/typespec-test/test/hierarchy_generic/spec/examples/cOp1.json delete mode 100644 packages/typespec-test/test/hierarchy_generic/spec/examples/op1.json diff --git a/.vscode/launch.json b/.vscode/launch.json index 1d8e588f42..7600924268 100755 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -112,7 +112,7 @@ { "name": "[TypeSpec] Smoke Test Debug", "request": "launch", - "cwd": "${workspaceFolder}/packages/typespec-test/test/hierarchy_generic", + "cwd": "${workspaceFolder}/packages/typespec-test/test/NetworkAnalytics.Management", "runtimeArgs": ["tsp", "compile", "./spec"], "runtimeExecutable": "npx", "skipFiles": ["/**"], diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json index 8c69011be4..d38cd2912c 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json @@ -13,39 +13,20 @@ ".": "./src/index.ts", "./api": "./src/api/index.ts", "./models": "./src/models/index.ts", - "./api/operations": "./src/api/operations/index.ts", - "./api/dataProductsCatalogs": "./src/api/dataProductsCatalogs/index.ts", - "./api/dataTypes": "./src/api/dataTypes/index.ts", - "./api/dataProducts": "./src/api/dataProducts/index.ts" + "./api/operations": "src/api/operations/index.ts", + "./api/dataProductsCatalogs": "src/api/dataProductsCatalogs/index.ts", + "./api/dataTypes": "src/api/dataTypes/index.ts", + "./api/dataProducts": "src/api/dataProducts/index.ts" }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], + "dialects": ["esm", "commonjs"], + "esmDialects": ["browser", "react-native"], "selfLink": false }, "type": "module", - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], + "keywords": ["node", "azure", "cloud", "typescript", "browser", "isomorphic"], "author": "Microsoft Corporation", "license": "MIT", - "files": [ - "dist", - "README.md", - "LICENSE", - "review/*", - "CHANGELOG.md" - ], + "files": ["dist", "README.md", "LICENSE", "review/*", "CHANGELOG.md"], "dependencies": { "@azure/core-util": "^1.9.2", "@azure-rest/core-client": "^2.1.0", @@ -93,137 +74,5 @@ "test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node", "test": "npm run clean && tshy && npm run unit-test:node && npm run unit-test:browser && npm run integration-test", "build": "npm run clean && tshy && npm run extract-api" - }, - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "react-native": { - "types": "./dist/react-native/index.d.ts", - "default": "./dist/react-native/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - }, - "./api": { - "browser": { - "types": "./dist/browser/api/index.d.ts", - "default": "./dist/browser/api/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/index.d.ts", - "default": "./dist/react-native/api/index.js" - }, - "import": { - "types": "./dist/esm/api/index.d.ts", - "default": "./dist/esm/api/index.js" - }, - "require": { - "types": "./dist/commonjs/api/index.d.ts", - "default": "./dist/commonjs/api/index.js" - } - }, - "./models": { - "browser": { - "types": "./dist/browser/models/index.d.ts", - "default": "./dist/browser/models/index.js" - }, - "react-native": { - "types": "./dist/react-native/models/index.d.ts", - "default": "./dist/react-native/models/index.js" - }, - "import": { - "types": "./dist/esm/models/index.d.ts", - "default": "./dist/esm/models/index.js" - }, - "require": { - "types": "./dist/commonjs/models/index.d.ts", - "default": "./dist/commonjs/models/index.js" - } - }, - "./api/operations": { - "browser": { - "types": "./dist/browser/api/operations/index.d.ts", - "default": "./dist/browser/api/operations/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/operations/index.d.ts", - "default": "./dist/react-native/api/operations/index.js" - }, - "import": { - "types": "./dist/esm/api/operations/index.d.ts", - "default": "./dist/esm/api/operations/index.js" - }, - "require": { - "types": "./dist/commonjs/api/operations/index.d.ts", - "default": "./dist/commonjs/api/operations/index.js" - } - }, - "./api/dataProductsCatalogs": { - "browser": { - "types": "./dist/browser/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/browser/api/dataProductsCatalogs/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/react-native/api/dataProductsCatalogs/index.js" - }, - "import": { - "types": "./dist/esm/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/esm/api/dataProductsCatalogs/index.js" - }, - "require": { - "types": "./dist/commonjs/api/dataProductsCatalogs/index.d.ts", - "default": "./dist/commonjs/api/dataProductsCatalogs/index.js" - } - }, - "./api/dataTypes": { - "browser": { - "types": "./dist/browser/api/dataTypes/index.d.ts", - "default": "./dist/browser/api/dataTypes/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/dataTypes/index.d.ts", - "default": "./dist/react-native/api/dataTypes/index.js" - }, - "import": { - "types": "./dist/esm/api/dataTypes/index.d.ts", - "default": "./dist/esm/api/dataTypes/index.js" - }, - "require": { - "types": "./dist/commonjs/api/dataTypes/index.d.ts", - "default": "./dist/commonjs/api/dataTypes/index.js" - } - }, - "./api/dataProducts": { - "browser": { - "types": "./dist/browser/api/dataProducts/index.d.ts", - "default": "./dist/browser/api/dataProducts/index.js" - }, - "react-native": { - "types": "./dist/react-native/api/dataProducts/index.d.ts", - "default": "./dist/react-native/api/dataProducts/index.js" - }, - "import": { - "types": "./dist/esm/api/dataProducts/index.d.ts", - "default": "./dist/esm/api/dataProducts/index.js" - }, - "require": { - "types": "./dist/commonjs/api/dataProducts/index.d.ts", - "default": "./dist/commonjs/api/dataProducts/index.js" - } - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "module": "./dist/esm/index.js" + } } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts similarity index 51% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts index d7164b40ab..d304daf4e0 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsAddUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts @@ -10,7 +10,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * @summary assign role to the data product. * x-ms-original-file: 2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json */ -async function dataProductsAddUserRoleMaximumSetGen(): void { +async function dataProductsAddUserRoleMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -29,34 +29,8 @@ async function dataProductsAddUserRoleMaximumSetGen(): void { console.log(result); } -/** - * This sample demonstrates how to assign role to the data product. - * - * @summary assign role to the data product. - * x-ms-original-file: 2023-11-15/DataProducts_AddUserRole_MinimumSet_Gen.json - */ -async function dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.addUserRole( - "aoiresourceGroupName", - "dataproduct01", - { - roleId: "00000000-0000-0000-0000-00000000000", - principalId: "00000000-0000-0000-0000-00000000000", - userName: "userName", - dataTypeScope: ["scope"], - principalType: "User", - role: "Reader", - }, - ); - console.log(result); -} - async function main() { dataProductsAddUserRoleMaximumSetGen(); - dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsGetSample.ts similarity index 52% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsGetSample.ts index 8f61d22992..3da4d21d13 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsGetSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsGetSample.ts @@ -10,21 +10,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * @summary retrieve data type resource. * x-ms-original-file: 2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json */ -async function dataProductsCatalogsGetMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProductsCatalogs.get("aoiresourceGroupName"); - console.log(result); -} - -/** - * This sample demonstrates how to retrieve data type resource. - * - * @summary retrieve data type resource. - * x-ms-original-file: 2023-11-15/DataProductsCatalogs_Get_MinimumSet_Gen.json - */ -async function dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { +async function dataProductsCatalogsGetMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -34,7 +20,6 @@ async function dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMini async function main() { dataProductsCatalogsGetMaximumSetGen(); - dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListByResourceGroupSample.ts similarity index 56% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListByResourceGroupSample.ts index 0028587307..150e4cc46f 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListByResourceGroupSample.ts @@ -10,27 +10,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * @summary list data catalog by resource group. * x-ms-original-file: 2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json */ -async function dataProductsCatalogsListByResourceGroupMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataProductsCatalogs.listByResourceGroup( - "aoiresourceGroupName", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -/** - * This sample demonstrates how to list data catalog by resource group. - * - * @summary list data catalog by resource group. - * x-ms-original-file: 2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json - */ -async function dataProductsCatalogsListByResourceGroupMinimumSetGen(): void { +async function dataProductsCatalogsListByResourceGroupMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -46,7 +26,6 @@ async function dataProductsCatalogsListByResourceGroupMinimumSetGen(): void { async function main() { dataProductsCatalogsListByResourceGroupMaximumSetGen(); - dataProductsCatalogsListByResourceGroupMinimumSetGen(); } main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListBySubscriptionSample.ts similarity index 56% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListBySubscriptionSample.ts index 0fd084d025..6b31818cb5 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductscatalogsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListBySubscriptionSample.ts @@ -10,25 +10,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * @summary list data catalog by subscription. * x-ms-original-file: 2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json */ -async function dataProductsCatalogsListBySubscriptionMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataProductsCatalogs.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -/** - * This sample demonstrates how to list data catalog by subscription. - * - * @summary list data catalog by subscription. - * x-ms-original-file: 2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json - */ -async function dataProductsCatalogsListBySubscriptionMinimumSetGen(): void { +async function dataProductsCatalogsListBySubscriptionMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -42,7 +24,6 @@ async function dataProductsCatalogsListBySubscriptionMinimumSetGen(): void { async function main() { dataProductsCatalogsListBySubscriptionMaximumSetGen(); - dataProductsCatalogsListBySubscriptionMinimumSetGen(); } main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts similarity index 71% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts index fb2a875268..e68c3328d6 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts @@ -10,7 +10,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * @summary create data product resource. * x-ms-original-file: 2023-11-15/DataProducts_Create_MaximumSet_Gen.json */ -async function dataProductsCreateMaximumSetGen(): void { +async function dataProductsCreateMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -68,35 +68,8 @@ async function dataProductsCreateMaximumSetGen(): void { console.log(result); } -/** - * This sample demonstrates how to create data product resource. - * - * @summary create data product resource. - * x-ms-original-file: 2023-11-15/DataProducts_Create_MinimumSet_Gen.json - */ -async function dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.create( - "aoiresourceGroupName", - "dataproduct01", - { - location: "eastus", - properties: { - publisher: "Microsoft", - product: "MCC", - majorVersion: "1.0.0", - }, - tags: { userSpecifiedKeyName: "userSpecifiedKeyValue" }, - }, - ); - console.log(result); -} - async function main() { dataProductsCreateMaximumSetGen(); - dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts similarity index 52% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts index 0188cb50dd..f05e4fb419 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts @@ -10,24 +10,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * @summary delete data product resource. * x-ms-original-file: 2023-11-15/DataProducts_Delete_MaximumSet_Gen.json */ -async function dataProductsDeleteMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.delete( - "aoiresourceGroupName", - "dataproduct01", - ); - console.log(result); -} - -/** - * This sample demonstrates how to delete data product resource. - * - * @summary delete data product resource. - * x-ms-original-file: 2023-11-15/DataProducts_Delete_MinimumSet_Gen.json - */ -async function dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { +async function dataProductsDeleteMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -40,7 +23,6 @@ async function dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSe async function main() { dataProductsDeleteMaximumSetGen(); - dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts similarity index 53% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts index 36683e9740..6c086ccd87 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGenerateStorageAccountSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts @@ -10,7 +10,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * @summary generate sas token for storage account. * x-ms-original-file: 2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json */ -async function dataProductsGenerateStorageAccountSasTokenMaximumSetGen(): void { +async function dataProductsGenerateStorageAccountSasTokenMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -26,31 +26,8 @@ async function dataProductsGenerateStorageAccountSasTokenMaximumSetGen(): void { console.log(result); } -/** - * This sample demonstrates how to generate sas token for storage account. - * - * @summary generate sas token for storage account. - * x-ms-original-file: 2023-11-15/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json - */ -async function dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.generateStorageAccountSasToken( - "aoiresourceGroupName", - "dataproduct01", - { - startTimeStamp: new Date("2023-08-24T05:35:17.051Z"), - expiryTimeStamp: new Date("2023-08-24T05:35:17.051Z"), - ipAddress: "1.1.1.1", - }, - ); - console.log(result); -} - async function main() { dataProductsGenerateStorageAccountSasTokenMaximumSetGen(); - dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts similarity index 57% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts index e8b75372f7..8b93bdecae 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts @@ -4,33 +4,13 @@ import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -/** - * This sample demonstrates how to list data products by resource group. - * - * @summary list data products by resource group. - * x-ms-original-file: 2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataProductsListByResourceGroupMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataProducts.listByResourceGroup( - "aoiresourceGroupName", - )) { - resArray.push(item); - } - - console.log(resArray); -} - /** * This sample demonstrates how to list data products by resource group. * * @summary list data products by resource group. * x-ms-original-file: 2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json */ -async function dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { +async function dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -45,7 +25,6 @@ async function dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSet } async function main() { - dataProductsListByResourceGroupMaximumSetGen(); dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListBySubscriptionSample.ts similarity index 57% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListBySubscriptionSample.ts index 914e45ee06..fd1d4abf09 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListBySubscriptionSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListBySubscriptionSample.ts @@ -4,31 +4,13 @@ import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; -/** - * This sample demonstrates how to list data products by subscription. - * - * @summary list data products by subscription. - * x-ms-original-file: 2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json - */ -async function dataProductsListBySubscriptionMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataProducts.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - /** * This sample demonstrates how to list data products by subscription. * * @summary list data products by subscription. * x-ms-original-file: 2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json */ -async function dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { +async function dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -41,7 +23,6 @@ async function dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetR } async function main() { - dataProductsListBySubscriptionMaximumSetGen(); dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts similarity index 51% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts index 00520a78ea..d6b0d724ba 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRotateKeySample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts @@ -10,25 +10,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * @summary initiate key rotation on Data Product. * x-ms-original-file: 2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json */ -async function dataProductsRotateKeyMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.rotateKey( - "aoiresourceGroupName", - "dataproduct01", - { keyVaultUrl: "https://myKeyVault.vault.azure.net" }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to initiate key rotation on Data Product. - * - * @summary initiate key rotation on Data Product. - * x-ms-original-file: 2023-11-15/DataProducts_RotateKey_MinimumSet_Gen.json - */ -async function dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { +async function dataProductsRotateKeyMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -42,7 +24,6 @@ async function dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimu async function main() { dataProductsRotateKeyMaximumSetGen(); - dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts similarity index 64% rename from packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts rename to packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts index cd52e227a7..7b618c6c86 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts @@ -10,7 +10,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * @summary update data product resource. * x-ms-original-file: 2023-11-15/DataProducts_Update_MaximumSet_Gen.json */ -async function dataProductsUpdateMaximumSetGen(): void { +async function dataProductsUpdateMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); @@ -38,27 +38,8 @@ async function dataProductsUpdateMaximumSetGen(): void { console.log(result); } -/** - * This sample demonstrates how to update data product resource. - * - * @summary update data product resource. - * x-ms-original-file: 2023-11-15/DataProducts_Update_MinimumSet_Gen.json - */ -async function dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.update( - "aoiresourceGroupName", - "dataproduct01", - {}, - ); - console.log(result); -} - async function main() { dataProductsUpdateMaximumSetGen(); - dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); } main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts deleted file mode 100644 index 1f5ecb3037..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsGetSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to retrieve data product resource. - * - * @summary retrieve data product resource. - * x-ms-original-file: 2023-11-15/DataProducts_Get_MaximumSet_Gen.json - */ -async function dataProductsGetMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.get( - "aoiresourceGroupName", - "dataproduct01", - ); - console.log(result); -} - -/** - * This sample demonstrates how to retrieve data product resource. - * - * @summary retrieve data product resource. - * x-ms-original-file: 2023-11-15/DataProducts_Get_MinimumSet_Gen.json - */ -async function dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.get( - "aoiresourceGroupName", - "dataproduct01", - ); - console.log(result); -} - -async function main() { - dataProductsGetMaximumSetGen(); - dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts deleted file mode 100644 index e409dfc4c9..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsListRolesAssignmentsSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list user roles associated with the data product. - * - * @summary list user roles associated with the data product. - * x-ms-original-file: 2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json - */ -async function dataProductsListRolesAssignmentsMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.listRolesAssignments( - "aoiresourceGroupName", - "dataproduct01", - {}, - ); - console.log(result); -} - -/** - * This sample demonstrates how to list user roles associated with the data product. - * - * @summary list user roles associated with the data product. - * x-ms-original-file: 2023-11-15/DataProducts_ListRolesAssignments_MinimumSet_Gen.json - */ -async function dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.listRolesAssignments( - "aoiresourceGroupName", - "dataproduct01", - {}, - ); - console.log(result); -} - -async function main() { - dataProductsListRolesAssignmentsMaximumSetGen(); - dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts deleted file mode 100644 index a6ded717ab..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataproductsRemoveUserRoleSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to remove role from the data product. - * - * @summary remove role from the data product. - * x-ms-original-file: 2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json - */ -async function dataProductsRemoveUserRoleMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.removeUserRole( - "aoiresourceGroupName", - "dataproduct01", - { - roleId: "00000000-0000-0000-0000-00000000000", - principalId: "00000000-0000-0000-0000-00000000000", - userName: "UserName", - dataTypeScope: ["scope"], - principalType: "User", - role: "Reader", - roleAssignmentId: "00000000-0000-0000-0000-00000000000", - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to remove role from the data product. - * - * @summary remove role from the data product. - * x-ms-original-file: 2023-11-15/DataProducts_RemoveUserRole_MinimumSet_Gen.json - */ -async function dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.removeUserRole( - "aoiresourceGroupName", - "dataproduct01", - { - roleId: "00000000-0000-0000-0000-00000000000", - principalId: "00000000-0000-0000-0000-00000000000", - userName: "UserName", - dataTypeScope: ["scope"], - principalType: "User", - role: "Reader", - roleAssignmentId: "00000000-0000-0000-0000-00000000000", - }, - ); - console.log(result); -} - -async function main() { - dataProductsRemoveUserRoleMaximumSetGen(); - dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts deleted file mode 100644 index ebd1154f6a..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesCreateSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to create data type resource. - * - * @summary create data type resource. - * x-ms-original-file: 2023-11-15/DataTypes_Create_MaximumSet_Gen.json - */ -async function dataTypesCreateMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.create( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - { - properties: { - provisioningState: "Succeeded", - storageOutputRetention: 27, - databaseCacheRetention: 23, - databaseRetention: 6, - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to create data type resource. - * - * @summary create data type resource. - * x-ms-original-file: 2023-11-15/DataTypes_Create_MinimumSet_Gen.json - */ -async function dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.create( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - {}, - ); - console.log(result); -} - -async function main() { - dataTypesCreateMaximumSetGen(); - dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts deleted file mode 100644 index 3e3966dbce..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteDataSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete data for data type. - * - * @summary delete data for data type. - * x-ms-original-file: 2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json - */ -async function dataTypesDeleteDataMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.deleteData( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - {}, - ); - console.log(result); -} - -/** - * This sample demonstrates how to delete data for data type. - * - * @summary delete data for data type. - * x-ms-original-file: 2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json - */ -async function dataTypesDeleteDataMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.deleteData( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - {}, - ); - console.log(result); -} - -async function main() { - dataTypesDeleteDataMaximumSetGen(); - dataTypesDeleteDataMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts deleted file mode 100644 index 5674df4aa7..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesDeleteSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to delete data type resource. - * - * @summary delete data type resource. - * x-ms-original-file: 2023-11-15/DataTypes_Delete_MaximumSet_Gen.json - */ -async function dataTypesDeleteMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.delete( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - ); - console.log(result); -} - -/** - * This sample demonstrates how to delete data type resource. - * - * @summary delete data type resource. - * x-ms-original-file: 2023-11-15/DataTypes_Delete_MinimumSet_Gen.json - */ -async function dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.delete( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - ); - console.log(result); -} - -async function main() { - dataTypesDeleteMaximumSetGen(); - dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts deleted file mode 100644 index 7b1ff4e123..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGenerateStorageContainerSasTokenSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to generate sas token for storage container. - * - * @summary generate sas token for storage container. - * x-ms-original-file: 2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json - */ -async function dataTypesGenerateStorageContainerSasTokenMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.generateStorageContainerSasToken( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - { - startTimeStamp: new Date("2023-08-24T05:34:58.039Z"), - expiryTimeStamp: new Date("2023-08-24T05:34:58.039Z"), - ipAddress: "1.1.1.1", - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to generate sas token for storage container. - * - * @summary generate sas token for storage container. - * x-ms-original-file: 2023-11-15/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json - */ -async function dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.generateStorageContainerSasToken( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - { - startTimeStamp: new Date("2023-08-24T05:35:16.887Z"), - expiryTimeStamp: new Date("2023-08-24T05:35:16.887Z"), - ipAddress: "1.1.1.1", - }, - ); - console.log(result); -} - -async function main() { - dataTypesGenerateStorageContainerSasTokenMaximumSetGen(); - dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts deleted file mode 100644 index b336c39cb3..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesGetSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to retrieve data type resource. - * - * @summary retrieve data type resource. - * x-ms-original-file: 2023-11-15/DataTypes_Get_MaximumSet_Gen.json - */ -async function dataTypesGetMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.get( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - ); - console.log(result); -} - -/** - * This sample demonstrates how to retrieve data type resource. - * - * @summary retrieve data type resource. - * x-ms-original-file: 2023-11-15/DataTypes_Get_MinimumSet_Gen.json - */ -async function dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.get( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - ); - console.log(result); -} - -async function main() { - dataTypesGetMaximumSetGen(); - dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts deleted file mode 100644 index 7d0d4c6b14..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesListByDataProductSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list data type by parent resource. - * - * @summary list data type by parent resource. - * x-ms-original-file: 2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json - */ -async function dataTypesListByDataProductMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataTypes.listByDataProduct( - "aoiresourceGroupName", - "dataproduct01", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -/** - * This sample demonstrates how to list data type by parent resource. - * - * @summary list data type by parent resource. - * x-ms-original-file: 2023-11-15/DataTypes_ListByDataProduct_MinimumSet_Gen.json - */ -async function dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataTypes.listByDataProduct( - "aoiresourceGroupName", - "dataproduct01", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataTypesListByDataProductMaximumSetGen(); - dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts deleted file mode 100644 index f38d15a1ba..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/datatypesUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to update data type resource. - * - * @summary update data type resource. - * x-ms-original-file: 2023-11-15/DataTypes_Update_MaximumSet_Gen.json - */ -async function dataTypesUpdateMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.update( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - { - properties: { - storageOutputRetention: 30, - databaseCacheRetention: 16, - databaseRetention: 9, - }, - }, - ); - console.log(result); -} - -/** - * This sample demonstrates how to update data type resource. - * - * @summary update data type resource. - * x-ms-original-file: 2023-11-15/DataTypes_Update_MinimumSet_Gen.json - */ -async function dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataTypes.update( - "aoiresourceGroupName", - "dataproduct01", - "datatypename", - {}, - ); - console.log(result); -} - -async function main() { - dataTypesUpdateMaximumSetGen(); - dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts deleted file mode 100644 index 70e5f3ac6e..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list the operations for the provider - * - * @summary list the operations for the provider - * x-ms-original-file: 2023-11-15/Operations_List_MaximumSet_Gen.json - */ -async function operationsListMaximumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - - console.log(resArray); -} - -/** - * This sample demonstrates how to list the operations for the provider - * - * @summary list the operations for the provider - * x-ms-original-file: 2023-11-15/Operations_List_MinimumSet_Gen.json - */ -async function operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(): void { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - operationsListMaximumSetGen(); - operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MinimumSet_Gen.json deleted file mode 100644 index 64d882b9f8..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MinimumSet_Gen.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "title": "DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProductsCatalogs_Get", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json deleted file mode 100644 index dc5c9007ff..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen", - "operationId": "DataProductsCatalogs_ListByResourceGroup", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" - } - ] - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json deleted file mode 100644 index 8d464345fe..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "DataProductsCatalogs_ListBySubscription_MinimumSet_Gen", - "operationId": "DataProductsCatalogs_ListBySubscription", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" - } - ] - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MinimumSet_Gen.json deleted file mode 100644 index 06b08f2d27..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MinimumSet_Gen.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "title": "DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProducts_AddUserRole", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "body": { - "roleId": "00000000-0000-0000-0000-00000000000", - "principalId": "00000000-0000-0000-0000-00000000000", - "userName": "userName", - "dataTypeScope": [ - "scope" - ], - "principalType": "User", - "role": "Reader" - } - }, - "responses": { - "200": { - "body": { - "roleId": "00000000-0000-0000-0000-00000000000", - "principalId": "00000000-0000-0000-0000-00000000000", - "userName": "userName", - "dataTypeScope": [ - "scope" - ], - "principalType": "User", - "role": "Reader", - "roleAssignmentId": "00000000-0000-0000-0000-00000000000" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MinimumSet_Gen.json deleted file mode 100644 index 59af0c6292..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MinimumSet_Gen.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "title": "DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProducts_Create", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "resource": { - "location": "eastus", - "properties": { - "publisher": "Microsoft", - "product": "MCC", - "majorVersion": "1.0.0" - }, - "tags": { - "userSpecifiedKeyName": "userSpecifiedKeyValue" - } - } - }, - "responses": { - "200": { - "body": { - "location": "eastus", - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01" - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://contoso.com/operationstatus" - }, - "body": { - "location": "eastus", - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MinimumSet_Gen.json deleted file mode 100644 index 77c64c727c..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MinimumSet_Gen.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "title": "DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProducts_Delete", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01" - }, - "responses": { - "202": { - "headers": { - "location": "https://contoso.com/operationstatus" - } - }, - "204": {} - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json deleted file mode 100644 index eec1c1acf7..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "title": "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProducts_GenerateStorageAccountSasToken", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "body": { - "startTimeStamp": "2023-08-24T05:35:17.051Z", - "expiryTimeStamp": "2023-08-24T05:35:17.051Z", - "ipAddress": "1.1.1.1" - } - }, - "responses": { - "200": { - "body": { - "storageAccountSasToken": "storageAccountSasToken" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen.json deleted file mode 100644 index 13bfa83591..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "title": "DataProducts_Get_MaximumSet_Gen", - "operationId": "DataProducts_Get", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01" - }, - "responses": { - "200": { - "body": { - "properties": { - "resourceGuid": "00000000-0000-0000-0000-000000000000", - "provisioningState": "Succeeded", - "publisher": "Microsoft", - "product": "MCC", - "majorVersion": "1.0.0", - "owners": [ - "abc@micros.com" - ], - "redundancy": "Disabled", - "purviewAccount": "testpurview", - "purviewCollection": "134567890", - "privateLinksEnabled": "Disabled", - "publicNetworkAccess": "Enabled", - "customerManagedKeyEncryptionEnabled": "Enabled", - "customerEncryptionKey": { - "keyVaultUri": "https://KeyVault.vault.azure.net", - "keyName": "keyName", - "keyVersion": "keyVersion" - }, - "networkacls": { - "virtualNetworkRule": [ - { - "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", - "action": "Allow", - "state": "Succeeded" - } - ], - "ipRules": [ - { - "value": "1.1.1.1", - "action": "Allow" - } - ], - "allowedQueryIpRangeList": [ - "1.1.1.1", - "1.1.1.2" - ], - "defaultAction": "Allow" - }, - "managedResourceGroupConfiguration": { - "name": "managedResourceGroupName", - "location": "eastus" - }, - "availableMinorVersions": [ - "1.0.1", - "1.0.2" - ], - "currentMinorVersion": "1.0.1", - "documentation": "https://learn.microsoft.com/", - "consumptionEndpoints": { - "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", - "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", - "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", - "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", - "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", - "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" - }, - "keyVaultUrl": "https://myKeyVault.vault.azure.net" - }, - "identity": { - "principalId": "00000000-0000-0000-0000-000000000000", - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "IdentityType", - "userAssignedIdentities": { - "key8474": { - "principalId": "00000000-0000-0000-0000-000000000000", - "clientId": "00000000-0000-0000-0000-000000000000" - } - } - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", - "name": "dataproduct01", - "type": "Microsoft.NetworkAnalytics/DataProducts", - "location": "eastus", - "tags": { - "userSpecifiedKeyName": "userSpecifiedKeyValue" - }, - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MinimumSet_Gen.json deleted file mode 100644 index 29f68292fc..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Get_MinimumSet_Gen.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "title": "DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProducts_Get", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01" - }, - "responses": { - "200": { - "body": { - "location": "eastus", - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json deleted file mode 100644 index 82de6e9ece..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "title": "DataProducts_ListByResourceGroup_MaximumSet_Gen", - "operationId": "DataProducts_ListByResourceGroup", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "properties": { - "resourceGuid": "00000000-0000-0000-0000-000000000000", - "provisioningState": "Succeeded", - "publisher": "Microsoft", - "product": "MCC", - "majorVersion": "1.0.0", - "owners": [ - "abc@micros.com" - ], - "redundancy": "Disabled", - "purviewAccount": "testpurview", - "purviewCollection": "134567890", - "privateLinksEnabled": "Disabled", - "publicNetworkAccess": "Enabled", - "customerManagedKeyEncryptionEnabled": "Enabled", - "customerEncryptionKey": { - "keyVaultUri": "https://KeyVault.vault.azure.net", - "keyName": "keyName", - "keyVersion": "keyVersion" - }, - "networkacls": { - "virtualNetworkRule": [ - { - "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", - "action": "Allow", - "state": "Succeeded" - } - ], - "ipRules": [ - { - "value": "1.1.1.1", - "action": "Allow" - } - ], - "allowedQueryIpRangeList": [ - "1.1.1.1", - "1.1.1.2" - ], - "defaultAction": "Allow" - }, - "managedResourceGroupConfiguration": { - "name": "managedResourceGroupName", - "location": "eastus" - }, - "availableMinorVersions": [ - "1.0.1", - "1.0.2" - ], - "currentMinorVersion": "1.0.1", - "documentation": "https://learn.microsoft.com/", - "consumptionEndpoints": { - "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", - "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", - "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", - "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", - "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", - "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" - }, - "keyVaultUrl": "https://myKeyVault.vault.azure.net" - }, - "identity": { - "principalId": "00000000-0000-0000-0000-000000000000", - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "IdentityType", - "userAssignedIdentities": { - "key8474": { - "principalId": "00000000-0000-0000-0000-000000000000", - "clientId": "00000000-0000-0000-0000-000000000000" - } - } - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", - "name": "dataproduct01", - "type": "Microsoft.NetworkAnalytics/DataProducts", - "location": "eastus", - "tags": { - "userSpecifiedKeyName": "userSpecifiedKeyValue" - }, - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - ], - "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json deleted file mode 100644 index 16534d88e5..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "title": "DataProducts_ListBySubscription_MaximumSet_Gen", - "operationId": "DataProducts_ListBySubscription", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "properties": { - "resourceGuid": "00000000-0000-0000-0000-000000000000", - "provisioningState": "Succeeded", - "publisher": "Microsoft", - "product": "MCC", - "majorVersion": "1.0.0", - "owners": [ - "abc@micros.com" - ], - "redundancy": "Disabled", - "purviewAccount": "testpurview", - "purviewCollection": "134567890", - "privateLinksEnabled": "Disabled", - "publicNetworkAccess": "Enabled", - "customerManagedKeyEncryptionEnabled": "Enabled", - "customerEncryptionKey": { - "keyVaultUri": "https://KeyVault.vault.azure.net", - "keyName": "keyName", - "keyVersion": "keyVersion" - }, - "networkacls": { - "virtualNetworkRule": [ - { - "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", - "action": "Allow", - "state": "Succeeded" - } - ], - "ipRules": [ - { - "value": "1.1.1.1", - "action": "Allow" - } - ], - "allowedQueryIpRangeList": [ - "1.1.1.1", - "1.1.1.2" - ], - "defaultAction": "Allow" - }, - "managedResourceGroupConfiguration": { - "name": "managedResourceGroupName", - "location": "eastus" - }, - "availableMinorVersions": [ - "1.0.1", - "1.0.2" - ], - "currentMinorVersion": "1.0.1", - "documentation": "https://learn.microsoft.com/", - "consumptionEndpoints": { - "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", - "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", - "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", - "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", - "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", - "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" - }, - "keyVaultUrl": "https://myKeyVault.vault.azure.net" - }, - "identity": { - "principalId": "00000000-0000-0000-0000-000000000000", - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "IdentityType", - "userAssignedIdentities": { - "key8474": { - "principalId": "00000000-0000-0000-0000-000000000000", - "clientId": "00000000-0000-0000-0000-000000000000" - } - } - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", - "name": "dataproduct01", - "type": "Microsoft.NetworkAnalytics/DataProducts", - "location": "eastus", - "tags": { - "userSpecifiedKeyName": "userSpecifiedKeyValue" - }, - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - ], - "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetworkAnalytics/DataProducts?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json deleted file mode 100644 index 774159728d..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "title": "DataProducts_ListRolesAssignments_MaximumSet_Gen", - "operationId": "DataProducts_ListRolesAssignments", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "body": {} - }, - "responses": { - "200": { - "body": { - "count": 1, - "roleAssignmentResponse": [ - { - "roleId": "00000000-0000-0000-0000-00000000000", - "principalId": "00000000-0000-0000-0000-00000000000", - "userName": "UserName", - "dataTypeScope": [ - "scope" - ], - "principalType": "User", - "role": "Reader", - "roleAssignmentId": "00000000-0000-0000-0000-00000000000" - } - ] - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MinimumSet_Gen.json deleted file mode 100644 index 68360878ce..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListRolesAssignments_MinimumSet_Gen.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "title": "DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProducts_ListRolesAssignments", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "body": {} - }, - "responses": { - "200": { - "body": { - "count": 1, - "roleAssignmentResponse": [ - { - "roleId": "00000000-0000-0000-0000-00000000000", - "principalId": "00000000-0000-0000-0000-00000000000", - "userName": "UserName", - "dataTypeScope": [ - "scope" - ], - "principalType": "User", - "role": "Reader", - "roleAssignmentId": "00000000-0000-0000-0000-00000000000" - } - ] - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json deleted file mode 100644 index 1771cd0f71..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "title": "DataProducts_RemoveUserRole_MaximumSet_Gen", - "operationId": "DataProducts_RemoveUserRole", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "body": { - "roleId": "00000000-0000-0000-0000-00000000000", - "principalId": "00000000-0000-0000-0000-00000000000", - "userName": "UserName", - "dataTypeScope": [ - "scope" - ], - "principalType": "User", - "role": "Reader", - "roleAssignmentId": "00000000-0000-0000-0000-00000000000" - } - }, - "responses": { - "204": {} - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MinimumSet_Gen.json deleted file mode 100644 index 8b8bbe3306..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RemoveUserRole_MinimumSet_Gen.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "title": "DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProducts_RemoveUserRole", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "body": { - "roleId": "00000000-0000-0000-0000-00000000000", - "principalId": "00000000-0000-0000-0000-00000000000", - "userName": "UserName", - "dataTypeScope": [ - "scope" - ], - "principalType": "User", - "role": "Reader", - "roleAssignmentId": "00000000-0000-0000-0000-00000000000" - } - }, - "responses": { - "204": {} - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MinimumSet_Gen.json deleted file mode 100644 index c24a79ba5f..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MinimumSet_Gen.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "title": "DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProducts_RotateKey", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "body": { - "keyVaultUrl": "https://myKeyVault.vault.azure.net" - } - }, - "responses": { - "204": {} - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MinimumSet_Gen.json deleted file mode 100644 index 7e457f7c07..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MinimumSet_Gen.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "title": "DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProducts_Update", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "properties": {} - }, - "responses": { - "200": { - "body": { - "location": "jwlerdaudgxff" - } - }, - "202": { - "headers": { - "location": "https://contoso.com/operationstatus" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen.json deleted file mode 100644 index 8fac29e573..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "title": "DataTypes_Create_MaximumSet_Gen", - "operationId": "DataTypes_Create", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename", - "resource": { - "properties": { - "provisioningState": "Succeeded", - "state": "STARTED", - "storageOutputRetention": 27, - "databaseCacheRetention": 23, - "databaseRetention": 6 - } - } - }, - "responses": { - "200": { - "body": { - "properties": { - "provisioningState": "Succeeded", - "state": "STARTED", - "stateReason": "State Reason", - "storageOutputRetention": 27, - "databaseCacheRetention": 23, - "databaseRetention": 6, - "visualizationUrl": "visualizationUrl" - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", - "name": "datatypeName", - "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://contoso.com/operationstatus" - }, - "body": { - "properties": { - "provisioningState": "Succeeded", - "state": "STARTED", - "stateReason": "State Reason", - "storageOutputRetention": 27, - "databaseCacheRetention": 23, - "databaseRetention": 6, - "visualizationUrl": "visualizationUrl" - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", - "name": "datatypename", - "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MinimumSet_Gen.json deleted file mode 100644 index 0f3a573ce6..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Create_MinimumSet_Gen.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "title": "DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataTypes_Create", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename", - "resource": {} - }, - "responses": { - "200": { - "body": {} - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://contoso.com/operationstatus" - }, - "body": {} - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json deleted file mode 100644 index 642dc86756..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "DataTypes_DeleteData_MaximumSet_Gen", - "operationId": "DataTypes_DeleteData", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename", - "body": {} - }, - "responses": { - "202": { - "headers": { - "location": "https://contoso.com/operationstatus" - } - }, - "204": {} - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json deleted file mode 100644 index 3034e317eb..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "DataTypes_DeleteData_MinimumSet_Gen", - "operationId": "DataTypes_DeleteData", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename", - "body": {} - }, - "responses": { - "202": { - "headers": { - "location": "https://contoso.com/operationstatus" - } - }, - "204": {} - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen.json deleted file mode 100644 index 408d593545..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "DataTypes_Delete_MaximumSet_Gen", - "operationId": "DataTypes_Delete", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename" - }, - "responses": { - "202": { - "headers": { - "location": "https://contoso.com/operationstatus" - } - }, - "204": {} - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MinimumSet_Gen.json deleted file mode 100644 index a6c944e733..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Delete_MinimumSet_Gen.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataTypes_Delete", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename" - }, - "responses": { - "202": { - "headers": { - "location": "https://contoso.com/operationstatus" - } - }, - "204": {} - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json deleted file mode 100644 index e7294dedde..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "title": "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen", - "operationId": "DataTypes_GenerateStorageContainerSasToken", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename", - "body": { - "startTimeStamp": "2023-08-24T05:34:58.039Z", - "expiryTimeStamp": "2023-08-24T05:34:58.039Z", - "ipAddress": "1.1.1.1" - } - }, - "responses": { - "200": { - "body": { - "storageContainerSasToken": "storageContainerSasToken" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json deleted file mode 100644 index 8ccc4e1b48..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "title": "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataTypes_GenerateStorageContainerSasToken", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename", - "body": { - "startTimeStamp": "2023-08-24T05:35:16.887Z", - "expiryTimeStamp": "2023-08-24T05:35:16.887Z", - "ipAddress": "1.1.1.1" - } - }, - "responses": { - "200": { - "body": { - "storageContainerSasToken": "storageContainerSasToken" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen.json deleted file mode 100644 index 0db40711ab..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "title": "DataTypes_Get_MaximumSet_Gen", - "operationId": "DataTypes_Get", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename" - }, - "responses": { - "200": { - "body": { - "properties": { - "provisioningState": "Succeeded", - "state": "STARTED", - "stateReason": "state Reason", - "storageOutputRetention": 27, - "databaseCacheRetention": 23, - "databaseRetention": 6, - "visualizationUrl": "visualizationUrl" - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", - "name": "datatypename", - "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MinimumSet_Gen.json deleted file mode 100644 index 3ad5f936e6..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Get_MinimumSet_Gen.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "title": "DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataTypes_Get", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json deleted file mode 100644 index 67ffeb98c0..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "title": "DataTypes_ListByDataProduct_MaximumSet_Gen", - "operationId": "DataTypes_ListByDataProduct", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "properties": { - "provisioningState": "Succeeded", - "state": "STARTED", - "stateReason": "state Reason", - "storageOutputRetention": 27, - "databaseCacheRetention": 23, - "databaseRetention": 6, - "visualizationUrl": "visualizationUrl" - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", - "name": "datatypename", - "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - ], - "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01/dataTypes?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MinimumSet_Gen.json deleted file mode 100644 index 894493ae61..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_ListByDataProduct_MinimumSet_Gen.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "title": "DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataTypes_ListByDataProduct", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename" - } - ] - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen.json deleted file mode 100644 index 61dc8bd10c..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "title": "DataTypes_Update_MaximumSet_Gen", - "operationId": "DataTypes_Update", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename", - "properties": { - "properties": { - "state": "STARTED", - "storageOutputRetention": 30, - "databaseCacheRetention": 16, - "databaseRetention": 9 - } - } - }, - "responses": { - "200": { - "body": { - "properties": { - "provisioningState": "Succeeded", - "state": "STARTED", - "stateReason": "State Reason", - "storageOutputRetention": 30, - "databaseCacheRetention": 16, - "databaseRetention": 9, - "visualizationUrl": "visualizationUrl" - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", - "name": "datatypename", - "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - }, - "202": { - "headers": { - "location": "https://contoso.com/operationstatus" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MinimumSet_Gen.json deleted file mode 100644 index 4e03ae4c7e..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataTypes_Update_MinimumSet_Gen.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "title": "DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataTypes_Update", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName", - "dataProductName": "dataproduct01", - "dataTypeName": "datatypename", - "properties": {} - }, - "responses": { - "200": { - "body": {} - }, - "202": { - "headers": { - "location": "https://contoso.com/operationstatus" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MaximumSet_Gen.json deleted file mode 100644 index b5d4bfbb70..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MaximumSet_Gen.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "title": "Operations_List_MaximumSet_Gen", - "operationId": "Operations_List", - "parameters": { - "api-version": "2023-11-15" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.NetworkAnalytics/resourceName/operationName", - "isDataAction": false, - "display": { - "provider": "Microsoft.NetworkAnalytics", - "resource": "ResourceName", - "operation": "OperationName", - "description": "Description of the operation" - }, - "origin": "user", - "actionType": "Internal" - } - ], - "nextLink": "https://fully.qualified.hyperlink" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MinimumSet_Gen.json deleted file mode 100644 index 1cb2610d6b..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/Operations_List_MinimumSet_Gen.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "title": "Operations_List_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "Operations_List", - "parameters": { - "api-version": "2023-11-15" - }, - "responses": { - "200": { - "body": {} - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml b/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml index dd3b9ae633..9815130afb 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml +++ b/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml @@ -1,8 +1,7 @@ -emit: [ - "@azure-tools/typespec-ts", - ] +emit: ["@azure-tools/typespec-ts"] options: "@azure-tools/typespec-ts": + examples-directory: "{project-root}/spec/examples" generateMetadata: true generateTest: true generateSample: true @@ -11,4 +10,4 @@ options: experimentalExtensibleEnums: true "emitter-output-dir": "{project-root}/generated/typespec-ts" packageDetails: - name: "@azure/arm-networkanalytics" \ No newline at end of file + name: "@azure/arm-networkanalytics" diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bCOp1Sample.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bCOp1Sample.ts deleted file mode 100644 index 17812d2b9a..0000000000 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bCOp1Sample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { FooClient } from "@msinternal/hierarchy-generic"; - -/** - * This sample demonstrates how to undefined - * - * @summary undefined - * x-ms-original-file: cOp1.json - */ -async function cOp1() { - const client = new FooClient(); - const result = await client.b.c.op1({ - prop2: "00000000-0000-0000-0000-00000000000", - }); - console.log(result); -} - -async function main() { - cOp1(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bECOp1Sample.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bECOp1Sample.ts deleted file mode 100644 index 677866bf17..0000000000 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bECOp1Sample.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { FooClient } from "@msinternal/hierarchy-generic"; - -/** - * This sample demonstrates how to undefined - * - * @summary undefined - * x-ms-original-file: cOp1.json - */ -async function cOp1() { - const client = new FooClient(); - const result = await client.b.e.c.op1({}); - console.log(result); -} - -async function main() { - cOp1(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bOp1Sample.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bOp1Sample.ts deleted file mode 100644 index 487a31f535..0000000000 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/bOp1Sample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { FooClient } from "@msinternal/hierarchy-generic"; - -/** - * This sample demonstrates how to undefined - * - * @summary undefined - * x-ms-original-file: bOp1.json - */ -async function bOpeS() { - const client = new FooClient(); - const result = await client.b.op1({ - prop2: "00000000-0000-0000-0000-00000000000", - }); - console.log(result); -} - -async function main() { - bOpeS(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts deleted file mode 100644 index af2dfe0b08..0000000000 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/samples-dev/op1Sample.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { FooClient } from "@msinternal/hierarchy-generic"; - -/** - * This sample demonstrates how to undefined - * - * @summary undefined - * x-ms-original-file: op1.json - */ -async function optop() { - const client = new FooClient(); - const result = await client.op1({ - propRename: "00000000-0000-0000-0000-00000000000", - }); - console.log(result); -} - -async function main() { - optop(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/hierarchy_generic/spec/examples/bOp1.json b/packages/typespec-test/test/hierarchy_generic/spec/examples/bOp1.json deleted file mode 100644 index e359a81e14..0000000000 --- a/packages/typespec-test/test/hierarchy_generic/spec/examples/bOp1.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "title": "B_OpeS", - "operationId": "B_Op1", - "parameters": { - "body": { - "prop2": "00000000-0000-0000-0000-00000000000" - } - }, - "responses": { - "200": { - "body": { - "roleId": "00000000-0000-0000-0000-00000000000", - "principalId": "00000000-0000-0000-0000-00000000000", - "userName": "UserName", - "dataTypeScope": ["scope"], - "principalType": "User", - "role": "Reader", - "roleAssignmentId": "00000000-0000-0000-0000-00000000000" - } - } - } -} diff --git a/packages/typespec-test/test/hierarchy_generic/spec/examples/cOp1.json b/packages/typespec-test/test/hierarchy_generic/spec/examples/cOp1.json deleted file mode 100644 index afa819493d..0000000000 --- a/packages/typespec-test/test/hierarchy_generic/spec/examples/cOp1.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "title": "C_Op1", - "operationId": "C_Op1", - "parameters": { - "body": { - "prop2": "00000000-0000-0000-0000-00000000000" - } - }, - "responses": { - "200": { - "body": { - "roleId": "00000000-0000-0000-0000-00000000000", - "principalId": "00000000-0000-0000-0000-00000000000", - "userName": "UserName", - "dataTypeScope": ["scope"], - "principalType": "User", - "role": "Reader", - "roleAssignmentId": "00000000-0000-0000-0000-00000000000" - } - } - } -} diff --git a/packages/typespec-test/test/hierarchy_generic/spec/examples/op1.json b/packages/typespec-test/test/hierarchy_generic/spec/examples/op1.json deleted file mode 100644 index 1ba456edc1..0000000000 --- a/packages/typespec-test/test/hierarchy_generic/spec/examples/op1.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "title": "Optop", - "operationId": "Op1", - "parameters": { - "body": { - "prop1": "00000000-0000-0000-0000-00000000000" - } - }, - "responses": { - "200": { - "body": { - "roleId": "00000000-0000-0000-0000-00000000000", - "principalId": "00000000-0000-0000-0000-00000000000", - "userName": "UserName", - "dataTypeScope": ["scope"], - "principalType": "User", - "role": "Reader", - "roleAssignmentId": "00000000-0000-0000-0000-00000000000" - } - } - } -} diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index 1791da6f2e..2f2b181710 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -5,6 +5,7 @@ import * as fsextra from "fs-extra"; import { AzureCoreDependencies, + AzureIdentityDependencies, AzurePollingDependencies, DefaultCoreDependencies } from "./modular/external-dependencies.js"; @@ -78,6 +79,7 @@ import { provideBinder } from "./framework/hooks/binder.js"; import { provideSdkTypes } from "./framework/hooks/sdkTypes.js"; import { transformRLCModel } from "./transform/transform.js"; import { transformRLCOptions } from "./transform/transfromRLCOptions.js"; +import { emitSamples } from "./modular/emitSamples.js"; export * from "./lib.js"; @@ -117,7 +119,11 @@ export async function $onEmit(context: EmitContext) { { sourcesDir: modularSourcesDir } ); const extraDependencies = isAzurePackage({ options: rlcOptions }) - ? { ...AzurePollingDependencies, ...AzureCoreDependencies } + ? { + ...AzurePollingDependencies, + ...AzureCoreDependencies, + ...AzureIdentityDependencies + } : { ...DefaultCoreDependencies }; const binder = provideBinder(outputProject, { staticHelpers, @@ -259,6 +265,10 @@ export async function $onEmit(context: EmitContext) { const isMultiClients = modularCodeModel.clients.length > 1; + // Enable modular sample generation when explicitly set to true + if (emitterOptions?.generateSample === true) { + emitSamples(dpgContext); + } for (const subClient of modularCodeModel.clients) { buildModels(subClient, modularCodeModel); buildModelsOptions(subClient, modularCodeModel); diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 80c7d6f454..4f0654d8d9 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -30,8 +30,7 @@ interface ExampleValue { export function emitSamples(dpgContext: SdkContext): SourceFile[] { const generatedFiles: SourceFile[] = []; for (const client of dpgContext.sdkPackage.clients) { - const tmp = emitClassicalClientSamples(dpgContext, client); - generatedFiles.push(...tmp); + generatedFiles.push(...emitClassicalClientSamples(dpgContext, client)); } return generatedFiles; } From 6ebe76ef2a5c06f325f378a6aca5390f25811f4f Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 26 Aug 2024 16:15:36 +0800 Subject: [PATCH 48/83] Update the samples and filter out constant values --- .../dataProductsCatalogsGetSample.ts | 25 ---------- ...oductsCatalogsListByResourceGroupSample.ts | 31 ------------ ...roductsCatalogsListBySubscriptionSample.ts | 29 ----------- .../dataProductsListBySubscriptionSample.ts | 29 ----------- ...taProductsCatalogs_Get_MaximumSet_Gen.json | 45 ----------------- ...gs_ListByResourceGroup_MaximumSet_Gen.json | 50 ------------------- ...ogs_ListBySubscription_MaximumSet_Gen.json | 49 ------------------ ...cts_ListBySubscription_MinimumSet_Gen.json | 20 -------- .../typespec-ts/src/modular/emitSamples.ts | 17 +++++-- 9 files changed, 12 insertions(+), 283 deletions(-) delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsGetSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListByResourceGroupSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListBySubscriptionSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListBySubscriptionSample.ts delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json delete mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsGetSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsGetSample.ts deleted file mode 100644 index 3da4d21d13..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsGetSample.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to retrieve data type resource. - * - * @summary retrieve data type resource. - * x-ms-original-file: 2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json - */ -async function dataProductsCatalogsGetMaximumSetGen() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProductsCatalogs.get("aoiresourceGroupName"); - console.log(result); -} - -async function main() { - dataProductsCatalogsGetMaximumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListByResourceGroupSample.ts deleted file mode 100644 index 150e4cc46f..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListByResourceGroupSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list data catalog by resource group. - * - * @summary list data catalog by resource group. - * x-ms-original-file: 2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json - */ -async function dataProductsCatalogsListByResourceGroupMaximumSetGen() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataProductsCatalogs.listByResourceGroup( - "aoiresourceGroupName", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataProductsCatalogsListByResourceGroupMaximumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListBySubscriptionSample.ts deleted file mode 100644 index 6b31818cb5..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCatalogsListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list data catalog by subscription. - * - * @summary list data catalog by subscription. - * x-ms-original-file: 2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json - */ -async function dataProductsCatalogsListBySubscriptionMaximumSetGen() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataProductsCatalogs.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataProductsCatalogsListBySubscriptionMaximumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListBySubscriptionSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListBySubscriptionSample.ts deleted file mode 100644 index fd1d4abf09..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to list data products by subscription. - * - * @summary list data products by subscription. - * x-ms-original-file: 2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json - */ -async function dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new NetworkAnalyticsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataProducts.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); -} - -main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json deleted file mode 100644 index c125a194c5..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "title": "DataProductsCatalogs_Get_MaximumSet_Gen", - "operationId": "DataProductsCatalogs_Get", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName" - }, - "responses": { - "200": { - "body": { - "properties": { - "provisioningState": "Succeeded", - "publishers": [ - { - "publisherName": "Microsoft", - "dataProducts": [ - { - "dataProductName": "MCC", - "description": "Official data product for Mobile Content Cloud.", - "dataProductVersions": [ - { - "version": "1.0.0" - } - ] - } - ] - } - ] - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", - "name": "default", - "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json deleted file mode 100644 index 4618600508..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "title": "DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen", - "operationId": "DataProductsCatalogs_ListByResourceGroup", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000", - "resourceGroupName": "aoiresourceGroupName" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "properties": { - "provisioningState": "Succeeded", - "publishers": [ - { - "publisherName": "Microsoft", - "dataProducts": [ - { - "dataProductName": "MCC", - "description": "Official data product for Mobile Content Cloud.", - "dataProductVersions": [ - { - "version": "1.0.0" - } - ] - } - ] - } - ] - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", - "name": "default", - "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - ], - "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json deleted file mode 100644 index 335ca166b4..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "title": "DataProductsCatalogs_ListBySubscription_MaximumSet_Gen", - "operationId": "DataProductsCatalogs_ListBySubscription", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "properties": { - "provisioningState": "Succeeded", - "publishers": [ - { - "publisherName": "Microsoft", - "dataProducts": [ - { - "dataProductName": "MCC", - "description": "Official data product for Mobile Content Cloud.", - "dataProductVersions": [ - { - "version": "1.0.0" - } - ] - } - ] - } - ] - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", - "name": "default", - "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", - "systemData": { - "createdBy": "abc@micros.com", - "createdByType": "User", - "createdAt": "2023-09-04T08:26:27.1506343Z", - "lastModifiedBy": "abc@micros.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" - } - } - ], - "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } -} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json deleted file mode 100644 index f1e77fc230..0000000000 --- a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListBySubscription_MinimumSet_Gen.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", - "operationId": "DataProducts_ListBySubscription", - "parameters": { - "api-version": "2023-11-15", - "subscriptionId": "00000000-0000-0000-0000-00000000000" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", - "location": "eastus" - } - ] - } - } - } -} diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 4f0654d8d9..ed2577be49 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -254,7 +254,11 @@ function prepareMethodExampleParameters( ): ExampleValue[] { const parameters: ExampleValue[] = []; for (const param of method.operation.parameters) { - if (param.optional === true || param.onClient === true) { + if ( + param.optional === true || + param.onClient === true || + param.type.kind === "constant" + ) { continue; } const exampleValue = parameterMap[param.serializedName]; @@ -326,9 +330,14 @@ function prepareClientExampleParameters( let subscriptionIdValue = `"00000000-0000-0000-0000-00000000000"`; // required client-level parameters for (const param of method.operation.parameters) { - if (param.onClient === false || param.optional === true) { + if ( + param.onClient === false || + param.optional === true || + param.type.kind === "constant" + ) { continue; } + const exampleValue = parameterMap[param.serializedName]; if (!exampleValue || !exampleValue.value) { // report diagnostic if required parameter is missing @@ -342,6 +351,7 @@ function prepareClientExampleParameters( }); continue; } + if ( param.name.toLowerCase() === "subscriptionid" && isArm(dpgContext) && @@ -350,9 +360,6 @@ function prepareClientExampleParameters( subscriptionIdValue = getParameterValue(exampleValue.value); continue; } - if (exampleValue?.parameter.type.kind === "constant") { - continue; - } result.push({ name: exampleValue.parameter.name, value: getParameterValue(exampleValue.value), From c4e5e7069afba27dba810c7783e1506c3430eeea Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 26 Aug 2024 16:50:06 +0800 Subject: [PATCH 49/83] Refactor the code a little --- .../generated/typespec-ts/tsconfig.json | 5 +++-- packages/typespec-ts/src/index.ts | 13 +++++++++---- packages/typespec-ts/src/modular/emitSamples.ts | 5 +---- packages/typespec-ts/src/utils/clientUtils.ts | 14 ++++---------- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/tsconfig.json b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/tsconfig.json index c295d30216..f9d341617c 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/tsconfig.json +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/tsconfig.json @@ -17,7 +17,8 @@ "forceConsistentCasingInFileNames": true, "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, - "esModuleInterop": true + "esModuleInterop": true, + "paths": { "@azure/arm-networkanalytics": ["./src/index"] } }, - "include": ["./src/**/*.ts", "./test/**/*.ts"] + "include": ["./src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"] } diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index 2f2b181710..55b003da55 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -72,7 +72,7 @@ import { emitSerializerHelpersFile } from "./modular/buildHelperSerializers.js"; import { env } from "process"; import { existsSync } from "fs"; import { getModuleExports } from "./modular/buildProjectFiles.js"; -import { getRLCClients } from "./utils/clientUtils.js"; +import { getRLCClients, isArm } from "./utils/clientUtils.js"; import { join } from "path"; import { loadStaticHelpers } from "./framework/load-static-helpers.js"; import { provideBinder } from "./framework/hooks/binder.js"; @@ -265,9 +265,14 @@ export async function $onEmit(context: EmitContext) { const isMultiClients = modularCodeModel.clients.length > 1; - // Enable modular sample generation when explicitly set to true - if (emitterOptions?.generateSample === true) { - emitSamples(dpgContext); + // Enable modular sample generation when explicitly set to true or MPG + if (emitterOptions?.generateSample === true || isArm(dpgContext)) { + const samples = emitSamples(dpgContext); + // Refine the rlc sample generation logic + // TODO: remember to remove this out when RLC is splitted from Modular + if (samples.length > 0) { + dpgContext.rlcOptions!.generateSample = true; + } } for (const subClient of modularCodeModel.clients) { buildModels(subClient, modularCodeModel); diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index ed2577be49..7d8e715c1e 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -21,6 +21,7 @@ import { join } from "path"; import { AzureIdentityDependencies } from "../modular/external-dependencies.js"; import { reportDiagnostic } from "../index.js"; import { NoTarget } from "@typespec/compiler"; +import { isArm } from "../utils/clientUtils.js"; interface ExampleValue { name: string; @@ -484,7 +485,3 @@ function getCredentialType( )?.type; return credentialParameter ? "Credential" : undefined; } - -function isArm(dpgContext: SdkContext): boolean { - return dpgContext.rlcOptions?.azureArm ?? dpgContext.arm ?? false; -} diff --git a/packages/typespec-ts/src/utils/clientUtils.ts b/packages/typespec-ts/src/utils/clientUtils.ts index 18bc877325..e0491c435e 100644 --- a/packages/typespec-ts/src/utils/clientUtils.ts +++ b/packages/typespec-ts/src/utils/clientUtils.ts @@ -1,9 +1,5 @@ import { SdkClient } from "@azure-tools/typespec-client-generator-core"; -import { - getNamespaceFullName, - listServices, - Namespace -} from "@typespec/compiler"; +import { getNamespaceFullName, listServices } from "@typespec/compiler"; import { SdkContext } from "./interfaces.js"; export function getRLCClients(dpgContext: SdkContext): SdkClient[] { @@ -16,7 +12,7 @@ export function getRLCClients(dpgContext: SdkContext): SdkClient[] { name: clientName, service: service.type, type: service.type, - arm: isArm(service.type), + arm: isArm(dpgContext), crossLanguageDefinitionId: `${getNamespaceFullName( service.type )}.${clientName}` @@ -24,10 +20,8 @@ export function getRLCClients(dpgContext: SdkContext): SdkClient[] { }); } -function isArm(service: Namespace): boolean { - return service.decorators.some( - (decorator) => decorator.decorator.name === "$armProviderNamespace" - ); +export function isArm(dpgContext: SdkContext): boolean { + return dpgContext.rlcOptions?.azureArm ?? dpgContext.arm ?? false; } export function isRLCMultiEndpoint(dpgContext: SdkContext): boolean { From 89e75d30e4c03b96e5b3f56bc601f0270b11de18 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 26 Aug 2024 16:51:22 +0800 Subject: [PATCH 50/83] Refactor the code a little --- .../generated/typespec-ts/package.json | 169 +++++++++++++++++- 1 file changed, 160 insertions(+), 9 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json index d38cd2912c..8c69011be4 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/package.json @@ -13,20 +13,39 @@ ".": "./src/index.ts", "./api": "./src/api/index.ts", "./models": "./src/models/index.ts", - "./api/operations": "src/api/operations/index.ts", - "./api/dataProductsCatalogs": "src/api/dataProductsCatalogs/index.ts", - "./api/dataTypes": "src/api/dataTypes/index.ts", - "./api/dataProducts": "src/api/dataProducts/index.ts" + "./api/operations": "./src/api/operations/index.ts", + "./api/dataProductsCatalogs": "./src/api/dataProductsCatalogs/index.ts", + "./api/dataTypes": "./src/api/dataTypes/index.ts", + "./api/dataProducts": "./src/api/dataProducts/index.ts" }, - "dialects": ["esm", "commonjs"], - "esmDialects": ["browser", "react-native"], + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], "selfLink": false }, "type": "module", - "keywords": ["node", "azure", "cloud", "typescript", "browser", "isomorphic"], + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], "author": "Microsoft Corporation", "license": "MIT", - "files": ["dist", "README.md", "LICENSE", "review/*", "CHANGELOG.md"], + "files": [ + "dist", + "README.md", + "LICENSE", + "review/*", + "CHANGELOG.md" + ], "dependencies": { "@azure/core-util": "^1.9.2", "@azure-rest/core-client": "^2.1.0", @@ -74,5 +93,137 @@ "test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node", "test": "npm run clean && tshy && npm run unit-test:node && npm run unit-test:browser && npm run integration-test", "build": "npm run clean && tshy && npm run extract-api" - } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "react-native": { + "types": "./dist/react-native/index.d.ts", + "default": "./dist/react-native/index.js" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./api": { + "browser": { + "types": "./dist/browser/api/index.d.ts", + "default": "./dist/browser/api/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/index.d.ts", + "default": "./dist/react-native/api/index.js" + }, + "import": { + "types": "./dist/esm/api/index.d.ts", + "default": "./dist/esm/api/index.js" + }, + "require": { + "types": "./dist/commonjs/api/index.d.ts", + "default": "./dist/commonjs/api/index.js" + } + }, + "./models": { + "browser": { + "types": "./dist/browser/models/index.d.ts", + "default": "./dist/browser/models/index.js" + }, + "react-native": { + "types": "./dist/react-native/models/index.d.ts", + "default": "./dist/react-native/models/index.js" + }, + "import": { + "types": "./dist/esm/models/index.d.ts", + "default": "./dist/esm/models/index.js" + }, + "require": { + "types": "./dist/commonjs/models/index.d.ts", + "default": "./dist/commonjs/models/index.js" + } + }, + "./api/operations": { + "browser": { + "types": "./dist/browser/api/operations/index.d.ts", + "default": "./dist/browser/api/operations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/operations/index.d.ts", + "default": "./dist/react-native/api/operations/index.js" + }, + "import": { + "types": "./dist/esm/api/operations/index.d.ts", + "default": "./dist/esm/api/operations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/operations/index.d.ts", + "default": "./dist/commonjs/api/operations/index.js" + } + }, + "./api/dataProductsCatalogs": { + "browser": { + "types": "./dist/browser/api/dataProductsCatalogs/index.d.ts", + "default": "./dist/browser/api/dataProductsCatalogs/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/dataProductsCatalogs/index.d.ts", + "default": "./dist/react-native/api/dataProductsCatalogs/index.js" + }, + "import": { + "types": "./dist/esm/api/dataProductsCatalogs/index.d.ts", + "default": "./dist/esm/api/dataProductsCatalogs/index.js" + }, + "require": { + "types": "./dist/commonjs/api/dataProductsCatalogs/index.d.ts", + "default": "./dist/commonjs/api/dataProductsCatalogs/index.js" + } + }, + "./api/dataTypes": { + "browser": { + "types": "./dist/browser/api/dataTypes/index.d.ts", + "default": "./dist/browser/api/dataTypes/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/dataTypes/index.d.ts", + "default": "./dist/react-native/api/dataTypes/index.js" + }, + "import": { + "types": "./dist/esm/api/dataTypes/index.d.ts", + "default": "./dist/esm/api/dataTypes/index.js" + }, + "require": { + "types": "./dist/commonjs/api/dataTypes/index.d.ts", + "default": "./dist/commonjs/api/dataTypes/index.js" + } + }, + "./api/dataProducts": { + "browser": { + "types": "./dist/browser/api/dataProducts/index.d.ts", + "default": "./dist/browser/api/dataProducts/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/dataProducts/index.d.ts", + "default": "./dist/react-native/api/dataProducts/index.js" + }, + "import": { + "types": "./dist/esm/api/dataProducts/index.d.ts", + "default": "./dist/esm/api/dataProducts/index.js" + }, + "require": { + "types": "./dist/commonjs/api/dataProducts/index.d.ts", + "default": "./dist/commonjs/api/dataProducts/index.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js" } From 00f2b838bce98fbb1b1cc6de8c63e5d107f4d547 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 26 Aug 2024 17:02:07 +0800 Subject: [PATCH 51/83] Squash the commit hashes for sample gen --- .vscode/launch.json | 4 +- common/config/rush/pnpm-lock.yaml | 52 +- .../dataProductsAddUserRoleSample.ts | 36 ++ .../samples-dev/dataProductsCreateSample.ts | 75 +++ .../samples-dev/dataProductsDeleteSample.ts | 28 + ...ctsGenerateStorageAccountSasTokenSample.ts | 33 ++ .../dataProductsListByResourceGroupSample.ts | 31 ++ .../dataProductsRotateKeySample.ts | 29 ++ .../samples-dev/dataProductsUpdateSample.ts | 45 ++ .../generated/typespec-ts/tsconfig.json | 5 +- ...taProducts_AddUserRole_MaximumSet_Gen.json | 35 ++ .../DataProducts_Create_MaximumSet_Gen.json | 252 +++++++++ .../DataProducts_Delete_MaximumSet_Gen.json | 18 + ...StorageAccountSasToken_MaximumSet_Gen.json | 22 + ...ts_ListByResourceGroup_MinimumSet_Gen.json | 21 + ...DataProducts_RotateKey_MaximumSet_Gen.json | 16 + .../DataProducts_Update_MaximumSet_Gen.json | 129 +++++ .../tspconfig.yaml | 7 +- packages/typespec-ts/package.json | 2 +- packages/typespec-ts/src/index.ts | 24 +- packages/typespec-ts/src/lib.ts | 6 + .../typespec-ts/src/modular/emitSamples.ts | 487 ++++++++++++++++++ .../src/modular/external-dependencies.ts | 8 + packages/typespec-ts/src/utils/clientUtils.ts | 14 +- .../test/commands/cadl-ranch-list.js | 4 + .../integration/azureExampleClient.spec.ts | 35 ++ .../generated/azure/example/basic/.gitignore | 6 + .../azure/example/basic/src/index.d.ts | 84 +++ .../azure/example/basic/tspconfig.yaml | 12 + .../azureExampleClient.spec.ts | 29 ++ .../generated/azure/example/basic/.gitignore | 6 + .../azure/example/basic/src/index.d.ts | 43 ++ .../azure/example/basic/tspconfig.yaml | 12 + .../test/modularUnit/scenarios.spec.ts | 70 ++- .../modularUnit/scenarios/example/example.md | 22 +- .../samples/client/disableHierarchyClient.md | 156 ++++++ .../samples/client/enableHierarchyClient.md | 156 ++++++ .../samples/client/parameterizedHost.md | 117 +++++ .../samples/operations/armCurdOperations.md | 245 +++++++++ .../samples/operations/dpgCurdOperations.md | 204 ++++++++ .../parameters/paramaterSpreadCheck.md | 96 ++++ .../samples/parameters/parameterTypesCheck.md | 95 ++++ packages/typespec-ts/test/util/emitUtil.ts | 27 +- packages/typespec-ts/test/util/testUtil.ts | 80 ++- 44 files changed, 2827 insertions(+), 51 deletions(-) create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json create mode 100644 packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen.json create mode 100644 packages/typespec-ts/src/modular/emitSamples.ts create mode 100644 packages/typespec-ts/test/integration/azureExampleClient.spec.ts create mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore create mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts create mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml create mode 100644 packages/typespec-ts/test/modularIntegration/azureExampleClient.spec.ts create mode 100644 packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/.gitignore create mode 100644 packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/src/index.d.ts create mode 100644 packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/parameterizedHost.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md diff --git a/.vscode/launch.json b/.vscode/launch.json index 1f6a0fe332..7600924268 100755 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -112,7 +112,7 @@ { "name": "[TypeSpec] Smoke Test Debug", "request": "launch", - "cwd": "${workspaceFolder}/packages/typespec-test/test/customWrapper", + "cwd": "${workspaceFolder}/packages/typespec-test/test/NetworkAnalytics.Management", "runtimeArgs": ["tsp", "compile", "./spec"], "runtimeExecutable": "npx", "skipFiles": ["/**"], @@ -146,7 +146,7 @@ "--timeout", "999999", "--colors", - "./test/unit/**/*.spec.ts" + "./test/modularUnit/**/*.spec.ts" ], "runtimeExecutable": "npx", "skipFiles": ["/**"], diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 84d0ecad93..09b3c8b46f 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -237,7 +237,7 @@ importers: '@azure-tools/typespec-autorest': '>=0.45.0 <1.0.0' '@azure-tools/typespec-azure-core': '>=0.45.0 <1.0.0' '@azure-tools/typespec-azure-resource-manager': '>=0.45.0 <1.0.0' - '@azure-tools/typespec-client-generator-core': '>=0.45.1 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.45.3 <1.0.0' '@azure/abort-controller': ^2.1.2 '@azure/core-auth': ^1.6.0 '@azure/core-lro': ^3.0.0 @@ -292,10 +292,10 @@ importers: '@azure-tools/cadl-ranch-api': 0.4.6 '@azure-tools/cadl-ranch-expect': 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu '@azure-tools/cadl-ranch-specs': 0.36.1_cvode6xhpuyl3aj5dk75xzx5nu - '@azure-tools/typespec-autorest': 0.45.0_n4w2xh5fhregk7uzwn23tc3udm + '@azure-tools/typespec-autorest': 0.45.0_ch4e7dmaodljkmzs7h7dd2lznu '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte '@azure-tools/typespec-azure-resource-manager': 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i - '@azure-tools/typespec-client-generator-core': 0.45.1_rxzquxnvxkwebgrumlsfc6ni5i + '@azure-tools/typespec-client-generator-core': 0.45.4_rxzquxnvxkwebgrumlsfc6ni5i '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.6.0 '@azure/core-lro': 3.0.0 @@ -542,6 +542,29 @@ packages: - supports-color dev: true + /@azure-tools/typespec-autorest/0.45.0_ch4e7dmaodljkmzs7h7dd2lznu: + resolution: {integrity: sha512-6ycZ0bEfXC0U26FHHEt9smAhxh78SACIDY+u7zLAopRzmxjTuthDdGgYSShuRDu3J+vEBi1fOKpz4cYQkgRkBQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@azure-tools/typespec-azure-core': ~0.45.0 + '@azure-tools/typespec-azure-resource-manager': ~0.45.0 + '@azure-tools/typespec-client-generator-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@azure-tools/typespec-azure-resource-manager': 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i + '@azure-tools/typespec-client-generator-core': 0.45.4_rxzquxnvxkwebgrumlsfc6ni5i + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + dev: true + /@azure-tools/typespec-autorest/0.45.0_n4w2xh5fhregk7uzwn23tc3udm: resolution: {integrity: sha512-6ycZ0bEfXC0U26FHHEt9smAhxh78SACIDY+u7zLAopRzmxjTuthDdGgYSShuRDu3J+vEBi1fOKpz4cYQkgRkBQ==} engines: {node: '>=18.0.0'} @@ -563,6 +586,7 @@ packages: '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + dev: false /@azure-tools/typespec-azure-core/0.45.0_alrznhyrw66bvx6gp4zrtdfkte: resolution: {integrity: sha512-GycGMCmaIVSN+TftPtlPJLyeOrglbLmH08ZiZaVMjSih/TQEJM21RGR6d8QdjlkQWN61ntNDRD+RP2uv9tHmqw==} @@ -615,6 +639,28 @@ packages: '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 change-case: 5.4.4 pluralize: 8.0.0 + dev: false + + /@azure-tools/typespec-client-generator-core/0.45.4_rxzquxnvxkwebgrumlsfc6ni5i: + resolution: {integrity: sha512-QJygwMqhEtBi2tPYs/HAfs0QTowXAwp6QpP/Vd2pHnJAncTV1BN17n/9LLAlMu2CnLimqvTuIN+FfliM28AX9w==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@azure-tools/typespec-azure-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + change-case: 5.4.4 + pluralize: 8.0.0 + dev: true /@azure/abort-controller/1.1.0: resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts new file mode 100644 index 0000000000..d304daf4e0 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to assign role to the data product. + * + * @summary assign role to the data product. + * x-ms-original-file: 2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json + */ +async function dataProductsAddUserRoleMaximumSetGen() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataProducts.addUserRole( + "aoiresourceGroupName", + "dataproduct01", + { + roleId: "00000000-0000-0000-0000-00000000000", + principalId: "00000000-0000-0000-0000-00000000000", + userName: "UserName", + dataTypeScope: ["scope"], + principalType: "User", + role: "Reader", + }, + ); + console.log(result); +} + +async function main() { + dataProductsAddUserRoleMaximumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts new file mode 100644 index 0000000000..e68c3328d6 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create data product resource. + * + * @summary create data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Create_MaximumSet_Gen.json + */ +async function dataProductsCreateMaximumSetGen() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataProducts.create( + "aoiresourceGroupName", + "dataproduct01", + { + properties: { + provisioningState: "Succeeded", + publisher: "Microsoft", + product: "MCC", + majorVersion: "1.0.0", + owners: ["abc@micros.com"], + redundancy: "Disabled", + purviewAccount: "testpurview", + purviewCollection: "134567890", + privateLinksEnabled: "Disabled", + publicNetworkAccess: "Enabled", + customerManagedKeyEncryptionEnabled: "Enabled", + customerEncryptionKey: { + keyVaultUri: "https://KeyVault.vault.azure.net", + keyName: "keyName", + keyVersion: "keyVersion", + }, + networkacls: { + virtualNetworkRule: [ + { + id: "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + action: "Allow", + state: "", + }, + ], + ipRules: [{ value: "1.1.1.1", action: "Allow" }], + allowedQueryIpRangeList: ["1.1.1.1"], + defaultAction: "Allow", + }, + managedResourceGroupConfiguration: { + name: "managedResourceGroupName", + location: "eastus", + }, + currentMinorVersion: "1.0.1", + consumptionEndpoints: {}, + }, + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": + {}, + }, + }, + tags: { userSpecifiedKeyName: "userSpecifiedKeyValue" }, + location: "eastus", + }, + ); + console.log(result); +} + +async function main() { + dataProductsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts new file mode 100644 index 0000000000..f05e4fb419 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete data product resource. + * + * @summary delete data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Delete_MaximumSet_Gen.json + */ +async function dataProductsDeleteMaximumSetGen() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataProducts.delete( + "aoiresourceGroupName", + "dataproduct01", + ); + console.log(result); +} + +async function main() { + dataProductsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts new file mode 100644 index 0000000000..6c086ccd87 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to generate sas token for storage account. + * + * @summary generate sas token for storage account. + * x-ms-original-file: 2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json + */ +async function dataProductsGenerateStorageAccountSasTokenMaximumSetGen() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataProducts.generateStorageAccountSasToken( + "aoiresourceGroupName", + "dataproduct01", + { + startTimeStamp: new Date("2023-08-24T05:34:58.151Z"), + expiryTimeStamp: new Date("2023-08-24T05:34:58.151Z"), + ipAddress: "1.1.1.1", + }, + ); + console.log(result); +} + +async function main() { + dataProductsGenerateStorageAccountSasTokenMaximumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts new file mode 100644 index 0000000000..8b93bdecae --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list data products by resource group. + * + * @summary list data products by resource group. + * x-ms-original-file: 2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json + */ +async function dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.dataProducts.listByResourceGroup( + "aoiresourceGroupName", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts new file mode 100644 index 0000000000..d6b0d724ba --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to initiate key rotation on Data Product. + * + * @summary initiate key rotation on Data Product. + * x-ms-original-file: 2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json + */ +async function dataProductsRotateKeyMaximumSetGen() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataProducts.rotateKey( + "aoiresourceGroupName", + "dataproduct01", + { keyVaultUrl: "https://myKeyVault.vault.azure.net" }, + ); + console.log(result); +} + +async function main() { + dataProductsRotateKeyMaximumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts new file mode 100644 index 0000000000..7b618c6c86 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update data product resource. + * + * @summary update data product resource. + * x-ms-original-file: 2023-11-15/DataProducts_Update_MaximumSet_Gen.json + */ +async function dataProductsUpdateMaximumSetGen() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new NetworkAnalyticsClient(credential, subscriptionId); + const result = await client.dataProducts.update( + "aoiresourceGroupName", + "dataproduct01", + { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": + {}, + }, + }, + tags: { userSpecifiedKeyName: "userSpecifiedKeyValue" }, + properties: { + owners: ["abc@micros.com", "def@micros.com"], + purviewAccount: "testpurview", + purviewCollection: "134567890", + privateLinksEnabled: "Disabled", + currentMinorVersion: "1.0.1", + }, + }, + ); + console.log(result); +} + +async function main() { + dataProductsUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/tsconfig.json b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/tsconfig.json index c295d30216..f9d341617c 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/tsconfig.json +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/tsconfig.json @@ -17,7 +17,8 @@ "forceConsistentCasingInFileNames": true, "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, - "esModuleInterop": true + "esModuleInterop": true, + "paths": { "@azure/arm-networkanalytics": ["./src/index"] } }, - "include": ["./src/**/*.ts", "./test/**/*.ts"] + "include": ["./src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"] } diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json new file mode 100644 index 0000000000..98b687ed20 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "title": "DataProducts_AddUserRole_MaximumSet_Gen", + "operationId": "DataProducts_AddUserRole", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": [ + "scope" + ], + "principalType": "User", + "role": "Reader" + } + }, + "responses": { + "200": { + "body": { + "roleId": "00000000-0000-0000-0000-00000000000", + "principalId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName", + "dataTypeScope": [ + "scope" + ], + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen.json new file mode 100644 index 0000000000..547af9ceb2 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen.json @@ -0,0 +1,252 @@ +{ + "title": "DataProducts_Create_MaximumSet_Gen", + "operationId": "DataProducts_Create", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "resource": { + "properties": { + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "currentMinorVersion": "1.0.1", + "consumptionEndpoints": {} + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "location": "eastus" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "Succeeded" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "currentMinorVersion": "1.0.1", + "documentation": "https://learn.microsoft.com/", + "consumptionEndpoints": { + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" + }, + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "IdentityType", + "userAssignedIdentities": { + "key8474": { + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "location": "eastus", + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + }, + "body": { + "properties": { + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "Succeeded" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "currentMinorVersion": "1.0.1", + "documentation": "https://learn.microsoft.com/", + "consumptionEndpoints": { + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" + }, + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "IdentityType", + "userAssignedIdentities": { + "key8474": { + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "location": "eastus", + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..9723fd225e --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "DataProducts_Delete_MaximumSet_Gen", + "operationId": "DataProducts_Delete", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json new file mode 100644 index 0000000000..12fc2e4a3d --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen", + "operationId": "DataProducts_GenerateStorageAccountSasToken", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "startTimeStamp": "2023-08-24T05:34:58.151Z", + "expiryTimeStamp": "2023-08-24T05:34:58.151Z", + "ipAddress": "1.1.1.1" + } + }, + "responses": { + "200": { + "body": { + "storageAccountSasToken": "storageAccountSasToken" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json new file mode 100644 index 0000000000..1f203c3641 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_ListByResourceGroup_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "operationId": "DataProducts_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + ] + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json new file mode 100644 index 0000000000..d34d4fff9e --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "title": "DataProducts_RotateKey_MaximumSet_Gen", + "operationId": "DataProducts_RotateKey", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "body": { + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + } + }, + "responses": { + "204": {} + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen.json b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen.json new file mode 100644 index 0000000000..e2e0b84ff4 --- /dev/null +++ b/packages/typespec-test/test/NetworkAnalytics.Management/spec/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen.json @@ -0,0 +1,129 @@ +{ + "title": "DataProducts_Update_MaximumSet_Gen", + "operationId": "DataProducts_Update", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "resourceGroupName": "aoiresourceGroupName", + "dataProductName": "dataproduct01", + "properties": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "properties": { + "owners": [ + "abc@micros.com", + "def@micros.com" + ], + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "currentMinorVersion": "1.0.1" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "provisioningState": "Succeeded", + "publisher": "Microsoft", + "product": "MCC", + "majorVersion": "1.0.0", + "owners": [ + "abc@micros.com", + "def@micros.com" + ], + "redundancy": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "privateLinksEnabled": "Disabled", + "publicNetworkAccess": "Enabled", + "customerManagedKeyEncryptionEnabled": "Enabled", + "customerEncryptionKey": { + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyName": "keyName", + "keyVersion": "keyVersion" + }, + "networkacls": { + "virtualNetworkRule": [ + { + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "action": "Allow", + "state": "Succeeded" + } + ], + "ipRules": [ + { + "value": "1.1.1.1", + "action": "Allow" + } + ], + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow" + }, + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "currentMinorVersion": "1.0.1", + "documentation": "https://learn.microsoft.com/", + "consumptionEndpoints": { + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName" + }, + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "IdentityType", + "userAssignedIdentities": { + "key8474": { + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "location": "eastus", + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + }, + "systemData": { + "createdBy": "abc@micros.com", + "createdByType": "User", + "createdAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z" + } + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml b/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml index dd3b9ae633..9815130afb 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml +++ b/packages/typespec-test/test/NetworkAnalytics.Management/tspconfig.yaml @@ -1,8 +1,7 @@ -emit: [ - "@azure-tools/typespec-ts", - ] +emit: ["@azure-tools/typespec-ts"] options: "@azure-tools/typespec-ts": + examples-directory: "{project-root}/spec/examples" generateMetadata: true generateTest: true generateSample: true @@ -11,4 +10,4 @@ options: experimentalExtensibleEnums: true "emitter-output-dir": "{project-root}/generated/typespec-ts" packageDetails: - name: "@azure/arm-networkanalytics" \ No newline at end of file + name: "@azure/arm-networkanalytics" diff --git a/packages/typespec-ts/package.json b/packages/typespec-ts/package.json index 65f3075739..15bb61261c 100644 --- a/packages/typespec-ts/package.json +++ b/packages/typespec-ts/package.json @@ -70,7 +70,7 @@ "@azure-tools/typespec-autorest": ">=0.45.0 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.45.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.45.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.45.1 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.45.3 <1.0.0", "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.6.0", "@azure/core-lro": "^3.0.0", diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index e07972dde8..55b003da55 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -5,6 +5,7 @@ import * as fsextra from "fs-extra"; import { AzureCoreDependencies, + AzureIdentityDependencies, AzurePollingDependencies, DefaultCoreDependencies } from "./modular/external-dependencies.js"; @@ -71,13 +72,14 @@ import { emitSerializerHelpersFile } from "./modular/buildHelperSerializers.js"; import { env } from "process"; import { existsSync } from "fs"; import { getModuleExports } from "./modular/buildProjectFiles.js"; -import { getRLCClients } from "./utils/clientUtils.js"; +import { getRLCClients, isArm } from "./utils/clientUtils.js"; import { join } from "path"; import { loadStaticHelpers } from "./framework/load-static-helpers.js"; import { provideBinder } from "./framework/hooks/binder.js"; import { provideSdkTypes } from "./framework/hooks/sdkTypes.js"; import { transformRLCModel } from "./transform/transform.js"; import { transformRLCOptions } from "./transform/transfromRLCOptions.js"; +import { emitSamples } from "./modular/emitSamples.js"; export * from "./lib.js"; @@ -117,7 +119,11 @@ export async function $onEmit(context: EmitContext) { { sourcesDir: modularSourcesDir } ); const extraDependencies = isAzurePackage({ options: rlcOptions }) - ? { ...AzurePollingDependencies, ...AzureCoreDependencies } + ? { + ...AzurePollingDependencies, + ...AzureCoreDependencies, + ...AzureIdentityDependencies + } : { ...DefaultCoreDependencies }; const binder = provideBinder(outputProject, { staticHelpers, @@ -259,6 +265,15 @@ export async function $onEmit(context: EmitContext) { const isMultiClients = modularCodeModel.clients.length > 1; + // Enable modular sample generation when explicitly set to true or MPG + if (emitterOptions?.generateSample === true || isArm(dpgContext)) { + const samples = emitSamples(dpgContext); + // Refine the rlc sample generation logic + // TODO: remember to remove this out when RLC is splitted from Modular + if (samples.length > 0) { + dpgContext.rlcOptions!.generateSample = true; + } + } for (const subClient of modularCodeModel.clients) { buildModels(subClient, modularCodeModel); buildModelsOptions(subClient, modularCodeModel); @@ -410,5 +425,8 @@ export async function createContextWithDefaultOptions( ...tcgcSettings }; - return (await createSdkContext(context)) as SdkContext; + return (await createSdkContext( + context, + context.program.emitters[0]?.metadata.name ?? "@azure-tools/typespec-ts" + )) as SdkContext; } diff --git a/packages/typespec-ts/src/lib.ts b/packages/typespec-ts/src/lib.ts index 8ab6b24f59..09f971bdc6 100644 --- a/packages/typespec-ts/src/lib.ts +++ b/packages/typespec-ts/src/lib.ts @@ -244,6 +244,12 @@ const libDef = { messages: { default: paramMessage`Authentication type ${"credentialType"} is not supported.` } + }, + "required-sample-parameter": { + severity: "warning", + messages: { + default: paramMessage`The parameter ${"paramName"} in ${"exampleName"} is required but no value provided.` + } } }, emitter: { diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts new file mode 100644 index 0000000000..7d8e715c1e --- /dev/null +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -0,0 +1,487 @@ +import { + StructureKind, + FunctionDeclarationStructure, + SourceFile +} from "ts-morph"; +import { resolveReference } from "../framework/reference.js"; +import { SdkContext } from "../utils/interfaces.js"; +import { + SdkClientType, + SdkHttpOperationExample, + SdkHttpParameterExample, + SdkInitializationType, + SdkServiceMethod, + SdkServiceOperation, + SdkType, + SdkTypeExample +} from "@azure-tools/typespec-client-generator-core"; +import { NameType, normalizeName } from "@azure-tools/rlc-common"; +import { useContext } from "../contextManager.js"; +import { join } from "path"; +import { AzureIdentityDependencies } from "../modular/external-dependencies.js"; +import { reportDiagnostic } from "../index.js"; +import { NoTarget } from "@typespec/compiler"; +import { isArm } from "../utils/clientUtils.js"; + +interface ExampleValue { + name: string; + value: string; + isOptional: boolean; +} +export function emitSamples(dpgContext: SdkContext): SourceFile[] { + const generatedFiles: SourceFile[] = []; + for (const client of dpgContext.sdkPackage.clients) { + generatedFiles.push(...emitClassicalClientSamples(dpgContext, client)); + } + return generatedFiles; +} + +function emitClassicalClientSamples( + dpgContext: SdkContext, + client: SdkClientType, + operationGroupPrefix?: string +) { + // build client-level parameters + const clientName = client.name; + const credentialParameterType = getCredentialType(client.initialization); + const generatedFiles: SourceFile[] = []; + emitClassicalClientSamplesDfs( + dpgContext, + client, + clientName, + generatedFiles, + credentialParameterType, + operationGroupPrefix ?? "" + ); + return generatedFiles; +} + +function emitClassicalClientSamplesDfs( + dpgContext: SdkContext, + client: SdkClientType, + clientName: string, + generatedFiles: SourceFile[], + credentialParameterType?: string, + operationGroupPrefix?: string +) { + for (const operationOrGroup of client.methods) { + if (operationOrGroup.kind === "clientaccessor") { + let prefix = normalizeName( + operationOrGroup.response.name, + NameType.Property + ); + // append hierarchy prefix if hierarchyClient is enabled + if (dpgContext.rlcOptions?.hierarchyClient === true) { + prefix = + (operationGroupPrefix ? `${operationGroupPrefix}.` : "") + prefix; + } + + emitClassicalClientSamplesDfs( + dpgContext, + operationOrGroup.response, + clientName, + generatedFiles, + credentialParameterType, + prefix + ); + } else { + const sample = emitMethodSamples(dpgContext, operationOrGroup, { + clientName, + credentialType: credentialParameterType, + operationGroupPrefix + }); + if (sample) { + generatedFiles.push(sample); + } + } + } +} + +function emitMethodSamples( + dpgContext: SdkContext, + method: SdkServiceMethod, + options: { + clientName: string; + credentialType?: string; + operationGroupPrefix?: string; + } +): SourceFile | undefined { + const examples = method.operation.examples ?? []; + if (examples.length === 0) { + return; + } + const project = useContext("outputProject"); + const operationPrefix = `${options.operationGroupPrefix ?? ""} ${ + method.name + }`; + const sampleFolder = join( + dpgContext.generationPathDetail?.rootDir ?? "", + "samples-dev" + ); + const fileName = normalizeName(`${operationPrefix} Sample`, NameType.File); + const sourceFile = project.createSourceFile( + join(sampleFolder, `${fileName}.ts`), + "", + { + overwrite: true + } + ); + const exampleFunctions = []; + // TODO: remove hard-coded for package + if (dpgContext.rlcOptions?.packageDetails?.name) { + sourceFile.addImportDeclaration({ + moduleSpecifier: dpgContext.rlcOptions?.packageDetails?.name, + namedImports: [options.clientName] + }); + } + + for (const example of examples) { + // build example + const exampleFunctionBody: string[] = []; + const exampleName = normalizeName( + escapeSpecialCharToSpace(example.name), + NameType.Method + ); + const exampleFunctionType = { + name: exampleName, + returnType: "void", + body: exampleFunctionBody + }; + const parameterMap: Record = + buildParameterValueMap(example); + // prepare client-level parameters + const clientParamValues = prepareClientExampleParameters( + dpgContext, + method, + parameterMap, + options.credentialType + ); + const clientParams: string[] = clientParamValues + .filter((p) => !p.isOptional) + .map((param) => { + exampleFunctionBody.push(`const ${param.name} = ${param.value};`); + return param.name; + }); + const optionalClientParams = clientParamValues + .filter((p) => p.isOptional) + .map((param) => `${param.name}: ${param.value}`); + if (optionalClientParams.length > 0) { + exampleFunctionBody.push( + `const clientOptions = {${optionalClientParams.join(", ")}};` + ); + clientParams.push("clientOptions"); + } + exampleFunctionBody.push( + `const client = new ${options.clientName}(${clientParams.join(", ")});` + ); + + // prepare operation-level parameters + const methodParamValues = prepareMethodExampleParameters( + dpgContext, + exampleName, + method, + parameterMap + ); + const methodParams = methodParamValues + .filter((p) => !p.isOptional) + .map((p) => `${p.value}`); + const optionalParams = methodParamValues + .filter((p) => p.isOptional) + .map((param) => `${param.name}: ${param.value}`); + if (optionalParams.length > 0) { + methodParams.push(`{${optionalParams.join(", ")}}`); + } + const prefix = options.operationGroupPrefix + ? `${options.operationGroupPrefix}.` + : ""; + const isPaging = method.kind === "paging"; + const methodCall = `client.${prefix}${method.name}(${methodParams.join( + ", " + )})`; + if (isPaging) { + exampleFunctionBody.push(`const resArray = new Array();`); + exampleFunctionBody.push( + `for await (let item of ${methodCall}) { resArray.push(item); }` + ); + exampleFunctionBody.push(`console.log(resArray);`); + } else { + exampleFunctionBody.push(`const result = await ${methodCall};`); + exampleFunctionBody.push(`console.log(result);`); + } + + // Create a function declaration structure + const normalizedDescription = + (method.description?.charAt(0).toLowerCase() ?? "") + + method.description?.slice(1); + const functionDeclaration: FunctionDeclarationStructure = { + kind: StructureKind.Function, + isAsync: true, + name: exampleFunctionType.name, + statements: exampleFunctionType.body, + docs: [ + `This sample demonstrates how to ${normalizedDescription}\n\n@summary ${normalizedDescription}\nx-ms-original-file: ${example.filePath}` + ] + }; + sourceFile.addFunction(functionDeclaration); + exampleFunctions.push(exampleFunctionType.name); + } + // Add statements referencing the tracked declarations + const functions = exampleFunctions.map((f) => `${f}();`).join("\n"); + sourceFile.addStatements(` + async function main() { + ${functions} + } + + main().catch(console.error);`); + return sourceFile; +} + +function buildParameterValueMap(example: SdkHttpOperationExample) { + const parameterMap: Record = {}; + example.parameters.forEach( + (param) => + (parameterMap[ + (param.parameter as any).serializedName ?? param.parameter.name + ] = param) + ); + return parameterMap; +} + +function prepareMethodExampleParameters( + dpgContext: SdkContext, + exampleName: string, + method: SdkServiceMethod, + parameterMap: Record +): ExampleValue[] { + const parameters: ExampleValue[] = []; + for (const param of method.operation.parameters) { + if ( + param.optional === true || + param.onClient === true || + param.type.kind === "constant" + ) { + continue; + } + const exampleValue = parameterMap[param.serializedName]; + if (!exampleValue || !exampleValue.value) { + // report diagnostic if required parameter is missing + reportDiagnostic(dpgContext.program, { + code: "required-sample-parameter", + format: { + exampleName: exampleName, + paramName: param.name + }, + target: NoTarget + }); + continue; + } + + parameters.push({ + name: param.name, + value: getParameterValue(exampleValue.value), + isOptional: false + }); + } + // required/optional body parameters + const bodyName = method.operation.bodyParam?.name; + if (bodyName && parameterMap[bodyName]) { + const example = parameterMap[bodyName]; + if (example && example.value) { + parameters.push({ + name: bodyName, + value: getParameterValue(example.value), + isOptional: Boolean(method.operation.bodyParam?.optional) + }); + } + } + // optional parameters + method.operation.parameters + .filter( + (param) => param.optional === true && parameterMap[param.serializedName] + ) + .map((param) => parameterMap[param.serializedName]!) + .forEach((param) => { + parameters.push({ + name: param.parameter.name, + value: getParameterValue(param.value), + isOptional: true + }); + }); + return parameters; +} + +function prepareClientExampleParameters( + dpgContext: SdkContext, + method: SdkServiceMethod, + parameterMap: Record, + credentialType?: string +): ExampleValue[] { + // TODO: blocked by tcgc issue: https://github.com/Azure/typespec-azure/issues/1419 + const result: ExampleValue[] = []; + if (credentialType) { + // Only support DefaultAzureCredential for now + result.push({ + name: "credential", + value: `new ${resolveReference( + AzureIdentityDependencies.DefaultAzureCredential + )}()`, + isOptional: false + }); + } + let subscriptionIdValue = `"00000000-0000-0000-0000-00000000000"`; + // required client-level parameters + for (const param of method.operation.parameters) { + if ( + param.onClient === false || + param.optional === true || + param.type.kind === "constant" + ) { + continue; + } + + const exampleValue = parameterMap[param.serializedName]; + if (!exampleValue || !exampleValue.value) { + // report diagnostic if required parameter is missing + reportDiagnostic(dpgContext.program, { + code: "required-sample-parameter", + format: { + exampleName: method.name, + paramName: param.name + }, + target: NoTarget + }); + continue; + } + + if ( + param.name.toLowerCase() === "subscriptionid" && + isArm(dpgContext) && + exampleValue + ) { + subscriptionIdValue = getParameterValue(exampleValue.value); + continue; + } + result.push({ + name: exampleValue.parameter.name, + value: getParameterValue(exampleValue.value), + isOptional: Boolean(param.optional) + }); + } + // always add subscriptionId for ARM clients + if (isArm(dpgContext)) { + result.push({ + name: "subscriptionId", + value: subscriptionIdValue, + isOptional: false + }); + } + // optional parameters + method.operation.parameters + .filter( + (param) => + param.onClient === true && + param.optional === true && + parameterMap[param.serializedName] + ) + .map((param) => parameterMap[param.serializedName]!) + .forEach((param) => { + result.push({ + name: param.parameter.name, + value: getParameterValue(param.value), + isOptional: true + }); + }); + + return result; +} + +function getParameterValue(value: SdkTypeExample): string { + let retValue = `{} as any`; + switch (value.kind) { + case "string": { + switch (value.type.kind) { + case "utcDateTime": + case "offsetDateTime": + retValue = `new Date("${value.value}")`; + break; + default: + retValue = `"${value.value}"`; + break; + } + break; + } + case "boolean": + case "number": + case "null": + case "any": + case "union": + retValue = `${value.value}`; + break; + case "dict": + case "model": { + const mapper = getPropertyClientNameMapper(value.type); + const values = []; + const additionalPropertiesValue = + value.kind === "model" ? value?.additionalPropertiesValue ?? {} : {}; + for (const propName in { + ...value.value, + ...additionalPropertiesValue + }) { + const propValue = + value.value[propName] ?? additionalPropertiesValue[propName]; + if (propValue === undefined || propValue === null) { + continue; + } + const propRetValue = + `"${mapper.get(propName) ?? propName}": ` + + getParameterValue(propValue); + values.push(propRetValue); + } + + retValue = `{${values.join(", ")}}`; + break; + } + case "array": { + const valuesArr = value.value.map((element) => + getParameterValue(element) + ); + retValue = `[${valuesArr.join(", ")}]`; + break; + } + default: + break; + } + return retValue; +} + +function getPropertyClientNameMapper(model: SdkType) { + const mapper = new Map(); + if (model.kind !== "model") { + return mapper; + } + for (const prop of model.properties) { + if (prop.kind !== "property") { + continue; + } + + mapper.set(prop.serializedName, prop.name); + } + return mapper; +} + +function escapeSpecialCharToSpace(str: string) { + if (!str) { + return str; + } + return str.replace(/_|,|\.|\(|\)|'s |\[|\]/g, " ").replace(/\//g, " Or "); +} + +// FIXME: This is a temporary solution to get the credential type +function getCredentialType( + initialization: SdkInitializationType +): string | undefined { + const credentialParameter = initialization.properties.find( + (p) => p.kind === "credential" + )?.type; + return credentialParameter ? "Credential" : undefined; +} diff --git a/packages/typespec-ts/src/modular/external-dependencies.ts b/packages/typespec-ts/src/modular/external-dependencies.ts index 356b64056a..4d57bfeee2 100644 --- a/packages/typespec-ts/src/modular/external-dependencies.ts +++ b/packages/typespec-ts/src/modular/external-dependencies.ts @@ -148,3 +148,11 @@ export const AzureCoreDependencies: CoreDependencies = { name: "stringToUint8Array" } }; + +export const AzureIdentityDependencies = { + DefaultAzureCredential: { + kind: "externalDependency", + module: "@azure/identity", + name: "DefaultAzureCredential" + } +}; diff --git a/packages/typespec-ts/src/utils/clientUtils.ts b/packages/typespec-ts/src/utils/clientUtils.ts index 18bc877325..e0491c435e 100644 --- a/packages/typespec-ts/src/utils/clientUtils.ts +++ b/packages/typespec-ts/src/utils/clientUtils.ts @@ -1,9 +1,5 @@ import { SdkClient } from "@azure-tools/typespec-client-generator-core"; -import { - getNamespaceFullName, - listServices, - Namespace -} from "@typespec/compiler"; +import { getNamespaceFullName, listServices } from "@typespec/compiler"; import { SdkContext } from "./interfaces.js"; export function getRLCClients(dpgContext: SdkContext): SdkClient[] { @@ -16,7 +12,7 @@ export function getRLCClients(dpgContext: SdkContext): SdkClient[] { name: clientName, service: service.type, type: service.type, - arm: isArm(service.type), + arm: isArm(dpgContext), crossLanguageDefinitionId: `${getNamespaceFullName( service.type )}.${clientName}` @@ -24,10 +20,8 @@ export function getRLCClients(dpgContext: SdkContext): SdkClient[] { }); } -function isArm(service: Namespace): boolean { - return service.decorators.some( - (decorator) => decorator.decorator.name === "$armProviderNamespace" - ); +export function isArm(dpgContext: SdkContext): boolean { + return dpgContext.rlcOptions?.azureArm ?? dpgContext.arm ?? false; } export function isRLCMultiEndpoint(dpgContext: SdkContext): boolean { diff --git a/packages/typespec-ts/test/commands/cadl-ranch-list.js b/packages/typespec-ts/test/commands/cadl-ranch-list.js index 5ab34b92a2..d9df9c3c01 100644 --- a/packages/typespec-ts/test/commands/cadl-ranch-list.js +++ b/packages/typespec-ts/test/commands/cadl-ranch-list.js @@ -543,6 +543,10 @@ export const modularTsps = [ outputPath: "azure/resource-manager/models/common-types/managed-identity", inputPath: "azure/resource-manager/models/common-types/managed-identity" }, + { + outputPath: "azure/example/basic", + inputPath: "azure/example/basic" + }, { outputPath: "azure/core/page", inputPath: "azure/core/page" diff --git a/packages/typespec-ts/test/integration/azureExampleClient.spec.ts b/packages/typespec-ts/test/integration/azureExampleClient.spec.ts new file mode 100644 index 0000000000..b01d0d0750 --- /dev/null +++ b/packages/typespec-ts/test/integration/azureExampleClient.spec.ts @@ -0,0 +1,35 @@ +import BasicClientFactory, { + BasicClient +} from "./generated/azure/example/basic/src/index.js"; +import { assert } from "chai"; +describe("Basic Rest Client", () => { + let client: BasicClient; + + beforeEach(() => { + client = BasicClientFactory({ allowInsecureConnection: true }); + }); + + it("basic example client action", async () => { + const result = await client.path("/azure/example/basic/basic").post({ + queryParameters: { + "query-param": "query", + "api-version": "2022-12-01-preview" + }, + headers: { "header-param": "header" }, + body: { + stringProperty: "text", + modelProperty: { + int32Property: 1, + float32Property: 1.5, + enumProperty: "EnumValue1" + }, + arrayProperty: ["item"], + recordProperty: { + record: "value" + } + } + }); + assert.strictEqual(result.status, "200"); + assert.strictEqual(result.body.stringProperty, "text"); + }); +}); diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore b/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore new file mode 100644 index 0000000000..39220655cc --- /dev/null +++ b/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore @@ -0,0 +1,6 @@ +/** +!/src +/src/** +!/src/index.d.ts +!/.gitignore +!/tspconfig.yaml diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts b/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts new file mode 100644 index 0000000000..2d08ef41c7 --- /dev/null +++ b/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts @@ -0,0 +1,84 @@ +import { Client } from '@azure-rest/core-client'; +import { ClientOptions } from '@azure-rest/core-client'; +import { HttpResponse } from '@azure-rest/core-client'; +import { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; +import { RequestParameters } from '@azure-rest/core-client'; +import { StreamableMethod } from '@azure-rest/core-client'; + +export declare interface ActionRequest { + stringProperty: string; + modelProperty?: Model; + arrayProperty?: string[]; + recordProperty?: Record; +} + +export declare interface ActionResponseOutput { + stringProperty: string; + modelProperty?: ModelOutput; + arrayProperty?: string[]; + recordProperty?: Record; +} + +export declare interface Basic { + post(options: BasicParameters): StreamableMethod; +} + +export declare interface Basic200Response extends HttpResponse { + status: "200"; + body: ActionResponseOutput; +} + +export declare interface BasicBodyParam { + body: ActionRequest; +} + +export declare type BasicClient = Client & { + path: Routes; +}; + +export declare interface BasicClientOptions extends ClientOptions { + apiVersion?: string; +} + +export declare interface BasicHeaderParam { + headers: RawHttpHeadersInput & BasicHeaders; +} + +export declare interface BasicHeaders { + "header-param": string; +} + +export declare type BasicParameters = BasicQueryParam & BasicHeaderParam & BasicBodyParam & RequestParameters; + +export declare interface BasicQueryParam { + queryParameters: BasicQueryParamProperties; +} + +export declare interface BasicQueryParamProperties { + "query-param": string; +} + +declare function createClient({ apiVersion, ...options }?: BasicClientOptions): BasicClient; +export default createClient; + +export declare type Enum = string; + +export declare type EnumOutput = string; + +export declare interface Model { + int32Property?: number; + float32Property?: number; + enumProperty?: Enum; +} + +export declare interface ModelOutput { + int32Property?: number; + float32Property?: number; + enumProperty?: EnumOutput; +} + +export declare interface Routes { + (path: "/azure/example/basic/azure/example/basic/basic"): Basic; +} + +export { } diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml b/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml new file mode 100644 index 0000000000..af9776cfe4 --- /dev/null +++ b/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml @@ -0,0 +1,12 @@ +emit: + - "@azure-tools/typespec-ts" +options: + "@azure-tools/typespec-ts": + "emitter-output-dir": "{project-root}" + generateMetadata: true + generateTest: false + addCredentials: false + azureSdkForJs: false + isTypeSpecTest: true + packageDetails: + name: "@msinternal/example" diff --git a/packages/typespec-ts/test/modularIntegration/azureExampleClient.spec.ts b/packages/typespec-ts/test/modularIntegration/azureExampleClient.spec.ts new file mode 100644 index 0000000000..041e2b0e62 --- /dev/null +++ b/packages/typespec-ts/test/modularIntegration/azureExampleClient.spec.ts @@ -0,0 +1,29 @@ +import { AzureExampleClient } from "./generated/azure/example/basic/src/index.js"; +import { assert } from "chai"; +describe("AzureExampleClient Client", () => { + let client: AzureExampleClient; + + beforeEach(() => { + client = new AzureExampleClient({ + allowInsecureConnection: true, + endpoint: "http://localhost:3002" + }); + }); + + it("basic example client action", async () => { + const result = await client.basicAction("query", "header", { + stringProperty: "text", + modelProperty: { + int32Property: 1, + float32Property: 1.5, + enumProperty: "EnumValue1" + }, + arrayProperty: ["item"], + recordProperty: { + record: "value" + } + }); + + assert.strictEqual(result.stringProperty, "text"); + }); +}); diff --git a/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/.gitignore b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/.gitignore new file mode 100644 index 0000000000..39220655cc --- /dev/null +++ b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/.gitignore @@ -0,0 +1,6 @@ +/** +!/src +/src/** +!/src/index.d.ts +!/.gitignore +!/tspconfig.yaml diff --git a/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/src/index.d.ts b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/src/index.d.ts new file mode 100644 index 0000000000..15f38874b8 --- /dev/null +++ b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/src/index.d.ts @@ -0,0 +1,43 @@ +import { ClientOptions } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { Pipeline } from '@azure/core-rest-pipeline'; + +export declare interface ActionRequest { + stringProperty: string; + modelProperty?: Model; + arrayProperty?: string[]; + recordProperty?: Record; +} + +export declare interface ActionResponse { + stringProperty: string; + modelProperty?: Model; + arrayProperty?: string[]; + recordProperty?: Record; +} + +export declare class AzureExampleClient { + private _client; + readonly pipeline: Pipeline; + constructor(options?: AzureExampleClientOptionalParams); + basicAction(queryParam: string, headerParam: string, body: ActionRequest, options?: BasicActionOptionalParams): Promise; +} + +export declare interface AzureExampleClientOptionalParams extends ClientOptions { + apiVersion?: string; +} + +export declare interface BasicActionOptionalParams extends OperationOptions { +} + +export declare type Enum = "EnumValue1"; + +export declare interface Model { + int32Property?: number; + float32Property?: number; + enumProperty?: Enum; +} + +export declare type Versions = "2022-12-01-preview"; + +export { } diff --git a/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml new file mode 100644 index 0000000000..b8570a61da --- /dev/null +++ b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml @@ -0,0 +1,12 @@ +emit: + - "@azure-tools/typespec-ts" +options: + "@azure-tools/typespec-ts": + generateMetadata: true + generateTest: false + azureSdkForJs: false + isModularLibrary: true + hierarchyClient: false + "emitter-output-dir": "{project-root}" + packageDetails: + name: "@msinternal/example" diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index ef35e04293..0e035544a8 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -3,7 +3,8 @@ import { readdirSync, readFileSync, statSync, writeFileSync } from "fs"; import path from "path"; import { emitModularModelsFromTypeSpec, - emitModularOperationsFromTypeSpec + emitModularOperationsFromTypeSpec, + emitSamplesFromTypeSpec } from "../util/emitUtil.js"; import { assertEqualContent } from "../util/testUtil.js"; import { format } from "prettier"; @@ -15,7 +16,8 @@ const SCENARIOS_UPDATE = process.env["SCENARIOS_UPDATE"] === "true"; type EmitterFunction = ( tsp: string, - namedArgs: Record + namedStringArgs: Record, + namedUnknownArgs?: Record ) => Promise; /** @@ -93,6 +95,19 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { const result = await emitModularOperationsFromTypeSpec(tsp); assert.equal(result?.length, 1, "Expected exactly 1 source file"); return result![0]!.getFunctionOrThrow(name!).getText(); + }, + + "(ts|typescript) samples": async (tsp, {}, unknownArgs) => { + if (!unknownArgs || !unknownArgs["examples"]) { + throw new Error(`Expected 'examples' to be passed in as an argument`); + } + const configs = unknownArgs["configs"] as Record; + const examples = unknownArgs["examples"] as Record; + const counts = Object.keys(examples).length; + const result = await emitSamplesFromTypeSpec(tsp, examples, configs); + assert.equal(result?.length, counts, `Expected exactly ${counts} files`); + const text = result.map((x) => x.getFullText()).join("\n"); + return text; } }; @@ -122,8 +137,22 @@ function describeScenarioFile(scenarioFile: string): void { const tspBlocks = codeBlocks.filter( (x) => x.heading.startsWith("tsp") || x.heading.startsWith("typespec") ); + const jsonBlocks = codeBlocks.filter((x) => + x.heading.startsWith("json") + ); + const examples: Record = {}; + for (const block of jsonBlocks) { + examples[block.heading.trim().replace(/ /g, "_")] = block.content; + } + const yamlConfigs = codeBlocks.filter((x) => + x.heading.startsWith("yaml") + ); + const configs = parseSimpleYaml(yamlConfigs.map((x) => x.content)); const outputCodeBlocks = codeBlocks.filter( - (x) => !tspBlocks.includes(x) + (x) => + !tspBlocks.includes(x) && + !jsonBlocks.includes(x) && + !yamlConfigs.includes(x) ); const inputTsp = tspBlocks.map((x) => x.content).join("\n"); @@ -140,11 +169,14 @@ function describeScenarioFile(scenarioFile: string): void { "^" + template.replace(/\{(\w+)\}/g, "(?<$1>\\w+)") + "$" ); - const match = x.heading.match(templateRegex); + const match = x.heading + .replace(/(\r\n|\n|\r)/gm, "") + .match(templateRegex); if (match !== null) { return { block: x, - fn: () => fn(inputTsp, match.groups!) + fn: () => + fn(inputTsp, match.groups! ?? {}, { examples, configs }) }; } } @@ -206,6 +238,11 @@ function readScenarios(fileContent: string): ScenarioFile { for (const part of rawParts) { const [rawHeading, ...lines] = part.split("\n"); const isOnly = rawHeading!.startsWith("only: "); + const isSkip = rawHeading!.startsWith("skip: "); + if (isSkip) { + console.log("Skipping scenario: ", rawHeading); + continue; + } const heading = isOnly ? rawHeading!.substring("only: ".length) : rawHeading!; @@ -258,3 +295,26 @@ function writeScenarios(file: ScenarioFile): string { return output; } + +function parseSimpleYaml(yamlConfigs: string[]): Record { + // This is a simple yaml parser that assumes that there are no nested objects. + // It splits the yaml into lines, then splits each line by the colon and + // creates a record from the key-value pairs. + // This is a very simple parser and will not work for all yaml files. + let record: Record = {}; + for (const yaml of yamlConfigs) { + const each = yaml + .split("\n") + .map((x) => x.split(":")) + .filter((x) => x.length === 2) + .reduce( + (acc, [key, value]) => { + acc[key!] = JSON.parse(value!); + return acc; + }, + {} as Record + ); + record = { ...record, ...each }; + } + return record; +} diff --git a/packages/typespec-ts/test/modularUnit/scenarios/example/example.md b/packages/typespec-ts/test/modularUnit/scenarios/example/example.md index 04b08f74d8..b89ec992df 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/example/example.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/example/example.md @@ -10,13 +10,7 @@ You can set the environment variable `SCENARIOS_UPDATE` to `true` to run the sna ## Only running specific scenarios -You can add `only:` to the top-level heading of the scenario document to run only that scenario. This is useful when you are working on a specific scenario and want to run only that scenario. For example, the heading for this test would be changed to - -``` -# only: Example scenario -``` - -This is the equivalent of using `it.only` for a Mocha/vitest test. +You can add `only:` to the top-level heading of the scenario document to run only that scenario. This is useful when you are working on a specific scenario and want to run only that scenario. For example, the heading for this test would be changed to `# only: Example scenario`. This is the equivalent of using `it.only` for a Mocha/vitest test. ## TypeSpec @@ -76,13 +70,13 @@ import { StreamableMethod, operationOptionsToRequestParameters, PathUncheckedResponse, - createRestError, + createRestError } from "@azure-rest/core-client"; export function _readSend( context: Client, id: string, - options: ReadOptionalParams = { requestOptions: {} }, + options: ReadOptionalParams = { requestOptions: {} } ): StreamableMethod { return context .path("/{id}", id) @@ -90,7 +84,7 @@ export function _readSend( } export async function _readDeserialize( - result: PathUncheckedResponse, + result: PathUncheckedResponse ): Promise { const expectedStatuses = ["200"]; if (!expectedStatuses.includes(result.status)) { @@ -98,14 +92,14 @@ export async function _readDeserialize( } return { - id: result.body["id"], + id: result.body["id"] }; } export async function read( context: Client, id: string, - options: ReadOptionalParams = { requestOptions: {} }, + options: ReadOptionalParams = { requestOptions: {} } ): Promise { const result = await _readSend(context, id, options); return _readDeserialize(result); @@ -118,9 +112,9 @@ Or you can extract a specific operation using `ts operations function { const result = await _readSend(context, id, options); return _readDeserialize(result); } -``` \ No newline at end of file +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md new file mode 100644 index 0000000000..0548ebf6c2 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md @@ -0,0 +1,156 @@ +# Should generate samples for disabled hierarchy client + +Sample generation should handle hierarchy client successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +model A { + prop1: string; +} + +@route("b") +namespace B { + @route("e") + namespace E { + model A { + prop3: string; + } + interface C { + op opBEC(@body body: A): void + } + } + op opB(@body body: A): void; +} + +@route("/d") +interface D { + @doc("show example opD") + op opD(@body body: A): void; +} +@doc("show example opTopLevel") +op opTopLevel(@body body: A): void; +``` + +This is the tspconfig.yaml. + +```yaml +hierarchyClient: false +``` + +## Example + +Raw json files. + +```json for opTopLevel +{ + "title": "opTopLevel", + "operationId": "opTopLevel", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for opD +{ + "title": "opD", + "operationId": "D_opD", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for opBEC +{ + "title": "opBEC", + "operationId": "C_opBEC", + "parameters": { + "body": { + "prop3": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for non-hierarchy cases: + +```ts samples +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example opTopLevel + * + * @summary show example opTopLevel + * x-ms-original-file: 2021-10-01-preview/json_for_opTopLevel.json + */ +async function opTopLevel() { + const client = new TestingClient(); + const result = await client.opTopLevel({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opTopLevel(); +} + +main().catch(console.error); + +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to undefined + * + * @summary undefined + * x-ms-original-file: 2021-10-01-preview/json_for_opBEC.json + */ +async function opBEC() { + const client = new TestingClient(); + const result = await client.c.opBEC({ prop3: "body name" }); + console.log(result); +} + +async function main() { + opBEC(); +} + +main().catch(console.error); + +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example opD + * + * @summary show example opD + * x-ms-original-file: 2021-10-01-preview/json_for_opD.json + */ +async function opD() { + const client = new TestingClient(); + const result = await client.d.opD({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opD(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md new file mode 100644 index 0000000000..ab67ab60a8 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md @@ -0,0 +1,156 @@ +# Should generate samples for enabled hierarchy client + +Sample generation should handle hierarchy client successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +model A { + prop1: string; +} + +@route("b") +namespace B { + @route("e") + namespace E { + model A { + prop3: string; + } + interface C { + op opBEC(@body body: A): void + } + } + op opB(@body body: A): void; +} + +@route("/d") +interface D { + @doc("show example opD") + op opD(@body body: A): void; +} +@doc("show example opTopLevel") +op opTopLevel(@body body: A): void; +``` + +This is the tspconfig.yaml. + +```yaml +hierarchyClient: true +``` + +## Example + +Raw json files. + +```json for opTopLevel +{ + "title": "opTopLevel", + "operationId": "opTopLevel", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for opD +{ + "title": "opD", + "operationId": "D_opD", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for opBEC +{ + "title": "opBEC", + "operationId": "C_opBEC", + "parameters": { + "body": { + "prop3": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for hierarchy cases: + +```ts samples +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example opTopLevel + * + * @summary show example opTopLevel + * x-ms-original-file: 2021-10-01-preview/json_for_opTopLevel.json + */ +async function opTopLevel() { + const client = new TestingClient(); + const result = await client.opTopLevel({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opTopLevel(); +} + +main().catch(console.error); + +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to undefined + * + * @summary undefined + * x-ms-original-file: 2021-10-01-preview/json_for_opBEC.json + */ +async function opBEC() { + const client = new TestingClient(); + const result = await client.b.e.c.opBEC({ prop3: "body name" }); + console.log(result); +} + +async function main() { + opBEC(); +} + +main().catch(console.error); + +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example opD + * + * @summary show example opD + * x-ms-original-file: 2021-10-01-preview/json_for_opD.json + */ +async function opD() { + const client = new TestingClient(); + const result = await client.d.opD({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opD(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/parameterizedHost.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/parameterizedHost.md new file mode 100644 index 0000000000..b377583fd7 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/parameterizedHost.md @@ -0,0 +1,117 @@ +# skip: Should generate samples for parameterized host client + +// FIXME: issue tracked in tcgc: https://github.com/Azure/typespec-azure/issues/1419 + +Sample generation should handle parameterized host client successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +import "@typespec/rest"; +import "@typespec/versioning"; +import "@typespec/openapi"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-autorest"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using OpenAPI; + +@service({title: "ParametrizedHost"}) +@useAuth(OAuth2Auth<[MyFlow]>) +@versioned(Versions) +@server( + "{host}.{subdomain}.{sufix}.com", + "Confidential Ledger Service", + { + @path + host?: string = "one", + @path + subdomain?: string = "two", + @path + sufix?: string = "three", + } +) +namespace Azure.Test.ParametrizedHost; + +/** The Contoso Widget Manager service version. */ +enum Versions { + /** Version 2021-10-01-preview */ + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + `2021-10-01-preview`, +} + +model MyFlow { + type: OAuth2FlowType.implicit; + authorizationUrl: "https://login.microsoftonline.com/common/v2.0/oauth2/authorize"; + tokenUrl: "https://login.microsoftonline.com/common/v2.0/oauth2/token"; + scopes: ["https://parametrized-host.azure.com/.default"]; +} + +@resource("collections") +@doc("Identifier for collections.") +model Collection { + @key + @visibility("read") + collectionId: string; +} + +@route("/app") +namespace ConfidentialLedger { + @summary("Retrieves a list of collection ids present in the Confidential Ledger") + @doc("Collection ids are user-created collections of ledger entries") + op listCollections is Azure.Core.Foundations.NonPagedResourceList; +} +``` + +## Example + +Raw json files. + +```json for listCollections +{ + "title": "listCollections", + "operationId": "ConfidentialLedger_listCollections", + "parameters": { + "host": "one", + "subdomain": "two", + "sufix": "three", + "apiVersion": "v1" + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for parameterized host cases: + +```ts samples +import { ParametrizedHostClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves a list of collection ids present in the Confidential Ledger + * + * @summary retrieves a list of collection ids present in the Confidential Ledger + * x-ms-original-file: 2021-10-01-preview/json_for_listCollections.json + */ +async function listCollections() { + const credential = new DefaultAzureCredential(); + const client = new ParametrizedHostClient(credential); + const result = await client.confidentialLedger.listCollections(); + console.log(result); +} + +async function main() { + listCollections(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md new file mode 100644 index 0000000000..151132dc53 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md @@ -0,0 +1,245 @@ +# Should generate samples for ARM operations + +Sample generation should arm template and operations successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.ResourceManager; + +/** Microsoft.Contoso Resource Provider management API. */ +@armProviderNamespace +@service({ + title: "Microsoft.Contoso management service", +}) +@versioned(Microsoft.Contoso.Versions) +namespace Microsoft.Contoso; + +/** The available API versions. */ +enum Versions { + /** 2021-10-01-preview version */ + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) + v2021_10_01_preview: "2021-10-01-preview", +} + +interface Operations extends Azure.ResourceManager.Operations {} + +/** Employee resource */ +model Employee is TrackedResource { + ...ResourceNameParameter; +} + +/** Employee properties */ +model EmployeeProperties { + /** Age of employee */ + age?: int32; + + /** City of employee */ + city?: string; + + /** Profile of employee */ + @encode("base64url") + profile?: bytes; + + /** The status of the last operation. */ + @visibility("read") + provisioningState?: ProvisioningState; +} + +/** The resource provisioning state. */ +@lroStatus +union ProvisioningState { + ResourceProvisioningState, + + /** The resource is being provisioned */ + Provisioning: "Provisioning", + + /** The resource is updating */ + Updating: "Updating", + + /** The resource is being deleted */ + Deleting: "Deleting", + + /** The resource create request has been accepted */ + Accepted: "Accepted", + + string, +} + +@armResourceOperations +interface Employees { + get is ArmResourceRead; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + delete is ArmResourceDeleteWithoutOkAsync; +} +``` + +## Example + +Raw json files. + +```json for Operations_List +{ + "title": "Operations_List", + "operationId": "Operations_List", + "parameters": { + "api-version": "2021-10-01-preview" + }, + "responses": { + "200": { + "body": {} + } + } +} +``` + +```json for Employees_CreateOrUpdate +{ + "title": "Employees_CreateOrUpdate", + "operationId": "Employees_CreateOrUpdate", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgopenapi", + "employeeName": "9KF-f-8b", + "resource": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms" + }, + "tags": { + "key2913": "urperxmkkhhkp" + }, + "location": "itajgxyqozseoygnl" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for Employees_Delete +{ + "title": "Employees_Delete", + "operationId": "Employees_Delete", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgopenapi", + "employeeName": "5vX--BxSu3ux48rI4O9OQ569" + }, + "responses": { + "202": {} + } +} +``` + +## Samples + +Generate samples for arm cases: + +```ts samples +import { ContosoClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list the operations for the provider + * + * @summary list the operations for the provider + * x-ms-original-file: 2021-10-01-preview/json_for_Operations_List.json + */ +async function operationsList() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new ContosoClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + operationsList(); +} + +main().catch(console.error); + +import { ContosoClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a Employee + * + * @summary create a Employee + * x-ms-original-file: 2021-10-01-preview/json_for_Employees_CreateOrUpdate.json + */ +async function employeesCreateOrUpdate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + const client = new ContosoClient(credential, subscriptionId); + const result = await client.employees.createOrUpdate( + "rgopenapi", + "9KF-f-8b", + { + properties: { + age: 30, + city: "gydhnntudughbmxlkyzrskcdkotrxn", + profile: "ms" + }, + tags: { key2913: "urperxmkkhhkp" }, + location: "itajgxyqozseoygnl" + } + ); + console.log(result); +} + +async function main() { + employeesCreateOrUpdate(); +} + +main().catch(console.error); + +import { ContosoClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a Employee + * + * @summary delete a Employee + * x-ms-original-file: 2021-10-01-preview/json_for_Employees_Delete.json + */ +async function employeesDelete() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + const client = new ContosoClient(credential, subscriptionId); + const result = await client.employees.delete( + "rgopenapi", + "5vX--BxSu3ux48rI4O9OQ569" + ); + console.log(result); +} + +async function main() { + employeesDelete(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md new file mode 100644 index 0000000000..b1e6fc0729 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md @@ -0,0 +1,204 @@ +# Should generate samples for data-plane operations + +Sample generation should dpg template and operations successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.Core.Traits; + +@useAuth(AadOauth2Auth<["https://contoso.azure.com/.default"]>) +@service({ + title: "Contoso Widget Manager", +}) +@versioned(Contoso.WidgetManager.Versions) +namespace Azure.Contoso.WidgetManager; + +@doc("Versions info.") +enum Versions { + @doc("The 2021-10-01-preview version.") + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2021_10_01_preview: "2021-10-01-preview", +} + +@doc("A widget.") +@resource("widgets") +model WidgetSuite { + @key("widgetName") + @doc("The widget name.") + @visibility("read") + name: string; + + @doc("The ID of the widget's manufacturer.") + manufacturerId: string; + +} + +interface Widgets { + @doc("Fetch a Widget by name.") + getWidget is ResourceRead; + + @doc("Gets status of a Widget operation.") + getWidgetOperationStatus is GetResourceOperationStatus; + + @doc("Creates or updates a Widget asynchronously.") + @pollingOperation(Widgets.getWidgetOperationStatus) + createOrUpdateWidget is StandardResourceOperations.LongRunningResourceCreateOrUpdate; + + @doc("Delete a Widget asynchronously.") + @pollingOperation(Widgets.getWidgetOperationStatus) + deleteWidget is LongRunningResourceDelete; + + @doc("List Widget resources") + listWidgets is ResourceList< + WidgetSuite, + ListQueryParametersTrait + >; +} +``` + +## Example + +Raw json files. + +```json for Widgets_ListWidgets +{ + "title": "Widgets_ListWidgets", + "operationId": "Widgets_ListWidgets", + "parameters": { + "top": 8, + "skip": 15, + "maxpagesize": 27, + "api-version": "2021-10-01-preview" + }, + "responses": { + "200": { + "body": {} + } + } +} +``` + +```json for Widgets_CreateOrUpdateWidget +{ + "title": "Widgets_CreateOrUpdateWidget", + "operationId": "Widgets_CreateOrUpdateWidget", + "parameters": { + "widgetName": "name1", + "api-version": "2021-10-01-preview", + "resource": { + "manufacturerId": "manufacturer id1" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for Widgets_DeleteWidget +{ + "operationId": "Widgets_DeleteWidget", + "title": "Delete widget by widget name using long-running operation.", + "parameters": { + "api-version": "2021-10-01-preview", + "widgetName": "searchbox" + }, + "responses": { + "202": {} + } +} +``` + +## Samples + +Generate samples for dpg cases: + +```ts samples +import { WidgetManagerClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates a Widget asynchronously. + * + * @summary creates or updates a Widget asynchronously. + * x-ms-original-file: 2021-10-01-preview/json_for_Widgets_CreateOrUpdateWidget.json + */ +async function widgetsCreateOrUpdateWidget() { + const credential = new DefaultAzureCredential(); + const client = new WidgetManagerClient(credential); + const result = await client.widgets.createOrUpdateWidget("name1", { + manufacturerId: "manufacturer id1", + }); + console.log(result); +} + +async function main() { + widgetsCreateOrUpdateWidget(); +} + +main().catch(console.error); + +import { WidgetManagerClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a Widget asynchronously. + * + * @summary delete a Widget asynchronously. + * x-ms-original-file: 2021-10-01-preview/json_for_Widgets_DeleteWidget.json + */ +async function deleteWidgetByWidgetNameUsingLongRunningOperation() { + const credential = new DefaultAzureCredential(); + const client = new WidgetManagerClient(credential); + const result = await client.widgets.deleteWidget("searchbox"); + console.log(result); +} + +async function main() { + deleteWidgetByWidgetNameUsingLongRunningOperation(); +} + +main().catch(console.error); + +import { WidgetManagerClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list Widget resources + * + * @summary list Widget resources + * x-ms-original-file: 2021-10-01-preview/json_for_Widgets_ListWidgets.json + */ +async function widgetsListWidgets() { + const credential = new DefaultAzureCredential(); + const client = new WidgetManagerClient(credential); + const resArray = new Array(); + for await (let item of client.widgets.listWidgets({ + top: 8, + skip: 15, + maxpagesize: 27, + })) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + widgetsListWidgets(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md new file mode 100644 index 0000000000..d1ec8d7ecd --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md @@ -0,0 +1,96 @@ +# skip: Should generate samples for spread cases + +// FIXME: issue tracked in tcgc: https://github.com/Azure/typespec-azure/issues/1421 + +Sample generation should handle operation-level parameter order successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +@doc("This is a simple model.") +model BodyParameter { + name: string; +} +@doc("This is a model with all http request decorator.") +model CompositeRequest { + @path + name: string; + + @header + requiredHeader: string; // required-header + + @header + optionalHeader?: string; + + @query + requiredQuery: string; + + @query + @clientName("renamedOptional", "javascript") + optionalQuery?: string; + + @body + body: BodyParameter; +} + +@doc("show example demo") +op read(...CompositeRequest): void; +``` + +## Example + +Raw json files. + +```json +{ + "title": "read", + "operationId": "read", + "parameters": { + "name": "required path param", + "optionalQuery": "renamed optional query", + "required-header": "required header", + "optional-header": "optional header", + "requiredQuery": "required query", + "body": { + "name": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for spread cases: + +```ts samples +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example demo + * + * @summary show example demo + * x-ms-original-file: 2021-10-01-preview/json.json + */ +async function read() { + const client = new TestingClient(); + const result = await client.read( + "required path param", + "required header", + "required query", + { name: "body name" }, + { optionalHeader: "optional header", optionalQuery: "optional query" } + ); + console.log(result); +} + +async function main() { + read(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md new file mode 100644 index 0000000000..50021856f0 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -0,0 +1,95 @@ +# Should generate samples for different types + +Sample generation should handle different types in body. + +## TypeSpec + +```tsp +model Foo { + bar: string; + barDate?: utcDateTime; +} + +model Widget { + strValue: string; + numValue: int32; + enumValue: "red" | "blue"; + modelValue: Foo; + dateValue: utcDateTime; + arrValue: string[]; + unionValue: Foo | string; + nullValue: null; + @clientName("jsClientName", "javascript") + renamedProp: string; + ...Record; +} + +@doc("show example demo") +op read(@bodyRoot body: Widget): void; +``` + +## Example + +```json +{ + "title": "read", + "operationId": "read", + "parameters": { + "body": { + "strValue": "00000000-0000-0000-0000-00000000000", + "numValue": 0.12, + "enumValue": "red", + "modelValue": { + "bar": "bar value", + "barDate": "2022-08-09" + }, + "dateValue": "2022-08-09", + "arrValue": ["x", "y"], + "unionValue": "test", + "nullValue": null, + "additionalProp": "additional prop", + "renamedProp": "prop renamed" + } + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for for different types: + +```ts samples +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example demo + * + * @summary show example demo + * x-ms-original-file: 2021-10-01-preview/json.json + */ +async function read() { + const client = new TestingClient(); + const result = await client.read({ + strValue: "00000000-0000-0000-0000-00000000000", + numValue: 0.12, + enumValue: "red", + modelValue: { bar: "bar value", barDate: new Date("2022-08-09") }, + dateValue: new Date("2022-08-09"), + arrValue: ["x", "y"], + unionValue: test, + nullValue: null, + jsClientName: "prop renamed", + additionalProp: "additional prop" + }); + console.log(result); +} + +async function main() { + read(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/util/emitUtil.ts b/packages/typespec-ts/test/util/emitUtil.ts index d5dcf241a9..31b062b070 100644 --- a/packages/typespec-ts/test/util/emitUtil.ts +++ b/packages/typespec-ts/test/util/emitUtil.ts @@ -14,7 +14,11 @@ import { buildModels, buildModelsOptions } from "../../src/modular/emitModels.js"; -import { createDpgContextTestHelper, rlcEmitterFor } from "./testUtil.js"; +import { + compileTypeSpecFor, + createDpgContextTestHelper, + rlcEmitterFor +} from "./testUtil.js"; import { transformRLCModel, transformUrlInfo @@ -36,6 +40,7 @@ import { transformToParameterTypes } from "../../src/transform/transformParamete import { transformToResponseTypes } from "../../src/transform/transformResponses.js"; import { useBinder } from "../../src/framework/hooks/binder.js"; import { useContext } from "../../src/contextManager.js"; +import { emitSamples } from "../../src/modular/emitSamples.js"; export async function emitPageHelperFromTypeSpec( tspContent: string, @@ -323,7 +328,7 @@ export async function emitModularModelsFromTypeSpec( RLCModel >(); const project = useContext("outputProject"); - const binder = useBinder(); + const binder = useBinder(); const clients = getRLCClients(dpgContext); let modelFile = undefined; if (clients && clients[0]) { @@ -562,3 +567,21 @@ export async function emitModularClientFromTypeSpec( expectDiagnosticEmpty(dpgContext.program.diagnostics); return undefined; } + +export async function emitSamplesFromTypeSpec( + tspContent: string, + examples: Record, + configs: Record = {} +) { + const context = await compileTypeSpecFor(tspContent, examples); + const dpgContext = await createDpgContextTestHelper(context.program, false, { + "examples-directory": `./examples`, + packageDetails: { + name: "@azure/internal-test" + }, + ...configs + }); + const files = await emitSamples(dpgContext); + useBinder().resolveAllReferences(); + return files; +} diff --git a/packages/typespec-ts/test/util/testUtil.ts b/packages/typespec-ts/test/util/testUtil.ts index 1a2e912618..f545f8e3a5 100644 --- a/packages/typespec-ts/test/util/testUtil.ts +++ b/packages/typespec-ts/test/util/testUtil.ts @@ -28,6 +28,7 @@ import { } from "../../src/modular/static-helpers-metadata.js"; import { AzureCoreDependencies, + AzureIdentityDependencies, AzurePollingDependencies } from "../../src/modular/external-dependencies.js"; @@ -55,7 +56,8 @@ export async function rlcEmitterFor( needTCGC: boolean = false, withRawContent: boolean = false, withVersionedApiVersion: boolean = false, - needArmTemplate: boolean = false + needArmTemplate: boolean = false, + exampleJson: Record = {} ): Promise { const host: TestHost = await createRLCEmitterTestHost(); const namespace = ` @@ -97,15 +99,77 @@ ${ ${code} `; host.addTypeSpecFile("main.tsp", content); + for (const example in exampleJson) { + host.addTypeSpecFile(`./examples/${example}.json`, exampleJson[example]); + } await host.compile("./", { warningAsError: false }); return host; } +export async function compileTypeSpecFor( + code: string, + exampleJson: Record = {} +) { + let prefix = ""; + if (!code.includes("import")) { + prefix = prefix + importStatement(); + if (!code.includes("@service")) { + prefix = prefix + serviceStatement(); + } + } + const host: TestHost = await createRLCEmitterTestHost(); + host.addTypeSpecFile("main.tsp", `${prefix}${code}`); + for (const example in exampleJson) { + host.addTypeSpecFile( + `./examples/2021-10-01-preview/${example}.json`, + exampleJson[example] + ); + } + await host.compile("./", { + warningAsError: false + }); + return host; +} + +function importStatement() { + return ` +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.Versioning; +using Azure.ClientGenerator.Core; +using Azure.Core; +using Azure.ResourceManager;`; +} + +function serviceStatement() { + return ` + @versioned(Azure.TypeScript.Testing.Versions) + @service({ + title: "Azure TypeScript Testing", + }) + + namespace Azure.TypeScript.Testing; + enum Versions { + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2021_10_01_preview: "2021-10-01-preview", + } + + `; +} + export async function createDpgContextTestHelper( program: Program, - enableModelNamespace = false + enableModelNamespace = false, + configs: Record = {} ): Promise { const outputProject = new Project({ useInMemoryFileSystem: true }); provideContext("rlcMetaTree", new Map()); @@ -114,13 +178,18 @@ export async function createDpgContextTestHelper( provideContext("outputProject", outputProject); const context = await createContextWithDefaultOptions({ - program + program, + options: configs as any } as EmitContext); const sdkContext = { ...context, program, - rlcOptions: { flavor: "azure", enableModelNamespace }, + rlcOptions: { + flavor: "azure", + enableModelNamespace, + ...configs + }, generationPathDetail: {}, emitterName: "@azure-tools/typespec-ts", originalProgram: program @@ -173,7 +242,8 @@ export async function provideBinderWithAzureDependencies(project: Project) { const extraDependencies = { ...AzurePollingDependencies, - ...AzureCoreDependencies + ...AzureCoreDependencies, + ...AzureIdentityDependencies }; const staticHelpers = { From 96f93eed6c154556a23930d70ee3b5f6693ce47a Mon Sep 17 00:00:00 2001 From: "Jiao Di (MSFT)" <80496810+v-jiaodi@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:38:15 +0800 Subject: [PATCH 52/83] smoke test and remove example client rlc --- .../generated/typespec-ts/src/index.ts | 2 +- .../generated/typespec-ts/src/models/index.ts | 2 +- .../typespec-ts/src/models/models.ts | 5 +- .../generated/typespec-ts/src/index.ts | 2 +- .../generated/typespec-ts/src/models/index.ts | 2 +- .../typespec-ts/src/models/models.ts | 6 +- .../integration/azureExampleClient.spec.ts | 35 -------- .../generated/azure/example/basic/.gitignore | 6 -- .../azure/example/basic/src/index.d.ts | 84 ------------------- .../azure/example/basic/tspconfig.yaml | 12 --- 10 files changed, 10 insertions(+), 146 deletions(-) delete mode 100644 packages/typespec-ts/test/integration/azureExampleClient.spec.ts delete mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore delete mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts delete mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml diff --git a/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/index.ts b/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/index.ts index 399c499152..c24bb16dd9 100644 --- a/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/index.ts +++ b/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/index.ts @@ -15,11 +15,11 @@ export { SchemaGroup, SchemaContentTypeValues, SchemaVersion, + ServiceApiVersions, SchemaProperties, SchemaFormat, Schema, ContentTypeEnum, - ServiceApiVersions, SchemaOperationsListSchemaGroupsOptionalParams, SchemaOperationsGetSchemaByIdOptionalParams, SchemaOperationsListSchemaVersionsOptionalParams, diff --git a/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/models/index.ts b/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/models/index.ts index 7042bee062..025f576757 100644 --- a/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/models/index.ts +++ b/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/models/index.ts @@ -5,11 +5,11 @@ export { SchemaGroup, SchemaContentTypeValues, SchemaVersion, + ServiceApiVersions, SchemaProperties, SchemaFormat, Schema, ContentTypeEnum, - ServiceApiVersions, } from "./models.js"; export { SchemaOperationsListSchemaGroupsOptionalParams, diff --git a/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/models/models.ts b/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/models/models.ts index 746bdc4300..23df6d93ed 100644 --- a/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/models/models.ts +++ b/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/src/models/models.ts @@ -20,6 +20,9 @@ export interface SchemaVersion { readonly schemaVersion: number; } +/** Represents the Schema Registry API version to use for requests. */ +export type ServiceApiVersions = "2021-10" | "2022-10" | "2023-07-01"; + /** Meta properties of a schema. */ export interface SchemaProperties { /** References a specific schema in the registry namespace. */ @@ -70,8 +73,6 @@ export type ContentTypeEnum = | "application/json; serialization=Avro" | "application/json; serialization=json" | "text/vnd.ms.protobuf"; -/** Represents the Schema Registry API version to use for requests. */ -export type ServiceApiVersions = "2021-10" | "2022-10" | "2023-07-01"; /** Paged collection of SchemaGroup items */ export interface _PagedSchemaGroup { diff --git a/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/index.ts b/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/index.ts index 9452493ae2..4abca8d1d9 100644 --- a/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/index.ts +++ b/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/index.ts @@ -19,8 +19,8 @@ export { CreateWidget, UpdateWidget, AnalyzeResult, - NonReferencedModel, Versions, + NonReferencedModel, WidgetsListWidgetsOptionalParams, WidgetsListWidgetsPagesOptionalParams, WidgetsQueryWidgetsPagesOptionalParams, diff --git a/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/models/index.ts b/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/models/index.ts index cc5787116c..e421942252 100644 --- a/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/models/index.ts +++ b/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/models/index.ts @@ -8,8 +8,8 @@ export { CreateWidget, UpdateWidget, AnalyzeResult, - NonReferencedModel, Versions, + NonReferencedModel, } from "./models.js"; export { WidgetsListWidgetsOptionalParams, diff --git a/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/models/models.ts b/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/models/models.ts index 0897828b06..153108d928 100644 --- a/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/models/models.ts +++ b/packages/typespec-test/test/widget_dpg/generated/typespec-ts/src/models/models.ts @@ -59,6 +59,9 @@ export interface AnalyzeResult { summary: string; } +/** The Contoso Widget Manager service version. */ +export type Versions = "1.0.0"; + export interface NonReferencedModel { /** The weight of the widget. This is an int32, but must be greater than zero. */ prop1: number; @@ -74,6 +77,3 @@ export function nonReferencedModelSerializer( prop2: item["prop2"], }; } - -/** The Contoso Widget Manager service version. */ -export type Versions = "1.0.0"; diff --git a/packages/typespec-ts/test/integration/azureExampleClient.spec.ts b/packages/typespec-ts/test/integration/azureExampleClient.spec.ts deleted file mode 100644 index b01d0d0750..0000000000 --- a/packages/typespec-ts/test/integration/azureExampleClient.spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import BasicClientFactory, { - BasicClient -} from "./generated/azure/example/basic/src/index.js"; -import { assert } from "chai"; -describe("Basic Rest Client", () => { - let client: BasicClient; - - beforeEach(() => { - client = BasicClientFactory({ allowInsecureConnection: true }); - }); - - it("basic example client action", async () => { - const result = await client.path("/azure/example/basic/basic").post({ - queryParameters: { - "query-param": "query", - "api-version": "2022-12-01-preview" - }, - headers: { "header-param": "header" }, - body: { - stringProperty: "text", - modelProperty: { - int32Property: 1, - float32Property: 1.5, - enumProperty: "EnumValue1" - }, - arrayProperty: ["item"], - recordProperty: { - record: "value" - } - } - }); - assert.strictEqual(result.status, "200"); - assert.strictEqual(result.body.stringProperty, "text"); - }); -}); diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore b/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore deleted file mode 100644 index 39220655cc..0000000000 --- a/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/** -!/src -/src/** -!/src/index.d.ts -!/.gitignore -!/tspconfig.yaml diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts b/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts deleted file mode 100644 index 2d08ef41c7..0000000000 --- a/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Client } from '@azure-rest/core-client'; -import { ClientOptions } from '@azure-rest/core-client'; -import { HttpResponse } from '@azure-rest/core-client'; -import { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; -import { RequestParameters } from '@azure-rest/core-client'; -import { StreamableMethod } from '@azure-rest/core-client'; - -export declare interface ActionRequest { - stringProperty: string; - modelProperty?: Model; - arrayProperty?: string[]; - recordProperty?: Record; -} - -export declare interface ActionResponseOutput { - stringProperty: string; - modelProperty?: ModelOutput; - arrayProperty?: string[]; - recordProperty?: Record; -} - -export declare interface Basic { - post(options: BasicParameters): StreamableMethod; -} - -export declare interface Basic200Response extends HttpResponse { - status: "200"; - body: ActionResponseOutput; -} - -export declare interface BasicBodyParam { - body: ActionRequest; -} - -export declare type BasicClient = Client & { - path: Routes; -}; - -export declare interface BasicClientOptions extends ClientOptions { - apiVersion?: string; -} - -export declare interface BasicHeaderParam { - headers: RawHttpHeadersInput & BasicHeaders; -} - -export declare interface BasicHeaders { - "header-param": string; -} - -export declare type BasicParameters = BasicQueryParam & BasicHeaderParam & BasicBodyParam & RequestParameters; - -export declare interface BasicQueryParam { - queryParameters: BasicQueryParamProperties; -} - -export declare interface BasicQueryParamProperties { - "query-param": string; -} - -declare function createClient({ apiVersion, ...options }?: BasicClientOptions): BasicClient; -export default createClient; - -export declare type Enum = string; - -export declare type EnumOutput = string; - -export declare interface Model { - int32Property?: number; - float32Property?: number; - enumProperty?: Enum; -} - -export declare interface ModelOutput { - int32Property?: number; - float32Property?: number; - enumProperty?: EnumOutput; -} - -export declare interface Routes { - (path: "/azure/example/basic/azure/example/basic/basic"): Basic; -} - -export { } diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml b/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml deleted file mode 100644 index af9776cfe4..0000000000 --- a/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml +++ /dev/null @@ -1,12 +0,0 @@ -emit: - - "@azure-tools/typespec-ts" -options: - "@azure-tools/typespec-ts": - "emitter-output-dir": "{project-root}" - generateMetadata: true - generateTest: false - addCredentials: false - azureSdkForJs: false - isTypeSpecTest: true - packageDetails: - name: "@msinternal/example" From d65c85b6df6f15ee08da9ea7b3084b18521200ed Mon Sep 17 00:00:00 2001 From: "Jiao Di (MSFT)" <80496810+v-jiaodi@users.noreply.github.com> Date: Mon, 26 Aug 2024 18:17:26 +0800 Subject: [PATCH 53/83] remove example client rlc --- .../integration/azureExampleClient.spec.ts | 35 -------- .../generated/azure/example/basic/.gitignore | 6 -- .../azure/example/basic/src/index.d.ts | 84 ------------------- .../azure/example/basic/tspconfig.yaml | 12 --- 4 files changed, 137 deletions(-) delete mode 100644 packages/typespec-ts/test/integration/azureExampleClient.spec.ts delete mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore delete mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts delete mode 100644 packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml diff --git a/packages/typespec-ts/test/integration/azureExampleClient.spec.ts b/packages/typespec-ts/test/integration/azureExampleClient.spec.ts deleted file mode 100644 index b01d0d0750..0000000000 --- a/packages/typespec-ts/test/integration/azureExampleClient.spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import BasicClientFactory, { - BasicClient -} from "./generated/azure/example/basic/src/index.js"; -import { assert } from "chai"; -describe("Basic Rest Client", () => { - let client: BasicClient; - - beforeEach(() => { - client = BasicClientFactory({ allowInsecureConnection: true }); - }); - - it("basic example client action", async () => { - const result = await client.path("/azure/example/basic/basic").post({ - queryParameters: { - "query-param": "query", - "api-version": "2022-12-01-preview" - }, - headers: { "header-param": "header" }, - body: { - stringProperty: "text", - modelProperty: { - int32Property: 1, - float32Property: 1.5, - enumProperty: "EnumValue1" - }, - arrayProperty: ["item"], - recordProperty: { - record: "value" - } - } - }); - assert.strictEqual(result.status, "200"); - assert.strictEqual(result.body.stringProperty, "text"); - }); -}); diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore b/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore deleted file mode 100644 index 39220655cc..0000000000 --- a/packages/typespec-ts/test/integration/generated/azure/example/basic/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/** -!/src -/src/** -!/src/index.d.ts -!/.gitignore -!/tspconfig.yaml diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts b/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts deleted file mode 100644 index 2d08ef41c7..0000000000 --- a/packages/typespec-ts/test/integration/generated/azure/example/basic/src/index.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Client } from '@azure-rest/core-client'; -import { ClientOptions } from '@azure-rest/core-client'; -import { HttpResponse } from '@azure-rest/core-client'; -import { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; -import { RequestParameters } from '@azure-rest/core-client'; -import { StreamableMethod } from '@azure-rest/core-client'; - -export declare interface ActionRequest { - stringProperty: string; - modelProperty?: Model; - arrayProperty?: string[]; - recordProperty?: Record; -} - -export declare interface ActionResponseOutput { - stringProperty: string; - modelProperty?: ModelOutput; - arrayProperty?: string[]; - recordProperty?: Record; -} - -export declare interface Basic { - post(options: BasicParameters): StreamableMethod; -} - -export declare interface Basic200Response extends HttpResponse { - status: "200"; - body: ActionResponseOutput; -} - -export declare interface BasicBodyParam { - body: ActionRequest; -} - -export declare type BasicClient = Client & { - path: Routes; -}; - -export declare interface BasicClientOptions extends ClientOptions { - apiVersion?: string; -} - -export declare interface BasicHeaderParam { - headers: RawHttpHeadersInput & BasicHeaders; -} - -export declare interface BasicHeaders { - "header-param": string; -} - -export declare type BasicParameters = BasicQueryParam & BasicHeaderParam & BasicBodyParam & RequestParameters; - -export declare interface BasicQueryParam { - queryParameters: BasicQueryParamProperties; -} - -export declare interface BasicQueryParamProperties { - "query-param": string; -} - -declare function createClient({ apiVersion, ...options }?: BasicClientOptions): BasicClient; -export default createClient; - -export declare type Enum = string; - -export declare type EnumOutput = string; - -export declare interface Model { - int32Property?: number; - float32Property?: number; - enumProperty?: Enum; -} - -export declare interface ModelOutput { - int32Property?: number; - float32Property?: number; - enumProperty?: EnumOutput; -} - -export declare interface Routes { - (path: "/azure/example/basic/azure/example/basic/basic"): Basic; -} - -export { } diff --git a/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml b/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml deleted file mode 100644 index af9776cfe4..0000000000 --- a/packages/typespec-ts/test/integration/generated/azure/example/basic/tspconfig.yaml +++ /dev/null @@ -1,12 +0,0 @@ -emit: - - "@azure-tools/typespec-ts" -options: - "@azure-tools/typespec-ts": - "emitter-output-dir": "{project-root}" - generateMetadata: true - generateTest: false - addCredentials: false - azureSdkForJs: false - isTypeSpecTest: true - packageDetails: - name: "@msinternal/example" From f1c2c5bb2ca6219400ba70683f384480a3d87f1d Mon Sep 17 00:00:00 2001 From: "Jiao Di (MSFT)" <80496810+v-jiaodi@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:45:46 +0800 Subject: [PATCH 54/83] update tspconfig --- .../generated/azure/example/basic/tspconfig.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml index b8570a61da..503fcdf6bd 100644 --- a/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml +++ b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml @@ -7,6 +7,8 @@ options: azureSdkForJs: false isModularLibrary: true hierarchyClient: false + generateSample: true + examples-directory: "../../../../../../temp/http/azure/example/basic/examples" "emitter-output-dir": "{project-root}" packageDetails: name: "@msinternal/example" From 7573a7d77992ec73a44bd3fe64ed5afba72d61ab Mon Sep 17 00:00:00 2001 From: "Jiao Di (MSFT)" <80496810+v-jiaodi@users.noreply.github.com> Date: Tue, 27 Aug 2024 10:38:05 +0800 Subject: [PATCH 55/83] update tspconfig --- .../generated/azure/example/basic/tspconfig.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml index b8570a61da..503fcdf6bd 100644 --- a/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml +++ b/packages/typespec-ts/test/modularIntegration/generated/azure/example/basic/tspconfig.yaml @@ -7,6 +7,8 @@ options: azureSdkForJs: false isModularLibrary: true hierarchyClient: false + generateSample: true + examples-directory: "../../../../../../temp/http/azure/example/basic/examples" "emitter-output-dir": "{project-root}" packageDetails: name: "@msinternal/example" From deeecfca071599fde74b622ec5924b6f543415e7 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 27 Aug 2024 14:48:42 +0800 Subject: [PATCH 56/83] Fix the spread issues --- .../typespec-ts/src/modular/emitSamples.ts | 248 ++++++++++-------- .../src/modular/helpers/namingHelpers.ts | 14 +- .../src/modular/helpers/typeHelpers.ts | 36 +++ .../typespec-ts/src/utils/credentialUtils.ts | 48 +++- .../samples/client/apiKeyCredentialClient.md | 82 ++++++ .../samples/operations/armCurdOperations.md | 8 +- .../samples/parameters/parameterTypesCheck.md | 2 +- 7 files changed, 318 insertions(+), 120 deletions(-) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 7d8e715c1e..a493a142a7 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -12,106 +12,99 @@ import { SdkInitializationType, SdkServiceMethod, SdkServiceOperation, - SdkType, SdkTypeExample } from "@azure-tools/typespec-client-generator-core"; -import { NameType, normalizeName } from "@azure-tools/rlc-common"; +import { + isAzurePackage, + NameType, + normalizeName +} from "@azure-tools/rlc-common"; import { useContext } from "../contextManager.js"; import { join } from "path"; import { AzureIdentityDependencies } from "../modular/external-dependencies.js"; import { reportDiagnostic } from "../index.js"; import { NoTarget } from "@typespec/compiler"; import { isArm } from "../utils/clientUtils.js"; +import { + buildPropertyNameMapper, + isSpreadBodyParameter +} from "./helpers/typeHelpers.js"; +import { getClassicalClientName } from "./helpers/namingHelpers.js"; +import { + hasKeyCredential, + hasTokenCredential +} from "../utils/credentialUtils.js"; +/** + * Interfaces for the example generations + */ interface ExampleValue { name: string; value: string; isOptional: boolean; } + +interface EmitSampleOptions { + topLevelClient: SdkClientType; + generatedFiles: SourceFile[]; + classicalMethodPrefix?: string; +} +/** + * Helpers to emit samples + */ export function emitSamples(dpgContext: SdkContext): SourceFile[] { const generatedFiles: SourceFile[] = []; for (const client of dpgContext.sdkPackage.clients) { - generatedFiles.push(...emitClassicalClientSamples(dpgContext, client)); + emitClientSamplesRecursively(dpgContext, client, { + topLevelClient: client, + generatedFiles + }); } return generatedFiles; } -function emitClassicalClientSamples( - dpgContext: SdkContext, - client: SdkClientType, - operationGroupPrefix?: string -) { - // build client-level parameters - const clientName = client.name; - const credentialParameterType = getCredentialType(client.initialization); - const generatedFiles: SourceFile[] = []; - emitClassicalClientSamplesDfs( - dpgContext, - client, - clientName, - generatedFiles, - credentialParameterType, - operationGroupPrefix ?? "" - ); - return generatedFiles; -} - -function emitClassicalClientSamplesDfs( +function emitClientSamplesRecursively( dpgContext: SdkContext, client: SdkClientType, - clientName: string, - generatedFiles: SourceFile[], - credentialParameterType?: string, - operationGroupPrefix?: string + options: EmitSampleOptions ) { for (const operationOrGroup of client.methods) { - if (operationOrGroup.kind === "clientaccessor") { - let prefix = normalizeName( - operationOrGroup.response.name, - NameType.Property - ); - // append hierarchy prefix if hierarchyClient is enabled - if (dpgContext.rlcOptions?.hierarchyClient === true) { - prefix = - (operationGroupPrefix ? `${operationGroupPrefix}.` : "") + prefix; - } - - emitClassicalClientSamplesDfs( - dpgContext, - operationOrGroup.response, - clientName, - generatedFiles, - credentialParameterType, - prefix - ); - } else { - const sample = emitMethodSamples(dpgContext, operationOrGroup, { - clientName, - credentialType: credentialParameterType, - operationGroupPrefix - }); - if (sample) { - generatedFiles.push(sample); - } + // handle client-level methods + if (operationOrGroup.kind !== "clientaccessor") { + emitMethodSamples(dpgContext, operationOrGroup, options); + continue; + } + // handle operation group + let prefix = normalizeName( + operationOrGroup.response.name, + NameType.Property + ); + // append hierarchy prefix if hierarchyClient is enabled + if (dpgContext.rlcOptions?.hierarchyClient === true) { + prefix = + (options.classicalMethodPrefix + ? `${options.classicalMethodPrefix}.` + : "") + prefix; } + + emitClientSamplesRecursively(dpgContext, operationOrGroup.response, { + ...options, + classicalMethodPrefix: prefix + }); } } function emitMethodSamples( dpgContext: SdkContext, method: SdkServiceMethod, - options: { - clientName: string; - credentialType?: string; - operationGroupPrefix?: string; - } + options: EmitSampleOptions ): SourceFile | undefined { const examples = method.operation.examples ?? []; if (examples.length === 0) { return; } const project = useContext("outputProject"); - const operationPrefix = `${options.operationGroupPrefix ?? ""} ${ + const operationPrefix = `${options.classicalMethodPrefix ?? ""} ${ method.name }`; const sampleFolder = join( @@ -131,12 +124,11 @@ function emitMethodSamples( if (dpgContext.rlcOptions?.packageDetails?.name) { sourceFile.addImportDeclaration({ moduleSpecifier: dpgContext.rlcOptions?.packageDetails?.name, - namedImports: [options.clientName] + namedImports: [getClassicalClientName(options.topLevelClient)] }); } for (const example of examples) { - // build example const exampleFunctionBody: string[] = []; const exampleName = normalizeName( escapeSpecialCharToSpace(example.name), @@ -154,7 +146,7 @@ function emitMethodSamples( dpgContext, method, parameterMap, - options.credentialType + options.topLevelClient ); const clientParams: string[] = clientParamValues .filter((p) => !p.isOptional) @@ -172,7 +164,9 @@ function emitMethodSamples( clientParams.push("clientOptions"); } exampleFunctionBody.push( - `const client = new ${options.clientName}(${clientParams.join(", ")});` + `const client = new ${getClassicalClientName( + options.topLevelClient + )}(${clientParams.join(", ")});` ); // prepare operation-level parameters @@ -191,8 +185,8 @@ function emitMethodSamples( if (optionalParams.length > 0) { methodParams.push(`{${optionalParams.join(", ")}}`); } - const prefix = options.operationGroupPrefix - ? `${options.operationGroupPrefix}.` + const prefix = options.classicalMethodPrefix + ? `${options.classicalMethodPrefix}.` : ""; const isPaging = method.kind === "paging"; const methodCall = `client.${prefix}${method.name}(${methodParams.join( @@ -233,6 +227,7 @@ function emitMethodSamples( } main().catch(console.error);`); + options.generatedFiles.push(sourceFile); return sourceFile; } @@ -283,13 +278,36 @@ function prepareMethodExampleParameters( }); } // required/optional body parameters - const bodyName = method.operation.bodyParam?.name; - if (bodyName && parameterMap[bodyName]) { - const example = parameterMap[bodyName]; - if (example && example.value) { + const bodyParam = method.operation.bodyParam; + const bodyName = bodyParam?.name; + const bodyExample = parameterMap[bodyName ?? ""]; + if ( + bodyParam && + bodyName && + bodyExample && + bodyExample && + bodyExample.value + ) { + if ( + isSpreadBodyParameter(bodyParam) && + bodyParam.type.kind === "model" && + bodyExample.value.kind === "model" + ) { + for (const prop of bodyParam.type.properties) { + const propExample = bodyExample.value.value[prop.name]; + if (!propExample) { + continue; + } + parameters.push({ + name: prop.name, + value: getParameterValue(propExample), + isOptional: Boolean(prop.optional) + }); + } + } else { parameters.push({ name: bodyName, - value: getParameterValue(example.value), + value: getParameterValue(bodyExample.value), isOptional: Boolean(method.operation.bodyParam?.optional) }); } @@ -314,20 +332,19 @@ function prepareClientExampleParameters( dpgContext: SdkContext, method: SdkServiceMethod, parameterMap: Record, - credentialType?: string + topLevelClient: SdkClientType ): ExampleValue[] { - // TODO: blocked by tcgc issue: https://github.com/Azure/typespec-azure/issues/1419 + // TODO: blocked by TCGC issue: https://github.com/Azure/typespec-azure/issues/1419 + // refine this to support generic client-level parameters once resolved const result: ExampleValue[] = []; - if (credentialType) { - // Only support DefaultAzureCredential for now - result.push({ - name: "credential", - value: `new ${resolveReference( - AzureIdentityDependencies.DefaultAzureCredential - )}()`, - isOptional: false - }); + const credentialExampleValue = getCredentialExampleValue( + dpgContext, + topLevelClient.initialization + ); + if (credentialExampleValue) { + result.push(credentialExampleValue); } + let subscriptionIdValue = `"00000000-0000-0000-0000-00000000000"`; // required client-level parameters for (const param of method.operation.parameters) { @@ -395,6 +412,42 @@ function prepareClientExampleParameters( return result; } +function getCredentialExampleValue( + dpgContext: SdkContext, + initialization: SdkInitializationType +): ExampleValue | undefined { + const keyCredential = hasKeyCredential(initialization), + tokenCredential = hasTokenCredential(initialization); + if (keyCredential || tokenCredential) { + if (isAzurePackage({ options: dpgContext.rlcOptions })) { + // Support DefaultAzureCredential for Azure packages + return { + name: "credential", + value: `new ${resolveReference( + AzureIdentityDependencies.DefaultAzureCredential + )}()`, + isOptional: false + }; + } else if (keyCredential) { + // Support ApiKeyCredential for non-Azure packages + return { + name: "credential", + value: `{ key: "INPUT_YOUR_KEY_HERE" }`, + isOptional: false + }; + } else if (tokenCredential) { + // Support TokenCredential for non-Azure packages + return { + name: "credential", + value: `{ getToken: async () => { + return { token: "INPUT_YOUR_TOKEN_HERE", expiresOnTimestamp: now() }; } }`, + isOptional: false + }; + } + } + return undefined; +} + function getParameterValue(value: SdkTypeExample): string { let retValue = `{} as any`; switch (value.kind) { @@ -419,7 +472,7 @@ function getParameterValue(value: SdkTypeExample): string { break; case "dict": case "model": { - const mapper = getPropertyClientNameMapper(value.type); + const mapper = buildPropertyNameMapper(value.type); const values = []; const additionalPropertiesValue = value.kind === "model" ? value?.additionalPropertiesValue ?? {} : {}; @@ -454,34 +507,9 @@ function getParameterValue(value: SdkTypeExample): string { return retValue; } -function getPropertyClientNameMapper(model: SdkType) { - const mapper = new Map(); - if (model.kind !== "model") { - return mapper; - } - for (const prop of model.properties) { - if (prop.kind !== "property") { - continue; - } - - mapper.set(prop.serializedName, prop.name); - } - return mapper; -} - function escapeSpecialCharToSpace(str: string) { if (!str) { return str; } return str.replace(/_|,|\.|\(|\)|'s |\[|\]/g, " ").replace(/\//g, " Or "); } - -// FIXME: This is a temporary solution to get the credential type -function getCredentialType( - initialization: SdkInitializationType -): string | undefined { - const credentialParameter = initialization.properties.find( - (p) => p.kind === "credential" - )?.type; - return credentialParameter ? "Credential" : undefined; -} diff --git a/packages/typespec-ts/src/modular/helpers/namingHelpers.ts b/packages/typespec-ts/src/modular/helpers/namingHelpers.ts index 043be71944..268cbbf80d 100644 --- a/packages/typespec-ts/src/modular/helpers/namingHelpers.ts +++ b/packages/typespec-ts/src/modular/helpers/namingHelpers.ts @@ -3,7 +3,11 @@ import { normalizeName, ReservedModelNames } from "@azure-tools/rlc-common"; -import { SdkClient } from "@azure-tools/typespec-client-generator-core"; +import { + SdkClient, + SdkClientType, + SdkServiceOperation +} from "@azure-tools/typespec-client-generator-core"; import * as path from "path"; import { toCamelCase, toPascalCase } from "../../utils/casingUtils.js"; import { SdkContext } from "../../utils/interfaces.js"; @@ -14,10 +18,16 @@ import { OperationGroup } from "../modularCodeModel.js"; -export function getClientName(client: Client) { +export function getClientName(client: Client): string { return client.name.replace(/Client$/, ""); } +export function getClassicalClientName( + client: SdkClientType +): string { + return client.name; +} + export interface GuardedName { name: string; fixme?: string[]; diff --git a/packages/typespec-ts/src/modular/helpers/typeHelpers.ts b/packages/typespec-ts/src/modular/helpers/typeHelpers.ts index fee24ab832..b3e8712ce3 100644 --- a/packages/typespec-ts/src/modular/helpers/typeHelpers.ts +++ b/packages/typespec-ts/src/modular/helpers/typeHelpers.ts @@ -1,3 +1,7 @@ +import { + SdkBodyParameter, + SdkType +} from "@azure-tools/typespec-client-generator-core"; import { Type } from "../modularCodeModel.js"; /** @@ -306,3 +310,35 @@ export function isCredentialType(type: Type): boolean { (type.type === "combined" && (type.types?.every(isCredentialType) ?? false)) ); } + +/** + * Builds a property name mapper between the serializedName and the name of the property. + * Return empty map if the type is not a model. + */ +export function buildPropertyNameMapper(model: SdkType) { + const mapper = new Map(); + if (model.kind !== "model") { + return mapper; + } + for (const prop of model.properties) { + if (prop.kind !== "property") { + continue; + } + + mapper.set(prop.serializedName, prop.name); + } + return mapper; +} + +/** + * Checks if the body parameter is a spread parameter. + * @param body + * @returns + */ +export function isSpreadBodyParameter(body: SdkBodyParameter) { + const methodParams = body.correspondingMethodParams; + return ( + methodParams.length > 1 || + (methodParams.length === 1 && methodParams[0]?.type !== body.type) + ); +} diff --git a/packages/typespec-ts/src/utils/credentialUtils.ts b/packages/typespec-ts/src/utils/credentialUtils.ts index bb77e459ef..1e31a2427f 100644 --- a/packages/typespec-ts/src/utils/credentialUtils.ts +++ b/packages/typespec-ts/src/utils/credentialUtils.ts @@ -1,6 +1,7 @@ import { NoTarget, Program } from "@typespec/compiler"; import { Authentication, HttpAuth } from "@typespec/http"; import { reportDiagnostic } from "../lib.js"; +import { SdkInitializationType } from "@azure-tools/typespec-client-generator-core"; /** * Get supported HTTP authentication schemes and filter out unsupported ones. @@ -17,7 +18,9 @@ export function getSupportedHttpAuth( for (const auth of option.schemes) { switch (auth.type) { case "apiKey": - if (auth.in === "cookie" || auth.in === "query") { + if (isSupportedKeyCredential(auth)) { + authList.push(auth); + } else { // just skip un-supported authentication and report a warning reportDiagnostic(program, { code: "un-supported-credential", @@ -26,8 +29,6 @@ export function getSupportedHttpAuth( }, target: NoTarget }); - } else { - authList.push(auth); } break; default: @@ -39,3 +40,44 @@ export function getSupportedHttpAuth( return authList; } + +export function isSupportedKeyCredential(auth: HttpAuth): boolean { + return ( + (auth.type === "apiKey" && auth.in === "header") || auth.type === "http" + ); +} + +export function isSupportedTokenCredential(auth: HttpAuth): boolean { + return auth.type === "oauth2" || auth.type === "openIdConnect"; +} + +export function hasKeyCredential(initialization: SdkInitializationType) { + const authScheme = getAuthScheme(initialization); + return authScheme.some((auth) => isSupportedKeyCredential(auth)); +} + +export function hasTokenCredential(initialization: SdkInitializationType) { + const authScheme = getAuthScheme(initialization); + return authScheme.some((auth) => isSupportedTokenCredential(auth)); +} + +function getAuthScheme(initialization: SdkInitializationType): HttpAuth[] { + const credentialParams = initialization.properties?.find( + (param) => param.kind === "credential" + ); + if (!credentialParams) { + return []; + } + const kind = credentialParams.type.kind; + const authScheme: HttpAuth[] = []; + if (kind === "credential") { + authScheme.push(credentialParams.type.scheme); + } else if (kind === "union") { + for (const param of credentialParams.type.values) { + if (param.kind === "credential") { + authScheme.push(param.scheme); + } + } + } + return authScheme; +} diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md new file mode 100644 index 0000000000..e28847eae0 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md @@ -0,0 +1,82 @@ +# Should generate fake api key credential in non-azure client + +Should generate fake api key credential in non-azure client. + +## TypeSpec + +This is tsp definition. + +```tsp +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +@service({ + title: "Demo Service", +}) +@versioned(Versions) +@useAuth(ApiKeyAuth) +namespace DemoService; + +enum Versions { + /** Version 2021-10-01-preview */ + `2021-10-01-preview`, +} + +@doc("show example demo") +op read(name: string): void; +``` + +This is the tspconfig.yaml. + +```yaml +flavor: "demo" +``` + +## Example + +Raw json files. + +```json for read +{ + "title": "read", + "operationId": "read", + "parameters": { + "readRequest": { + "name": "test" + } + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for non-hierarchy cases: + +```ts samples +import { DemoServiceClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example demo + * + * @summary show example demo + * x-ms-original-file: 2021-10-01-preview/json_for_read.json + */ +async function read() { + const credential = { key: "INPUT_YOUR_KEY_HERE" }; + const client = new DemoServiceClient(credential); + const result = await client.read("test"); + console.log(result); +} + +async function main() { + read(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md index 151132dc53..1c57934e2a 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md @@ -202,11 +202,11 @@ async function employeesCreateOrUpdate() { properties: { age: 30, city: "gydhnntudughbmxlkyzrskcdkotrxn", - profile: "ms" + profile: "ms", }, tags: { key2913: "urperxmkkhhkp" }, - location: "itajgxyqozseoygnl" - } + location: "itajgxyqozseoygnl", + }, ); console.log(result); } @@ -232,7 +232,7 @@ async function employeesDelete() { const client = new ContosoClient(credential, subscriptionId); const result = await client.employees.delete( "rgopenapi", - "5vX--BxSu3ux48rI4O9OQ569" + "5vX--BxSu3ux48rI4O9OQ569", ); console.log(result); } diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index 50021856f0..18ae744edf 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -82,7 +82,7 @@ async function read() { unionValue: test, nullValue: null, jsClientName: "prop renamed", - additionalProp: "additional prop" + additionalProp: "additional prop", }); console.log(result); } From 62cecad17e3db806027fdebd2133fb1795d41a06 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 27 Aug 2024 15:04:02 +0800 Subject: [PATCH 57/83] Update the optional body cases --- .../typespec-ts/src/modular/emitSamples.ts | 2 +- .../samples/parameters/bodyOptionalCheck.md | 84 +++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index a493a142a7..0ebd934769 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -36,7 +36,7 @@ import { } from "../utils/credentialUtils.js"; /** - * Interfaces for the example generations + * Interfaces for samples generations */ interface ExampleValue { name: string; diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md new file mode 100644 index 0000000000..9ce4c7bcdf --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md @@ -0,0 +1,84 @@ +# Should generate optional body in option parameter + +Should generate optional body in option parameter. + +## TypeSpec + +This is tsp definition. + +```tsp +@doc("This is a simple model.") +model BodyParameter { + name: string; +} +@doc("This is a model with all http request decorator.") +model CompositeRequest { + @path + name: string; + + @query + requiredQuery: string; + + @query + optionalQuery?: string; + + @body + body?: BodyParameter; +} + +@doc("show example demo") +op read(...CompositeRequest): void; +``` + +## Example + +Raw json files. + +```json +{ + "title": "read", + "operationId": "read", + "parameters": { + "name": "required path param", + "optionalQuery": "renamed optional query", + "required-header": "required header", + "optional-header": "optional header", + "requiredQuery": "required query", + "body": { + "name": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate optional body in option parameter: + +```ts samples +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example demo + * + * @summary show example demo + * x-ms-original-file: 2021-10-01-preview/json.json + */ +async function read() { + const client = new TestingClient(); + const result = await client.read("required path param", "required query", { + body: { name: "body name" }, + optionalQuery: "renamed optional query", + }); + console.log(result); +} + +async function main() { + read(); +} + +main().catch(console.error); +``` From e59c05c07b0584a05387840c4c4e1919162aa456 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 27 Aug 2024 15:05:46 +0800 Subject: [PATCH 58/83] Revert changes --- .vscode/launch.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7600924268..1f6a0fe332 100755 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -112,7 +112,7 @@ { "name": "[TypeSpec] Smoke Test Debug", "request": "launch", - "cwd": "${workspaceFolder}/packages/typespec-test/test/NetworkAnalytics.Management", + "cwd": "${workspaceFolder}/packages/typespec-test/test/customWrapper", "runtimeArgs": ["tsp", "compile", "./spec"], "runtimeExecutable": "npx", "skipFiles": ["/**"], @@ -146,7 +146,7 @@ "--timeout", "999999", "--colors", - "./test/modularUnit/**/*.spec.ts" + "./test/unit/**/*.spec.ts" ], "runtimeExecutable": "npx", "skipFiles": ["/**"], From 8edd48ea90e86e57e15346818b7f1b75a7169128 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 27 Aug 2024 15:17:49 +0800 Subject: [PATCH 59/83] Rename methods --- packages/typespec-ts/src/modular/emitSamples.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 0ebd934769..3bce08ff5d 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -55,7 +55,7 @@ interface EmitSampleOptions { export function emitSamples(dpgContext: SdkContext): SourceFile[] { const generatedFiles: SourceFile[] = []; for (const client of dpgContext.sdkPackage.clients) { - emitClientSamplesRecursively(dpgContext, client, { + emitClientSamples(dpgContext, client, { topLevelClient: client, generatedFiles }); @@ -63,7 +63,7 @@ export function emitSamples(dpgContext: SdkContext): SourceFile[] { return generatedFiles; } -function emitClientSamplesRecursively( +function emitClientSamples( dpgContext: SdkContext, client: SdkClientType, options: EmitSampleOptions @@ -87,7 +87,7 @@ function emitClientSamplesRecursively( : "") + prefix; } - emitClientSamplesRecursively(dpgContext, operationOrGroup.response, { + emitClientSamples(dpgContext, operationOrGroup.response, { ...options, classicalMethodPrefix: prefix }); From 206065da0aefe2ed028818ab45de382c2644da79 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 27 Aug 2024 15:22:19 +0800 Subject: [PATCH 60/83] Refactor a little the example code --- packages/typespec-ts/src/modular/emitSamples.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 3bce08ff5d..911757d1d1 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -281,13 +281,7 @@ function prepareMethodExampleParameters( const bodyParam = method.operation.bodyParam; const bodyName = bodyParam?.name; const bodyExample = parameterMap[bodyName ?? ""]; - if ( - bodyParam && - bodyName && - bodyExample && - bodyExample && - bodyExample.value - ) { + if (bodyName && bodyExample && bodyExample.value) { if ( isSpreadBodyParameter(bodyParam) && bodyParam.type.kind === "model" && From 0c110b599fa661caf64169bd0ec99ea508b6790d Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 27 Aug 2024 15:38:00 +0800 Subject: [PATCH 61/83] Update the enablement for arm --- packages/typespec-ts/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index 55b003da55..31824311fc 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -266,7 +266,10 @@ export async function $onEmit(context: EmitContext) { const isMultiClients = modularCodeModel.clients.length > 1; // Enable modular sample generation when explicitly set to true or MPG - if (emitterOptions?.generateSample === true || isArm(dpgContext)) { + if ( + emitterOptions?.generateSample === true || + (emitterOptions?.generateSample === undefined && isArm(dpgContext)) + ) { const samples = emitSamples(dpgContext); // Refine the rlc sample generation logic // TODO: remember to remove this out when RLC is splitted from Modular From be8e757fa9cb9184e87b87b276cbb450aa3a5dbe Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 27 Aug 2024 15:40:13 +0800 Subject: [PATCH 62/83] Update the default logic --- packages/typespec-ts/src/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index 31824311fc..0fd93a3d32 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -266,10 +266,7 @@ export async function $onEmit(context: EmitContext) { const isMultiClients = modularCodeModel.clients.length > 1; // Enable modular sample generation when explicitly set to true or MPG - if ( - emitterOptions?.generateSample === true || - (emitterOptions?.generateSample === undefined && isArm(dpgContext)) - ) { + if (emitterOptions?.generateSample === true) { const samples = emitSamples(dpgContext); // Refine the rlc sample generation logic // TODO: remember to remove this out when RLC is splitted from Modular From 5f967d3b9e9e612c91dbdde9a77503ce2492db5f Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 27 Aug 2024 15:56:55 +0800 Subject: [PATCH 63/83] Fix build issues --- packages/typespec-ts/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typespec-ts/src/index.ts b/packages/typespec-ts/src/index.ts index 0fd93a3d32..a5a3e7bc20 100644 --- a/packages/typespec-ts/src/index.ts +++ b/packages/typespec-ts/src/index.ts @@ -72,7 +72,7 @@ import { emitSerializerHelpersFile } from "./modular/buildHelperSerializers.js"; import { env } from "process"; import { existsSync } from "fs"; import { getModuleExports } from "./modular/buildProjectFiles.js"; -import { getRLCClients, isArm } from "./utils/clientUtils.js"; +import { getRLCClients } from "./utils/clientUtils.js"; import { join } from "path"; import { loadStaticHelpers } from "./framework/load-static-helpers.js"; import { provideBinder } from "./framework/hooks/binder.js"; From 6a8cc248457716cf32c109e69167d05566bc20ef Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 27 Aug 2024 17:40:07 +0800 Subject: [PATCH 64/83] Update the sample with multipleClient --- .../typespec-ts/src/modular/emitSamples.ts | 15 ++- .../test/modularUnit/scenarios.spec.ts | 7 +- .../modularUnit/scenarios/example/example.md | 12 +-- .../samples/client/apiKeyCredentialClient.md | 1 + .../samples/client/disableHierarchyClient.md | 7 +- .../samples/client/enableHierarchyClient.md | 7 +- .../samples/client/multipleClient.md | 98 +++++++++++++++++++ .../samples/operations/armCurdOperations.md | 3 + .../samples/operations/dpgCurdOperations.md | 3 + .../samples/parameters/bodyOptionalCheck.md | 1 + .../samples/parameters/parameterTypesCheck.md | 1 + 11 files changed, 140 insertions(+), 15 deletions(-) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClient.md diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 911757d1d1..6a05178c8d 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -48,16 +48,22 @@ interface EmitSampleOptions { topLevelClient: SdkClientType; generatedFiles: SourceFile[]; classicalMethodPrefix?: string; + subFolder?: string; } /** * Helpers to emit samples */ export function emitSamples(dpgContext: SdkContext): SourceFile[] { const generatedFiles: SourceFile[] = []; + const clients = dpgContext.sdkPackage.clients; for (const client of dpgContext.sdkPackage.clients) { emitClientSamples(dpgContext, client, { topLevelClient: client, - generatedFiles + generatedFiles, + subFolder: + clients.length > 1 + ? normalizeName(getClassicalClientName(client), NameType.File) + : undefined }); } return generatedFiles; @@ -109,7 +115,8 @@ function emitMethodSamples( }`; const sampleFolder = join( dpgContext.generationPathDetail?.rootDir ?? "", - "samples-dev" + "samples-dev", + options.subFolder ?? "" ); const fileName = normalizeName(`${operationPrefix} Sample`, NameType.File); const sourceFile = project.createSourceFile( @@ -204,9 +211,9 @@ function emitMethodSamples( } // Create a function declaration structure + const description = method.description ?? `execute ${method.name}`; const normalizedDescription = - (method.description?.charAt(0).toLowerCase() ?? "") + - method.description?.slice(1); + description.charAt(0).toLowerCase() + description.slice(1); const functionDeclaration: FunctionDeclarationStructure = { kind: StructureKind.Function, isAsync: true, diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index 0e035544a8..c47a578f0b 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -106,7 +106,12 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { const counts = Object.keys(examples).length; const result = await emitSamplesFromTypeSpec(tsp, examples, configs); assert.equal(result?.length, counts, `Expected exactly ${counts} files`); - const text = result.map((x) => x.getFullText()).join("\n"); + const text = result + .map( + (x) => + `/** This file path is ${x.getFilePath()} */\n ${x.getFullText()}` + ) + .join("\n"); return text; } }; diff --git a/packages/typespec-ts/test/modularUnit/scenarios/example/example.md b/packages/typespec-ts/test/modularUnit/scenarios/example/example.md index 7cc642123e..0bf9216431 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/example/example.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/example/example.md @@ -76,13 +76,13 @@ import { StreamableMethod, operationOptionsToRequestParameters, PathUncheckedResponse, - createRestError + createRestError, } from "@azure-rest/core-client"; export function _readSend( context: Client, id: string, - options: ReadOptionalParams = { requestOptions: {} } + options: ReadOptionalParams = { requestOptions: {} }, ): StreamableMethod { return context .path("/{id}", id) @@ -90,7 +90,7 @@ export function _readSend( } export async function _readDeserialize( - result: PathUncheckedResponse + result: PathUncheckedResponse, ): Promise { const expectedStatuses = ["200"]; if (!expectedStatuses.includes(result.status)) { @@ -98,14 +98,14 @@ export async function _readDeserialize( } return { - id: result.body["id"] + id: result.body["id"], }; } export async function read( context: Client, id: string, - options: ReadOptionalParams = { requestOptions: {} } + options: ReadOptionalParams = { requestOptions: {} }, ): Promise { const result = await _readSend(context, id, options); return _readDeserialize(result); @@ -118,7 +118,7 @@ Or you can extract a specific operation using `ts operations function { const result = await _readSend(context, id, options); return _readDeserialize(result); diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md index e28847eae0..64b3f20c97 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md @@ -59,6 +59,7 @@ Raw json files. Generate samples for non-hierarchy cases: ```ts samples +/** This file path is /samples-dev/readSample.ts */ import { DemoServiceClient } from "@azure/internal-test"; /** diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md index 0548ebf6c2..6aa0ca691d 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md @@ -94,6 +94,7 @@ Raw json files. Generate samples for non-hierarchy cases: ```ts samples +/** This file path is /samples-dev/opTopLevelSample.ts */ import { TestingClient } from "@azure/internal-test"; /** @@ -114,12 +115,13 @@ async function main() { main().catch(console.error); +/** This file path is /samples-dev/cOpBECSample.ts */ import { TestingClient } from "@azure/internal-test"; /** - * This sample demonstrates how to undefined + * This sample demonstrates how to execute opBEC * - * @summary undefined + * @summary execute opBEC * x-ms-original-file: 2021-10-01-preview/json_for_opBEC.json */ async function opBEC() { @@ -134,6 +136,7 @@ async function main() { main().catch(console.error); +/** This file path is /samples-dev/dOpDSample.ts */ import { TestingClient } from "@azure/internal-test"; /** diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md index ab67ab60a8..8b1ee83b51 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md @@ -94,6 +94,7 @@ Raw json files. Generate samples for hierarchy cases: ```ts samples +/** This file path is /samples-dev/opTopLevelSample.ts */ import { TestingClient } from "@azure/internal-test"; /** @@ -114,12 +115,13 @@ async function main() { main().catch(console.error); +/** This file path is /samples-dev/bECOpBECSample.ts */ import { TestingClient } from "@azure/internal-test"; /** - * This sample demonstrates how to undefined + * This sample demonstrates how to execute opBEC * - * @summary undefined + * @summary execute opBEC * x-ms-original-file: 2021-10-01-preview/json_for_opBEC.json */ async function opBEC() { @@ -134,6 +136,7 @@ async function main() { main().catch(console.error); +/** This file path is /samples-dev/dOpDSample.ts */ import { TestingClient } from "@azure/internal-test"; /** diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClient.md new file mode 100644 index 0000000000..a5ccba88fb --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClient.md @@ -0,0 +1,98 @@ +# Should generate samples for enabled hierarchy client + +Sample generation should handle hierarchy client successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.ClientGenerator.Core; + +@service({ + title: "Demo Service", +}) +@versioned(Versions) +@useAuth(ApiKeyAuth) +namespace DemoService; + +enum Versions { + /** Version 2021-10-01-preview */ + `2021-10-01-preview`, +} +@route("b") +namespace Sub { + @route("foo") + op foo(): void; + @route("bar") + op bar(): void; +} + +@client({ + name: "AClient", + service: DemoService, +}) +interface ClientA { + foo is Sub.foo; +} + + +@client({ + name: "BClient", + service: DemoService, +}) +interface ClientB { + bar is Sub.bar; +} +``` + +## Example + +Raw json files. + +```json for Sub_foo +{ + "title": "Sub_foo", + "operationId": "Sub_foo", + "parameters": {}, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate samples for hierarchy cases: + +```ts samples +/** This file path is /samples-dev/aClient/fooSample.ts */ +import { AClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to execute foo + * + * @summary execute foo + * x-ms-original-file: 2021-10-01-preview/json_for_Sub_foo.json + */ +async function subFoo() { + const credential = new DefaultAzureCredential(); + const client = new AClient(credential); + const result = await client.foo(); + console.log(result); +} + +async function main() { + subFoo(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md index 1c57934e2a..6d714adbd6 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md @@ -155,6 +155,7 @@ Raw json files. Generate samples for arm cases: ```ts samples +/** This file path is /samples-dev/operationsListSample.ts */ import { ContosoClient } from "@azure/internal-test"; import { DefaultAzureCredential } from "@azure/identity"; @@ -182,6 +183,7 @@ async function main() { main().catch(console.error); +/** This file path is /samples-dev/employeesCreateOrUpdateSample.ts */ import { ContosoClient } from "@azure/internal-test"; import { DefaultAzureCredential } from "@azure/identity"; @@ -217,6 +219,7 @@ async function main() { main().catch(console.error); +/** This file path is /samples-dev/employeesDeleteSample.ts */ import { ContosoClient } from "@azure/internal-test"; import { DefaultAzureCredential } from "@azure/identity"; diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md index b1e6fc0729..339f88da2c 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/dpgCurdOperations.md @@ -126,6 +126,7 @@ Raw json files. Generate samples for dpg cases: ```ts samples +/** This file path is /samples-dev/widgetsCreateOrUpdateWidgetSample.ts */ import { WidgetManagerClient } from "@azure/internal-test"; import { DefaultAzureCredential } from "@azure/identity"; @@ -150,6 +151,7 @@ async function main() { main().catch(console.error); +/** This file path is /samples-dev/widgetsDeleteWidgetSample.ts */ import { WidgetManagerClient } from "@azure/internal-test"; import { DefaultAzureCredential } from "@azure/identity"; @@ -172,6 +174,7 @@ async function main() { main().catch(console.error); +/** This file path is /samples-dev/widgetsListWidgetsSample.ts */ import { WidgetManagerClient } from "@azure/internal-test"; import { DefaultAzureCredential } from "@azure/identity"; diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md index 9ce4c7bcdf..c80d8b4fb2 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md @@ -59,6 +59,7 @@ Raw json files. Generate optional body in option parameter: ```ts samples +/** This file path is /samples-dev/readSample.ts */ import { TestingClient } from "@azure/internal-test"; /** diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index 18ae744edf..a14271d6b5 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -62,6 +62,7 @@ op read(@bodyRoot body: Widget): void; Generate samples for for different types: ```ts samples +/** This file path is /samples-dev/readSample.ts */ import { TestingClient } from "@azure/internal-test"; /** From 5041c49116c4a9199b8b302223261bf645a23b40 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 27 Aug 2024 17:59:56 +0800 Subject: [PATCH 65/83] Update the name --- packages/typespec-ts/test/modularUnit/scenarios.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index c47a578f0b..a132db81e3 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -97,12 +97,12 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { return result![0]!.getFunctionOrThrow(name!).getText(); }, - "(ts|typescript) samples": async (tsp, {}, unknownArgs) => { - if (!unknownArgs || !unknownArgs["examples"]) { + "(ts|typescript) samples": async (tsp, {}, namedUnknownArgs) => { + if (!namedUnknownArgs || !namedUnknownArgs["examples"]) { throw new Error(`Expected 'examples' to be passed in as an argument`); } - const configs = unknownArgs["configs"] as Record; - const examples = unknownArgs["examples"] as Record; + const configs = namedUnknownArgs["configs"] as Record; + const examples = namedUnknownArgs["examples"] as Record; const counts = Object.keys(examples).length; const result = await emitSamplesFromTypeSpec(tsp, examples, configs); assert.equal(result?.length, counts, `Expected exactly ${counts} files`); From d6ac403dc21958d6b9b0f6fd286dae098ff9f215 Mon Sep 17 00:00:00 2001 From: "Jiao Di (MSFT)" <80496810+v-jiaodi@users.noreply.github.com> Date: Fri, 30 Aug 2024 09:59:46 +0800 Subject: [PATCH 66/83] update --- common/config/rush/pnpm-lock.yaml | 8221 +++++++++-------------------- 1 file changed, 2495 insertions(+), 5726 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 4d83895cd4..3b2791bd22 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1,43 +1,44 @@ lockfileVersion: 5.4 importers: + .: specifiers: {} ../../packages/autorest.typescript: specifiers: - "@autorest/codemodel": ~4.19.2 - "@autorest/extension-base": ^3.5.0 - "@autorest/testmodeler": ^2.6.1 - "@azure-rest/core-client": ^1.4.0 - "@azure-tools/codegen": ^2.9.1 - "@azure-tools/rlc-common": workspace:^0.32.0 - "@azure-tools/test-recorder": ^3.0.0 - "@azure/abort-controller": ^2.1.2 - "@azure/core-auth": ^1.6.0 - "@azure/core-client": ^1.6.1 - "@azure/core-http": ^3.0.0 - "@azure/core-http-compat": ^1.2.0 - "@azure/core-lro": ^2.5.4 - "@azure/core-paging": ^1.5.0 - "@azure/core-rest-pipeline": ^1.14.0 - "@azure/core-tracing": ^1.0.0 - "@azure/core-util": ^1.4.0 - "@azure/core-xml": ^1.0.0-beta.1 - "@azure/logger": ^1.0.0 - "@microsoft.azure/autorest.testserver": ^3.3.34 - "@types/chai": ^4.2.8 - "@types/chai-as-promised": ^7.1.4 - "@types/fs-extra": ^9.0.13 - "@types/js-yaml": 3.12.1 - "@types/lodash": ^4.14.149 - "@types/mocha": ^5.2.7 - "@types/node": ^18.0.0 - "@types/sinon": ^10.0.0 - "@types/xmlbuilder": 0.0.34 - "@types/yargs": ^17.0.10 - "@typescript-eslint/eslint-plugin": ^6.8.0 - "@typescript-eslint/parser": ^6.8.0 + '@autorest/codemodel': ~4.19.2 + '@autorest/extension-base': ^3.5.0 + '@autorest/testmodeler': ^2.6.1 + '@azure-rest/core-client': ^1.4.0 + '@azure-tools/codegen': ^2.9.1 + '@azure-tools/rlc-common': workspace:^0.32.0 + '@azure-tools/test-recorder': ^3.0.0 + '@azure/abort-controller': ^2.1.2 + '@azure/core-auth': ^1.6.0 + '@azure/core-client': ^1.6.1 + '@azure/core-http': ^3.0.0 + '@azure/core-http-compat': ^1.2.0 + '@azure/core-lro': ^2.5.4 + '@azure/core-paging': ^1.5.0 + '@azure/core-rest-pipeline': ^1.14.0 + '@azure/core-tracing': ^1.0.0 + '@azure/core-util': ^1.4.0 + '@azure/core-xml': ^1.0.0-beta.1 + '@azure/logger': ^1.0.0 + '@microsoft.azure/autorest.testserver': ^3.3.34 + '@types/chai': ^4.2.8 + '@types/chai-as-promised': ^7.1.4 + '@types/fs-extra': ^9.0.13 + '@types/js-yaml': 3.12.1 + '@types/lodash': ^4.14.149 + '@types/mocha': ^5.2.7 + '@types/node': ^18.0.0 + '@types/sinon': ^10.0.0 + '@types/xmlbuilder': 0.0.34 + '@types/yargs': ^17.0.10 + '@typescript-eslint/eslint-plugin': ^6.8.0 + '@typescript-eslint/parser': ^6.8.0 autorest: ^3.4.2 buffer: ^6.0.3 chai: ^4.2.0 @@ -74,22 +75,22 @@ importers: webpack-cli: ^4.9.2 yargs: ^17.4.1 dependencies: - "@autorest/codemodel": 4.19.3 - "@autorest/extension-base": 3.5.2 - "@autorest/testmodeler": 2.6.1 - "@azure-rest/core-client": 1.4.0 - "@azure-tools/codegen": 2.9.2 - "@azure-tools/rlc-common": link:../rlc-common - "@azure/core-auth": 1.6.0 - "@azure/core-client": 1.7.3 - "@azure/core-http": 3.0.3 - "@azure/core-http-compat": 1.3.0 - "@azure/core-lro": 2.5.4 - "@azure/core-paging": 1.5.0 - "@azure/core-rest-pipeline": 1.14.0 - "@azure/core-tracing": 1.0.1 - "@azure/logger": 1.0.4 - "@types/lodash": 4.14.199 + '@autorest/codemodel': 4.19.3 + '@autorest/extension-base': 3.5.2 + '@autorest/testmodeler': 2.6.1 + '@azure-rest/core-client': 1.4.0 + '@azure-tools/codegen': 2.9.2 + '@azure-tools/rlc-common': link:../rlc-common + '@azure/core-auth': 1.6.0 + '@azure/core-client': 1.7.3 + '@azure/core-http': 3.0.3 + '@azure/core-http-compat': 1.3.0 + '@azure/core-lro': 2.5.4 + '@azure/core-paging': 1.5.0 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/core-tracing': 1.0.1 + '@azure/logger': 1.0.4 + '@types/lodash': 4.14.199 dotenv: 16.3.1 fs-extra: 11.1.1 handlebars: 4.7.8 @@ -98,22 +99,22 @@ importers: source-map-support: 0.5.21 ts-morph: 23.0.0 devDependencies: - "@azure-tools/test-recorder": 3.0.0 - "@azure/abort-controller": 2.1.2 - "@azure/core-util": 1.5.0 - "@azure/core-xml": 1.3.4 - "@microsoft.azure/autorest.testserver": 3.3.48 - "@types/chai": 4.3.6 - "@types/chai-as-promised": 7.1.6 - "@types/fs-extra": 9.0.13 - "@types/js-yaml": 3.12.1 - "@types/mocha": 5.2.7 - "@types/node": 18.18.0 - "@types/sinon": 10.0.17 - "@types/xmlbuilder": 0.0.34 - "@types/yargs": 17.0.25 - "@typescript-eslint/eslint-plugin": 6.8.0_qf4uxqaifopx7g4oramkqjuumy - "@typescript-eslint/parser": 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i + '@azure-tools/test-recorder': 3.0.0 + '@azure/abort-controller': 2.1.2 + '@azure/core-util': 1.5.0 + '@azure/core-xml': 1.3.4 + '@microsoft.azure/autorest.testserver': 3.3.48 + '@types/chai': 4.3.6 + '@types/chai-as-promised': 7.1.6 + '@types/fs-extra': 9.0.13 + '@types/js-yaml': 3.12.1 + '@types/mocha': 5.2.7 + '@types/node': 18.18.0 + '@types/sinon': 10.0.17 + '@types/xmlbuilder': 0.0.34 + '@types/yargs': 17.0.25 + '@typescript-eslint/eslint-plugin': 6.8.0_qf4uxqaifopx7g4oramkqjuumy + '@typescript-eslint/parser': 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i autorest: 3.6.3 buffer: 6.0.3 chai: 4.3.8 @@ -145,13 +146,13 @@ importers: ../../packages/rlc-common: specifiers: - "@types/chai": ^4.3.4 - "@types/fs-extra": ^8.1.0 - "@types/lodash": ^4.14.182 - "@types/mocha": ^10.0.1 - "@types/node": ^18.0.0 - "@typescript-eslint/eslint-plugin": ^6.8.0 - "@typescript-eslint/parser": ^6.8.0 + '@types/chai': ^4.3.4 + '@types/fs-extra': ^8.1.0 + '@types/lodash': ^4.14.182 + '@types/mocha': ^10.0.1 + '@types/node': ^18.0.0 + '@typescript-eslint/eslint-plugin': ^6.8.0 + '@typescript-eslint/parser': ^6.8.0 chai: ^4.3.7 cross-env: 7.0.3 eslint: ^8.9.0 @@ -170,13 +171,13 @@ importers: lodash: 4.17.21 ts-morph: 23.0.0 devDependencies: - "@types/chai": 4.3.6 - "@types/fs-extra": 8.1.3 - "@types/lodash": 4.14.199 - "@types/mocha": 10.0.1 - "@types/node": 18.18.0 - "@typescript-eslint/eslint-plugin": 6.8.0_qf4uxqaifopx7g4oramkqjuumy - "@typescript-eslint/parser": 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i + '@types/chai': 4.3.6 + '@types/fs-extra': 8.1.3 + '@types/lodash': 4.14.199 + '@types/mocha': 10.0.1 + '@types/node': 18.18.0 + '@typescript-eslint/eslint-plugin': 6.8.0_qf4uxqaifopx7g4oramkqjuumy + '@typescript-eslint/parser': 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i chai: 4.3.8 cross-env: 7.0.3 eslint: 8.50.0 @@ -190,76 +191,76 @@ importers: ../../packages/typespec-test: specifiers: - "@azure-tools/typespec-autorest": ">=0.45.0 <1.0.0" - "@azure-tools/typespec-azure-core": ">=0.45.0 <1.0.0" - "@azure-tools/typespec-azure-resource-manager": ">=0.45.0 <1.0.0" - "@azure-tools/typespec-client-generator-core": ">=0.45.4 <1.0.0" - "@azure-tools/typespec-ts": workspace:^0.32.0 - "@types/mocha": ^5.2.7 - "@types/node": ^18.0.0 - "@typespec/compiler": ">=0.59.0 <1.0.0" - "@typespec/http": ">=0.59.0 <1.0.0" - "@typespec/openapi": ">=0.59.0 <1.0.0" - "@typespec/openapi3": ">=0.59.0 <1.0.0" - "@typespec/rest": ">=0.59.0 <1.0.0" - "@typespec/versioning": ">=0.59.0 <1.0.0" + '@azure-tools/typespec-autorest': '>=0.45.0 <1.0.0' + '@azure-tools/typespec-azure-core': '>=0.45.0 <1.0.0' + '@azure-tools/typespec-azure-resource-manager': '>=0.45.0 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.45.4 <1.0.0' + '@azure-tools/typespec-ts': workspace:^0.32.0 + '@types/mocha': ^5.2.7 + '@types/node': ^18.0.0 + '@typespec/compiler': '>=0.59.0 <1.0.0' + '@typespec/http': '>=0.59.0 <1.0.0' + '@typespec/openapi': '>=0.59.0 <1.0.0' + '@typespec/openapi3': '>=0.59.0 <1.0.0' + '@typespec/rest': '>=0.59.0 <1.0.0' + '@typespec/versioning': '>=0.59.0 <1.0.0' prettier: ^3.1.0 ts-node: ^8.5.2 typescript: ~5.5.3 dependencies: - "@azure-tools/typespec-autorest": 0.45.0_ch4e7dmaodljkmzs7h7dd2lznu - "@azure-tools/typespec-azure-core": 0.45.0_alrznhyrw66bvx6gp4zrtdfkte - "@azure-tools/typespec-azure-resource-manager": 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i - "@azure-tools/typespec-client-generator-core": 0.45.4_rxzquxnvxkwebgrumlsfc6ni5i - "@azure-tools/typespec-ts": link:../typespec-ts - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/openapi": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/openapi3": 0.59.0_foc6rhrbx2on4sod3dtg7cmvwy - "@typespec/rest": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/versioning": 0.59.0_@typespec+compiler@0.59.0 + '@azure-tools/typespec-autorest': 0.45.0_ch4e7dmaodljkmzs7h7dd2lznu + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@azure-tools/typespec-azure-resource-manager': 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i + '@azure-tools/typespec-client-generator-core': 0.45.4_rxzquxnvxkwebgrumlsfc6ni5i + '@azure-tools/typespec-ts': link:../typespec-ts + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/openapi3': 0.59.0_foc6rhrbx2on4sod3dtg7cmvwy + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 prettier: 3.1.1 devDependencies: - "@types/mocha": 5.2.7 - "@types/node": 18.18.0 + '@types/mocha': 5.2.7 + '@types/node': 18.18.0 ts-node: 8.10.2_typescript@5.5.3 typescript: 5.5.3 ../../packages/typespec-ts: specifiers: - "@azure-rest/core-client": ^2.1.0 - "@azure-tools/cadl-ranch": ^0.14.3 - "@azure-tools/cadl-ranch-api": ^0.4.6 - "@azure-tools/cadl-ranch-expect": ^0.15.1 - "@azure-tools/cadl-ranch-specs": ^0.36.1 - "@azure-tools/rlc-common": workspace:^0.32.0 - "@azure-tools/typespec-autorest": ">=0.45.0 <1.0.0" - "@azure-tools/typespec-azure-core": ">=0.45.0 <1.0.0" - "@azure-tools/typespec-azure-resource-manager": ">=0.45.0 <1.0.0" - "@azure-tools/typespec-client-generator-core": ">=0.45.4 <1.0.0" - "@azure/abort-controller": ^2.1.2 - "@azure/core-auth": ^1.6.0 - "@azure/core-lro": ^3.0.0 - "@azure/core-paging": ^1.5.0 - "@azure/core-rest-pipeline": ^1.14.0 - "@azure/core-util": ^1.4.0 - "@azure/logger": ^1.0.4 - "@microsoft/api-extractor": ^7.47.5 - "@types/chai": ^4.3.1 - "@types/fs-extra": ^9.0.13 - "@types/lodash": ^4.17.4 - "@types/mocha": ^10.0.6 - "@types/node": ^18.0.0 - "@typescript-eslint/eslint-plugin": ^6.8.0 - "@typescript-eslint/parser": ^6.8.0 - "@typespec/compiler": ">=0.59.0 <1.0.0" - "@typespec/http": ">=0.59.0 <1.0.0" - "@typespec/openapi": ">=0.59.0, <1.0.0" - "@typespec/rest": ">=0.59.0 <1.0.0" - "@typespec/ts-http-runtime": 1.0.0-alpha.20240314.2 - "@typespec/versioning": ">=0.59.0 <1.0.0" - "@vitest/coverage-istanbul": ~1.6.0 - "@vitest/coverage-v8": ~1.6.0 + '@azure-rest/core-client': ^2.1.0 + '@azure-tools/cadl-ranch': ^0.14.3 + '@azure-tools/cadl-ranch-api': ^0.4.6 + '@azure-tools/cadl-ranch-expect': ^0.15.1 + '@azure-tools/cadl-ranch-specs': ^0.36.1 + '@azure-tools/rlc-common': workspace:^0.32.0 + '@azure-tools/typespec-autorest': '>=0.45.0 <1.0.0' + '@azure-tools/typespec-azure-core': '>=0.45.0 <1.0.0' + '@azure-tools/typespec-azure-resource-manager': '>=0.45.0 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.45.4 <1.0.0' + '@azure/abort-controller': ^2.1.2 + '@azure/core-auth': ^1.6.0 + '@azure/core-lro': ^3.0.0 + '@azure/core-paging': ^1.5.0 + '@azure/core-rest-pipeline': ^1.14.0 + '@azure/core-util': ^1.4.0 + '@azure/logger': ^1.0.4 + '@microsoft/api-extractor': ^7.47.5 + '@types/chai': ^4.3.1 + '@types/fs-extra': ^9.0.13 + '@types/lodash': ^4.17.4 + '@types/mocha': ^10.0.6 + '@types/node': ^18.0.0 + '@typescript-eslint/eslint-plugin': ^6.8.0 + '@typescript-eslint/parser': ^6.8.0 + '@typespec/compiler': '>=0.59.0 <1.0.0' + '@typespec/http': '>=0.59.0 <1.0.0' + '@typespec/openapi': '>=0.59.0, <1.0.0' + '@typespec/rest': '>=0.59.0 <1.0.0' + '@typespec/ts-http-runtime': 1.0.0-alpha.20240314.2 + '@typespec/versioning': '>=0.59.0 <1.0.0' + '@vitest/coverage-istanbul': ~1.6.0 + '@vitest/coverage-v8': ~1.6.0 chai: ^4.3.6 chalk: ^4.0.0 cross-env: ^7.0.3 @@ -279,45 +280,45 @@ importers: typescript: ~5.5.3 vitest: ~1.6.0 dependencies: - "@azure-tools/rlc-common": link:../rlc-common + '@azure-tools/rlc-common': link:../rlc-common fs-extra: 11.1.1 lodash: 4.17.21 prettier: 3.1.1 ts-morph: 23.0.0 tslib: 2.6.2 devDependencies: - "@azure-rest/core-client": 2.1.0 - "@azure-tools/cadl-ranch": 0.14.3_e53zy5pp4bbrxbruosuhuay6sm - "@azure-tools/cadl-ranch-api": 0.4.6 - "@azure-tools/cadl-ranch-expect": 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu - "@azure-tools/cadl-ranch-specs": 0.36.1_cvode6xhpuyl3aj5dk75xzx5nu - "@azure-tools/typespec-autorest": 0.45.0_ch4e7dmaodljkmzs7h7dd2lznu - "@azure-tools/typespec-azure-core": 0.45.0_alrznhyrw66bvx6gp4zrtdfkte - "@azure-tools/typespec-azure-resource-manager": 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i - "@azure-tools/typespec-client-generator-core": 0.45.4_rxzquxnvxkwebgrumlsfc6ni5i - "@azure/abort-controller": 2.1.2 - "@azure/core-auth": 1.6.0 - "@azure/core-lro": 3.0.0 - "@azure/core-paging": 1.5.0 - "@azure/core-rest-pipeline": 1.14.0 - "@azure/core-util": 1.5.0 - "@azure/logger": 1.0.4 - "@microsoft/api-extractor": 7.47.5_@types+node@18.18.0 - "@types/chai": 4.3.6 - "@types/fs-extra": 9.0.13 - "@types/lodash": 4.17.4 - "@types/mocha": 10.0.6 - "@types/node": 18.18.0 - "@typescript-eslint/eslint-plugin": 6.8.0_qf4uxqaifopx7g4oramkqjuumy - "@typescript-eslint/parser": 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/openapi": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/rest": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/ts-http-runtime": 1.0.0-alpha.20240314.2 - "@typespec/versioning": 0.59.0_@typespec+compiler@0.59.0 - "@vitest/coverage-istanbul": 1.6.0_vitest@1.6.0 - "@vitest/coverage-v8": 1.6.0_vitest@1.6.0 + '@azure-rest/core-client': 2.2.0 + '@azure-tools/cadl-ranch': 0.14.3_e53zy5pp4bbrxbruosuhuay6sm + '@azure-tools/cadl-ranch-api': 0.4.6 + '@azure-tools/cadl-ranch-expect': 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu + '@azure-tools/cadl-ranch-specs': 0.36.1_cvode6xhpuyl3aj5dk75xzx5nu + '@azure-tools/typespec-autorest': 0.45.0_ch4e7dmaodljkmzs7h7dd2lznu + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@azure-tools/typespec-azure-resource-manager': 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i + '@azure-tools/typespec-client-generator-core': 0.45.4_rxzquxnvxkwebgrumlsfc6ni5i + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.6.0 + '@azure/core-lro': 3.0.0 + '@azure/core-paging': 1.5.0 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/core-util': 1.5.0 + '@azure/logger': 1.0.4 + '@microsoft/api-extractor': 7.47.5_@types+node@18.18.0 + '@types/chai': 4.3.6 + '@types/fs-extra': 9.0.13 + '@types/lodash': 4.17.4 + '@types/mocha': 10.0.6 + '@types/node': 18.18.0 + '@typescript-eslint/eslint-plugin': 6.8.0_qf4uxqaifopx7g4oramkqjuumy + '@typescript-eslint/parser': 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/ts-http-runtime': 1.0.0-alpha.20240314.2 + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + '@vitest/coverage-istanbul': 1.6.0_vitest@1.6.0 + '@vitest/coverage-v8': 1.6.0_vitest@1.6.0 chai: 4.3.8 chalk: 4.1.2 cross-env: 7.0.3 @@ -333,113 +334,84 @@ importers: vitest: 1.6.0_@types+node@18.18.0 packages: + /@aashutoshrathi/word-wrap/1.2.6: - resolution: - { - integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} dev: true /@ampproject/remapping/2.3.0: - resolution: - { - integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==, - } - engines: { node: ">=6.0.0" } + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} dependencies: - "@jridgewell/gen-mapping": 0.3.5 - "@jridgewell/trace-mapping": 0.3.25 + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 dev: true /@apidevtools/swagger-methods/3.0.2: - resolution: - { - integrity: sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==, - } + resolution: {integrity: sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==} dev: false /@autorest/codemodel/4.19.3: - resolution: - { - integrity: sha512-8RMPjq2BmLNn080EHGbSc0E9pk7EO6i+vi3vGrz8xrfnTBydOZPJUZqmOpEmNnV6LRbr23cthXQo0JbA/bStWg==, - } - engines: { node: ">=12.0.0" } + resolution: {integrity: sha512-8RMPjq2BmLNn080EHGbSc0E9pk7EO6i+vi3vGrz8xrfnTBydOZPJUZqmOpEmNnV6LRbr23cthXQo0JbA/bStWg==} + engines: {node: '>=12.0.0'} dependencies: - "@azure-tools/codegen": 2.9.2 + '@azure-tools/codegen': 2.9.2 js-yaml: 4.0.0 dev: false /@autorest/extension-base/3.5.2: - resolution: - { - integrity: sha512-brpRtQ34mo/SZPTWrOUYvDHOKbvDa9eX5N15qd0OGLX8q3y29nXjhokMVoink4w1jW+8p2KXy2emMIZL14s+HQ==, - } - engines: { node: ">=12.0.0" } + resolution: {integrity: sha512-brpRtQ34mo/SZPTWrOUYvDHOKbvDa9eX5N15qd0OGLX8q3y29nXjhokMVoink4w1jW+8p2KXy2emMIZL14s+HQ==} + engines: {node: '>=12.0.0'} dependencies: - "@azure-tools/codegen": 2.9.2 + '@azure-tools/codegen': 2.9.2 js-yaml: 4.0.0 vscode-jsonrpc: 3.6.2 dev: false /@autorest/testmodeler/2.6.1: - resolution: - { - integrity: sha512-7OXzYet3S/Hiow9LzHUY5qdNRnceSQd41wKEGzfcGVleyWRobYJgYxGmUEyFZP4ZSerAb+QqygSvo9yWIC3nrQ==, - } + resolution: {integrity: sha512-7OXzYet3S/Hiow9LzHUY5qdNRnceSQd41wKEGzfcGVleyWRobYJgYxGmUEyFZP4ZSerAb+QqygSvo9yWIC3nrQ==} dev: false /@azure-rest/core-client/1.4.0: - resolution: - { - integrity: sha512-ozTDPBVUDR5eOnMIwhggbnVmOrka4fXCs8n8mvUo4WLLc38kki6bAOByDoVZZPz/pZy2jMt2kwfpvy/UjALj6w==, - } - engines: { node: ">=18.0.0" } - dependencies: - "@azure/abort-controller": 2.1.2 - "@azure/core-auth": 1.6.0 - "@azure/core-rest-pipeline": 1.14.0 - "@azure/core-tracing": 1.0.1 - "@azure/core-util": 1.5.0 + resolution: {integrity: sha512-ozTDPBVUDR5eOnMIwhggbnVmOrka4fXCs8n8mvUo4WLLc38kki6bAOByDoVZZPz/pZy2jMt2kwfpvy/UjALj6w==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.6.0 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/core-tracing': 1.0.1 + '@azure/core-util': 1.5.0 tslib: 2.6.2 transitivePeerDependencies: - supports-color dev: false - /@azure-rest/core-client/2.1.0: - resolution: - { - integrity: sha512-Ekq5PXiLyBF1PnfoXeC0IIAmFm1DVBiJdZGzk4lK0wsk8l8KdYDAWDfDQ8P0nqjvEQQjFaWd45pIidri94ih3Q==, - } - engines: { node: ">=18.0.0" } - dependencies: - "@azure/abort-controller": 2.1.2 - "@azure/core-auth": 1.6.0 - "@azure/core-rest-pipeline": 1.14.0 - "@azure/core-tracing": 1.0.1 - "@azure/core-util": 1.5.0 + /@azure-rest/core-client/2.2.0: + resolution: {integrity: sha512-2uPSZPRb2TRyYONl5IcsWhX7C1xbm6Gof/tcLlDnYg7fCVcEfASfySKZ9OTHxhNeFgo79LhrT6juEoxTHvrXkQ==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.6.0 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/core-tracing': 1.1.2 + '@azure/core-util': 1.9.0 tslib: 2.6.2 transitivePeerDependencies: - supports-color dev: true /@azure-tools/async-io/3.0.254: - resolution: - { - integrity: sha512-X1C7XdyCuo50ch9FzKtTvmK18FgDxxf1Bbt3cSoknQqeDaRegHSSCO+zByq2YA4NvUzKXeZ1engh29IDxZXgpQ==, - } - engines: { node: ">=10.12.0" } + resolution: {integrity: sha512-X1C7XdyCuo50ch9FzKtTvmK18FgDxxf1Bbt3cSoknQqeDaRegHSSCO+zByq2YA4NvUzKXeZ1engh29IDxZXgpQ==} + engines: {node: '>=10.12.0'} dependencies: - "@azure-tools/tasks": 3.0.255 + '@azure-tools/tasks': 3.0.255 proper-lockfile: 2.0.1 dev: false /@azure-tools/cadl-ranch-api/0.4.6: - resolution: - { - integrity: sha512-IwIpl+wZYXWdDuY3hoI81n7rkm90CcjMWxQLhUYjBhppvc4o1YYgkV9jfxMBaclrDgS1R2TrAq2Xul/+kY99lg==, - } - engines: { node: ">=16.0.0" } + resolution: {integrity: sha512-IwIpl+wZYXWdDuY3hoI81n7rkm90CcjMWxQLhUYjBhppvc4o1YYgkV9jfxMBaclrDgS1R2TrAq2Xul/+kY99lg==} + engines: {node: '>=16.0.0'} dependencies: body-parser: 1.20.2 deep-equal: 2.2.2 @@ -454,86 +426,74 @@ packages: xml2js: 0.6.2 yargs: 17.7.2 transitivePeerDependencies: - - "@types/express" + - '@types/express' dev: true /@azure-tools/cadl-ranch-coverage-sdk/0.8.3: - resolution: - { - integrity: sha512-tYgSawBWKRMwaA8sW4CuVynMlxnxmwjH0pG3qkHDuX8oIxvi/yawrLimLDNV29zAQiESHJkFU7THh/qG51oYPQ==, - } - engines: { node: ">=16.0.0" } - dependencies: - "@azure/identity": 4.4.1 - "@azure/storage-blob": 12.24.0 - "@types/node": 22.2.0 + resolution: {integrity: sha512-tYgSawBWKRMwaA8sW4CuVynMlxnxmwjH0pG3qkHDuX8oIxvi/yawrLimLDNV29zAQiESHJkFU7THh/qG51oYPQ==} + engines: {node: '>=16.0.0'} + dependencies: + '@azure/identity': 4.4.1 + '@azure/storage-blob': 12.24.0 + '@types/node': 22.2.0 transitivePeerDependencies: - supports-color dev: true /@azure-tools/cadl-ranch-expect/0.15.1_y3yxhtjg35d3g6m2dacugmsjfu: - resolution: - { - integrity: sha512-gVu077Rtry3YM0JvsMocXi2KMQPUBaMSF7BKiIKzsxIB/YKAYKe+WEAMfkbFs3BQrbbYMMEWSMQQVUFzfaWpog==, - } - engines: { node: ">=16.0.0" } + resolution: {integrity: sha512-gVu077Rtry3YM0JvsMocXi2KMQPUBaMSF7BKiIKzsxIB/YKAYKe+WEAMfkbFs3BQrbbYMMEWSMQQVUFzfaWpog==} + engines: {node: '>=16.0.0'} peerDependencies: - "@typespec/compiler": ~0.59.0 - "@typespec/http": ~0.59.0 - "@typespec/rest": ~0.59.0 - "@typespec/versioning": ~0.59.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 dependencies: - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/rest": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/versioning": 0.59.0_@typespec+compiler@0.59.0 + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 dev: true /@azure-tools/cadl-ranch-specs/0.36.1_cvode6xhpuyl3aj5dk75xzx5nu: - resolution: - { - integrity: sha512-DmgSaMeEhM6N3ZTFCDcBAy73hz8o1PYUdAKCN9P6WCj8sOVzZ8FCD9CGi2XjKBMqeJr4KHHooIgceglODJWSwQ==, - } - engines: { node: ">=16.0.0" } + resolution: {integrity: sha512-DmgSaMeEhM6N3ZTFCDcBAy73hz8o1PYUdAKCN9P6WCj8sOVzZ8FCD9CGi2XjKBMqeJr4KHHooIgceglODJWSwQ==} + engines: {node: '>=16.0.0'} peerDependencies: - "@azure-tools/cadl-ranch-expect": ~0.15.1 - "@azure-tools/typespec-azure-core": ~0.45.0 - "@typespec/compiler": ~0.59.0 - "@typespec/http": ~0.59.0 - "@typespec/rest": ~0.59.0 - "@typespec/versioning": ~0.59.0 - "@typespec/xml": ~0.59.0 - dependencies: - "@azure-tools/cadl-ranch": 0.14.3_e53zy5pp4bbrxbruosuhuay6sm - "@azure-tools/cadl-ranch-api": 0.4.6 - "@azure-tools/cadl-ranch-expect": 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu - "@azure-tools/typespec-azure-core": 0.45.0_alrznhyrw66bvx6gp4zrtdfkte - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/rest": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/versioning": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/xml": 0.59.0_@typespec+compiler@0.59.0 + '@azure-tools/cadl-ranch-expect': ~0.15.1 + '@azure-tools/typespec-azure-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + '@typespec/xml': ~0.59.0 + dependencies: + '@azure-tools/cadl-ranch': 0.14.3_e53zy5pp4bbrxbruosuhuay6sm + '@azure-tools/cadl-ranch-api': 0.4.6 + '@azure-tools/cadl-ranch-expect': 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/xml': 0.59.0_@typespec+compiler@0.59.0 transitivePeerDependencies: - - "@types/express" + - '@types/express' - supports-color dev: true /@azure-tools/cadl-ranch/0.14.3_e53zy5pp4bbrxbruosuhuay6sm: - resolution: - { - integrity: sha512-7UVhTi5dHR9hH6OnpWQONvDJGx5t5sU9q8BYHoJU0gdaTy0x23EHie5GTMg7aIFI896kuksu4iggUnQaCm2AnA==, - } - engines: { node: ">=16.0.0" } + resolution: {integrity: sha512-7UVhTi5dHR9hH6OnpWQONvDJGx5t5sU9q8BYHoJU0gdaTy0x23EHie5GTMg7aIFI896kuksu4iggUnQaCm2AnA==} + engines: {node: '>=16.0.0'} hasBin: true dependencies: - "@azure-tools/cadl-ranch-api": 0.4.6 - "@azure-tools/cadl-ranch-coverage-sdk": 0.8.3 - "@azure-tools/cadl-ranch-expect": 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu - "@azure/identity": 4.4.1 - "@types/js-yaml": 4.0.6 - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/rest": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@azure-tools/cadl-ranch-api': 0.4.6 + '@azure-tools/cadl-ranch-coverage-sdk': 0.8.3 + '@azure-tools/cadl-ranch-expect': 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu + '@azure/identity': 4.4.1 + '@types/js-yaml': 4.0.6 + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q ajv: 8.17.1 body-parser: 1.20.2 deep-equal: 2.2.2 @@ -551,241 +511,194 @@ packages: xml2js: 0.6.2 yargs: 17.7.2 transitivePeerDependencies: - - "@types/express" - - "@typespec/versioning" + - '@types/express' + - '@typespec/versioning' - supports-color dev: true /@azure-tools/codegen/2.9.2: - resolution: - { - integrity: sha512-brVLyffOtPiEijYYBYgV+4q7IyAfqXIec7XbdEqvv7As6SeEdq5WtbtN9N0LdGVHDWtEfc+JArwIx9aYGFdMUg==, - } - engines: { node: ">=12.0.0" } + resolution: {integrity: sha512-brVLyffOtPiEijYYBYgV+4q7IyAfqXIec7XbdEqvv7As6SeEdq5WtbtN9N0LdGVHDWtEfc+JArwIx9aYGFdMUg==} + engines: {node: '>=12.0.0'} dependencies: - "@azure-tools/async-io": 3.0.254 + '@azure-tools/async-io': 3.0.254 js-yaml: 4.0.0 semver: 7.5.4 dev: false /@azure-tools/tasks/3.0.255: - resolution: - { - integrity: sha512-GjALNLz7kWMEdRVbaN5g0cJHNAr3XVTbP0611Mv2UzMgGL6FOhNZJK+oPHJKLDR8EEDZNnkwPlyi7B+INXUSQA==, - } - engines: { node: ">=10.12.0" } + resolution: {integrity: sha512-GjALNLz7kWMEdRVbaN5g0cJHNAr3XVTbP0611Mv2UzMgGL6FOhNZJK+oPHJKLDR8EEDZNnkwPlyi7B+INXUSQA==} + engines: {node: '>=10.12.0'} dev: false /@azure-tools/test-recorder/3.0.0: - resolution: - { - integrity: sha512-1M1cjyqZa0TwKpaeaRaNON/c5yLWMEnMijc0V0Vu67pWrLkqoZE+6rmzrGLXapWUB1YmflvVaXQEWbbulGK3Ew==, - } - engines: { node: ">=14.0.0" } - dependencies: - "@azure/core-auth": 1.6.0 - "@azure/core-rest-pipeline": 1.14.0 - "@azure/core-util": 1.5.0 - "@azure/logger": 1.0.4 + resolution: {integrity: sha512-1M1cjyqZa0TwKpaeaRaNON/c5yLWMEnMijc0V0Vu67pWrLkqoZE+6rmzrGLXapWUB1YmflvVaXQEWbbulGK3Ew==} + engines: {node: '>=14.0.0'} + dependencies: + '@azure/core-auth': 1.6.0 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/core-util': 1.5.0 + '@azure/logger': 1.0.4 transitivePeerDependencies: - supports-color dev: true /@azure-tools/typespec-autorest/0.45.0_ch4e7dmaodljkmzs7h7dd2lznu: - resolution: - { - integrity: sha512-6ycZ0bEfXC0U26FHHEt9smAhxh78SACIDY+u7zLAopRzmxjTuthDdGgYSShuRDu3J+vEBi1fOKpz4cYQkgRkBQ==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-6ycZ0bEfXC0U26FHHEt9smAhxh78SACIDY+u7zLAopRzmxjTuthDdGgYSShuRDu3J+vEBi1fOKpz4cYQkgRkBQ==} + engines: {node: '>=18.0.0'} peerDependencies: - "@azure-tools/typespec-azure-core": ~0.45.0 - "@azure-tools/typespec-azure-resource-manager": ~0.45.0 - "@azure-tools/typespec-client-generator-core": ~0.45.0 - "@typespec/compiler": ~0.59.0 - "@typespec/http": ~0.59.0 - "@typespec/openapi": ~0.59.0 - "@typespec/rest": ~0.59.0 - "@typespec/versioning": ~0.59.0 - dependencies: - "@azure-tools/typespec-azure-core": 0.45.0_alrznhyrw66bvx6gp4zrtdfkte - "@azure-tools/typespec-azure-resource-manager": 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i - "@azure-tools/typespec-client-generator-core": 0.45.4_rxzquxnvxkwebgrumlsfc6ni5i - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/openapi": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/rest": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/versioning": 0.59.0_@typespec+compiler@0.59.0 - dev: false + '@azure-tools/typespec-azure-core': ~0.45.0 + '@azure-tools/typespec-azure-resource-manager': ~0.45.0 + '@azure-tools/typespec-client-generator-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@azure-tools/typespec-azure-resource-manager': 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i + '@azure-tools/typespec-client-generator-core': 0.45.4_rxzquxnvxkwebgrumlsfc6ni5i + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 /@azure-tools/typespec-azure-core/0.45.0_alrznhyrw66bvx6gp4zrtdfkte: - resolution: - { - integrity: sha512-GycGMCmaIVSN+TftPtlPJLyeOrglbLmH08ZiZaVMjSih/TQEJM21RGR6d8QdjlkQWN61ntNDRD+RP2uv9tHmqw==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-GycGMCmaIVSN+TftPtlPJLyeOrglbLmH08ZiZaVMjSih/TQEJM21RGR6d8QdjlkQWN61ntNDRD+RP2uv9tHmqw==} + engines: {node: '>=18.0.0'} peerDependencies: - "@typespec/compiler": ~0.59.0 - "@typespec/http": ~0.59.0 - "@typespec/rest": ~0.59.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/rest': ~0.59.0 dependencies: - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/rest": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q /@azure-tools/typespec-azure-resource-manager/0.45.0_rxzquxnvxkwebgrumlsfc6ni5i: - resolution: - { - integrity: sha512-PdhB03P8PoOlUoUWd+CF5WipGzu2Q3ZjT0EAzgQe878DmXvxMq+zYaPJQtvkq9R6jCxFauDSr5gG7Yd4NINAuA==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-PdhB03P8PoOlUoUWd+CF5WipGzu2Q3ZjT0EAzgQe878DmXvxMq+zYaPJQtvkq9R6jCxFauDSr5gG7Yd4NINAuA==} + engines: {node: '>=18.0.0'} peerDependencies: - "@azure-tools/typespec-azure-core": ~0.45.0 - "@typespec/compiler": ~0.59.0 - "@typespec/http": ~0.59.0 - "@typespec/openapi": ~0.59.0 - "@typespec/rest": ~0.59.0 - "@typespec/versioning": ~0.59.0 - dependencies: - "@azure-tools/typespec-azure-core": 0.45.0_alrznhyrw66bvx6gp4zrtdfkte - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/openapi": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/rest": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/versioning": 0.59.0_@typespec+compiler@0.59.0 + '@azure-tools/typespec-azure-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 change-case: 5.4.4 pluralize: 8.0.0 /@azure-tools/typespec-client-generator-core/0.45.4_rxzquxnvxkwebgrumlsfc6ni5i: - resolution: - { - integrity: sha512-QJygwMqhEtBi2tPYs/HAfs0QTowXAwp6QpP/Vd2pHnJAncTV1BN17n/9LLAlMu2CnLimqvTuIN+FfliM28AX9w==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-QJygwMqhEtBi2tPYs/HAfs0QTowXAwp6QpP/Vd2pHnJAncTV1BN17n/9LLAlMu2CnLimqvTuIN+FfliM28AX9w==} + engines: {node: '>=18.0.0'} peerDependencies: - "@azure-tools/typespec-azure-core": ~0.45.0 - "@typespec/compiler": ~0.59.0 - "@typespec/http": ~0.59.0 - "@typespec/openapi": ~0.59.0 - "@typespec/rest": ~0.59.0 - "@typespec/versioning": ~0.59.0 - dependencies: - "@azure-tools/typespec-azure-core": 0.45.0_alrznhyrw66bvx6gp4zrtdfkte - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/openapi": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/rest": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/versioning": 0.59.0_@typespec+compiler@0.59.0 + '@azure-tools/typespec-azure-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/rest': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 change-case: 5.4.4 pluralize: 8.0.0 - dev: false /@azure/abort-controller/1.1.0: - resolution: - { - integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==, - } - engines: { node: ">=12.0.0" } + resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==} + engines: {node: '>=12.0.0'} dependencies: tslib: 2.6.2 /@azure/abort-controller/2.1.2: - resolution: - { - integrity: sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==} + engines: {node: '>=18.0.0'} dependencies: tslib: 2.6.2 /@azure/core-auth/1.6.0: - resolution: - { - integrity: sha512-3X9wzaaGgRaBCwhLQZDtFp5uLIXCPrGbwJNWPPugvL4xbIGgScv77YzzxToKGLAKvG9amDoofMoP+9hsH1vs1w==, - } - engines: { node: ">=18.0.0" } - dependencies: - "@azure/abort-controller": 2.1.2 - "@azure/core-util": 1.5.0 + resolution: {integrity: sha512-3X9wzaaGgRaBCwhLQZDtFp5uLIXCPrGbwJNWPPugvL4xbIGgScv77YzzxToKGLAKvG9amDoofMoP+9hsH1vs1w==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-util': 1.5.0 tslib: 2.6.2 /@azure/core-client/1.7.3: - resolution: - { - integrity: sha512-kleJ1iUTxcO32Y06dH9Pfi9K4U+Tlb111WXEnbt7R/ne+NLRwppZiTGJuTD5VVoxTMK5NTbEtm5t2vcdNCFe2g==, - } - engines: { node: ">=14.0.0" } - dependencies: - "@azure/abort-controller": 1.1.0 - "@azure/core-auth": 1.6.0 - "@azure/core-rest-pipeline": 1.14.0 - "@azure/core-tracing": 1.0.1 - "@azure/core-util": 1.5.0 - "@azure/logger": 1.0.4 + resolution: {integrity: sha512-kleJ1iUTxcO32Y06dH9Pfi9K4U+Tlb111WXEnbt7R/ne+NLRwppZiTGJuTD5VVoxTMK5NTbEtm5t2vcdNCFe2g==} + engines: {node: '>=14.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.6.0 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/core-tracing': 1.0.1 + '@azure/core-util': 1.5.0 + '@azure/logger': 1.0.4 tslib: 2.6.2 transitivePeerDependencies: - supports-color dev: false /@azure/core-client/1.9.2: - resolution: - { - integrity: sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==, - } - engines: { node: ">=18.0.0" } - dependencies: - "@azure/abort-controller": 2.1.2 - "@azure/core-auth": 1.6.0 - "@azure/core-rest-pipeline": 1.14.0 - "@azure/core-tracing": 1.1.2 - "@azure/core-util": 1.9.0 - "@azure/logger": 1.0.4 + resolution: {integrity: sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.6.0 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/core-tracing': 1.1.2 + '@azure/core-util': 1.9.0 + '@azure/logger': 1.0.4 tslib: 2.6.2 transitivePeerDependencies: - supports-color dev: true /@azure/core-http-compat/1.3.0: - resolution: - { - integrity: sha512-ZN9avruqbQ5TxopzG3ih3KRy52n8OAbitX3fnZT5go4hzu0J+KVPSzkL+Wt3hpJpdG8WIfg1sBD1tWkgUdEpBA==, - } - engines: { node: ">=12.0.0" } - dependencies: - "@azure/abort-controller": 1.1.0 - "@azure/core-client": 1.7.3 - "@azure/core-rest-pipeline": 1.14.0 + resolution: {integrity: sha512-ZN9avruqbQ5TxopzG3ih3KRy52n8OAbitX3fnZT5go4hzu0J+KVPSzkL+Wt3hpJpdG8WIfg1sBD1tWkgUdEpBA==} + engines: {node: '>=12.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-client': 1.7.3 + '@azure/core-rest-pipeline': 1.14.0 transitivePeerDependencies: - supports-color dev: false /@azure/core-http-compat/2.1.2: - resolution: - { - integrity: sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ==, - } - engines: { node: ">=18.0.0" } - dependencies: - "@azure/abort-controller": 2.1.2 - "@azure/core-client": 1.9.2 - "@azure/core-rest-pipeline": 1.14.0 + resolution: {integrity: sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-client': 1.9.2 + '@azure/core-rest-pipeline': 1.14.0 transitivePeerDependencies: - supports-color dev: true /@azure/core-http/3.0.3: - resolution: - { - integrity: sha512-QMib3wXotJMFhHgmJBPUF9YsyErw34H0XDFQd9CauH7TPB+RGcyl9Ayy7iURtJB04ngXhE6YwrQsWDXlSLrilg==, - } - engines: { node: ">=14.0.0" } - dependencies: - "@azure/abort-controller": 1.1.0 - "@azure/core-auth": 1.6.0 - "@azure/core-tracing": 1.0.0-preview.13 - "@azure/core-util": 1.5.0 - "@azure/logger": 1.0.4 - "@types/node-fetch": 2.6.6 - "@types/tunnel": 0.0.3 + resolution: {integrity: sha512-QMib3wXotJMFhHgmJBPUF9YsyErw34H0XDFQd9CauH7TPB+RGcyl9Ayy7iURtJB04ngXhE6YwrQsWDXlSLrilg==} + engines: {node: '>=14.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.6.0 + '@azure/core-tracing': 1.0.0-preview.13 + '@azure/core-util': 1.5.0 + '@azure/logger': 1.0.4 + '@types/node-fetch': 2.6.6 + '@types/tunnel': 0.0.3 form-data: 4.0.0 node-fetch: 2.7.0 process: 0.11.10 @@ -797,51 +710,39 @@ packages: - encoding /@azure/core-lro/2.5.4: - resolution: - { - integrity: sha512-3GJiMVH7/10bulzOKGrrLeG/uCBH/9VtxqaMcB9lIqAeamI/xYQSHJL/KcsLDuH+yTjYpro/u6D/MuRe4dN70Q==, - } - engines: { node: ">=14.0.0" } - dependencies: - "@azure/abort-controller": 1.1.0 - "@azure/core-util": 1.5.0 - "@azure/logger": 1.0.4 + resolution: {integrity: sha512-3GJiMVH7/10bulzOKGrrLeG/uCBH/9VtxqaMcB9lIqAeamI/xYQSHJL/KcsLDuH+yTjYpro/u6D/MuRe4dN70Q==} + engines: {node: '>=14.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-util': 1.5.0 + '@azure/logger': 1.0.4 tslib: 2.6.2 /@azure/core-lro/3.0.0: - resolution: - { - integrity: sha512-t46lsD0jDJ1o71hIGzoUfT9jH+rIkNJAJLhhPqW8XLbPueHBnP4x5PNJ2szXlLoztH/00OcUUH3FbFnAntOSWA==, - } - engines: { node: ">=18.0.0" } - dependencies: - "@azure/abort-controller": 2.1.2 - "@azure/core-util": 1.9.0 - "@azure/logger": 1.0.4 + resolution: {integrity: sha512-t46lsD0jDJ1o71hIGzoUfT9jH+rIkNJAJLhhPqW8XLbPueHBnP4x5PNJ2szXlLoztH/00OcUUH3FbFnAntOSWA==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-util': 1.9.0 + '@azure/logger': 1.0.4 tslib: 2.6.2 dev: true /@azure/core-paging/1.5.0: - resolution: - { - integrity: sha512-zqWdVIt+2Z+3wqxEOGzR5hXFZ8MGKK52x4vFLw8n58pR6ZfKRx3EXYTxTaYxYHc/PexPUTyimcTWFJbji9Z6Iw==, - } - engines: { node: ">=14.0.0" } + resolution: {integrity: sha512-zqWdVIt+2Z+3wqxEOGzR5hXFZ8MGKK52x4vFLw8n58pR6ZfKRx3EXYTxTaYxYHc/PexPUTyimcTWFJbji9Z6Iw==} + engines: {node: '>=14.0.0'} dependencies: tslib: 2.6.2 /@azure/core-rest-pipeline/1.14.0: - resolution: - { - integrity: sha512-Tp4M6NsjCmn9L5p7HsW98eSOS7A0ibl3e5ntZglozT0XuD/0y6i36iW829ZbBq0qihlGgfaeFpkLjZ418KDm1Q==, - } - engines: { node: ">=18.0.0" } - dependencies: - "@azure/abort-controller": 2.1.2 - "@azure/core-auth": 1.6.0 - "@azure/core-tracing": 1.0.1 - "@azure/core-util": 1.5.0 - "@azure/logger": 1.0.4 + resolution: {integrity: sha512-Tp4M6NsjCmn9L5p7HsW98eSOS7A0ibl3e5ntZglozT0XuD/0y6i36iW829ZbBq0qihlGgfaeFpkLjZ418KDm1Q==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.6.0 + '@azure/core-tracing': 1.0.1 + '@azure/core-util': 1.5.0 + '@azure/logger': 1.0.4 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 tslib: 2.6.2 @@ -849,82 +750,61 @@ packages: - supports-color /@azure/core-tracing/1.0.0-preview.13: - resolution: - { - integrity: sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==, - } - engines: { node: ">=12.0.0" } + resolution: {integrity: sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==} + engines: {node: '>=12.0.0'} dependencies: - "@opentelemetry/api": 1.6.0 + '@opentelemetry/api': 1.6.0 tslib: 2.6.2 /@azure/core-tracing/1.0.1: - resolution: - { - integrity: sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==, - } - engines: { node: ">=12.0.0" } + resolution: {integrity: sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==} + engines: {node: '>=12.0.0'} dependencies: tslib: 2.6.2 /@azure/core-tracing/1.1.2: - resolution: - { - integrity: sha512-dawW9ifvWAWmUm9/h+/UQ2jrdvjCJ7VJEuCJ6XVNudzcOwm53BFZH4Q845vjfgoUAM8ZxokvVNxNxAITc502YA==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-dawW9ifvWAWmUm9/h+/UQ2jrdvjCJ7VJEuCJ6XVNudzcOwm53BFZH4Q845vjfgoUAM8ZxokvVNxNxAITc502YA==} + engines: {node: '>=18.0.0'} dependencies: tslib: 2.6.2 dev: true /@azure/core-util/1.5.0: - resolution: - { - integrity: sha512-GZBpVFDtQ/15hW1OgBcRdT4Bl7AEpcEZqLfbAvOtm1CQUncKWiYapFHVD588hmlV27NbOOtSm3cnLF3lvoHi4g==, - } - engines: { node: ">=14.0.0" } + resolution: {integrity: sha512-GZBpVFDtQ/15hW1OgBcRdT4Bl7AEpcEZqLfbAvOtm1CQUncKWiYapFHVD588hmlV27NbOOtSm3cnLF3lvoHi4g==} + engines: {node: '>=14.0.0'} dependencies: - "@azure/abort-controller": 1.1.0 + '@azure/abort-controller': 1.1.0 tslib: 2.6.2 /@azure/core-util/1.9.0: - resolution: - { - integrity: sha512-AfalUQ1ZppaKuxPPMsFEUdX6GZPB3d9paR9d/TTL7Ow2De8cJaC7ibi7kWVlFAVPCYo31OcnGymc0R89DX8Oaw==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-AfalUQ1ZppaKuxPPMsFEUdX6GZPB3d9paR9d/TTL7Ow2De8cJaC7ibi7kWVlFAVPCYo31OcnGymc0R89DX8Oaw==} + engines: {node: '>=18.0.0'} dependencies: - "@azure/abort-controller": 2.1.2 + '@azure/abort-controller': 2.1.2 tslib: 2.6.2 dev: true /@azure/core-xml/1.3.4: - resolution: - { - integrity: sha512-B1xI79Ur/u+KR69fGTcsMNj8KDjBSqAy0Ys6Byy4Qm1CqoUy7gCT5A7Pej0EBWRskuH6bpCwrAnosfmQEalkcg==, - } - engines: { node: ">=14.0.0" } + resolution: {integrity: sha512-B1xI79Ur/u+KR69fGTcsMNj8KDjBSqAy0Ys6Byy4Qm1CqoUy7gCT5A7Pej0EBWRskuH6bpCwrAnosfmQEalkcg==} + engines: {node: '>=14.0.0'} dependencies: fast-xml-parser: 4.3.1 tslib: 2.6.2 dev: true /@azure/identity/4.4.1: - resolution: - { - integrity: sha512-DwnG4cKFEM7S3T+9u05NstXU/HN0dk45kPOinUyNKsn5VWwpXd9sbPKEg6kgJzGbm1lMuhx9o31PVbCtM5sfBA==, - } - engines: { node: ">=18.0.0" } - dependencies: - "@azure/abort-controller": 1.1.0 - "@azure/core-auth": 1.6.0 - "@azure/core-client": 1.9.2 - "@azure/core-rest-pipeline": 1.14.0 - "@azure/core-tracing": 1.1.2 - "@azure/core-util": 1.9.0 - "@azure/logger": 1.0.4 - "@azure/msal-browser": 3.18.0 - "@azure/msal-node": 2.10.0 + resolution: {integrity: sha512-DwnG4cKFEM7S3T+9u05NstXU/HN0dk45kPOinUyNKsn5VWwpXd9sbPKEg6kgJzGbm1lMuhx9o31PVbCtM5sfBA==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.6.0 + '@azure/core-client': 1.9.2 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/core-tracing': 1.1.2 + '@azure/core-util': 1.9.0 + '@azure/logger': 1.0.4 + '@azure/msal-browser': 3.18.0 + '@azure/msal-node': 2.10.0 events: 3.3.0 jws: 4.0.0 open: 8.4.2 @@ -935,57 +815,42 @@ packages: dev: true /@azure/logger/1.0.4: - resolution: - { - integrity: sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==, - } - engines: { node: ">=14.0.0" } + resolution: {integrity: sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==} + engines: {node: '>=14.0.0'} dependencies: tslib: 2.6.2 /@azure/msal-browser/3.18.0: - resolution: - { - integrity: sha512-jvK5bDUWbpOaJt2Io/rjcaOVcUzkqkrCme/WntdV1SMUc67AiTcEdKuY6G/nMQ7N5Cfsk9SfpugflQwDku53yg==, - } - engines: { node: ">=0.8.0" } + resolution: {integrity: sha512-jvK5bDUWbpOaJt2Io/rjcaOVcUzkqkrCme/WntdV1SMUc67AiTcEdKuY6G/nMQ7N5Cfsk9SfpugflQwDku53yg==} + engines: {node: '>=0.8.0'} dependencies: - "@azure/msal-common": 14.13.0 + '@azure/msal-common': 14.13.0 dev: true /@azure/msal-common/14.13.0: - resolution: - { - integrity: sha512-b4M/tqRzJ4jGU91BiwCsLTqChveUEyFK3qY2wGfZ0zBswIBZjAxopx5CYt5wzZFKuN15HqRDYXQbztttuIC3nA==, - } - engines: { node: ">=0.8.0" } + resolution: {integrity: sha512-b4M/tqRzJ4jGU91BiwCsLTqChveUEyFK3qY2wGfZ0zBswIBZjAxopx5CYt5wzZFKuN15HqRDYXQbztttuIC3nA==} + engines: {node: '>=0.8.0'} dev: true /@azure/msal-node/2.10.0: - resolution: - { - integrity: sha512-JxsSE0464a8IA/+q5EHKmchwNyUFJHtCH00tSXsLaOddwLjG6yVvTH6lGgPcWMhO7YWUXj/XVgVgeE9kZtsPUQ==, - } - engines: { node: ">=16" } + resolution: {integrity: sha512-JxsSE0464a8IA/+q5EHKmchwNyUFJHtCH00tSXsLaOddwLjG6yVvTH6lGgPcWMhO7YWUXj/XVgVgeE9kZtsPUQ==} + engines: {node: '>=16'} dependencies: - "@azure/msal-common": 14.13.0 + '@azure/msal-common': 14.13.0 jsonwebtoken: 9.0.2 uuid: 8.3.2 dev: true /@azure/storage-blob/12.16.0: - resolution: - { - integrity: sha512-jz33rUSUGUB65FgYrTRgRDjG6hdPHwfvHe+g/UrwVG8MsyLqSxg9TaW7Yuhjxu1v1OZ5xam2NU6+IpCN0xJO8Q==, - } - engines: { node: ">=14.0.0" } - dependencies: - "@azure/abort-controller": 1.1.0 - "@azure/core-http": 3.0.3 - "@azure/core-lro": 2.5.4 - "@azure/core-paging": 1.5.0 - "@azure/core-tracing": 1.0.0-preview.13 - "@azure/logger": 1.0.4 + resolution: {integrity: sha512-jz33rUSUGUB65FgYrTRgRDjG6hdPHwfvHe+g/UrwVG8MsyLqSxg9TaW7Yuhjxu1v1OZ5xam2NU6+IpCN0xJO8Q==} + engines: {node: '>=14.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-http': 3.0.3 + '@azure/core-lro': 2.5.4 + '@azure/core-paging': 1.5.0 + '@azure/core-tracing': 1.0.0-preview.13 + '@azure/logger': 1.0.4 events: 3.3.0 tslib: 2.6.2 transitivePeerDependencies: @@ -993,23 +858,20 @@ packages: dev: true /@azure/storage-blob/12.24.0: - resolution: - { - integrity: sha512-l8cmWM4C7RoNCBOImoFMxhTXe1Lr+8uQ/IgnhRNMpfoA9bAFWoLG4XrWm6O5rKXortreVQuD+fc1hbzWklOZbw==, - } - engines: { node: ">=18.0.0" } - dependencies: - "@azure/abort-controller": 1.1.0 - "@azure/core-auth": 1.6.0 - "@azure/core-client": 1.9.2 - "@azure/core-http-compat": 2.1.2 - "@azure/core-lro": 2.5.4 - "@azure/core-paging": 1.5.0 - "@azure/core-rest-pipeline": 1.14.0 - "@azure/core-tracing": 1.1.2 - "@azure/core-util": 1.9.0 - "@azure/core-xml": 1.3.4 - "@azure/logger": 1.0.4 + resolution: {integrity: sha512-l8cmWM4C7RoNCBOImoFMxhTXe1Lr+8uQ/IgnhRNMpfoA9bAFWoLG4XrWm6O5rKXortreVQuD+fc1hbzWklOZbw==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.6.0 + '@azure/core-client': 1.9.2 + '@azure/core-http-compat': 2.1.2 + '@azure/core-lro': 2.5.4 + '@azure/core-paging': 1.5.0 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/core-tracing': 1.1.2 + '@azure/core-util': 1.9.0 + '@azure/core-xml': 1.3.4 + '@azure/logger': 1.0.4 events: 3.3.0 tslib: 2.6.2 transitivePeerDependencies: @@ -1017,40 +879,31 @@ packages: dev: true /@babel/code-frame/7.24.7: - resolution: - { - integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + engines: {node: '>=6.9.0'} dependencies: - "@babel/highlight": 7.24.7 + '@babel/highlight': 7.24.7 picocolors: 1.0.1 /@babel/compat-data/7.24.7: - resolution: - { - integrity: sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==} + engines: {node: '>=6.9.0'} dev: true /@babel/core/7.24.7: - resolution: - { - integrity: sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==, - } - engines: { node: ">=6.9.0" } - dependencies: - "@ampproject/remapping": 2.3.0 - "@babel/code-frame": 7.24.7 - "@babel/generator": 7.24.7 - "@babel/helper-compilation-targets": 7.24.7 - "@babel/helper-module-transforms": 7.24.7_@babel+core@7.24.7 - "@babel/helpers": 7.24.7 - "@babel/parser": 7.24.7 - "@babel/template": 7.24.7 - "@babel/traverse": 7.24.7 - "@babel/types": 7.24.7 + resolution: {integrity: sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.24.7 + '@babel/generator': 7.24.7 + '@babel/helper-compilation-targets': 7.24.7 + '@babel/helper-module-transforms': 7.24.7_@babel+core@7.24.7 + '@babel/helpers': 7.24.7 + '@babel/parser': 7.24.7 + '@babel/template': 7.24.7 + '@babel/traverse': 7.24.7 + '@babel/types': 7.24.7 convert-source-map: 2.0.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -1061,210 +914,156 @@ packages: dev: true /@babel/generator/7.24.7: - resolution: - { - integrity: sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==, - } - engines: { node: ">=6.9.0" } - dependencies: - "@babel/types": 7.24.7 - "@jridgewell/gen-mapping": 0.3.5 - "@jridgewell/trace-mapping": 0.3.25 + resolution: {integrity: sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.24.7 + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 dev: true /@babel/helper-compilation-targets/7.24.7: - resolution: - { - integrity: sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==, - } - engines: { node: ">=6.9.0" } - dependencies: - "@babel/compat-data": 7.24.7 - "@babel/helper-validator-option": 7.24.7 + resolution: {integrity: sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/compat-data': 7.24.7 + '@babel/helper-validator-option': 7.24.7 browserslist: 4.23.1 lru-cache: 5.1.1 semver: 6.3.1 dev: true /@babel/helper-environment-visitor/7.24.7: - resolution: - { - integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==} + engines: {node: '>=6.9.0'} dependencies: - "@babel/types": 7.24.7 + '@babel/types': 7.24.7 dev: true /@babel/helper-function-name/7.24.7: - resolution: - { - integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==} + engines: {node: '>=6.9.0'} dependencies: - "@babel/template": 7.24.7 - "@babel/types": 7.24.7 + '@babel/template': 7.24.7 + '@babel/types': 7.24.7 dev: true /@babel/helper-hoist-variables/7.24.7: - resolution: - { - integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==} + engines: {node: '>=6.9.0'} dependencies: - "@babel/types": 7.24.7 + '@babel/types': 7.24.7 dev: true /@babel/helper-module-imports/7.24.7: - resolution: - { - integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==, - } - engines: { node: ">=6.9.0" } - dependencies: - "@babel/traverse": 7.24.7 - "@babel/types": 7.24.7 + resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/traverse': 7.24.7 + '@babel/types': 7.24.7 transitivePeerDependencies: - supports-color dev: true /@babel/helper-module-transforms/7.24.7_@babel+core@7.24.7: - resolution: - { - integrity: sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==} + engines: {node: '>=6.9.0'} peerDependencies: - "@babel/core": ^7.0.0 - dependencies: - "@babel/core": 7.24.7 - "@babel/helper-environment-visitor": 7.24.7 - "@babel/helper-module-imports": 7.24.7 - "@babel/helper-simple-access": 7.24.7 - "@babel/helper-split-export-declaration": 7.24.7 - "@babel/helper-validator-identifier": 7.24.7 + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-simple-access': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 + '@babel/helper-validator-identifier': 7.24.7 transitivePeerDependencies: - supports-color dev: true /@babel/helper-simple-access/7.24.7: - resolution: - { - integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==, - } - engines: { node: ">=6.9.0" } - dependencies: - "@babel/traverse": 7.24.7 - "@babel/types": 7.24.7 + resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/traverse': 7.24.7 + '@babel/types': 7.24.7 transitivePeerDependencies: - supports-color dev: true /@babel/helper-split-export-declaration/7.24.7: - resolution: - { - integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} + engines: {node: '>=6.9.0'} dependencies: - "@babel/types": 7.24.7 + '@babel/types': 7.24.7 dev: true /@babel/helper-string-parser/7.24.7: - resolution: - { - integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==} + engines: {node: '>=6.9.0'} dev: true /@babel/helper-validator-identifier/7.24.7: - resolution: - { - integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + engines: {node: '>=6.9.0'} /@babel/helper-validator-option/7.24.7: - resolution: - { - integrity: sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==} + engines: {node: '>=6.9.0'} dev: true /@babel/helpers/7.24.7: - resolution: - { - integrity: sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==} + engines: {node: '>=6.9.0'} dependencies: - "@babel/template": 7.24.7 - "@babel/types": 7.24.7 + '@babel/template': 7.24.7 + '@babel/types': 7.24.7 dev: true /@babel/highlight/7.24.7: - resolution: - { - integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + engines: {node: '>=6.9.0'} dependencies: - "@babel/helper-validator-identifier": 7.24.7 + '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.0.1 /@babel/parser/7.24.7: - resolution: - { - integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==, - } - engines: { node: ">=6.0.0" } + resolution: {integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==} + engines: {node: '>=6.0.0'} hasBin: true dev: true /@babel/runtime/7.24.8: - resolution: - { - integrity: sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==} + engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.1 dev: false /@babel/template/7.24.7: - resolution: - { - integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} + engines: {node: '>=6.9.0'} dependencies: - "@babel/code-frame": 7.24.7 - "@babel/parser": 7.24.7 - "@babel/types": 7.24.7 + '@babel/code-frame': 7.24.7 + '@babel/parser': 7.24.7 + '@babel/types': 7.24.7 dev: true /@babel/traverse/7.24.7: - resolution: - { - integrity: sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==, - } - engines: { node: ">=6.9.0" } - dependencies: - "@babel/code-frame": 7.24.7 - "@babel/generator": 7.24.7 - "@babel/helper-environment-visitor": 7.24.7 - "@babel/helper-function-name": 7.24.7 - "@babel/helper-hoist-variables": 7.24.7 - "@babel/helper-split-export-declaration": 7.24.7 - "@babel/parser": 7.24.7 - "@babel/types": 7.24.7 + resolution: {integrity: sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.24.7 + '@babel/generator': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-function-name': 7.24.7 + '@babel/helper-hoist-variables': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 + '@babel/parser': 7.24.7 + '@babel/types': 7.24.7 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: @@ -1272,55 +1071,37 @@ packages: dev: true /@babel/types/7.24.7: - resolution: - { - integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==, - } - engines: { node: ">=6.9.0" } - dependencies: - "@babel/helper-string-parser": 7.24.7 - "@babel/helper-validator-identifier": 7.24.7 + resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.24.7 + '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 dev: true /@bcoe/v8-coverage/0.2.3: - resolution: - { - integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==, - } + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true /@colors/colors/1.5.0: - resolution: - { - integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==, - } - engines: { node: ">=0.1.90" } + resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} + engines: {node: '>=0.1.90'} dev: true /@colors/colors/1.6.0: - resolution: - { - integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==, - } - engines: { node: ">=0.1.90" } + resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} + engines: {node: '>=0.1.90'} dev: true /@cspotcode/source-map-support/0.8.1: - resolution: - { - integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} dependencies: - "@jridgewell/trace-mapping": 0.3.9 + '@jridgewell/trace-mapping': 0.3.9 dev: true /@dabh/diagnostics/2.0.3: - resolution: - { - integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==, - } + resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} dependencies: colorspace: 1.1.4 enabled: 2.0.0 @@ -1328,19 +1109,13 @@ packages: dev: true /@discoveryjs/json-ext/0.5.7: - resolution: - { - integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==, - } - engines: { node: ">=10.0.0" } + resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} + engines: {node: '>=10.0.0'} dev: true /@esbuild/aix-ppc64/0.20.2: - resolution: - { - integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} + engines: {node: '>=12'} cpu: [ppc64] os: [aix] requiresBuild: true @@ -1348,11 +1123,8 @@ packages: optional: true /@esbuild/aix-ppc64/0.23.0: - resolution: - { - integrity: sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==} + engines: {node: '>=18'} cpu: [ppc64] os: [aix] requiresBuild: true @@ -1360,11 +1132,8 @@ packages: optional: true /@esbuild/android-arm/0.20.2: - resolution: - { - integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} + engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true @@ -1372,11 +1141,8 @@ packages: optional: true /@esbuild/android-arm/0.23.0: - resolution: - { - integrity: sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==} + engines: {node: '>=18'} cpu: [arm] os: [android] requiresBuild: true @@ -1384,11 +1150,8 @@ packages: optional: true /@esbuild/android-arm64/0.20.2: - resolution: - { - integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} + engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true @@ -1396,11 +1159,8 @@ packages: optional: true /@esbuild/android-arm64/0.23.0: - resolution: - { - integrity: sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==} + engines: {node: '>=18'} cpu: [arm64] os: [android] requiresBuild: true @@ -1408,11 +1168,8 @@ packages: optional: true /@esbuild/android-x64/0.20.2: - resolution: - { - integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} + engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true @@ -1420,11 +1177,8 @@ packages: optional: true /@esbuild/android-x64/0.23.0: - resolution: - { - integrity: sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==} + engines: {node: '>=18'} cpu: [x64] os: [android] requiresBuild: true @@ -1432,11 +1186,8 @@ packages: optional: true /@esbuild/darwin-arm64/0.20.2: - resolution: - { - integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} + engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true @@ -1444,11 +1195,8 @@ packages: optional: true /@esbuild/darwin-arm64/0.23.0: - resolution: - { - integrity: sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==} + engines: {node: '>=18'} cpu: [arm64] os: [darwin] requiresBuild: true @@ -1456,11 +1204,8 @@ packages: optional: true /@esbuild/darwin-x64/0.20.2: - resolution: - { - integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} + engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true @@ -1468,11 +1213,8 @@ packages: optional: true /@esbuild/darwin-x64/0.23.0: - resolution: - { - integrity: sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==} + engines: {node: '>=18'} cpu: [x64] os: [darwin] requiresBuild: true @@ -1480,11 +1222,8 @@ packages: optional: true /@esbuild/freebsd-arm64/0.20.2: - resolution: - { - integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} + engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true @@ -1492,11 +1231,8 @@ packages: optional: true /@esbuild/freebsd-arm64/0.23.0: - resolution: - { - integrity: sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==} + engines: {node: '>=18'} cpu: [arm64] os: [freebsd] requiresBuild: true @@ -1504,11 +1240,8 @@ packages: optional: true /@esbuild/freebsd-x64/0.20.2: - resolution: - { - integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} + engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true @@ -1516,11 +1249,8 @@ packages: optional: true /@esbuild/freebsd-x64/0.23.0: - resolution: - { - integrity: sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==} + engines: {node: '>=18'} cpu: [x64] os: [freebsd] requiresBuild: true @@ -1528,11 +1258,8 @@ packages: optional: true /@esbuild/linux-arm/0.20.2: - resolution: - { - integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} + engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true @@ -1540,11 +1267,8 @@ packages: optional: true /@esbuild/linux-arm/0.23.0: - resolution: - { - integrity: sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==} + engines: {node: '>=18'} cpu: [arm] os: [linux] requiresBuild: true @@ -1552,11 +1276,8 @@ packages: optional: true /@esbuild/linux-arm64/0.20.2: - resolution: - { - integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} + engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true @@ -1564,11 +1285,8 @@ packages: optional: true /@esbuild/linux-arm64/0.23.0: - resolution: - { - integrity: sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==} + engines: {node: '>=18'} cpu: [arm64] os: [linux] requiresBuild: true @@ -1576,11 +1294,8 @@ packages: optional: true /@esbuild/linux-ia32/0.20.2: - resolution: - { - integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} + engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true @@ -1588,11 +1303,8 @@ packages: optional: true /@esbuild/linux-ia32/0.23.0: - resolution: - { - integrity: sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==} + engines: {node: '>=18'} cpu: [ia32] os: [linux] requiresBuild: true @@ -1600,11 +1312,8 @@ packages: optional: true /@esbuild/linux-loong64/0.20.2: - resolution: - { - integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} + engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true @@ -1612,11 +1321,8 @@ packages: optional: true /@esbuild/linux-loong64/0.23.0: - resolution: - { - integrity: sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==} + engines: {node: '>=18'} cpu: [loong64] os: [linux] requiresBuild: true @@ -1624,11 +1330,8 @@ packages: optional: true /@esbuild/linux-mips64el/0.20.2: - resolution: - { - integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} + engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true @@ -1636,11 +1339,8 @@ packages: optional: true /@esbuild/linux-mips64el/0.23.0: - resolution: - { - integrity: sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==} + engines: {node: '>=18'} cpu: [mips64el] os: [linux] requiresBuild: true @@ -1648,11 +1348,8 @@ packages: optional: true /@esbuild/linux-ppc64/0.20.2: - resolution: - { - integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} + engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true @@ -1660,11 +1357,8 @@ packages: optional: true /@esbuild/linux-ppc64/0.23.0: - resolution: - { - integrity: sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==} + engines: {node: '>=18'} cpu: [ppc64] os: [linux] requiresBuild: true @@ -1672,11 +1366,8 @@ packages: optional: true /@esbuild/linux-riscv64/0.20.2: - resolution: - { - integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} + engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true @@ -1684,11 +1375,8 @@ packages: optional: true /@esbuild/linux-riscv64/0.23.0: - resolution: - { - integrity: sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==} + engines: {node: '>=18'} cpu: [riscv64] os: [linux] requiresBuild: true @@ -1696,11 +1384,8 @@ packages: optional: true /@esbuild/linux-s390x/0.20.2: - resolution: - { - integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} + engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true @@ -1708,11 +1393,8 @@ packages: optional: true /@esbuild/linux-s390x/0.23.0: - resolution: - { - integrity: sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==} + engines: {node: '>=18'} cpu: [s390x] os: [linux] requiresBuild: true @@ -1720,11 +1402,8 @@ packages: optional: true /@esbuild/linux-x64/0.20.2: - resolution: - { - integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} + engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true @@ -1732,11 +1411,8 @@ packages: optional: true /@esbuild/linux-x64/0.23.0: - resolution: - { - integrity: sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==} + engines: {node: '>=18'} cpu: [x64] os: [linux] requiresBuild: true @@ -1744,11 +1420,8 @@ packages: optional: true /@esbuild/netbsd-x64/0.20.2: - resolution: - { - integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} + engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true @@ -1756,11 +1429,8 @@ packages: optional: true /@esbuild/netbsd-x64/0.23.0: - resolution: - { - integrity: sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==} + engines: {node: '>=18'} cpu: [x64] os: [netbsd] requiresBuild: true @@ -1768,11 +1438,8 @@ packages: optional: true /@esbuild/openbsd-arm64/0.23.0: - resolution: - { - integrity: sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==} + engines: {node: '>=18'} cpu: [arm64] os: [openbsd] requiresBuild: true @@ -1780,11 +1447,8 @@ packages: optional: true /@esbuild/openbsd-x64/0.20.2: - resolution: - { - integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} + engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true @@ -1792,11 +1456,8 @@ packages: optional: true /@esbuild/openbsd-x64/0.23.0: - resolution: - { - integrity: sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==} + engines: {node: '>=18'} cpu: [x64] os: [openbsd] requiresBuild: true @@ -1804,11 +1465,8 @@ packages: optional: true /@esbuild/sunos-x64/0.20.2: - resolution: - { - integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} + engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true @@ -1816,11 +1474,8 @@ packages: optional: true /@esbuild/sunos-x64/0.23.0: - resolution: - { - integrity: sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==} + engines: {node: '>=18'} cpu: [x64] os: [sunos] requiresBuild: true @@ -1828,11 +1483,8 @@ packages: optional: true /@esbuild/win32-arm64/0.20.2: - resolution: - { - integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} + engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true @@ -1840,11 +1492,8 @@ packages: optional: true /@esbuild/win32-arm64/0.23.0: - resolution: - { - integrity: sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==} + engines: {node: '>=18'} cpu: [arm64] os: [win32] requiresBuild: true @@ -1852,11 +1501,8 @@ packages: optional: true /@esbuild/win32-ia32/0.20.2: - resolution: - { - integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} + engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true @@ -1864,11 +1510,8 @@ packages: optional: true /@esbuild/win32-ia32/0.23.0: - resolution: - { - integrity: sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==} + engines: {node: '>=18'} cpu: [ia32] os: [win32] requiresBuild: true @@ -1876,11 +1519,8 @@ packages: optional: true /@esbuild/win32-x64/0.20.2: - resolution: - { - integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} + engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true @@ -1888,11 +1528,8 @@ packages: optional: true /@esbuild/win32-x64/0.23.0: - resolution: - { - integrity: sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==} + engines: {node: '>=18'} cpu: [x64] os: [win32] requiresBuild: true @@ -1900,11 +1537,8 @@ packages: optional: true /@eslint-community/eslint-utils/4.4.0_eslint@8.50.0: - resolution: - { - integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==, - } - engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: @@ -1913,19 +1547,13 @@ packages: dev: true /@eslint-community/regexpp/4.8.2: - resolution: - { - integrity: sha512-0MGxAVt1m/ZK+LTJp/j0qF7Hz97D9O/FH9Ms3ltnyIdDD57cbb1ACIQTkbHvNXtWDv5TPq7w5Kq56+cNukbo7g==, - } - engines: { node: ^12.0.0 || ^14.0.0 || >=16.0.0 } + resolution: {integrity: sha512-0MGxAVt1m/ZK+LTJp/j0qF7Hz97D9O/FH9Ms3ltnyIdDD57cbb1ACIQTkbHvNXtWDv5TPq7w5Kq56+cNukbo7g==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true /@eslint/eslintrc/2.1.2: - resolution: - { - integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==, - } - engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 @@ -1941,21 +1569,15 @@ packages: dev: true /@eslint/js/8.50.0: - resolution: - { - integrity: sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==, - } - engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + resolution: {integrity: sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true /@humanwhocodes/config-array/0.11.11: - resolution: - { - integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==, - } - engines: { node: ">=10.10.0" } + resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} + engines: {node: '>=10.10.0'} dependencies: - "@humanwhocodes/object-schema": 1.2.1 + '@humanwhocodes/object-schema': 1.2.1 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: @@ -1963,34 +1585,22 @@ packages: dev: true /@humanwhocodes/module-importer/1.0.1: - resolution: - { - integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==, - } - engines: { node: ">=12.22" } + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} dev: true /@humanwhocodes/momoa/2.0.4: - resolution: - { - integrity: sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==, - } - engines: { node: ">=10.10.0" } + resolution: {integrity: sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==} + engines: {node: '>=10.10.0'} dev: false /@humanwhocodes/object-schema/1.2.1: - resolution: - { - integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==, - } + resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true /@isaacs/cliui/8.0.2: - resolution: - { - integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} dependencies: string-width: 5.1.2 string-width-cjs: /string-width/4.2.3 @@ -2001,104 +1611,71 @@ packages: dev: true /@istanbuljs/schema/0.1.3: - resolution: - { - integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} + engines: {node: '>=8'} dev: true /@jest/schemas/29.6.3: - resolution: - { - integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==, - } - engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - "@sinclair/typebox": 0.27.8 + '@sinclair/typebox': 0.27.8 dev: true /@jridgewell/gen-mapping/0.3.5: - resolution: - { - integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==, - } - engines: { node: ">=6.0.0" } + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} dependencies: - "@jridgewell/set-array": 1.2.1 - "@jridgewell/sourcemap-codec": 1.4.15 - "@jridgewell/trace-mapping": 0.3.25 + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.25 dev: true /@jridgewell/resolve-uri/3.1.1: - resolution: - { - integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==, - } - engines: { node: ">=6.0.0" } + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} + engines: {node: '>=6.0.0'} dev: true /@jridgewell/set-array/1.2.1: - resolution: - { - integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==, - } - engines: { node: ">=6.0.0" } + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} dev: true /@jridgewell/source-map/0.3.5: - resolution: - { - integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==, - } + resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} dependencies: - "@jridgewell/gen-mapping": 0.3.5 - "@jridgewell/trace-mapping": 0.3.25 + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 dev: true /@jridgewell/sourcemap-codec/1.4.15: - resolution: - { - integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==, - } + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true /@jridgewell/trace-mapping/0.3.25: - resolution: - { - integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==, - } + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} dependencies: - "@jridgewell/resolve-uri": 3.1.1 - "@jridgewell/sourcemap-codec": 1.4.15 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true /@jridgewell/trace-mapping/0.3.9: - resolution: - { - integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==, - } + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} dependencies: - "@jridgewell/resolve-uri": 3.1.1 - "@jridgewell/sourcemap-codec": 1.4.15 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true /@jsdevtools/ono/7.1.3: - resolution: - { - integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==, - } + resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} dev: false /@microsoft.azure/autorest.testserver/3.3.48: - resolution: - { - integrity: sha512-/6SPjIEkHFxHi/mImmWHsTA2yhuSWfM2JWzsngZlck+0gTF5xIEyPTL1eIosdoc0oynBQGDuAsjGkd4ssioMpA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-/6SPjIEkHFxHi/mImmWHsTA2yhuSWfM2JWzsngZlck+0gTF5xIEyPTL1eIosdoc0oynBQGDuAsjGkd4ssioMpA==} + engines: {node: '>=10'} hasBin: true dependencies: - "@azure/storage-blob": 12.16.0 + '@azure/storage-blob': 12.16.0 axios: 0.21.4 body-parser: 1.20.2 busboy: 1.6.0 @@ -2118,38 +1695,32 @@ packages: xml2js: 0.5.0 yargs: 17.7.2 transitivePeerDependencies: - - "@types/express" + - '@types/express' - debug - encoding dev: true /@microsoft/api-extractor-model/7.29.4_@types+node@18.18.0: - resolution: - { - integrity: sha512-LHOMxmT8/tU1IiiiHOdHFF83Qsi+V8d0kLfscG4EvQE9cafiR8blOYr8SfkQKWB1wgEilQgXJX3MIA4vetDLZw==, - } - dependencies: - "@microsoft/tsdoc": 0.15.0 - "@microsoft/tsdoc-config": 0.17.0 - "@rushstack/node-core-library": 5.5.1_@types+node@18.18.0 + resolution: {integrity: sha512-LHOMxmT8/tU1IiiiHOdHFF83Qsi+V8d0kLfscG4EvQE9cafiR8blOYr8SfkQKWB1wgEilQgXJX3MIA4vetDLZw==} + dependencies: + '@microsoft/tsdoc': 0.15.0 + '@microsoft/tsdoc-config': 0.17.0 + '@rushstack/node-core-library': 5.5.1_@types+node@18.18.0 transitivePeerDependencies: - - "@types/node" + - '@types/node' dev: true /@microsoft/api-extractor/7.47.5_@types+node@18.18.0: - resolution: - { - integrity: sha512-edKt4dFO2t25xmI2FX2rsP5liIgwKW1yuQImA0JM+5YGHCoo51GEQ7j+On17SvVpRJnuqLE/QVgtjIQ1Hpg98w==, - } + resolution: {integrity: sha512-edKt4dFO2t25xmI2FX2rsP5liIgwKW1yuQImA0JM+5YGHCoo51GEQ7j+On17SvVpRJnuqLE/QVgtjIQ1Hpg98w==} hasBin: true dependencies: - "@microsoft/api-extractor-model": 7.29.4_@types+node@18.18.0 - "@microsoft/tsdoc": 0.15.0 - "@microsoft/tsdoc-config": 0.17.0 - "@rushstack/node-core-library": 5.5.1_@types+node@18.18.0 - "@rushstack/rig-package": 0.5.3 - "@rushstack/terminal": 0.13.3_@types+node@18.18.0 - "@rushstack/ts-command-line": 4.22.4_@types+node@18.18.0 + '@microsoft/api-extractor-model': 7.29.4_@types+node@18.18.0 + '@microsoft/tsdoc': 0.15.0 + '@microsoft/tsdoc-config': 0.17.0 + '@rushstack/node-core-library': 5.5.1_@types+node@18.18.0 + '@rushstack/rig-package': 0.5.3 + '@rushstack/terminal': 0.13.3_@types+node@18.18.0 + '@rushstack/ts-command-line': 4.22.4_@types+node@18.18.0 lodash: 4.17.21 minimatch: 3.0.8 resolve: 1.22.6 @@ -2157,78 +1728,54 @@ packages: source-map: 0.6.1 typescript: 5.4.2 transitivePeerDependencies: - - "@types/node" + - '@types/node' dev: true /@microsoft/tsdoc-config/0.17.0: - resolution: - { - integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==, - } + resolution: {integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==} dependencies: - "@microsoft/tsdoc": 0.15.0 + '@microsoft/tsdoc': 0.15.0 ajv: 8.12.0 jju: 1.4.0 resolve: 1.22.6 dev: true /@microsoft/tsdoc/0.15.0: - resolution: - { - integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==, - } + resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} dev: true /@nodelib/fs.scandir/2.1.5: - resolution: - { - integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==, - } - engines: { node: ">= 8" } + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} dependencies: - "@nodelib/fs.stat": 2.0.5 + '@nodelib/fs.stat': 2.0.5 run-parallel: 1.2.0 /@nodelib/fs.stat/2.0.5: - resolution: - { - integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==, - } - engines: { node: ">= 8" } + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} /@nodelib/fs.walk/1.2.8: - resolution: - { - integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==, - } - engines: { node: ">= 8" } + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} dependencies: - "@nodelib/fs.scandir": 2.1.5 + '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 /@opentelemetry/api/1.6.0: - resolution: - { - integrity: sha512-OWlrQAnWn9577PhVgqjUvMr1pg57Bc4jv0iL4w0PRuOSRvq67rvHW9Ie/dZVMvCzhSCB+UxhcY/PmCmFj33Q+g==, - } - engines: { node: ">=8.0.0" } + resolution: {integrity: sha512-OWlrQAnWn9577PhVgqjUvMr1pg57Bc4jv0iL4w0PRuOSRvq67rvHW9Ie/dZVMvCzhSCB+UxhcY/PmCmFj33Q+g==} + engines: {node: '>=8.0.0'} /@pkgjs/parseargs/0.11.0: - resolution: - { - integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==, - } - engines: { node: ">=14" } + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} requiresBuild: true dev: true optional: true /@puppeteer/browsers/2.1.0: - resolution: - { - integrity: sha512-xloWvocjvryHdUjDam/ZuGMh7zn4Sn3ZAaV4Ah2e2EwEt90N3XphZlSsU3n0VDc1F7kggCjMuH0UuxfPQ5mD9w==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-xloWvocjvryHdUjDam/ZuGMh7zn4Sn3ZAaV4Ah2e2EwEt90N3XphZlSsU3n0VDc1F7kggCjMuH0UuxfPQ5mD9w==} + engines: {node: '>=18'} hasBin: true dependencies: debug: 4.3.4 @@ -2244,17 +1791,14 @@ packages: dev: true /@readme/better-ajv-errors/1.6.0_ajv@8.17.1: - resolution: - { - integrity: sha512-9gO9rld84Jgu13kcbKRU+WHseNhaVt76wYMeRDGsUGYxwJtI3RmEJ9LY9dZCYQGI8eUZLuxb5qDja0nqklpFjQ==, - } - engines: { node: ">=14" } + resolution: {integrity: sha512-9gO9rld84Jgu13kcbKRU+WHseNhaVt76wYMeRDGsUGYxwJtI3RmEJ9LY9dZCYQGI8eUZLuxb5qDja0nqklpFjQ==} + engines: {node: '>=14'} peerDependencies: ajv: 4.11.8 - 8 dependencies: - "@babel/code-frame": 7.24.7 - "@babel/runtime": 7.24.8 - "@humanwhocodes/momoa": 2.0.4 + '@babel/code-frame': 7.24.7 + '@babel/runtime': 7.24.8 + '@humanwhocodes/momoa': 2.0.4 ajv: 8.17.1 chalk: 4.1.2 json-to-ast: 2.1.0 @@ -2263,31 +1807,25 @@ packages: dev: false /@readme/json-schema-ref-parser/1.2.0: - resolution: - { - integrity: sha512-Bt3QVovFSua4QmHa65EHUmh2xS0XJ3rgTEUPH998f4OW4VVJke3BuS16f+kM0ZLOGdvIrzrPRqwihuv5BAjtrA==, - } + resolution: {integrity: sha512-Bt3QVovFSua4QmHa65EHUmh2xS0XJ3rgTEUPH998f4OW4VVJke3BuS16f+kM0ZLOGdvIrzrPRqwihuv5BAjtrA==} dependencies: - "@jsdevtools/ono": 7.1.3 - "@types/json-schema": 7.0.13 + '@jsdevtools/ono': 7.1.3 + '@types/json-schema': 7.0.13 call-me-maybe: 1.0.2 js-yaml: 4.1.0 dev: false /@readme/openapi-parser/2.6.0_openapi-types@7.2.3: - resolution: - { - integrity: sha512-pyFJXezWj9WI1O+gdp95CoxfY+i+Uq3kKk4zXIFuRAZi9YnHpHOpjumWWr67wkmRTw19Hskh9spyY0Iyikf3fA==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-pyFJXezWj9WI1O+gdp95CoxfY+i+Uq3kKk4zXIFuRAZi9YnHpHOpjumWWr67wkmRTw19Hskh9spyY0Iyikf3fA==} + engines: {node: '>=18'} peerDependencies: - openapi-types: ">=7" + openapi-types: '>=7' dependencies: - "@apidevtools/swagger-methods": 3.0.2 - "@jsdevtools/ono": 7.1.3 - "@readme/better-ajv-errors": 1.6.0_ajv@8.17.1 - "@readme/json-schema-ref-parser": 1.2.0 - "@readme/openapi-schemas": 3.1.0 + '@apidevtools/swagger-methods': 3.0.2 + '@jsdevtools/ono': 7.1.3 + '@readme/better-ajv-errors': 1.6.0_ajv@8.17.1 + '@readme/json-schema-ref-parser': 1.2.0 + '@readme/openapi-schemas': 3.1.0 ajv: 8.17.1 ajv-draft-04: 1.0.0_ajv@8.17.1 call-me-maybe: 1.0.2 @@ -2295,18 +1833,12 @@ packages: dev: false /@readme/openapi-schemas/3.1.0: - resolution: - { - integrity: sha512-9FC/6ho8uFa8fV50+FPy/ngWN53jaUu4GRXlAjcxIRrzhltJnpKkBG2Tp0IDraFJeWrOpk84RJ9EMEEYzaI1Bw==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-9FC/6ho8uFa8fV50+FPy/ngWN53jaUu4GRXlAjcxIRrzhltJnpKkBG2Tp0IDraFJeWrOpk84RJ9EMEEYzaI1Bw==} + engines: {node: '>=18'} dev: false /@rollup/rollup-android-arm-eabi/4.18.0: - resolution: - { - integrity: sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==, - } + resolution: {integrity: sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==} cpu: [arm] os: [android] requiresBuild: true @@ -2314,10 +1846,7 @@ packages: optional: true /@rollup/rollup-android-arm64/4.18.0: - resolution: - { - integrity: sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==, - } + resolution: {integrity: sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==} cpu: [arm64] os: [android] requiresBuild: true @@ -2325,10 +1854,7 @@ packages: optional: true /@rollup/rollup-darwin-arm64/4.18.0: - resolution: - { - integrity: sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==, - } + resolution: {integrity: sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==} cpu: [arm64] os: [darwin] requiresBuild: true @@ -2336,10 +1862,7 @@ packages: optional: true /@rollup/rollup-darwin-x64/4.18.0: - resolution: - { - integrity: sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==, - } + resolution: {integrity: sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==} cpu: [x64] os: [darwin] requiresBuild: true @@ -2347,10 +1870,7 @@ packages: optional: true /@rollup/rollup-linux-arm-gnueabihf/4.18.0: - resolution: - { - integrity: sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==, - } + resolution: {integrity: sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==} cpu: [arm] os: [linux] requiresBuild: true @@ -2358,10 +1878,7 @@ packages: optional: true /@rollup/rollup-linux-arm-musleabihf/4.18.0: - resolution: - { - integrity: sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==, - } + resolution: {integrity: sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==} cpu: [arm] os: [linux] requiresBuild: true @@ -2369,10 +1886,7 @@ packages: optional: true /@rollup/rollup-linux-arm64-gnu/4.18.0: - resolution: - { - integrity: sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==, - } + resolution: {integrity: sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==} cpu: [arm64] os: [linux] requiresBuild: true @@ -2380,10 +1894,7 @@ packages: optional: true /@rollup/rollup-linux-arm64-musl/4.18.0: - resolution: - { - integrity: sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==, - } + resolution: {integrity: sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==} cpu: [arm64] os: [linux] requiresBuild: true @@ -2391,10 +1902,7 @@ packages: optional: true /@rollup/rollup-linux-powerpc64le-gnu/4.18.0: - resolution: - { - integrity: sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==, - } + resolution: {integrity: sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==} cpu: [ppc64] os: [linux] requiresBuild: true @@ -2402,10 +1910,7 @@ packages: optional: true /@rollup/rollup-linux-riscv64-gnu/4.18.0: - resolution: - { - integrity: sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==, - } + resolution: {integrity: sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==} cpu: [riscv64] os: [linux] requiresBuild: true @@ -2413,10 +1918,7 @@ packages: optional: true /@rollup/rollup-linux-s390x-gnu/4.18.0: - resolution: - { - integrity: sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==, - } + resolution: {integrity: sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==} cpu: [s390x] os: [linux] requiresBuild: true @@ -2424,10 +1926,7 @@ packages: optional: true /@rollup/rollup-linux-x64-gnu/4.18.0: - resolution: - { - integrity: sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==, - } + resolution: {integrity: sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==} cpu: [x64] os: [linux] requiresBuild: true @@ -2435,10 +1934,7 @@ packages: optional: true /@rollup/rollup-linux-x64-musl/4.18.0: - resolution: - { - integrity: sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==, - } + resolution: {integrity: sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==} cpu: [x64] os: [linux] requiresBuild: true @@ -2446,10 +1942,7 @@ packages: optional: true /@rollup/rollup-win32-arm64-msvc/4.18.0: - resolution: - { - integrity: sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==, - } + resolution: {integrity: sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==} cpu: [arm64] os: [win32] requiresBuild: true @@ -2457,10 +1950,7 @@ packages: optional: true /@rollup/rollup-win32-ia32-msvc/4.18.0: - resolution: - { - integrity: sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==, - } + resolution: {integrity: sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==} cpu: [ia32] os: [win32] requiresBuild: true @@ -2468,10 +1958,7 @@ packages: optional: true /@rollup/rollup-win32-x64-msvc/4.18.0: - resolution: - { - integrity: sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==, - } + resolution: {integrity: sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==} cpu: [x64] os: [win32] requiresBuild: true @@ -2479,17 +1966,14 @@ packages: optional: true /@rushstack/node-core-library/5.5.1_@types+node@18.18.0: - resolution: - { - integrity: sha512-ZutW56qIzH8xIOlfyaLQJFx+8IBqdbVCZdnj+XT1MorQ1JqqxHse8vbCpEM+2MjsrqcbxcgDIbfggB1ZSQ2A3g==, - } + resolution: {integrity: sha512-ZutW56qIzH8xIOlfyaLQJFx+8IBqdbVCZdnj+XT1MorQ1JqqxHse8vbCpEM+2MjsrqcbxcgDIbfggB1ZSQ2A3g==} peerDependencies: - "@types/node": "*" + '@types/node': '*' peerDependenciesMeta: - "@types/node": + '@types/node': optional: true dependencies: - "@types/node": 18.18.0 + '@types/node': 18.18.0 ajv: 8.13.0 ajv-draft-04: 1.0.0_ajv@8.13.0 ajv-formats: 3.0.1_ajv@8.13.0 @@ -2501,148 +1985,100 @@ packages: dev: true /@rushstack/rig-package/0.5.3: - resolution: - { - integrity: sha512-olzSSjYrvCNxUFZowevC3uz8gvKr3WTpHQ7BkpjtRpA3wK+T0ybep/SRUMfr195gBzJm5gaXw0ZMgjIyHqJUow==, - } + resolution: {integrity: sha512-olzSSjYrvCNxUFZowevC3uz8gvKr3WTpHQ7BkpjtRpA3wK+T0ybep/SRUMfr195gBzJm5gaXw0ZMgjIyHqJUow==} dependencies: resolve: 1.22.6 strip-json-comments: 3.1.1 dev: true /@rushstack/terminal/0.13.3_@types+node@18.18.0: - resolution: - { - integrity: sha512-fc3zjXOw8E0pXS5t9vTiIPx9gHA0fIdTXsu9mT4WbH+P3mYvnrX0iAQ5a6NvyK1+CqYWBTw/wVNx7SDJkI+WYQ==, - } + resolution: {integrity: sha512-fc3zjXOw8E0pXS5t9vTiIPx9gHA0fIdTXsu9mT4WbH+P3mYvnrX0iAQ5a6NvyK1+CqYWBTw/wVNx7SDJkI+WYQ==} peerDependencies: - "@types/node": "*" + '@types/node': '*' peerDependenciesMeta: - "@types/node": + '@types/node': optional: true dependencies: - "@rushstack/node-core-library": 5.5.1_@types+node@18.18.0 - "@types/node": 18.18.0 + '@rushstack/node-core-library': 5.5.1_@types+node@18.18.0 + '@types/node': 18.18.0 supports-color: 8.1.1 dev: true /@rushstack/ts-command-line/4.22.4_@types+node@18.18.0: - resolution: - { - integrity: sha512-QoyhbWfyF9Ixg5DWdPzxO3h2RmJ7i5WH9b7qLzD5h5WFya/ZqicjdPrVwQiGtrFvAbBj8jhcC9DhbzU9xAk78g==, - } + resolution: {integrity: sha512-QoyhbWfyF9Ixg5DWdPzxO3h2RmJ7i5WH9b7qLzD5h5WFya/ZqicjdPrVwQiGtrFvAbBj8jhcC9DhbzU9xAk78g==} dependencies: - "@rushstack/terminal": 0.13.3_@types+node@18.18.0 - "@types/argparse": 1.0.38 + '@rushstack/terminal': 0.13.3_@types+node@18.18.0 + '@types/argparse': 1.0.38 argparse: 1.0.10 string-argv: 0.3.2 transitivePeerDependencies: - - "@types/node" + - '@types/node' dev: true /@sinclair/typebox/0.27.8: - resolution: - { - integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==, - } + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true /@sindresorhus/merge-streams/2.3.0: - resolution: - { - integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} + engines: {node: '>=18'} /@sinonjs/commons/1.8.6: - resolution: - { - integrity: sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==, - } + resolution: {integrity: sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==} dependencies: type-detect: 4.0.8 dev: true /@sinonjs/commons/2.0.0: - resolution: - { - integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==, - } + resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} dependencies: type-detect: 4.0.8 dev: true /@sinonjs/commons/3.0.0: - resolution: - { - integrity: sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==, - } + resolution: {integrity: sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==} dependencies: type-detect: 4.0.8 dev: true /@sinonjs/fake-timers/10.3.0: - resolution: - { - integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==, - } + resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} dependencies: - "@sinonjs/commons": 3.0.0 + '@sinonjs/commons': 3.0.0 dev: true /@sinonjs/fake-timers/7.1.2: - resolution: - { - integrity: sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==, - } + resolution: {integrity: sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==} dependencies: - "@sinonjs/commons": 1.8.6 + '@sinonjs/commons': 1.8.6 dev: true /@sinonjs/samsam/6.1.3: - resolution: - { - integrity: sha512-nhOb2dWPeb1sd3IQXL/dVPnKHDOAFfvichtBf4xV00/rU1QbPCQqKMbvIheIjqwVjh7qIgf2AHTHi391yMOMpQ==, - } + resolution: {integrity: sha512-nhOb2dWPeb1sd3IQXL/dVPnKHDOAFfvichtBf4xV00/rU1QbPCQqKMbvIheIjqwVjh7qIgf2AHTHi391yMOMpQ==} dependencies: - "@sinonjs/commons": 1.8.6 + '@sinonjs/commons': 1.8.6 lodash.get: 4.4.2 type-detect: 4.0.8 dev: true /@sinonjs/text-encoding/0.7.2: - resolution: - { - integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==, - } + resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} dev: true /@socket.io/component-emitter/3.1.0: - resolution: - { - integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==, - } + resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} dev: true /@tootallnate/once/2.0.0: - resolution: - { - integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==, - } - engines: { node: ">= 10" } + resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} + engines: {node: '>= 10'} /@tootallnate/quickjs-emscripten/0.23.0: - resolution: - { - integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==, - } + resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} dev: true /@ts-morph/common/0.24.0: - resolution: - { - integrity: sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==, - } + resolution: {integrity: sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==} dependencies: fast-glob: 3.3.2 minimatch: 9.0.5 @@ -2651,294 +2087,186 @@ packages: dev: false /@tsconfig/node10/1.0.9: - resolution: - { - integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==, - } + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} dev: true /@tsconfig/node12/1.0.11: - resolution: - { - integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==, - } + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} dev: true /@tsconfig/node14/1.0.3: - resolution: - { - integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==, - } + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} dev: true /@tsconfig/node16/1.0.4: - resolution: - { - integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==, - } + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: true /@types/argparse/1.0.38: - resolution: - { - integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==, - } + resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} dev: true /@types/chai-as-promised/7.1.6: - resolution: - { - integrity: sha512-cQLhk8fFarRVZAXUQV1xEnZgMoPxqKojBvRkqPCKPQCzEhpbbSKl1Uu75kDng7k5Ln6LQLUmNBjLlFthCgm1NA==, - } + resolution: {integrity: sha512-cQLhk8fFarRVZAXUQV1xEnZgMoPxqKojBvRkqPCKPQCzEhpbbSKl1Uu75kDng7k5Ln6LQLUmNBjLlFthCgm1NA==} dependencies: - "@types/chai": 4.3.6 + '@types/chai': 4.3.6 dev: true /@types/chai/4.3.6: - resolution: - { - integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==, - } + resolution: {integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==} dev: true /@types/cookie/0.4.1: - resolution: - { - integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==, - } + resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} dev: true /@types/cors/2.8.14: - resolution: - { - integrity: sha512-RXHUvNWYICtbP6s18PnOCaqToK8y14DnLd75c6HfyKf228dxy7pHNOQkxPtvXKp/hINFMDjbYzsj63nnpPMSRQ==, - } + resolution: {integrity: sha512-RXHUvNWYICtbP6s18PnOCaqToK8y14DnLd75c6HfyKf228dxy7pHNOQkxPtvXKp/hINFMDjbYzsj63nnpPMSRQ==} dependencies: - "@types/node": 18.18.0 + '@types/node': 18.18.0 dev: true /@types/eslint-scope/3.7.5: - resolution: - { - integrity: sha512-JNvhIEyxVW6EoMIFIvj93ZOywYFatlpu9deeH6eSx6PE3WHYvHaQtmHmQeNw7aA81bYGBPPQqdtBm6b1SsQMmA==, - } + resolution: {integrity: sha512-JNvhIEyxVW6EoMIFIvj93ZOywYFatlpu9deeH6eSx6PE3WHYvHaQtmHmQeNw7aA81bYGBPPQqdtBm6b1SsQMmA==} dependencies: - "@types/eslint": 8.44.3 - "@types/estree": 1.0.2 + '@types/eslint': 8.44.3 + '@types/estree': 1.0.2 dev: true /@types/eslint/8.44.3: - resolution: - { - integrity: sha512-iM/WfkwAhwmPff3wZuPLYiHX18HI24jU8k1ZSH7P8FHwxTjZ2P6CoX2wnF43oprR+YXJM6UUxATkNvyv/JHd+g==, - } + resolution: {integrity: sha512-iM/WfkwAhwmPff3wZuPLYiHX18HI24jU8k1ZSH7P8FHwxTjZ2P6CoX2wnF43oprR+YXJM6UUxATkNvyv/JHd+g==} dependencies: - "@types/estree": 1.0.5 - "@types/json-schema": 7.0.13 + '@types/estree': 1.0.5 + '@types/json-schema': 7.0.13 dev: true /@types/estree/1.0.2: - resolution: - { - integrity: sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==, - } + resolution: {integrity: sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==} dev: true /@types/estree/1.0.5: - resolution: - { - integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==, - } + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: true /@types/fs-extra/8.1.3: - resolution: - { - integrity: sha512-7IdV01N0u/CaVO0fuY1YmEg14HQN3+EW8mpNgg6NEfxEl/lzCa5OxlBu3iFsCAdamnYOcTQ7oEi43Xc/67Rgzw==, - } + resolution: {integrity: sha512-7IdV01N0u/CaVO0fuY1YmEg14HQN3+EW8mpNgg6NEfxEl/lzCa5OxlBu3iFsCAdamnYOcTQ7oEi43Xc/67Rgzw==} dependencies: - "@types/node": 18.18.0 + '@types/node': 18.18.0 dev: true /@types/fs-extra/9.0.13: - resolution: - { - integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==, - } + resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - "@types/node": 18.18.0 + '@types/node': 18.18.0 dev: true /@types/js-yaml/3.12.1: - resolution: - { - integrity: sha512-SGGAhXLHDx+PK4YLNcNGa6goPf9XRWQNAUUbffkwVGGXIxmDKWyGGL4inzq2sPmExu431Ekb9aEMn9BkPqEYFA==, - } + resolution: {integrity: sha512-SGGAhXLHDx+PK4YLNcNGa6goPf9XRWQNAUUbffkwVGGXIxmDKWyGGL4inzq2sPmExu431Ekb9aEMn9BkPqEYFA==} dev: true /@types/js-yaml/4.0.6: - resolution: - { - integrity: sha512-ACTuifTSIIbyksx2HTon3aFtCKWcID7/h3XEmRpDYdMCXxPbl+m9GteOJeaAkiAta/NJaSFuA7ahZ0NkwajDSw==, - } + resolution: {integrity: sha512-ACTuifTSIIbyksx2HTon3aFtCKWcID7/h3XEmRpDYdMCXxPbl+m9GteOJeaAkiAta/NJaSFuA7ahZ0NkwajDSw==} dev: true /@types/json-schema/7.0.13: - resolution: - { - integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==, - } + resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} /@types/lodash/4.14.199: - resolution: - { - integrity: sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==, - } + resolution: {integrity: sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==} /@types/lodash/4.17.4: - resolution: - { - integrity: sha512-wYCP26ZLxaT3R39kiN2+HcJ4kTd3U1waI/cY7ivWYqFP6pW3ZNpvi6Wd6PHZx7T/t8z0vlkXMg3QYLa7DZ/IJQ==, - } + resolution: {integrity: sha512-wYCP26ZLxaT3R39kiN2+HcJ4kTd3U1waI/cY7ivWYqFP6pW3ZNpvi6Wd6PHZx7T/t8z0vlkXMg3QYLa7DZ/IJQ==} dev: true /@types/mocha/10.0.1: - resolution: - { - integrity: sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==, - } + resolution: {integrity: sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==} dev: true /@types/mocha/10.0.6: - resolution: - { - integrity: sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==, - } + resolution: {integrity: sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==} dev: true /@types/mocha/5.2.7: - resolution: - { - integrity: sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==, - } + resolution: {integrity: sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==} dev: true /@types/node-fetch/2.6.6: - resolution: - { - integrity: sha512-95X8guJYhfqiuVVhRFxVQcf4hW/2bCuoPwDasMf/531STFoNoWTT7YDnWdXHEZKqAGUigmpG31r2FE70LwnzJw==, - } + resolution: {integrity: sha512-95X8guJYhfqiuVVhRFxVQcf4hW/2bCuoPwDasMf/531STFoNoWTT7YDnWdXHEZKqAGUigmpG31r2FE70LwnzJw==} dependencies: - "@types/node": 18.18.0 + '@types/node': 18.18.0 form-data: 4.0.0 /@types/node/18.18.0: - resolution: - { - integrity: sha512-3xA4X31gHT1F1l38ATDIL9GpRLdwVhnEFC8Uikv5ZLlXATwrCYyPq7ZWHxzxc3J/30SUiwiYT+bQe0/XvKlWbw==, - } + resolution: {integrity: sha512-3xA4X31gHT1F1l38ATDIL9GpRLdwVhnEFC8Uikv5ZLlXATwrCYyPq7ZWHxzxc3J/30SUiwiYT+bQe0/XvKlWbw==} /@types/node/22.2.0: - resolution: - { - integrity: sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==, - } + resolution: {integrity: sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==} dependencies: undici-types: 6.13.0 dev: true /@types/semver/7.5.3: - resolution: - { - integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==, - } + resolution: {integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==} dev: true /@types/sinon/10.0.17: - resolution: - { - integrity: sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==, - } + resolution: {integrity: sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==} dependencies: - "@types/sinonjs__fake-timers": 8.1.3 + '@types/sinonjs__fake-timers': 8.1.3 dev: true /@types/sinonjs__fake-timers/8.1.3: - resolution: - { - integrity: sha512-4g+2YyWe0Ve+LBh+WUm1697PD0Kdi6coG1eU0YjQbwx61AZ8XbEpL1zIT6WjuUKrCMCROpEaYQPDjBnDouBVAQ==, - } + resolution: {integrity: sha512-4g+2YyWe0Ve+LBh+WUm1697PD0Kdi6coG1eU0YjQbwx61AZ8XbEpL1zIT6WjuUKrCMCROpEaYQPDjBnDouBVAQ==} dev: true /@types/triple-beam/1.3.3: - resolution: - { - integrity: sha512-6tOUG+nVHn0cJbVp25JFayS5UE6+xlbcNF9Lo9mU7U0zk3zeUShZied4YEQZjy1JBF043FSkdXw8YkUJuVtB5g==, - } + resolution: {integrity: sha512-6tOUG+nVHn0cJbVp25JFayS5UE6+xlbcNF9Lo9mU7U0zk3zeUShZied4YEQZjy1JBF043FSkdXw8YkUJuVtB5g==} dev: true /@types/tunnel/0.0.3: - resolution: - { - integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==, - } + resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - "@types/node": 18.18.0 + '@types/node': 18.18.0 /@types/xmlbuilder/0.0.34: - resolution: - { - integrity: sha512-yVsHfYqJblSEg3DvUhGndpCZBZz2GiGVmqMa04fbGro2xzxRj85Q7MQ4os+MaXmKcpCDD42MXuxUWfoUKTuVdQ==, - } + resolution: {integrity: sha512-yVsHfYqJblSEg3DvUhGndpCZBZz2GiGVmqMa04fbGro2xzxRj85Q7MQ4os+MaXmKcpCDD42MXuxUWfoUKTuVdQ==} dev: true /@types/yargs-parser/21.0.1: - resolution: - { - integrity: sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==, - } + resolution: {integrity: sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==} dev: true /@types/yargs/17.0.25: - resolution: - { - integrity: sha512-gy7iPgwnzNvxgAEi2bXOHWCVOG6f7xsprVJH4MjlAWeBmJ7vh/Y1kwMtUrs64ztf24zVIRCpr3n/z6gm9QIkgg==, - } + resolution: {integrity: sha512-gy7iPgwnzNvxgAEi2bXOHWCVOG6f7xsprVJH4MjlAWeBmJ7vh/Y1kwMtUrs64ztf24zVIRCpr3n/z6gm9QIkgg==} dependencies: - "@types/yargs-parser": 21.0.1 + '@types/yargs-parser': 21.0.1 dev: true /@types/yauzl/2.10.1: - resolution: - { - integrity: sha512-CHzgNU3qYBnp/O4S3yv2tXPlvMTq0YWSTVg2/JYLqWZGHwwgJGAwd00poay/11asPq8wLFwHzubyInqHIFmmiw==, - } + resolution: {integrity: sha512-CHzgNU3qYBnp/O4S3yv2tXPlvMTq0YWSTVg2/JYLqWZGHwwgJGAwd00poay/11asPq8wLFwHzubyInqHIFmmiw==} requiresBuild: true dependencies: - "@types/node": 18.18.0 + '@types/node': 18.18.0 dev: true optional: true /@typescript-eslint/eslint-plugin/6.8.0_qf4uxqaifopx7g4oramkqjuumy: - resolution: - { - integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==, - } - engines: { node: ^16.0.0 || >=18.0.0 } + resolution: {integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - "@typescript-eslint/parser": ^6.0.0 || ^6.0.0-alpha + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha eslint: ^7.0.0 || ^8.0.0 - typescript: "*" + typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - "@eslint-community/regexpp": 4.8.2 - "@typescript-eslint/parser": 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i - "@typescript-eslint/scope-manager": 6.8.0 - "@typescript-eslint/type-utils": 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i - "@typescript-eslint/utils": 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i - "@typescript-eslint/visitor-keys": 6.8.0 + '@eslint-community/regexpp': 4.8.2 + '@typescript-eslint/parser': 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/type-utils': 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i + '@typescript-eslint/utils': 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i + '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 eslint: 8.50.0 graphemer: 1.4.0 @@ -2952,22 +2280,19 @@ packages: dev: true /@typescript-eslint/parser/6.8.0_5hvrknbmeu6sajfm3eyubyzq5i: - resolution: - { - integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==, - } - engines: { node: ^16.0.0 || >=18.0.0 } + resolution: {integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 - typescript: "*" + typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - "@typescript-eslint/scope-manager": 6.8.0 - "@typescript-eslint/types": 6.8.0 - "@typescript-eslint/typescript-estree": 6.8.0_typescript@5.5.3 - "@typescript-eslint/visitor-keys": 6.8.0 + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/typescript-estree': 6.8.0_typescript@5.5.3 + '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 eslint: 8.50.0 typescript: 5.5.3 @@ -2976,31 +2301,25 @@ packages: dev: true /@typescript-eslint/scope-manager/6.8.0: - resolution: - { - integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==, - } - engines: { node: ^16.0.0 || >=18.0.0 } + resolution: {integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==} + engines: {node: ^16.0.0 || >=18.0.0} dependencies: - "@typescript-eslint/types": 6.8.0 - "@typescript-eslint/visitor-keys": 6.8.0 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/visitor-keys': 6.8.0 dev: true /@typescript-eslint/type-utils/6.8.0_5hvrknbmeu6sajfm3eyubyzq5i: - resolution: - { - integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==, - } - engines: { node: ^16.0.0 || >=18.0.0 } + resolution: {integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 - typescript: "*" + typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - "@typescript-eslint/typescript-estree": 6.8.0_typescript@5.5.3 - "@typescript-eslint/utils": 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i + '@typescript-eslint/typescript-estree': 6.8.0_typescript@5.5.3 + '@typescript-eslint/utils': 6.8.0_5hvrknbmeu6sajfm3eyubyzq5i debug: 4.3.4 eslint: 8.50.0 ts-api-utils: 1.0.3_typescript@5.5.3 @@ -3010,27 +2329,21 @@ packages: dev: true /@typescript-eslint/types/6.8.0: - resolution: - { - integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==, - } - engines: { node: ^16.0.0 || >=18.0.0 } + resolution: {integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==} + engines: {node: ^16.0.0 || >=18.0.0} dev: true /@typescript-eslint/typescript-estree/6.8.0_typescript@5.5.3: - resolution: - { - integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==, - } - engines: { node: ^16.0.0 || >=18.0.0 } + resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - typescript: "*" + typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - "@typescript-eslint/types": 6.8.0 - "@typescript-eslint/visitor-keys": 6.8.0 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -3042,20 +2355,17 @@ packages: dev: true /@typescript-eslint/utils/6.8.0_5hvrknbmeu6sajfm3eyubyzq5i: - resolution: - { - integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==, - } - engines: { node: ^16.0.0 || >=18.0.0 } + resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - "@eslint-community/eslint-utils": 4.4.0_eslint@8.50.0 - "@types/json-schema": 7.0.13 - "@types/semver": 7.5.3 - "@typescript-eslint/scope-manager": 6.8.0 - "@typescript-eslint/types": 6.8.0 - "@typescript-eslint/typescript-estree": 6.8.0_typescript@5.5.3 + '@eslint-community/eslint-utils': 4.4.0_eslint@8.50.0 + '@types/json-schema': 7.0.13 + '@types/semver': 7.5.3 + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/typescript-estree': 6.8.0_typescript@5.5.3 eslint: 8.50.0 semver: 7.6.3 transitivePeerDependencies: @@ -3064,25 +2374,19 @@ packages: dev: true /@typescript-eslint/visitor-keys/6.8.0: - resolution: - { - integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==, - } - engines: { node: ^16.0.0 || >=18.0.0 } + resolution: {integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==} + engines: {node: ^16.0.0 || >=18.0.0} dependencies: - "@typescript-eslint/types": 6.8.0 + '@typescript-eslint/types': 6.8.0 eslint-visitor-keys: 3.4.3 dev: true /@typespec/compiler/0.59.0: - resolution: - { - integrity: sha512-fqh2TeAWQyt70f7NkfwOvoQMqHAfGzIfvcUi+XW55+ms6opiqNXBIT822Jr+T4fNo1PgsnbKC34n6SSIMxnOqw==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-fqh2TeAWQyt70f7NkfwOvoQMqHAfGzIfvcUi+XW55+ms6opiqNXBIT822Jr+T4fNo1PgsnbKC34n6SSIMxnOqw==} + engines: {node: '>=18.0.0'} hasBin: true dependencies: - "@babel/code-frame": 7.24.7 + '@babel/code-frame': 7.24.7 ajv: 8.17.1 change-case: 5.4.4 globby: 14.0.2 @@ -3098,71 +2402,56 @@ packages: yargs: 17.7.2 /@typespec/http/0.59.0_@typespec+compiler@0.59.0: - resolution: - { - integrity: sha512-P8kJBHmkqYHhojO97Tnj8FH+UInWzGBl2I9Z6ZX6sVUVW9/87hoovgCcVmvU1xMUD/xvKzX3m70fbRXhkocsGQ==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-P8kJBHmkqYHhojO97Tnj8FH+UInWzGBl2I9Z6ZX6sVUVW9/87hoovgCcVmvU1xMUD/xvKzX3m70fbRXhkocsGQ==} + engines: {node: '>=18.0.0'} peerDependencies: - "@typespec/compiler": ~0.59.0 + '@typespec/compiler': ~0.59.0 dependencies: - "@typespec/compiler": 0.59.0 + '@typespec/compiler': 0.59.0 /@typespec/openapi/0.59.0_kqkvcwi4aithpv7x2xgy7toc2q: - resolution: - { - integrity: sha512-do1Dm5w0MuK3994gYTBg6qMfgeIxmmsDqnz3zimYKMPpbnUBi4F6/o4iCfn0Fn9kaNl+H6UlOzZpsZW9xHui1Q==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-do1Dm5w0MuK3994gYTBg6qMfgeIxmmsDqnz3zimYKMPpbnUBi4F6/o4iCfn0Fn9kaNl+H6UlOzZpsZW9xHui1Q==} + engines: {node: '>=18.0.0'} peerDependencies: - "@typespec/compiler": ~0.59.0 - "@typespec/http": ~0.59.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 dependencies: - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 /@typespec/openapi3/0.59.0_foc6rhrbx2on4sod3dtg7cmvwy: - resolution: - { - integrity: sha512-xwdWPPRtjsLxXjsebNppaHrFPF6rJiWkAEHCsK0elwvaPSruZvYfPhXpx1HnNkC2glb0NHgmxvXg7EmMwIYYcA==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-xwdWPPRtjsLxXjsebNppaHrFPF6rJiWkAEHCsK0elwvaPSruZvYfPhXpx1HnNkC2glb0NHgmxvXg7EmMwIYYcA==} + engines: {node: '>=18.0.0'} hasBin: true peerDependencies: - "@typespec/compiler": ~0.59.0 - "@typespec/http": ~0.59.0 - "@typespec/openapi": ~0.59.0 - "@typespec/versioning": ~0.59.0 - dependencies: - "@readme/openapi-parser": 2.6.0_openapi-types@7.2.3 - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 - "@typespec/openapi": 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q - "@typespec/versioning": 0.59.0_@typespec+compiler@0.59.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/versioning': ~0.59.0 + dependencies: + '@readme/openapi-parser': 2.6.0_openapi-types@7.2.3 + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 + '@typespec/openapi': 0.59.0_kqkvcwi4aithpv7x2xgy7toc2q + '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 yaml: 2.4.5 transitivePeerDependencies: - openapi-types dev: false /@typespec/rest/0.59.0_kqkvcwi4aithpv7x2xgy7toc2q: - resolution: - { - integrity: sha512-wGrmjRDUMgMn9fqusRhu36hC2GOvirz5O01VSrmAEOH6k1L2GX0Mq70gOdZa4kkkWyHYDKb7GdjfaLe8v+OH6w==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-wGrmjRDUMgMn9fqusRhu36hC2GOvirz5O01VSrmAEOH6k1L2GX0Mq70gOdZa4kkkWyHYDKb7GdjfaLe8v+OH6w==} + engines: {node: '>=18.0.0'} peerDependencies: - "@typespec/compiler": ~0.59.0 - "@typespec/http": ~0.59.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 dependencies: - "@typespec/compiler": 0.59.0 - "@typespec/http": 0.59.0_@typespec+compiler@0.59.0 + '@typespec/compiler': 0.59.0 + '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 /@typespec/ts-http-runtime/1.0.0-alpha.20240314.2: - resolution: - { - integrity: sha512-Rc/bFkKLbrEo9KKXiSdRYNSmosZ1W6ycQKEKScpXvK4jaXFNyCvmS0tLv7rEN4EzEEds2fPzEHNtX4e8gMu/lA==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-Rc/bFkKLbrEo9KKXiSdRYNSmosZ1W6ycQKEKScpXvK4jaXFNyCvmS0tLv7rEN4EzEEds2fPzEHNtX4e8gMu/lA==} + engines: {node: '>=18.0.0'} dependencies: http-proxy-agent: 7.0.0 https-proxy-agent: 7.0.2 @@ -3172,40 +2461,28 @@ packages: dev: true /@typespec/versioning/0.59.0_@typespec+compiler@0.59.0: - resolution: - { - integrity: sha512-aihO/ux0lLmsuYAdGVkiBflSudcZokYG42SELk1FtMFo609G3Pd7ep7hau6unBnMIceQZejB0ow5UGRupK4X5A==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-aihO/ux0lLmsuYAdGVkiBflSudcZokYG42SELk1FtMFo609G3Pd7ep7hau6unBnMIceQZejB0ow5UGRupK4X5A==} + engines: {node: '>=18.0.0'} peerDependencies: - "@typespec/compiler": ~0.59.0 + '@typespec/compiler': ~0.59.0 dependencies: - "@typespec/compiler": 0.59.0 + '@typespec/compiler': 0.59.0 /@typespec/xml/0.59.0_@typespec+compiler@0.59.0: - resolution: - { - integrity: sha512-UoSsEmm7SXEtL9OXsqotu1TjruJSobqZMhUKAAlC9EP2WfQIHLRfBu7xaZB0sgwq7CM6zy/Hq1RZfQyL1KqEvg==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-UoSsEmm7SXEtL9OXsqotu1TjruJSobqZMhUKAAlC9EP2WfQIHLRfBu7xaZB0sgwq7CM6zy/Hq1RZfQyL1KqEvg==} + engines: {node: '>=18.0.0'} peerDependencies: - "@typespec/compiler": ~0.59.0 + '@typespec/compiler': ~0.59.0 dependencies: - "@typespec/compiler": 0.59.0 + '@typespec/compiler': 0.59.0 dev: true /@ungap/promise-all-settled/1.1.2: - resolution: - { - integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==, - } + resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} dev: true /@vitest/coverage-istanbul/1.6.0_vitest@1.6.0: - resolution: - { - integrity: sha512-h/BwpXehkkS0qsNCS00QxiupAqVkNi0WT19BR0dQvlge5oHghoSVLx63fABYFoKxVb7Ue7+k6V2KokmQ1zdMpg==, - } + resolution: {integrity: sha512-h/BwpXehkkS0qsNCS00QxiupAqVkNi0WT19BR0dQvlge5oHghoSVLx63fABYFoKxVb7Ue7+k6V2KokmQ1zdMpg==} peerDependencies: vitest: 1.6.0 dependencies: @@ -3224,15 +2501,12 @@ packages: dev: true /@vitest/coverage-v8/1.6.0_vitest@1.6.0: - resolution: - { - integrity: sha512-KvapcbMY/8GYIG0rlwwOKCVNRc0OL20rrhFkg/CHNzncV03TE2XWvO5w9uZYoxNiMEBacAJt3unSOiZ7svePew==, - } + resolution: {integrity: sha512-KvapcbMY/8GYIG0rlwwOKCVNRc0OL20rrhFkg/CHNzncV03TE2XWvO5w9uZYoxNiMEBacAJt3unSOiZ7svePew==} peerDependencies: vitest: 1.6.0 dependencies: - "@ampproject/remapping": 2.3.0 - "@bcoe/v8-coverage": 0.2.3 + '@ampproject/remapping': 2.3.0 + '@bcoe/v8-coverage': 0.2.3 debug: 4.3.4 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 @@ -3250,32 +2524,23 @@ packages: dev: true /@vitest/expect/1.6.0: - resolution: - { - integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==, - } + resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} dependencies: - "@vitest/spy": 1.6.0 - "@vitest/utils": 1.6.0 + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 chai: 4.4.1 dev: true /@vitest/runner/1.6.0: - resolution: - { - integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==, - } + resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==} dependencies: - "@vitest/utils": 1.6.0 + '@vitest/utils': 1.6.0 p-limit: 5.0.0 pathe: 1.1.2 dev: true /@vitest/snapshot/1.6.0: - resolution: - { - integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==, - } + resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==} dependencies: magic-string: 0.30.10 pathe: 1.1.2 @@ -3283,19 +2548,13 @@ packages: dev: true /@vitest/spy/1.6.0: - resolution: - { - integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==, - } + resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==} dependencies: tinyspy: 2.2.1 dev: true /@vitest/utils/1.6.0: - resolution: - { - integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==, - } + resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==} dependencies: diff-sequences: 29.6.3 estree-walker: 3.0.3 @@ -3304,161 +2563,113 @@ packages: dev: true /@webassemblyjs/ast/1.11.6: - resolution: - { - integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==, - } + resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: - "@webassemblyjs/helper-numbers": 1.11.6 - "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + '@webassemblyjs/helper-numbers': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 dev: true /@webassemblyjs/floating-point-hex-parser/1.11.6: - resolution: - { - integrity: sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==, - } + resolution: {integrity: sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==} dev: true /@webassemblyjs/helper-api-error/1.11.6: - resolution: - { - integrity: sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==, - } + resolution: {integrity: sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==} dev: true /@webassemblyjs/helper-buffer/1.11.6: - resolution: - { - integrity: sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==, - } + resolution: {integrity: sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==} dev: true /@webassemblyjs/helper-numbers/1.11.6: - resolution: - { - integrity: sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==, - } + resolution: {integrity: sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==} dependencies: - "@webassemblyjs/floating-point-hex-parser": 1.11.6 - "@webassemblyjs/helper-api-error": 1.11.6 - "@xtuc/long": 4.2.2 + '@webassemblyjs/floating-point-hex-parser': 1.11.6 + '@webassemblyjs/helper-api-error': 1.11.6 + '@xtuc/long': 4.2.2 dev: true /@webassemblyjs/helper-wasm-bytecode/1.11.6: - resolution: - { - integrity: sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==, - } + resolution: {integrity: sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==} dev: true /@webassemblyjs/helper-wasm-section/1.11.6: - resolution: - { - integrity: sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==, - } + resolution: {integrity: sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==} dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 - "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-buffer': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/wasm-gen': 1.11.6 dev: true /@webassemblyjs/ieee754/1.11.6: - resolution: - { - integrity: sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==, - } + resolution: {integrity: sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==} dependencies: - "@xtuc/ieee754": 1.2.0 + '@xtuc/ieee754': 1.2.0 dev: true /@webassemblyjs/leb128/1.11.6: - resolution: - { - integrity: sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==, - } + resolution: {integrity: sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==} dependencies: - "@xtuc/long": 4.2.2 + '@xtuc/long': 4.2.2 dev: true /@webassemblyjs/utf8/1.11.6: - resolution: - { - integrity: sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==, - } + resolution: {integrity: sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==} dev: true /@webassemblyjs/wasm-edit/1.11.6: - resolution: - { - integrity: sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==, - } + resolution: {integrity: sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==} dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 - "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - "@webassemblyjs/helper-wasm-section": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - "@webassemblyjs/wasm-opt": 1.11.6 - "@webassemblyjs/wasm-parser": 1.11.6 - "@webassemblyjs/wast-printer": 1.11.6 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-buffer': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/helper-wasm-section': 1.11.6 + '@webassemblyjs/wasm-gen': 1.11.6 + '@webassemblyjs/wasm-opt': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 + '@webassemblyjs/wast-printer': 1.11.6 dev: true /@webassemblyjs/wasm-gen/1.11.6: - resolution: - { - integrity: sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==, - } + resolution: {integrity: sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==} dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - "@webassemblyjs/ieee754": 1.11.6 - "@webassemblyjs/leb128": 1.11.6 - "@webassemblyjs/utf8": 1.11.6 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/ieee754': 1.11.6 + '@webassemblyjs/leb128': 1.11.6 + '@webassemblyjs/utf8': 1.11.6 dev: true /@webassemblyjs/wasm-opt/1.11.6: - resolution: - { - integrity: sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==, - } + resolution: {integrity: sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==} dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - "@webassemblyjs/wasm-parser": 1.11.6 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-buffer': 1.11.6 + '@webassemblyjs/wasm-gen': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 dev: true /@webassemblyjs/wasm-parser/1.11.6: - resolution: - { - integrity: sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==, - } + resolution: {integrity: sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==} dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-api-error": 1.11.6 - "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - "@webassemblyjs/ieee754": 1.11.6 - "@webassemblyjs/leb128": 1.11.6 - "@webassemblyjs/utf8": 1.11.6 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-api-error': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/ieee754': 1.11.6 + '@webassemblyjs/leb128': 1.11.6 + '@webassemblyjs/utf8': 1.11.6 dev: true /@webassemblyjs/wast-printer/1.11.6: - resolution: - { - integrity: sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==, - } + resolution: {integrity: sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==} dependencies: - "@webassemblyjs/ast": 1.11.6 - "@xtuc/long": 4.2.2 + '@webassemblyjs/ast': 1.11.6 + '@xtuc/long': 4.2.2 dev: true /@webpack-cli/configtest/1.2.0_w3wu7rcwmvifygnqiqkxwjppse: - resolution: - { - integrity: sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==, - } + resolution: {integrity: sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==} peerDependencies: webpack: 4.x.x || 5.x.x webpack-cli: 4.x.x @@ -3468,10 +2679,7 @@ packages: dev: true /@webpack-cli/info/1.5.0_webpack-cli@4.10.0: - resolution: - { - integrity: sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==, - } + resolution: {integrity: sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==} peerDependencies: webpack-cli: 4.x.x dependencies: @@ -3480,13 +2688,10 @@ packages: dev: true /@webpack-cli/serve/1.7.0_webpack-cli@4.10.0: - resolution: - { - integrity: sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==, - } + resolution: {integrity: sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==} peerDependencies: webpack-cli: 4.x.x - webpack-dev-server: "*" + webpack-dev-server: '*' peerDependenciesMeta: webpack-dev-server: optional: true @@ -3495,42 +2700,27 @@ packages: dev: true /@xtuc/ieee754/1.2.0: - resolution: - { - integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==, - } + resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} dev: true /@xtuc/long/4.2.2: - resolution: - { - integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==, - } + resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} dev: true /abab/2.0.6: - resolution: - { - integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==, - } + resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} dev: true /accepts/1.3.8: - resolution: - { - integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} + engines: {node: '>= 0.6'} dependencies: mime-types: 2.1.35 negotiator: 0.6.3 dev: true /acorn-import-assertions/1.9.0_acorn@8.10.0: - resolution: - { - integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==, - } + resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} peerDependencies: acorn: ^8 dependencies: @@ -3538,10 +2728,7 @@ packages: dev: true /acorn-jsx/5.3.2_acorn@8.10.0: - resolution: - { - integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==, - } + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: @@ -3549,56 +2736,38 @@ packages: dev: true /acorn-walk/8.2.0: - resolution: - { - integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==, - } - engines: { node: ">=0.4.0" } + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} dev: true /acorn-walk/8.3.2: - resolution: - { - integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==, - } - engines: { node: ">=0.4.0" } + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + engines: {node: '>=0.4.0'} dev: true /acorn/8.10.0: - resolution: - { - integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==, - } - engines: { node: ">=0.4.0" } + resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} + engines: {node: '>=0.4.0'} hasBin: true dev: true /acorn/8.11.3: - resolution: - { - integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==, - } - engines: { node: ">=0.4.0" } + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + engines: {node: '>=0.4.0'} hasBin: true dev: true /agent-base/6.0.2: - resolution: - { - integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==, - } - engines: { node: ">= 6.0.0" } + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} dependencies: debug: 4.3.4 transitivePeerDependencies: - supports-color /agent-base/7.1.0: - resolution: - { - integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} + engines: {node: '>= 14'} dependencies: debug: 4.3.4 transitivePeerDependencies: @@ -3606,10 +2775,7 @@ packages: dev: true /ajv-draft-04/1.0.0_ajv@8.13.0: - resolution: - { - integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==, - } + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} peerDependencies: ajv: ^8.5.0 peerDependenciesMeta: @@ -3620,10 +2786,7 @@ packages: dev: true /ajv-draft-04/1.0.0_ajv@8.17.1: - resolution: - { - integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==, - } + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} peerDependencies: ajv: ^8.5.0 peerDependenciesMeta: @@ -3634,10 +2797,7 @@ packages: dev: false /ajv-formats/3.0.1_ajv@8.13.0: - resolution: - { - integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==, - } + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} peerDependencies: ajv: ^8.0.0 peerDependenciesMeta: @@ -3648,10 +2808,7 @@ packages: dev: true /ajv-keywords/3.5.2_ajv@6.12.6: - resolution: - { - integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==, - } + resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} peerDependencies: ajv: ^6.9.1 dependencies: @@ -3659,10 +2816,7 @@ packages: dev: true /ajv/6.12.6: - resolution: - { - integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==, - } + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: fast-deep-equal: 3.1.3 fast-json-stable-stringify: 2.1.0 @@ -3671,10 +2825,7 @@ packages: dev: true /ajv/8.12.0: - resolution: - { - integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==, - } + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} dependencies: fast-deep-equal: 3.1.3 json-schema-traverse: 1.0.0 @@ -3683,10 +2834,7 @@ packages: dev: true /ajv/8.13.0: - resolution: - { - integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==, - } + resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} dependencies: fast-deep-equal: 3.1.3 json-schema-traverse: 1.0.0 @@ -3695,10 +2843,7 @@ packages: dev: true /ajv/8.17.1: - resolution: - { - integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==, - } + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} dependencies: fast-deep-equal: 3.1.3 fast-uri: 3.0.1 @@ -3706,133 +2851,85 @@ packages: require-from-string: 2.0.2 /ansi-colors/4.1.1: - resolution: - { - integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} + engines: {node: '>=6'} dev: true /ansi-regex/5.0.1: - resolution: - { - integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} /ansi-regex/6.0.1: - resolution: - { - integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} dev: true /ansi-styles/3.2.1: - resolution: - { - integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} dependencies: color-convert: 1.9.3 /ansi-styles/4.3.0: - resolution: - { - integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} dependencies: color-convert: 2.0.1 /ansi-styles/5.2.0: - resolution: - { - integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} dev: true /ansi-styles/6.2.1: - resolution: - { - integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} dev: true /anymatch/3.1.3: - resolution: - { - integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==, - } - engines: { node: ">= 8" } + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 dev: true /append-field/1.0.0: - resolution: - { - integrity: sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==, - } + resolution: {integrity: sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==} dev: true /arg/4.1.3: - resolution: - { - integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==, - } + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} dev: true /argparse/1.0.10: - resolution: - { - integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==, - } + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: sprintf-js: 1.0.3 dev: true /argparse/2.0.1: - resolution: - { - integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==, - } + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} /array-buffer-byte-length/1.0.0: - resolution: - { - integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==, - } + resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: call-bind: 1.0.2 is-array-buffer: 3.0.2 dev: true /array-flatten/1.1.1: - resolution: - { - integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==, - } + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: true /array-union/2.1.0: - resolution: - { - integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} dev: true /arraybuffer.prototype.slice/1.0.2: - resolution: - { - integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} + engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 call-bind: 1.0.2 @@ -3844,89 +2941,56 @@ packages: dev: true /asn1/0.2.6: - resolution: - { - integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==, - } + resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} dependencies: safer-buffer: 2.1.2 dev: true /assert-plus/1.0.0: - resolution: - { - integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==, - } - engines: { node: ">=0.8" } + resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==} + engines: {node: '>=0.8'} dev: true /assertion-error/1.1.0: - resolution: - { - integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==, - } + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true /ast-types/0.13.4: - resolution: - { - integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} + engines: {node: '>=4'} dependencies: tslib: 2.6.2 dev: true /async/3.2.4: - resolution: - { - integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==, - } + resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} dev: true /asynckit/0.4.0: - resolution: - { - integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==, - } + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} /autorest/3.6.3: - resolution: - { - integrity: sha512-j/Axwk9bniifTNtBLYVxfQZGQIGPKljFaCQCBWOiybVar2j3tkHP1btiC4a/t9pAJXY6IaFgWctoPM3G/Puhyg==, - } - engines: { node: ">=12.0.0" } + resolution: {integrity: sha512-j/Axwk9bniifTNtBLYVxfQZGQIGPKljFaCQCBWOiybVar2j3tkHP1btiC4a/t9pAJXY6IaFgWctoPM3G/Puhyg==} + engines: {node: '>=12.0.0'} hasBin: true requiresBuild: true dev: true /available-typed-arrays/1.0.5: - resolution: - { - integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} + engines: {node: '>= 0.4'} dev: true /aws-sign2/0.7.0: - resolution: - { - integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==, - } + resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==} dev: true /aws4/1.12.0: - resolution: - { - integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==, - } + resolution: {integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==} dev: true /axios/0.21.4: - resolution: - { - integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==, - } + resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} dependencies: follow-redirects: 1.15.3 transitivePeerDependencies: @@ -3934,31 +2998,19 @@ packages: dev: true /b4a/1.6.4: - resolution: - { - integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==, - } + resolution: {integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==} dev: true /balanced-match/1.0.2: - resolution: - { - integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, - } + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} /bare-events/2.2.1: - resolution: - { - integrity: sha512-9GYPpsPFvrWBkelIhOhTWtkeZxVxZOdb3VnFTCzlOo3OjvmTvzLoZFUT8kNFACx0vJej6QPney1Cf9BvzCNE/A==, - } + resolution: {integrity: sha512-9GYPpsPFvrWBkelIhOhTWtkeZxVxZOdb3VnFTCzlOo3OjvmTvzLoZFUT8kNFACx0vJej6QPney1Cf9BvzCNE/A==} dev: true optional: true /bare-fs/2.2.2: - resolution: - { - integrity: sha512-X9IqgvyB0/VA5OZJyb5ZstoN62AzD7YxVGog13kkfYWYqJYcK0kcqLZ6TrmH5qr4/8//ejVcX4x/a0UvaogXmA==, - } + resolution: {integrity: sha512-X9IqgvyB0/VA5OZJyb5ZstoN62AzD7YxVGog13kkfYWYqJYcK0kcqLZ6TrmH5qr4/8//ejVcX4x/a0UvaogXmA==} requiresBuild: true dependencies: bare-events: 2.2.1 @@ -3969,86 +3021,56 @@ packages: optional: true /bare-os/2.2.1: - resolution: - { - integrity: sha512-OwPyHgBBMkhC29Hl3O4/YfxW9n7mdTr2+SsO29XBWKKJsbgj3mnorDB80r5TiCQgQstgE5ga1qNYrpes6NvX2w==, - } + resolution: {integrity: sha512-OwPyHgBBMkhC29Hl3O4/YfxW9n7mdTr2+SsO29XBWKKJsbgj3mnorDB80r5TiCQgQstgE5ga1qNYrpes6NvX2w==} dev: true optional: true /bare-path/2.1.0: - resolution: - { - integrity: sha512-DIIg7ts8bdRKwJRJrUMy/PICEaQZaPGZ26lsSx9MJSwIhSrcdHn7/C8W+XmnG/rKi6BaRcz+JO00CjZteybDtw==, - } + resolution: {integrity: sha512-DIIg7ts8bdRKwJRJrUMy/PICEaQZaPGZ26lsSx9MJSwIhSrcdHn7/C8W+XmnG/rKi6BaRcz+JO00CjZteybDtw==} dependencies: bare-os: 2.2.1 dev: true optional: true /base64-js/1.5.1: - resolution: - { - integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==, - } + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: true /base64id/2.0.0: - resolution: - { - integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==, - } - engines: { node: ^4.5.0 || >= 5.9 } + resolution: {integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==} + engines: {node: ^4.5.0 || >= 5.9} dev: true /basic-auth/2.0.1: - resolution: - { - integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} + engines: {node: '>= 0.8'} dependencies: safe-buffer: 5.1.2 dev: true /basic-ftp/5.0.4: - resolution: - { - integrity: sha512-8PzkB0arJFV4jJWSGOYR+OEic6aeKMu/osRhBULN6RY0ykby6LKhbmuQ5ublvaas5BOwboah5D87nrHyuh8PPA==, - } - engines: { node: ">=10.0.0" } + resolution: {integrity: sha512-8PzkB0arJFV4jJWSGOYR+OEic6aeKMu/osRhBULN6RY0ykby6LKhbmuQ5ublvaas5BOwboah5D87nrHyuh8PPA==} + engines: {node: '>=10.0.0'} dev: true /bcrypt-pbkdf/1.0.2: - resolution: - { - integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==, - } + resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} dependencies: tweetnacl: 0.14.5 dev: true /big.js/5.2.2: - resolution: - { - integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==, - } + resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} dev: true /binary-extensions/2.2.0: - resolution: - { - integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} dev: true /body-parser/1.20.1: - resolution: - { - integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==, - } - engines: { node: ">= 0.8", npm: 1.2.8000 || >= 1.4.16 } + resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dependencies: bytes: 3.1.2 content-type: 1.0.5 @@ -4065,11 +3087,8 @@ packages: dev: true /body-parser/1.20.2: - resolution: - { - integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==, - } - engines: { node: ">= 0.8", npm: 1.2.8000 || >= 1.4.16 } + resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dependencies: bytes: 3.1.2 content-type: 1.0.5 @@ -4086,45 +3105,30 @@ packages: dev: true /brace-expansion/1.1.11: - resolution: - { - integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==, - } + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 dev: true /brace-expansion/2.0.1: - resolution: - { - integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==, - } + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} dependencies: balanced-match: 1.0.2 /braces/3.0.2: - resolution: - { - integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} dependencies: fill-range: 7.0.1 /browser-stdout/1.3.1: - resolution: - { - integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==, - } + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} dev: true /browserslist/4.21.11: - resolution: - { - integrity: sha512-xn1UXOKUz7DjdGlg9RrUr0GGiWzI97UQJnugHtH0OLDfJB7jMgoIkYvRIEO1l9EeEERVqeqLYOcFBW9ldjypbQ==, - } - engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 } + resolution: {integrity: sha512-xn1UXOKUz7DjdGlg9RrUr0GGiWzI97UQJnugHtH0OLDfJB7jMgoIkYvRIEO1l9EeEERVqeqLYOcFBW9ldjypbQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: caniuse-lite: 1.0.30001539 @@ -4134,11 +3138,8 @@ packages: dev: true /browserslist/4.23.1: - resolution: - { - integrity: sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==, - } - engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 } + resolution: {integrity: sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: caniuse-lite: 1.0.30001632 @@ -4148,143 +3149,92 @@ packages: dev: true /buffer-crc32/0.2.13: - resolution: - { - integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==, - } + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} dev: true /buffer-equal-constant-time/1.0.1: - resolution: - { - integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==, - } + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: true /buffer-from/1.1.2: - resolution: - { - integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==, - } + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} /buffer/5.7.1: - resolution: - { - integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==, - } + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: base64-js: 1.5.1 ieee754: 1.2.1 dev: true /buffer/6.0.3: - resolution: - { - integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==, - } + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} dependencies: base64-js: 1.5.1 ieee754: 1.2.1 dev: true /busboy/1.6.0: - resolution: - { - integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==, - } - engines: { node: ">=10.16.0" } + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} dependencies: streamsearch: 1.1.0 dev: true /bytes/3.1.2: - resolution: - { - integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} dev: true /cac/6.7.14: - resolution: - { - integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} dev: true /call-bind/1.0.2: - resolution: - { - integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==, - } + resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 get-intrinsic: 1.2.1 dev: true /call-me-maybe/1.0.2: - resolution: - { - integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==, - } + resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} dev: false /callsites/3.1.0: - resolution: - { - integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} dev: true /camelcase/6.3.0: - resolution: - { - integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} dev: true /caniuse-lite/1.0.30001539: - resolution: - { - integrity: sha512-hfS5tE8bnNiNvEOEkm8HElUHroYwlqMMENEzELymy77+tJ6m+gA2krtHl5hxJaj71OlpC2cHZbdSMX1/YEqEkA==, - } + resolution: {integrity: sha512-hfS5tE8bnNiNvEOEkm8HElUHroYwlqMMENEzELymy77+tJ6m+gA2krtHl5hxJaj71OlpC2cHZbdSMX1/YEqEkA==} dev: true /caniuse-lite/1.0.30001632: - resolution: - { - integrity: sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==, - } + resolution: {integrity: sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==} dev: true /caseless/0.12.0: - resolution: - { - integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==, - } + resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} dev: true /chai-as-promised/7.1.1_chai@4.3.8: - resolution: - { - integrity: sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==, - } + resolution: {integrity: sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==} peerDependencies: - chai: ">= 2.1.2 < 5" + chai: '>= 2.1.2 < 5' dependencies: chai: 4.3.8 check-error: 1.0.2 dev: true /chai/4.3.8: - resolution: - { - integrity: sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==} + engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 check-error: 1.0.2 @@ -4296,11 +3246,8 @@ packages: dev: true /chai/4.4.1: - resolution: - { - integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} + engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 check-error: 1.0.3 @@ -4312,54 +3259,36 @@ packages: dev: true /chalk/2.4.2: - resolution: - { - integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} dependencies: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 supports-color: 5.5.0 /chalk/4.1.2: - resolution: - { - integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 /change-case/5.4.4: - resolution: - { - integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==, - } + resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} /check-error/1.0.2: - resolution: - { - integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==, - } + resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} dev: true /check-error/1.0.3: - resolution: - { - integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==, - } + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} dependencies: get-func-name: 2.0.2 dev: true /chokidar/3.5.3: - resolution: - { - integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==, - } - engines: { node: ">= 8.10.0" } + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} dependencies: anymatch: 3.1.3 braces: 3.0.2 @@ -4373,20 +3302,14 @@ packages: dev: true /chrome-trace-event/1.0.3: - resolution: - { - integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==, - } - engines: { node: ">=6.0" } + resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} + engines: {node: '>=6.0'} dev: true /chromium-bidi/0.5.12_74t7hwmhzgczi6zz4gvli4zmpa: - resolution: - { - integrity: sha512-sZMgEBWKbupD0Q7lyFu8AWkrE+rs5ycE12jFkGwIgD/VS8lDPtelPlXM7LYaq4zrkZ/O2L3f4afHUHL0ICdKog==, - } + resolution: {integrity: sha512-sZMgEBWKbupD0Q7lyFu8AWkrE+rs5ycE12jFkGwIgD/VS8lDPtelPlXM7LYaq4zrkZ/O2L3f4afHUHL0ICdKog==} peerDependencies: - devtools-protocol: "*" + devtools-protocol: '*' dependencies: devtools-protocol: 0.0.1249869 mitt: 3.0.1 @@ -4394,10 +3317,7 @@ packages: dev: true /cliui/7.0.4: - resolution: - { - integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==, - } + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 @@ -4405,22 +3325,16 @@ packages: dev: true /cliui/8.0.1: - resolution: - { - integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 /clone-deep/4.0.1: - resolution: - { - integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} + engines: {node: '>=6'} dependencies: is-plain-object: 2.0.4 kind-of: 6.0.3 @@ -4428,122 +3342,77 @@ packages: dev: true /code-block-writer/13.0.2: - resolution: - { - integrity: sha512-XfXzAGiStXSmCIwrkdfvc7FS5Dtj8yelCtyOf2p2skCAfvLd6zu0rGzuS9NSCO3bq1JKpFZ7tbKdKlcd5occQA==, - } + resolution: {integrity: sha512-XfXzAGiStXSmCIwrkdfvc7FS5Dtj8yelCtyOf2p2skCAfvLd6zu0rGzuS9NSCO3bq1JKpFZ7tbKdKlcd5occQA==} dev: false /code-error-fragment/0.0.230: - resolution: - { - integrity: sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==, - } - engines: { node: ">= 4" } + resolution: {integrity: sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==} + engines: {node: '>= 4'} dev: false /color-convert/1.9.3: - resolution: - { - integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==, - } + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 /color-convert/2.0.1: - resolution: - { - integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==, - } - engines: { node: ">=7.0.0" } + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 /color-name/1.1.3: - resolution: - { - integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==, - } + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} /color-name/1.1.4: - resolution: - { - integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==, - } + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} /color-string/1.9.1: - resolution: - { - integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==, - } + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 dev: true /color/3.2.1: - resolution: - { - integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==, - } + resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} dependencies: color-convert: 1.9.3 color-string: 1.9.1 dev: true /colorette/2.0.20: - resolution: - { - integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==, - } + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true /colorspace/1.1.4: - resolution: - { - integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==, - } + resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} dependencies: color: 3.2.1 text-hex: 1.0.0 dev: true /combined-stream/1.0.8: - resolution: - { - integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} dependencies: delayed-stream: 1.0.0 /commander/2.20.3: - resolution: - { - integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==, - } + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} dev: true /commander/3.0.2: - resolution: - { - integrity: sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==, - } + resolution: {integrity: sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==} dev: true /commander/7.2.0: - resolution: - { - integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==, - } - engines: { node: ">= 10" } + resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} + engines: {node: '>= 10'} dev: true /commonmark/0.30.0: - resolution: - { - integrity: sha512-j1yoUo4gxPND1JWV9xj5ELih0yMv1iCWDG6eEQIPLSWLxzCXiFoyS7kvB+WwU+tZMf4snwJMMtaubV0laFpiBA==, - } + resolution: {integrity: sha512-j1yoUo4gxPND1JWV9xj5ELih0yMv1iCWDG6eEQIPLSWLxzCXiFoyS7kvB+WwU+tZMf4snwJMMtaubV0laFpiBA==} hasBin: true dependencies: entities: 2.0.3 @@ -4553,18 +3422,12 @@ packages: dev: true /concat-map/0.0.1: - resolution: - { - integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==, - } + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true /concat-stream/1.6.2: - resolution: - { - integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==, - } - engines: { "0": node >= 0.8 } + resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} + engines: {'0': node >= 0.8} dependencies: buffer-from: 1.1.2 inherits: 2.0.4 @@ -4573,18 +3436,12 @@ packages: dev: true /confbox/0.1.7: - resolution: - { - integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==, - } + resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} dev: true /connect/3.7.0: - resolution: - { - integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==, - } - engines: { node: ">= 0.10.0" } + resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} + engines: {node: '>= 0.10.0'} dependencies: debug: 2.6.9 finalhandler: 1.1.2 @@ -4593,87 +3450,57 @@ packages: dev: true /content-disposition/0.5.4: - resolution: - { - integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + engines: {node: '>= 0.6'} dependencies: safe-buffer: 5.2.1 dev: true /content-type/1.0.5: - resolution: - { - integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} dev: true /convert-source-map/2.0.0: - resolution: - { - integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==, - } + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true /cookie-signature/1.0.6: - resolution: - { - integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==, - } + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: true /cookie/0.4.2: - resolution: - { - integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} + engines: {node: '>= 0.6'} dev: true /cookie/0.5.0: - resolution: - { - integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} + engines: {node: '>= 0.6'} dev: true /cookie/0.6.0: - resolution: - { - integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + engines: {node: '>= 0.6'} dev: true /core-util-is/1.0.2: - resolution: - { - integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==, - } + resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} dev: true /cors/2.8.5: - resolution: - { - integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==, - } - engines: { node: ">= 0.10" } + resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} + engines: {node: '>= 0.10'} dependencies: object-assign: 4.1.1 vary: 1.1.2 dev: true /cosmiconfig/9.0.0_typescript@5.5.3: - resolution: - { - integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==, - } - engines: { node: ">=14" } + resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} + engines: {node: '>=14'} peerDependencies: - typescript: ">=4.9.5" + typescript: '>=4.9.5' peerDependenciesMeta: typescript: optional: true @@ -4686,28 +3513,19 @@ packages: dev: true /create-require/1.1.1: - resolution: - { - integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==, - } + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true /cross-env/7.0.3: - resolution: - { - integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==, - } - engines: { node: ">=10.14", npm: ">=6", yarn: ">=1" } + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} hasBin: true dependencies: cross-spawn: 7.0.3 dev: true /cross-fetch/4.0.0: - resolution: - { - integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==, - } + resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} dependencies: node-fetch: 2.7.0 transitivePeerDependencies: @@ -4715,11 +3533,8 @@ packages: dev: true /cross-spawn/6.0.5: - resolution: - { - integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==, - } - engines: { node: ">=4.8" } + resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} + engines: {node: '>=4.8'} dependencies: nice-try: 1.0.5 path-key: 2.0.1 @@ -4729,11 +3544,8 @@ packages: dev: true /cross-spawn/7.0.3: - resolution: - { - integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==, - } - engines: { node: ">= 8" } + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} dependencies: path-key: 3.1.1 shebang-command: 2.0.0 @@ -4741,63 +3553,42 @@ packages: dev: true /custom-event/1.0.1: - resolution: - { - integrity: sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==, - } + resolution: {integrity: sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==} dev: true /dashdash/1.14.1: - resolution: - { - integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==, - } - engines: { node: ">=0.10" } + resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} + engines: {node: '>=0.10'} dependencies: assert-plus: 1.0.0 dev: true /data-uri-to-buffer/4.0.1: - resolution: - { - integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==, - } - engines: { node: ">= 12" } + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} dev: true /data-uri-to-buffer/6.0.1: - resolution: - { - integrity: sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==} + engines: {node: '>= 14'} dev: true /date-format/4.0.14: - resolution: - { - integrity: sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==, - } - engines: { node: ">=4.0" } + resolution: {integrity: sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==} + engines: {node: '>=4.0'} dev: true /debug/2.6.9: - resolution: - { - integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==, - } + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} dependencies: ms: 2.0.0 dev: true /debug/4.3.3_supports-color@8.1.1: - resolution: - { - integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==, - } - engines: { node: ">=6.0" } + resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} + engines: {node: '>=6.0'} peerDependencies: - supports-color: "*" + supports-color: '*' peerDependenciesMeta: supports-color: optional: true @@ -4807,13 +3598,10 @@ packages: dev: true /debug/4.3.4: - resolution: - { - integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==, - } - engines: { node: ">=6.0" } + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} peerDependencies: - supports-color: "*" + supports-color: '*' peerDependenciesMeta: supports-color: optional: true @@ -4821,13 +3609,10 @@ packages: ms: 2.1.2 /debug/4.3.4_supports-color@8.1.1: - resolution: - { - integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==, - } - engines: { node: ">=6.0" } + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} peerDependencies: - supports-color: "*" + supports-color: '*' peerDependenciesMeta: supports-color: optional: true @@ -4837,28 +3622,19 @@ packages: dev: true /decamelize/4.0.0: - resolution: - { - integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} dev: true /deep-eql/4.1.3: - resolution: - { - integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} dependencies: type-detect: 4.0.8 dev: true /deep-equal/2.2.2: - resolution: - { - integrity: sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==, - } + resolution: {integrity: sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==} dependencies: array-buffer-byte-length: 1.0.0 call-bind: 1.0.2 @@ -4881,18 +3657,12 @@ packages: dev: true /deep-is/0.1.4: - resolution: - { - integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==, - } + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true /define-data-property/1.1.0: - resolution: - { - integrity: sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==} + engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.1 gopd: 1.0.1 @@ -4900,19 +3670,13 @@ packages: dev: true /define-lazy-prop/2.0.0: - resolution: - { - integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} dev: true /define-properties/1.2.1: - resolution: - { - integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.0 has-property-descriptors: 1.0.0 @@ -4920,11 +3684,8 @@ packages: dev: true /degenerator/5.0.1: - resolution: - { - integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} + engines: {node: '>= 14'} dependencies: ast-types: 0.13.4 escodegen: 2.1.0 @@ -4932,100 +3693,64 @@ packages: dev: true /delayed-stream/1.0.0: - resolution: - { - integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==, - } - engines: { node: ">=0.4.0" } + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} /depd/2.0.0: - resolution: - { - integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} dev: true /destroy/1.2.0: - resolution: - { - integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==, - } - engines: { node: ">= 0.8", npm: 1.2.8000 || >= 1.4.16 } + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dev: true /devtools-protocol/0.0.1249869: - resolution: - { - integrity: sha512-Ctp4hInA0BEavlUoRy9mhGq0i+JSo/AwVyX2EFgZmV1kYB+Zq+EMBAn52QWu6FbRr10hRb6pBl420upbp4++vg==, - } + resolution: {integrity: sha512-Ctp4hInA0BEavlUoRy9mhGq0i+JSo/AwVyX2EFgZmV1kYB+Zq+EMBAn52QWu6FbRr10hRb6pBl420upbp4++vg==} dev: true /di/0.0.1: - resolution: - { - integrity: sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==, - } + resolution: {integrity: sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==} dev: true /diff-sequences/29.6.3: - resolution: - { - integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==, - } - engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true /diff/4.0.2: - resolution: - { - integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==, - } - engines: { node: ">=0.3.1" } + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} dev: true /diff/5.0.0: - resolution: - { - integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==, - } - engines: { node: ">=0.3.1" } + resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} + engines: {node: '>=0.3.1'} dev: true /dir-glob/3.0.1: - resolution: - { - integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} dependencies: path-type: 4.0.0 dev: true /directory-tree/2.4.0: - resolution: - { - integrity: sha512-AM03Th+ypDAHefyB6SP3uezaWkTbol1P43CS5yFU7wePTuHnR4YoHgY6KbGHLr/a065ocN26l9lXOoFBzzM31w==, - } - engines: { node: ">=10.0" } + resolution: {integrity: sha512-AM03Th+ypDAHefyB6SP3uezaWkTbol1P43CS5yFU7wePTuHnR4YoHgY6KbGHLr/a065ocN26l9lXOoFBzzM31w==} + engines: {node: '>=10.0'} deprecated: Breaking change, bumped to 3.0.0 dev: true /doctrine/3.0.0: - resolution: - { - integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==, - } - engines: { node: ">=6.0.0" } + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} dependencies: esutils: 2.0.3 dev: true /dom-serialize/2.2.1: - resolution: - { - integrity: sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==, - } + resolution: {integrity: sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==} dependencies: custom-event: 1.0.1 ent: 2.2.0 @@ -5034,123 +3759,78 @@ packages: dev: true /dotenv/16.3.1: - resolution: - { - integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} + engines: {node: '>=12'} dev: false /eastasianwidth/0.2.0: - resolution: - { - integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==, - } + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true /ecc-jsbn/0.1.2: - resolution: - { - integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==, - } + resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} dependencies: jsbn: 0.1.1 safer-buffer: 2.1.2 dev: true /ecdsa-sig-formatter/1.0.11: - resolution: - { - integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==, - } + resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} dependencies: safe-buffer: 5.2.1 dev: true /ee-first/1.1.1: - resolution: - { - integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==, - } + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: true /electron-to-chromium/1.4.529: - resolution: - { - integrity: sha512-6uyPyXTo8lkv8SWAmjKFbG42U073TXlzD4R8rW3EzuznhFS2olCIAfjjQtV2dV2ar/vRF55KUd3zQYnCB0dd3A==, - } + resolution: {integrity: sha512-6uyPyXTo8lkv8SWAmjKFbG42U073TXlzD4R8rW3EzuznhFS2olCIAfjjQtV2dV2ar/vRF55KUd3zQYnCB0dd3A==} dev: true /electron-to-chromium/1.4.798: - resolution: - { - integrity: sha512-by9J2CiM9KPGj9qfp5U4FcPSbXJG7FNzqnYaY4WLzX+v2PHieVGmnsA4dxfpGE3QEC7JofpPZmn7Vn1B9NR2+Q==, - } + resolution: {integrity: sha512-by9J2CiM9KPGj9qfp5U4FcPSbXJG7FNzqnYaY4WLzX+v2PHieVGmnsA4dxfpGE3QEC7JofpPZmn7Vn1B9NR2+Q==} dev: true /emoji-regex/8.0.0: - resolution: - { - integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==, - } + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} /emoji-regex/9.2.2: - resolution: - { - integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==, - } + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true /emojis-list/3.0.0: - resolution: - { - integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==, - } - engines: { node: ">= 4" } + resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} + engines: {node: '>= 4'} dev: true /enabled/2.0.0: - resolution: - { - integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==, - } + resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} dev: true /encodeurl/1.0.2: - resolution: - { - integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} + engines: {node: '>= 0.8'} dev: true /end-of-stream/1.4.4: - resolution: - { - integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==, - } + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} dependencies: once: 1.4.0 dev: true /engine.io-parser/5.2.1: - resolution: - { - integrity: sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==, - } - engines: { node: ">=10.0.0" } + resolution: {integrity: sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==} + engines: {node: '>=10.0.0'} dev: true /engine.io/6.5.2: - resolution: - { - integrity: sha512-IXsMcGpw/xRfjra46sVZVHiSWo/nJ/3g1337q9KNXtS6YRzbW5yIzTCb9DjhrBe7r3GZQR0I4+nq+4ODk5g/cA==, - } - engines: { node: ">=10.2.0" } - dependencies: - "@types/cookie": 0.4.1 - "@types/cors": 2.8.14 - "@types/node": 18.18.0 + resolution: {integrity: sha512-IXsMcGpw/xRfjra46sVZVHiSWo/nJ/3g1337q9KNXtS6YRzbW5yIzTCb9DjhrBe7r3GZQR0I4+nq+4ODk5g/cA==} + engines: {node: '>=10.2.0'} + dependencies: + '@types/cookie': 0.4.1 + '@types/cors': 2.8.14 + '@types/node': 18.18.0 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -5165,62 +3845,41 @@ packages: dev: true /enhanced-resolve/5.15.0: - resolution: - { - integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==, - } - engines: { node: ">=10.13.0" } + resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} + engines: {node: '>=10.13.0'} dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 dev: true /ent/2.2.0: - resolution: - { - integrity: sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==, - } + resolution: {integrity: sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==} dev: true /entities/2.0.3: - resolution: - { - integrity: sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==, - } + resolution: {integrity: sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==} dev: true /env-paths/2.2.1: - resolution: - { - integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} dev: true /envinfo/7.10.0: - resolution: - { - integrity: sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==} + engines: {node: '>=4'} hasBin: true dev: true /error-ex/1.3.2: - resolution: - { - integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==, - } + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: is-arrayish: 0.2.1 dev: true /es-abstract/1.22.2: - resolution: - { - integrity: sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==} + engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 arraybuffer.prototype.slice: 1.0.2 @@ -5264,10 +3923,7 @@ packages: dev: true /es-get-iterator/1.1.3: - resolution: - { - integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==, - } + resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 @@ -5281,18 +3937,12 @@ packages: dev: true /es-module-lexer/1.3.1: - resolution: - { - integrity: sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==, - } + resolution: {integrity: sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==} dev: true /es-set-tostringtag/2.0.1: - resolution: - { - integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} + engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.1 has: 1.0.3 @@ -5300,11 +3950,8 @@ packages: dev: true /es-to-primitive/1.2.1: - resolution: - { - integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} dependencies: is-callable: 1.2.7 is-date-object: 1.0.5 @@ -5312,117 +3959,93 @@ packages: dev: true /esbuild/0.20.2: - resolution: - { - integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} + engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - "@esbuild/aix-ppc64": 0.20.2 - "@esbuild/android-arm": 0.20.2 - "@esbuild/android-arm64": 0.20.2 - "@esbuild/android-x64": 0.20.2 - "@esbuild/darwin-arm64": 0.20.2 - "@esbuild/darwin-x64": 0.20.2 - "@esbuild/freebsd-arm64": 0.20.2 - "@esbuild/freebsd-x64": 0.20.2 - "@esbuild/linux-arm": 0.20.2 - "@esbuild/linux-arm64": 0.20.2 - "@esbuild/linux-ia32": 0.20.2 - "@esbuild/linux-loong64": 0.20.2 - "@esbuild/linux-mips64el": 0.20.2 - "@esbuild/linux-ppc64": 0.20.2 - "@esbuild/linux-riscv64": 0.20.2 - "@esbuild/linux-s390x": 0.20.2 - "@esbuild/linux-x64": 0.20.2 - "@esbuild/netbsd-x64": 0.20.2 - "@esbuild/openbsd-x64": 0.20.2 - "@esbuild/sunos-x64": 0.20.2 - "@esbuild/win32-arm64": 0.20.2 - "@esbuild/win32-ia32": 0.20.2 - "@esbuild/win32-x64": 0.20.2 + '@esbuild/aix-ppc64': 0.20.2 + '@esbuild/android-arm': 0.20.2 + '@esbuild/android-arm64': 0.20.2 + '@esbuild/android-x64': 0.20.2 + '@esbuild/darwin-arm64': 0.20.2 + '@esbuild/darwin-x64': 0.20.2 + '@esbuild/freebsd-arm64': 0.20.2 + '@esbuild/freebsd-x64': 0.20.2 + '@esbuild/linux-arm': 0.20.2 + '@esbuild/linux-arm64': 0.20.2 + '@esbuild/linux-ia32': 0.20.2 + '@esbuild/linux-loong64': 0.20.2 + '@esbuild/linux-mips64el': 0.20.2 + '@esbuild/linux-ppc64': 0.20.2 + '@esbuild/linux-riscv64': 0.20.2 + '@esbuild/linux-s390x': 0.20.2 + '@esbuild/linux-x64': 0.20.2 + '@esbuild/netbsd-x64': 0.20.2 + '@esbuild/openbsd-x64': 0.20.2 + '@esbuild/sunos-x64': 0.20.2 + '@esbuild/win32-arm64': 0.20.2 + '@esbuild/win32-ia32': 0.20.2 + '@esbuild/win32-x64': 0.20.2 dev: true /esbuild/0.23.0: - resolution: - { - integrity: sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==} + engines: {node: '>=18'} hasBin: true requiresBuild: true optionalDependencies: - "@esbuild/aix-ppc64": 0.23.0 - "@esbuild/android-arm": 0.23.0 - "@esbuild/android-arm64": 0.23.0 - "@esbuild/android-x64": 0.23.0 - "@esbuild/darwin-arm64": 0.23.0 - "@esbuild/darwin-x64": 0.23.0 - "@esbuild/freebsd-arm64": 0.23.0 - "@esbuild/freebsd-x64": 0.23.0 - "@esbuild/linux-arm": 0.23.0 - "@esbuild/linux-arm64": 0.23.0 - "@esbuild/linux-ia32": 0.23.0 - "@esbuild/linux-loong64": 0.23.0 - "@esbuild/linux-mips64el": 0.23.0 - "@esbuild/linux-ppc64": 0.23.0 - "@esbuild/linux-riscv64": 0.23.0 - "@esbuild/linux-s390x": 0.23.0 - "@esbuild/linux-x64": 0.23.0 - "@esbuild/netbsd-x64": 0.23.0 - "@esbuild/openbsd-arm64": 0.23.0 - "@esbuild/openbsd-x64": 0.23.0 - "@esbuild/sunos-x64": 0.23.0 - "@esbuild/win32-arm64": 0.23.0 - "@esbuild/win32-ia32": 0.23.0 - "@esbuild/win32-x64": 0.23.0 + '@esbuild/aix-ppc64': 0.23.0 + '@esbuild/android-arm': 0.23.0 + '@esbuild/android-arm64': 0.23.0 + '@esbuild/android-x64': 0.23.0 + '@esbuild/darwin-arm64': 0.23.0 + '@esbuild/darwin-x64': 0.23.0 + '@esbuild/freebsd-arm64': 0.23.0 + '@esbuild/freebsd-x64': 0.23.0 + '@esbuild/linux-arm': 0.23.0 + '@esbuild/linux-arm64': 0.23.0 + '@esbuild/linux-ia32': 0.23.0 + '@esbuild/linux-loong64': 0.23.0 + '@esbuild/linux-mips64el': 0.23.0 + '@esbuild/linux-ppc64': 0.23.0 + '@esbuild/linux-riscv64': 0.23.0 + '@esbuild/linux-s390x': 0.23.0 + '@esbuild/linux-x64': 0.23.0 + '@esbuild/netbsd-x64': 0.23.0 + '@esbuild/openbsd-arm64': 0.23.0 + '@esbuild/openbsd-x64': 0.23.0 + '@esbuild/sunos-x64': 0.23.0 + '@esbuild/win32-arm64': 0.23.0 + '@esbuild/win32-ia32': 0.23.0 + '@esbuild/win32-x64': 0.23.0 dev: true /escalade/3.1.1: - resolution: - { - integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} /escalade/3.1.2: - resolution: - { - integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} dev: true /escape-html/1.0.3: - resolution: - { - integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==, - } + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} dev: true /escape-string-regexp/1.0.5: - resolution: - { - integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==, - } - engines: { node: ">=0.8.0" } + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} /escape-string-regexp/4.0.0: - resolution: - { - integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} dev: true /escodegen/2.1.0: - resolution: - { - integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==, - } - engines: { node: ">=6.0" } + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} hasBin: true dependencies: esprima: 4.0.1 @@ -5433,62 +4056,47 @@ packages: dev: true /eslint-plugin-require-extensions/0.1.3_eslint@8.50.0: - resolution: - { - integrity: sha512-T3c1PZ9PIdI3hjV8LdunfYI8gj017UQjzAnCrxuo3wAjneDbTPHdE3oNWInOjMA+z/aBkUtlW5vC0YepYMZIug==, - } - engines: { node: ">=16" } + resolution: {integrity: sha512-T3c1PZ9PIdI3hjV8LdunfYI8gj017UQjzAnCrxuo3wAjneDbTPHdE3oNWInOjMA+z/aBkUtlW5vC0YepYMZIug==} + engines: {node: '>=16'} peerDependencies: - eslint: "*" + eslint: '*' dependencies: eslint: 8.50.0 dev: true /eslint-scope/5.1.1: - resolution: - { - integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==, - } - engines: { node: ">=8.0.0" } + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 dev: true /eslint-scope/7.2.2: - resolution: - { - integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==, - } - engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 dev: true /eslint-visitor-keys/3.4.3: - resolution: - { - integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==, - } - engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true /eslint/8.50.0: - resolution: - { - integrity: sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==, - } - engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + resolution: {integrity: sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - "@eslint-community/eslint-utils": 4.4.0_eslint@8.50.0 - "@eslint-community/regexpp": 4.8.2 - "@eslint/eslintrc": 2.1.2 - "@eslint/js": 8.50.0 - "@humanwhocodes/config-array": 0.11.11 - "@humanwhocodes/module-importer": 1.0.1 - "@nodelib/fs.walk": 1.2.8 + '@eslint-community/eslint-utils': 4.4.0_eslint@8.50.0 + '@eslint-community/regexpp': 4.8.2 + '@eslint/eslintrc': 2.1.2 + '@eslint/js': 8.50.0 + '@humanwhocodes/config-array': 0.11.11 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 @@ -5524,11 +4132,8 @@ packages: dev: true /espree/9.6.1: - resolution: - { - integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==, - } - engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.10.0 acorn-jsx: 5.3.2_acorn@8.10.0 @@ -5536,96 +4141,63 @@ packages: dev: true /esprima/4.0.1: - resolution: - { - integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} hasBin: true dev: true /esquery/1.5.0: - resolution: - { - integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==, - } - engines: { node: ">=0.10" } + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + engines: {node: '>=0.10'} dependencies: estraverse: 5.3.0 dev: true /esrecurse/4.3.0: - resolution: - { - integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==, - } - engines: { node: ">=4.0" } + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} dependencies: estraverse: 5.3.0 dev: true /estraverse/4.3.0: - resolution: - { - integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==, - } - engines: { node: ">=4.0" } + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} dev: true /estraverse/5.3.0: - resolution: - { - integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==, - } - engines: { node: ">=4.0" } + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} dev: true /estree-walker/3.0.3: - resolution: - { - integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==, - } + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} dependencies: - "@types/estree": 1.0.5 + '@types/estree': 1.0.5 dev: true /esutils/2.0.3: - resolution: - { - integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} dev: true /etag/1.8.1: - resolution: - { - integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} dev: true /eventemitter3/4.0.7: - resolution: - { - integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==, - } + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} dev: true /events/3.3.0: - resolution: - { - integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==, - } - engines: { node: ">=0.8.x" } + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} dev: true /execa/8.0.1: - resolution: - { - integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==, - } - engines: { node: ">=16.17" } + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} dependencies: cross-spawn: 7.0.3 get-stream: 8.0.1 @@ -5639,16 +4211,13 @@ packages: dev: true /express-promise-router/4.1.1_express@4.18.2: - resolution: - { - integrity: sha512-Lkvcy/ZGrBhzkl3y7uYBHLMtLI4D6XQ2kiFg9dq7fbktBch5gjqJ0+KovX0cvCAvTJw92raWunRLM/OM+5l4fA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-Lkvcy/ZGrBhzkl3y7uYBHLMtLI4D6XQ2kiFg9dq7fbktBch5gjqJ0+KovX0cvCAvTJw92raWunRLM/OM+5l4fA==} + engines: {node: '>=10'} peerDependencies: - "@types/express": ^4.0.0 + '@types/express': ^4.0.0 express: ^4.0.0 peerDependenciesMeta: - "@types/express": + '@types/express': optional: true dependencies: express: 4.18.2 @@ -5658,16 +4227,13 @@ packages: dev: true /express-promise-router/4.1.1_express@4.19.2: - resolution: - { - integrity: sha512-Lkvcy/ZGrBhzkl3y7uYBHLMtLI4D6XQ2kiFg9dq7fbktBch5gjqJ0+KovX0cvCAvTJw92raWunRLM/OM+5l4fA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-Lkvcy/ZGrBhzkl3y7uYBHLMtLI4D6XQ2kiFg9dq7fbktBch5gjqJ0+KovX0cvCAvTJw92raWunRLM/OM+5l4fA==} + engines: {node: '>=10'} peerDependencies: - "@types/express": ^4.0.0 + '@types/express': ^4.0.0 express: ^4.0.0 peerDependenciesMeta: - "@types/express": + '@types/express': optional: true dependencies: express: 4.19.2 @@ -5677,11 +4243,8 @@ packages: dev: true /express/4.18.2: - resolution: - { - integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==, - } - engines: { node: ">= 0.10.0" } + resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==} + engines: {node: '>= 0.10.0'} dependencies: accepts: 1.3.8 array-flatten: 1.1.1 @@ -5717,11 +4280,8 @@ packages: dev: true /express/4.19.2: - resolution: - { - integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==, - } - engines: { node: ">= 0.10.0" } + resolution: {integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==} + engines: {node: '>= 0.10.0'} dependencies: accepts: 1.3.8 array-flatten: 1.1.1 @@ -5757,161 +4317,107 @@ packages: dev: true /extend/3.0.2: - resolution: - { - integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==, - } + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} dev: true /extract-zip/2.0.1: - resolution: - { - integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==, - } - engines: { node: ">= 10.17.0" } + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} hasBin: true dependencies: debug: 4.3.4 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: - "@types/yauzl": 2.10.1 + '@types/yauzl': 2.10.1 transitivePeerDependencies: - supports-color dev: true /extsprintf/1.3.0: - resolution: - { - integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==, - } - engines: { "0": node >=0.6.0 } + resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==} + engines: {'0': node >=0.6.0} dev: true /fast-deep-equal/3.1.3: - resolution: - { - integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==, - } + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} /fast-fifo/1.3.2: - resolution: - { - integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==, - } + resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} dev: true /fast-glob/3.3.2: - resolution: - { - integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==, - } - engines: { node: ">=8.6.0" } - dependencies: - "@nodelib/fs.stat": 2.0.5 - "@nodelib/fs.walk": 1.2.8 + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 micromatch: 4.0.5 /fast-json-stable-stringify/2.1.0: - resolution: - { - integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==, - } + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true /fast-levenshtein/2.0.6: - resolution: - { - integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==, - } + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true /fast-uri/3.0.1: - resolution: - { - integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==, - } + resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==} /fast-xml-parser/4.3.1: - resolution: - { - integrity: sha512-viVv3xb8D+SiS1W4cv4tva3bni08kAkx0gQnWrykMM8nXPc1FxqZPU00dCEVjkiCg4HoXd2jC4x29Nzg/l2DAA==, - } + resolution: {integrity: sha512-viVv3xb8D+SiS1W4cv4tva3bni08kAkx0gQnWrykMM8nXPc1FxqZPU00dCEVjkiCg4HoXd2jC4x29Nzg/l2DAA==} hasBin: true dependencies: strnum: 1.0.5 dev: true /fastest-levenshtein/1.0.16: - resolution: - { - integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==, - } - engines: { node: ">= 4.9.1" } + resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} + engines: {node: '>= 4.9.1'} dev: true /fastq/1.15.0: - resolution: - { - integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==, - } + resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: reusify: 1.0.4 /fd-slicer/1.1.0: - resolution: - { - integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==, - } + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} dependencies: pend: 1.2.0 dev: true /fecha/4.2.3: - resolution: - { - integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==, - } + resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} dev: true /fetch-blob/3.2.0: - resolution: - { - integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==, - } - engines: { node: ^12.20 || >= 14.13 } + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} dependencies: node-domexception: 1.0.0 web-streams-polyfill: 3.2.1 dev: true /file-entry-cache/6.0.1: - resolution: - { - integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==, - } - engines: { node: ^10.12.0 || >=12.0.0 } + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} dependencies: flat-cache: 3.1.0 dev: true /fill-range/7.0.1: - resolution: - { - integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 /finalhandler/1.1.2: - resolution: - { - integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} + engines: {node: '>= 0.8'} dependencies: debug: 2.6.9 encodeurl: 1.0.2 @@ -5923,11 +4429,8 @@ packages: dev: true /finalhandler/1.2.0: - resolution: - { - integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} + engines: {node: '>= 0.8'} dependencies: debug: 2.6.9 encodeurl: 1.0.2 @@ -5939,33 +4442,24 @@ packages: dev: true /find-up/4.1.0: - resolution: - { - integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} dependencies: locate-path: 5.0.0 path-exists: 4.0.0 dev: true /find-up/5.0.0: - resolution: - { - integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} dependencies: locate-path: 6.0.0 path-exists: 4.0.0 dev: true /flat-cache/3.1.0: - resolution: - { - integrity: sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==, - } - engines: { node: ">=12.0.0" } + resolution: {integrity: sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==} + engines: {node: '>=12.0.0'} dependencies: flatted: 3.2.9 keyv: 4.5.3 @@ -5973,73 +4467,49 @@ packages: dev: true /flat/5.0.2: - resolution: - { - integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==, - } + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true dev: true /flatted/3.2.9: - resolution: - { - integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==, - } + resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true /fn.name/1.1.0: - resolution: - { - integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==, - } + resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} dev: true /follow-redirects/1.15.3: - resolution: - { - integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==, - } - engines: { node: ">=4.0" } + resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} + engines: {node: '>=4.0'} peerDependencies: - debug: "*" + debug: '*' peerDependenciesMeta: debug: optional: true dev: true /for-each/0.3.3: - resolution: - { - integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==, - } + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 dev: true /foreground-child/3.1.1: - resolution: - { - integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==, - } - engines: { node: ">=14" } + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 dev: true /forever-agent/0.6.1: - resolution: - { - integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==, - } + resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} dev: true /form-data/2.3.3: - resolution: - { - integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==, - } - engines: { node: ">= 0.12" } + resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} + engines: {node: '>= 0.12'} dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 @@ -6047,48 +4517,33 @@ packages: dev: true /form-data/4.0.0: - resolution: - { - integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==, - } - engines: { node: ">= 6" } + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 /formdata-polyfill/4.0.10: - resolution: - { - integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==, - } - engines: { node: ">=12.20.0" } + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} dependencies: fetch-blob: 3.2.0 dev: true /forwarded/0.2.0: - resolution: - { - integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} dev: true /fresh/0.5.2: - resolution: - { - integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} + engines: {node: '>= 0.6'} dev: true /fs-extra/10.1.0: - resolution: - { - integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} dependencies: graceful-fs: 4.2.11 jsonfile: 6.1.0 @@ -6096,11 +4551,8 @@ packages: dev: true /fs-extra/11.1.1: - resolution: - { - integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==, - } - engines: { node: ">=14.14" } + resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} + engines: {node: '>=14.14'} dependencies: graceful-fs: 4.2.11 jsonfile: 6.1.0 @@ -6108,11 +4560,8 @@ packages: dev: false /fs-extra/7.0.1: - resolution: - { - integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==, - } - engines: { node: ">=6 <7 || >=8" } + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} dependencies: graceful-fs: 4.2.11 jsonfile: 4.0.0 @@ -6120,11 +4569,8 @@ packages: dev: true /fs-extra/8.1.0: - resolution: - { - integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==, - } - engines: { node: ">=6 <7 || >=8" } + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} dependencies: graceful-fs: 4.2.11 jsonfile: 4.0.0 @@ -6132,36 +4578,24 @@ packages: dev: true /fs.realpath/1.0.0: - resolution: - { - integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==, - } + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true /fsevents/2.3.3: - resolution: - { - integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, - } - engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true dev: true optional: true /function-bind/1.1.1: - resolution: - { - integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==, - } + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true /function.prototype.name/1.1.6: - resolution: - { - integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.1 @@ -6170,46 +4604,28 @@ packages: dev: true /functions-have-names/1.2.3: - resolution: - { - integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==, - } + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true /gensync/1.0.0-beta.2: - resolution: - { - integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==, - } - engines: { node: ">=6.9.0" } + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} dev: true /get-caller-file/2.0.5: - resolution: - { - integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==, - } - engines: { node: 6.* || 8.* || >= 10.* } + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} /get-func-name/2.0.0: - resolution: - { - integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==, - } + resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} dev: true /get-func-name/2.0.2: - resolution: - { - integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==, - } + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} dev: true /get-intrinsic/1.2.1: - resolution: - { - integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==, - } + resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: function-bind: 1.1.1 has: 1.0.3 @@ -6218,49 +4634,34 @@ packages: dev: true /get-stream/5.2.0: - resolution: - { - integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} dependencies: pump: 3.0.0 dev: true /get-stream/8.0.1: - resolution: - { - integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==, - } - engines: { node: ">=16" } + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} dev: true /get-symbol-description/1.0.0: - resolution: - { - integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 dev: true /get-tsconfig/4.7.6: - resolution: - { - integrity: sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==, - } + resolution: {integrity: sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==} dependencies: resolve-pkg-maps: 1.0.0 dev: true /get-uri/6.0.2: - resolution: - { - integrity: sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==} + engines: {node: '>= 14'} dependencies: basic-ftp: 5.0.4 data-uri-to-buffer: 6.0.1 @@ -6271,46 +4672,31 @@ packages: dev: true /getpass/0.1.7: - resolution: - { - integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==, - } + resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} dependencies: assert-plus: 1.0.0 dev: true /glob-parent/5.1.2: - resolution: - { - integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==, - } - engines: { node: ">= 6" } + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} dependencies: is-glob: 4.0.3 /glob-parent/6.0.2: - resolution: - { - integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==, - } - engines: { node: ">=10.13.0" } + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 dev: true /glob-to-regexp/0.4.1: - resolution: - { - integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==, - } + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} dev: true /glob/10.3.9: - resolution: - { - integrity: sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==, - } - engines: { node: ">=16 || 14 >=14.17" } + resolution: {integrity: sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==} + engines: {node: '>=16 || 14 >=14.17'} hasBin: true dependencies: foreground-child: 3.1.1 @@ -6321,11 +4707,8 @@ packages: dev: true /glob/11.0.0: - resolution: - { - integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==, - } - engines: { node: 20 || >=22 } + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} hasBin: true dependencies: foreground-child: 3.1.1 @@ -6337,10 +4720,7 @@ packages: dev: true /glob/7.2.0: - resolution: - { - integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==, - } + resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -6351,10 +4731,7 @@ packages: dev: true /glob/7.2.3: - resolution: - { - integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==, - } + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -6365,11 +4742,8 @@ packages: dev: true /glob/8.1.0: - resolution: - { - integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -6379,39 +4753,27 @@ packages: dev: true /globals/11.12.0: - resolution: - { - integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} dev: true /globals/13.22.0: - resolution: - { - integrity: sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==} + engines: {node: '>=8'} dependencies: type-fest: 0.20.2 dev: true /globalthis/1.0.3: - resolution: - { - integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} dependencies: define-properties: 1.2.1 dev: true /globby/11.1.0: - resolution: - { - integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} dependencies: array-union: 2.1.0 dir-glob: 3.0.1 @@ -6422,13 +4784,10 @@ packages: dev: true /globby/14.0.2: - resolution: - { - integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==} + engines: {node: '>=18'} dependencies: - "@sindresorhus/merge-streams": 2.3.0 + '@sindresorhus/merge-streams': 2.3.0 fast-glob: 3.3.2 ignore: 5.2.4 path-type: 5.0.0 @@ -6436,48 +4795,30 @@ packages: unicorn-magic: 0.1.0 /gopd/1.0.1: - resolution: - { - integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==, - } + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: get-intrinsic: 1.2.1 dev: true /graceful-fs/4.2.11: - resolution: - { - integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==, - } + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} /grapheme-splitter/1.0.4: - resolution: - { - integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==, - } + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: false /graphemer/1.4.0: - resolution: - { - integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==, - } + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true /growl/1.10.5: - resolution: - { - integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==, - } - engines: { node: ">=4.x" } + resolution: {integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==} + engines: {node: '>=4.x'} dev: true /handlebars/4.7.8: - resolution: - { - integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==, - } - engines: { node: ">=0.4.7" } + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} + engines: {node: '>=0.4.7'} hasBin: true dependencies: minimist: 1.2.8 @@ -6489,19 +4830,13 @@ packages: dev: false /har-schema/2.0.0: - resolution: - { - integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==} + engines: {node: '>=4'} dev: true /har-validator/5.1.5: - resolution: - { - integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==} + engines: {node: '>=6'} deprecated: this library is no longer supported dependencies: ajv: 6.12.6 @@ -6509,99 +4844,63 @@ packages: dev: true /has-bigints/1.0.2: - resolution: - { - integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==, - } + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true /has-flag/3.0.0: - resolution: - { - integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} /has-flag/4.0.0: - resolution: - { - integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} /has-property-descriptors/1.0.0: - resolution: - { - integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==, - } + resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: get-intrinsic: 1.2.1 dev: true /has-proto/1.0.1: - resolution: - { - integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} dev: true /has-symbols/1.0.3: - resolution: - { - integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} dev: true /has-tostringtag/1.0.0: - resolution: - { - integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true /has/1.0.3: - resolution: - { - integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==, - } - engines: { node: ">= 0.4.0" } + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} dependencies: function-bind: 1.1.1 dev: true /he/1.2.0: - resolution: - { - integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==, - } + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true dev: true /hosted-git-info/2.8.9: - resolution: - { - integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==, - } + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true /html-escaper/2.0.2: - resolution: - { - integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==, - } + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true /http-errors/2.0.0: - resolution: - { - integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + engines: {node: '>= 0.8'} dependencies: depd: 2.0.0 inherits: 2.0.4 @@ -6611,24 +4910,18 @@ packages: dev: true /http-proxy-agent/5.0.0: - resolution: - { - integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==, - } - engines: { node: ">= 6" } + resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} + engines: {node: '>= 6'} dependencies: - "@tootallnate/once": 2.0.0 + '@tootallnate/once': 2.0.0 agent-base: 6.0.2 debug: 4.3.4 transitivePeerDependencies: - supports-color /http-proxy-agent/7.0.0: - resolution: - { - integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==} + engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 debug: 4.3.4 @@ -6637,11 +4930,8 @@ packages: dev: true /http-proxy-agent/7.0.2: - resolution: - { - integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 debug: 4.3.4 @@ -6650,11 +4940,8 @@ packages: dev: true /http-proxy/1.18.1: - resolution: - { - integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==, - } - engines: { node: ">=8.0.0" } + resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} + engines: {node: '>=8.0.0'} dependencies: eventemitter3: 4.0.7 follow-redirects: 1.15.3 @@ -6664,11 +4951,8 @@ packages: dev: true /http-signature/1.2.0: - resolution: - { - integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==, - } - engines: { node: ">=0.8", npm: ">=1.3.7" } + resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==} + engines: {node: '>=0.8', npm: '>=1.3.7'} dependencies: assert-plus: 1.0.0 jsprim: 1.4.2 @@ -6676,11 +4960,8 @@ packages: dev: true /https-proxy-agent/5.0.1: - resolution: - { - integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==, - } - engines: { node: ">= 6" } + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} dependencies: agent-base: 6.0.2 debug: 4.3.4 @@ -6688,11 +4969,8 @@ packages: - supports-color /https-proxy-agent/7.0.2: - resolution: - { - integrity: sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==} + engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 debug: 4.3.4 @@ -6701,11 +4979,8 @@ packages: dev: true /https-proxy-agent/7.0.4: - resolution: - { - integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==} + engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 debug: 4.3.4 @@ -6714,72 +4989,48 @@ packages: dev: true /human-signals/5.0.0: - resolution: - { - integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==, - } - engines: { node: ">=16.17.0" } + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} dev: true /iconv-lite/0.4.24: - resolution: - { - integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 dev: true /iconv-lite/0.6.3: - resolution: - { - integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 dev: true /ieee754/1.2.1: - resolution: - { - integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==, - } + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true /ignore/5.2.4: - resolution: - { - integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==, - } - engines: { node: ">= 4" } + resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} + engines: {node: '>= 4'} /import-fresh/3.3.0: - resolution: - { - integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 dev: true /import-lazy/4.0.0: - resolution: - { - integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} dev: true /import-local/3.1.0: - resolution: - { - integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} + engines: {node: '>=8'} hasBin: true dependencies: pkg-dir: 4.2.0 @@ -6787,18 +5038,12 @@ packages: dev: true /imurmurhash/0.1.4: - resolution: - { - integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==, - } - engines: { node: ">=0.8.19" } + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} dev: true /inflight/1.0.6: - resolution: - { - integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==, - } + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. dependencies: once: 1.4.0 @@ -6806,18 +5051,12 @@ packages: dev: true /inherits/2.0.4: - resolution: - { - integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==, - } + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} dev: true /internal-slot/1.0.5: - resolution: - { - integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} + engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.1 has: 1.0.3 @@ -6825,51 +5064,33 @@ packages: dev: true /interpret/2.2.0: - resolution: - { - integrity: sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==, - } - engines: { node: ">= 0.10" } + resolution: {integrity: sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==} + engines: {node: '>= 0.10'} dev: true /ip/1.1.8: - resolution: - { - integrity: sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==, - } + resolution: {integrity: sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==} dev: true /ip/2.0.0: - resolution: - { - integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==, - } + resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==} dev: true /ipaddr.js/1.9.1: - resolution: - { - integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==, - } - engines: { node: ">= 0.10" } + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} dev: true /is-arguments/1.1.1: - resolution: - { - integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 has-tostringtag: 1.0.0 dev: true /is-array-buffer/3.0.2: - resolution: - { - integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==, - } + resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 @@ -6877,366 +5098,237 @@ packages: dev: true /is-arrayish/0.2.1: - resolution: - { - integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==, - } + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true /is-arrayish/0.3.2: - resolution: - { - integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==, - } + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} dev: true /is-bigint/1.0.4: - resolution: - { - integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==, - } + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: has-bigints: 1.0.2 dev: true /is-binary-path/2.1.0: - resolution: - { - integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} dependencies: binary-extensions: 2.2.0 dev: true /is-boolean-object/1.1.2: - resolution: - { - integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 has-tostringtag: 1.0.0 dev: true /is-callable/1.2.7: - resolution: - { - integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} dev: true /is-core-module/2.13.0: - resolution: - { - integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==, - } + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: has: 1.0.3 dev: true /is-date-object/1.0.5: - resolution: - { - integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 dev: true /is-docker/2.2.1: - resolution: - { - integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} hasBin: true dev: true /is-extglob/2.1.1: - resolution: - { - integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} /is-fullwidth-code-point/3.0.0: - resolution: - { - integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} /is-glob/4.0.3: - resolution: - { - integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 /is-map/2.0.2: - resolution: - { - integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==, - } + resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} dev: true /is-negative-zero/2.0.2: - resolution: - { - integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} + engines: {node: '>= 0.4'} dev: true /is-number-object/1.0.7: - resolution: - { - integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 dev: true /is-number/7.0.0: - resolution: - { - integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==, - } - engines: { node: ">=0.12.0" } + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} /is-path-inside/3.0.3: - resolution: - { - integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} dev: true /is-plain-obj/2.1.0: - resolution: - { - integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} dev: true /is-plain-object/2.0.4: - resolution: - { - integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} + engines: {node: '>=0.10.0'} dependencies: isobject: 3.0.1 dev: true /is-promise/4.0.0: - resolution: - { - integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==, - } + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} dev: true /is-regex/1.1.4: - resolution: - { - integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 has-tostringtag: 1.0.0 dev: true /is-set/2.0.2: - resolution: - { - integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==, - } + resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==} dev: true /is-shared-array-buffer/1.0.2: - resolution: - { - integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==, - } + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: call-bind: 1.0.2 dev: true /is-stream/2.0.1: - resolution: - { - integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} dev: true /is-stream/3.0.0: - resolution: - { - integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==, - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true /is-string/1.0.7: - resolution: - { - integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 dev: true /is-symbol/1.0.4: - resolution: - { - integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true /is-typed-array/1.1.12: - resolution: - { - integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} + engines: {node: '>= 0.4'} dependencies: which-typed-array: 1.1.11 dev: true /is-typedarray/1.0.0: - resolution: - { - integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==, - } + resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: true /is-unicode-supported/0.1.0: - resolution: - { - integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} dev: true /is-weakmap/2.0.1: - resolution: - { - integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==, - } + resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==} dev: true /is-weakref/1.0.2: - resolution: - { - integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==, - } + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.2 dev: true /is-weakset/2.0.2: - resolution: - { - integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==, - } + resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 dev: true /is-wsl/2.2.0: - resolution: - { - integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} dependencies: is-docker: 2.2.1 dev: true /isarray/0.0.1: - resolution: - { - integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==, - } + resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} dev: true /isarray/1.0.0: - resolution: - { - integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==, - } + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} dev: true /isarray/2.0.5: - resolution: - { - integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==, - } + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true /isbinaryfile/4.0.10: - resolution: - { - integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==, - } - engines: { node: ">= 8.0.0" } + resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} + engines: {node: '>= 8.0.0'} dev: true /isexe/2.0.0: - resolution: - { - integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==, - } + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true /isobject/3.0.1: - resolution: - { - integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} + engines: {node: '>=0.10.0'} dev: true /isstream/0.1.2: - resolution: - { - integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==, - } + resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} dev: true /istanbul-lib-coverage/3.2.2: - resolution: - { - integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} dev: true /istanbul-lib-instrument/6.0.2: - resolution: - { - integrity: sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==, - } - engines: { node: ">=10" } - dependencies: - "@babel/core": 7.24.7 - "@babel/parser": 7.24.7 - "@istanbuljs/schema": 0.1.3 + resolution: {integrity: sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==} + engines: {node: '>=10'} + dependencies: + '@babel/core': 7.24.7 + '@babel/parser': 7.24.7 + '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 7.6.3 transitivePeerDependencies: @@ -7244,11 +5336,8 @@ packages: dev: true /istanbul-lib-report/3.0.1: - resolution: - { - integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} dependencies: istanbul-lib-coverage: 3.2.2 make-dir: 4.0.0 @@ -7256,13 +5345,10 @@ packages: dev: true /istanbul-lib-source-maps/5.0.4: - resolution: - { - integrity: sha512-wHOoEsNJTVltaJp8eVkm8w+GVkVNHT2YDYo53YdzQEL2gWm1hBX5cGFR9hQJtuGLebidVX7et3+dmDZrmclduw==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-wHOoEsNJTVltaJp8eVkm8w+GVkVNHT2YDYo53YdzQEL2gWm1hBX5cGFR9hQJtuGLebidVX7et3+dmDZrmclduw==} + engines: {node: '>=10'} dependencies: - "@jridgewell/trace-mapping": 0.3.25 + '@jridgewell/trace-mapping': 0.3.25 debug: 4.3.4 istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: @@ -7270,215 +5356,140 @@ packages: dev: true /istanbul-reports/3.1.7: - resolution: - { - integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} + engines: {node: '>=8'} dependencies: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 dev: true /jackspeak/2.3.5: - resolution: - { - integrity: sha512-Ratx+B8WeXLAtRJn26hrhY8S1+Jz6pxPMrkrdkgb/NstTNiqMhX0/oFVu5wX+g5n6JlEu2LPsDJmY8nRP4+alw==, - } - engines: { node: ">=14" } + resolution: {integrity: sha512-Ratx+B8WeXLAtRJn26hrhY8S1+Jz6pxPMrkrdkgb/NstTNiqMhX0/oFVu5wX+g5n6JlEu2LPsDJmY8nRP4+alw==} + engines: {node: '>=14'} dependencies: - "@isaacs/cliui": 8.0.2 + '@isaacs/cliui': 8.0.2 optionalDependencies: - "@pkgjs/parseargs": 0.11.0 + '@pkgjs/parseargs': 0.11.0 dev: true /jackspeak/4.0.1: - resolution: - { - integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==, - } - engines: { node: 20 || >=22 } + resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==} + engines: {node: 20 || >=22} dependencies: - "@isaacs/cliui": 8.0.2 + '@isaacs/cliui': 8.0.2 optionalDependencies: - "@pkgjs/parseargs": 0.11.0 + '@pkgjs/parseargs': 0.11.0 dev: true /jest-worker/27.5.1: - resolution: - { - integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==, - } - engines: { node: ">= 10.13.0" } + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} + engines: {node: '>= 10.13.0'} dependencies: - "@types/node": 18.18.0 + '@types/node': 18.18.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true /jju/1.4.0: - resolution: - { - integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==, - } + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} dev: true /js-tokens/4.0.0: - resolution: - { - integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==, - } + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} /js-tokens/9.0.0: - resolution: - { - integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==, - } + resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==} dev: true /js-yaml/4.0.0: - resolution: - { - integrity: sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==, - } + resolution: {integrity: sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==} hasBin: true dependencies: argparse: 2.0.1 dev: false /js-yaml/4.1.0: - resolution: - { - integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==, - } + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true dependencies: argparse: 2.0.1 /jsbn/0.1.1: - resolution: - { - integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==, - } + resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} dev: true /jsesc/2.5.2: - resolution: - { - integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} + engines: {node: '>=4'} hasBin: true dev: true /json-buffer/3.0.1: - resolution: - { - integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==, - } + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: true /json-parse-better-errors/1.0.2: - resolution: - { - integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==, - } + resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} dev: true /json-parse-even-better-errors/2.3.1: - resolution: - { - integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==, - } + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true /json-schema-traverse/0.4.1: - resolution: - { - integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==, - } + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true /json-schema-traverse/1.0.0: - resolution: - { - integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==, - } + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} /json-schema/0.4.0: - resolution: - { - integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==, - } + resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} dev: true /json-stable-stringify-without-jsonify/1.0.1: - resolution: - { - integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==, - } + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true /json-stringify-safe/5.0.1: - resolution: - { - integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==, - } + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} dev: true /json-to-ast/2.1.0: - resolution: - { - integrity: sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==, - } - engines: { node: ">= 4" } + resolution: {integrity: sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==} + engines: {node: '>= 4'} dependencies: code-error-fragment: 0.0.230 grapheme-splitter: 1.0.4 dev: false /json5/2.2.3: - resolution: - { - integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} hasBin: true dev: true /jsonfile/4.0.0: - resolution: - { - integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==, - } + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} optionalDependencies: graceful-fs: 4.2.11 dev: true /jsonfile/6.1.0: - resolution: - { - integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==, - } + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: universalify: 2.0.0 optionalDependencies: graceful-fs: 4.2.11 /jsonpointer/5.0.1: - resolution: - { - integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} + engines: {node: '>=0.10.0'} dev: false /jsonwebtoken/9.0.2: - resolution: - { - integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==, - } - engines: { node: ">=12", npm: ">=6" } + resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} + engines: {node: '>=12', npm: '>=6'} dependencies: jws: 3.2.2 lodash.includes: 4.3.0 @@ -7493,11 +5504,8 @@ packages: dev: true /jsprim/1.4.2: - resolution: - { - integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==, - } - engines: { node: ">=0.6.0" } + resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==} + engines: {node: '>=0.6.0'} dependencies: assert-plus: 1.0.0 extsprintf: 1.3.0 @@ -7506,17 +5514,11 @@ packages: dev: true /just-extend/4.2.1: - resolution: - { - integrity: sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==, - } + resolution: {integrity: sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==} dev: true /jwa/1.4.1: - resolution: - { - integrity: sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==, - } + resolution: {integrity: sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==} dependencies: buffer-equal-constant-time: 1.0.1 ecdsa-sig-formatter: 1.0.11 @@ -7524,10 +5526,7 @@ packages: dev: true /jwa/2.0.0: - resolution: - { - integrity: sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==, - } + resolution: {integrity: sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==} dependencies: buffer-equal-constant-time: 1.0.1 ecdsa-sig-formatter: 1.0.11 @@ -7535,61 +5534,43 @@ packages: dev: true /jws/3.2.2: - resolution: - { - integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==, - } + resolution: {integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==} dependencies: jwa: 1.4.1 safe-buffer: 5.2.1 dev: true /jws/4.0.0: - resolution: - { - integrity: sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==, - } + resolution: {integrity: sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==} dependencies: jwa: 2.0.0 safe-buffer: 5.2.1 dev: true /karma-chrome-launcher/3.2.0: - resolution: - { - integrity: sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==, - } + resolution: {integrity: sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==} dependencies: which: 1.3.1 dev: true /karma-mocha/2.0.1: - resolution: - { - integrity: sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==, - } + resolution: {integrity: sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==} dependencies: minimist: 1.2.8 dev: true /karma-source-map-support/1.4.0: - resolution: - { - integrity: sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==, - } + resolution: {integrity: sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==} dependencies: source-map-support: 0.5.21 dev: true /karma/6.4.2: - resolution: - { - integrity: sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ==, - } - engines: { node: ">= 10" } + resolution: {integrity: sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ==} + engines: {node: '>= 10'} hasBin: true dependencies: - "@colors/colors": 1.5.0 + '@colors/colors': 1.5.0 body-parser: 1.20.2 braces: 3.0.2 chokidar: 3.5.3 @@ -7621,68 +5602,44 @@ packages: dev: true /keyv/4.5.3: - resolution: - { - integrity: sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==, - } + resolution: {integrity: sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==} dependencies: json-buffer: 3.0.1 dev: true /kind-of/6.0.3: - resolution: - { - integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} dev: true /kleur/3.0.3: - resolution: - { - integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} /kuler/2.0.0: - resolution: - { - integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==, - } + resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} dev: true /leven/3.1.0: - resolution: - { - integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} dev: false /levn/0.4.1: - resolution: - { - integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==, - } - engines: { node: ">= 0.8.0" } + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 dev: true /lines-and-columns/1.2.4: - resolution: - { - integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==, - } + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true /load-json-file/4.0.0: - resolution: - { - integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} + engines: {node: '>=4'} dependencies: graceful-fs: 4.2.11 parse-json: 4.0.0 @@ -7691,19 +5648,13 @@ packages: dev: true /loader-runner/4.3.0: - resolution: - { - integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==, - } - engines: { node: ">=6.11.5" } + resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} + engines: {node: '>=6.11.5'} dev: true /loader-utils/2.0.4: - resolution: - { - integrity: sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==, - } - engines: { node: ">=8.9.0" } + resolution: {integrity: sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==} + engines: {node: '>=8.9.0'} dependencies: big.js: 5.2.2 emojis-list: 3.0.0 @@ -7711,129 +5662,81 @@ packages: dev: true /local-pkg/0.5.0: - resolution: - { - integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==, - } - engines: { node: ">=14" } + resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} + engines: {node: '>=14'} dependencies: mlly: 1.7.1 pkg-types: 1.1.1 dev: true /locate-path/5.0.0: - resolution: - { - integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} dependencies: p-locate: 4.1.0 dev: true /locate-path/6.0.0: - resolution: - { - integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} dependencies: p-locate: 5.0.0 dev: true /lodash.flattendeep/4.4.0: - resolution: - { - integrity: sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==, - } + resolution: {integrity: sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==} dev: true /lodash.get/4.4.2: - resolution: - { - integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==, - } + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} dev: true /lodash.includes/4.3.0: - resolution: - { - integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==, - } + resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} dev: true /lodash.isboolean/3.0.3: - resolution: - { - integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==, - } + resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} dev: true /lodash.isinteger/4.0.4: - resolution: - { - integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==, - } + resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==} dev: true /lodash.isnumber/3.0.3: - resolution: - { - integrity: sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==, - } + resolution: {integrity: sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==} dev: true /lodash.isplainobject/4.0.6: - resolution: - { - integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==, - } + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} dev: true /lodash.isstring/4.0.1: - resolution: - { - integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==, - } + resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} dev: true /lodash.merge/4.6.2: - resolution: - { - integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==, - } + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true /lodash.once/4.1.1: - resolution: - { - integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==, - } + resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} dev: true /lodash/4.17.21: - resolution: - { - integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==, - } + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} /log-symbols/4.1.0: - resolution: - { - integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} dependencies: chalk: 4.1.2 is-unicode-supported: 0.1.0 dev: true /log4js/6.9.1: - resolution: - { - integrity: sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==, - } - engines: { node: ">=8.0" } + resolution: {integrity: sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==} + engines: {node: '>=8.0'} dependencies: date-format: 4.0.14 debug: 4.3.4 @@ -7845,13 +5748,10 @@ packages: dev: true /logform/2.5.1: - resolution: - { - integrity: sha512-9FyqAm9o9NKKfiAKfZoYo9bGXXuwMkxQiQttkT4YjjVtQVIQtK6LmVtlxmCaFswo6N4AfEkHqZTV0taDtPotNg==, - } + resolution: {integrity: sha512-9FyqAm9o9NKKfiAKfZoYo9bGXXuwMkxQiQttkT4YjjVtQVIQtK6LmVtlxmCaFswo6N4AfEkHqZTV0taDtPotNg==} dependencies: - "@colors/colors": 1.5.0 - "@types/triple-beam": 1.3.3 + '@colors/colors': 1.5.0 + '@types/triple-beam': 1.3.3 fecha: 4.2.3 ms: 2.1.3 safe-stable-stringify: 2.4.3 @@ -7859,14 +5759,11 @@ packages: dev: true /logform/2.6.1: - resolution: - { - integrity: sha512-CdaO738xRapbKIMVn2m4F6KTj4j7ooJ8POVnebSgKo3KBz5axNXRAL7ZdRjIV6NOr2Uf4vjtRkxrFETOioCqSA==, - } - engines: { node: ">= 12.0.0" } - dependencies: - "@colors/colors": 1.6.0 - "@types/triple-beam": 1.3.3 + resolution: {integrity: sha512-CdaO738xRapbKIMVn2m4F6KTj4j7ooJ8POVnebSgKo3KBz5axNXRAL7ZdRjIV6NOr2Uf4vjtRkxrFETOioCqSA==} + engines: {node: '>= 12.0.0'} + dependencies: + '@colors/colors': 1.6.0 + '@types/triple-beam': 1.3.3 fecha: 4.2.3 ms: 2.1.3 safe-stable-stringify: 2.4.3 @@ -7874,318 +5771,207 @@ packages: dev: true /loupe/2.3.6: - resolution: - { - integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==, - } + resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} deprecated: Please upgrade to 2.3.7 which fixes GHSA-4q6p-r6v2-jvc5 dependencies: get-func-name: 2.0.2 dev: true /loupe/2.3.7: - resolution: - { - integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==, - } + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} dependencies: get-func-name: 2.0.2 dev: true /lru-cache/10.0.1: - resolution: - { - integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==, - } - engines: { node: 14 || >=16.14 } + resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} + engines: {node: 14 || >=16.14} dev: true /lru-cache/11.0.0: - resolution: - { - integrity: sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==, - } - engines: { node: 20 || >=22 } + resolution: {integrity: sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==} + engines: {node: 20 || >=22} dev: true /lru-cache/5.1.1: - resolution: - { - integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==, - } + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: yallist: 3.1.1 dev: true /lru-cache/6.0.0: - resolution: - { - integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} dependencies: yallist: 4.0.0 /lru-cache/7.18.3: - resolution: - { - integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} dev: true /magic-string/0.30.10: - resolution: - { - integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==, - } + resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} dependencies: - "@jridgewell/sourcemap-codec": 1.4.15 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true /magicast/0.3.4: - resolution: - { - integrity: sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==, - } + resolution: {integrity: sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==} dependencies: - "@babel/parser": 7.24.7 - "@babel/types": 7.24.7 + '@babel/parser': 7.24.7 + '@babel/types': 7.24.7 source-map-js: 1.2.0 dev: true /make-dir/4.0.0: - resolution: - { - integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} dependencies: semver: 7.6.3 dev: true /make-error/1.3.6: - resolution: - { - integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==, - } + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: true /mdurl/1.0.1: - resolution: - { - integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==, - } + resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} dev: true /media-typer/0.3.0: - resolution: - { - integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} dev: true /memorystream/0.3.1: - resolution: - { - integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==, - } - engines: { node: ">= 0.10.0" } + resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} + engines: {node: '>= 0.10.0'} dev: true /merge-descriptors/1.0.1: - resolution: - { - integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==, - } + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: true /merge-stream/2.0.0: - resolution: - { - integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==, - } + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true /merge2/1.4.1: - resolution: - { - integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==, - } - engines: { node: ">= 8" } + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} /methods/1.1.2: - resolution: - { - integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} + engines: {node: '>= 0.6'} dev: true /micromatch/4.0.5: - resolution: - { - integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==, - } - engines: { node: ">=8.6" } + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} dependencies: braces: 3.0.2 picomatch: 2.3.1 /mime-db/1.52.0: - resolution: - { - integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} /mime-types/2.1.35: - resolution: - { - integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} dependencies: mime-db: 1.52.0 /mime/1.6.0: - resolution: - { - integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} hasBin: true dev: true /mime/2.6.0: - resolution: - { - integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==, - } - engines: { node: ">=4.0.0" } + resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} + engines: {node: '>=4.0.0'} hasBin: true dev: true /mimic-fn/4.0.0: - resolution: - { - integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} dev: true /minimatch/10.0.1: - resolution: - { - integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==, - } - engines: { node: 20 || >=22 } + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} dependencies: brace-expansion: 2.0.1 dev: true /minimatch/3.0.8: - resolution: - { - integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==, - } + resolution: {integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==} dependencies: brace-expansion: 1.1.11 dev: true /minimatch/3.1.2: - resolution: - { - integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==, - } + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 dev: true /minimatch/4.2.1: - resolution: - { - integrity: sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==} + engines: {node: '>=10'} dependencies: brace-expansion: 1.1.11 dev: true /minimatch/5.0.1: - resolution: - { - integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} + engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 dev: true /minimatch/5.1.6: - resolution: - { - integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 dev: true /minimatch/9.0.5: - resolution: - { - integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==, - } - engines: { node: ">=16 || 14 >=14.17" } + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} dependencies: brace-expansion: 2.0.1 /minimist/1.2.8: - resolution: - { - integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==, - } + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} /minipass/7.1.2: - resolution: - { - integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==, - } - engines: { node: ">=16 || 14 >=14.17" } + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} dev: true /mitt/3.0.1: - resolution: - { - integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==, - } + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} dev: true /mkdirp/0.5.6: - resolution: - { - integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==, - } + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true dependencies: minimist: 1.2.8 dev: true /mkdirp/3.0.1: - resolution: - { - integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} + engines: {node: '>=10'} hasBin: true /mlly/1.7.1: - resolution: - { - integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==, - } + resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} dependencies: acorn: 8.11.3 pathe: 1.1.2 @@ -8194,11 +5980,8 @@ packages: dev: true /mocha/10.2.0: - resolution: - { - integrity: sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==, - } - engines: { node: ">= 14.0.0" } + resolution: {integrity: sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==} + engines: {node: '>= 14.0.0'} hasBin: true dependencies: ansi-colors: 4.1.1 @@ -8225,11 +6008,8 @@ packages: dev: true /mocha/10.4.0: - resolution: - { - integrity: sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==, - } - engines: { node: ">= 14.0.0" } + resolution: {integrity: sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==} + engines: {node: '>= 14.0.0'} hasBin: true dependencies: ansi-colors: 4.1.1 @@ -8255,14 +6035,11 @@ packages: dev: true /mocha/9.2.2: - resolution: - { - integrity: sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==, - } - engines: { node: ">= 12.0.0" } + resolution: {integrity: sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==} + engines: {node: '>= 12.0.0'} hasBin: true dependencies: - "@ungap/promise-all-settled": 1.1.2 + '@ungap/promise-all-settled': 1.1.2 ansi-colors: 4.1.1 browser-stdout: 1.3.1 chokidar: 3.5.3 @@ -8289,18 +6066,12 @@ packages: dev: true /moment/2.29.4: - resolution: - { - integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==, - } + resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==} dev: true /morgan/1.10.0: - resolution: - { - integrity: sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==, - } - engines: { node: ">= 0.8.0" } + resolution: {integrity: sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==} + engines: {node: '>= 0.8.0'} dependencies: basic-auth: 2.0.1 debug: 2.6.9 @@ -8310,31 +6081,19 @@ packages: dev: true /ms/2.0.0: - resolution: - { - integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==, - } + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: true /ms/2.1.2: - resolution: - { - integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==, - } + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} /ms/2.1.3: - resolution: - { - integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==, - } + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true /multer/1.4.5-lts.1: - resolution: - { - integrity: sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==, - } - engines: { node: ">= 6.0.0" } + resolution: {integrity: sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==} + engines: {node: '>= 6.0.0'} dependencies: append-field: 1.0.0 busboy: 1.6.0 @@ -8346,109 +6105,70 @@ packages: dev: true /mustache/4.2.0: - resolution: - { - integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==, - } + resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} hasBin: true /nanoid/3.3.1: - resolution: - { - integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==, - } - engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 } + resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true /nanoid/3.3.3: - resolution: - { - integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==, - } - engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 } + resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true /nanoid/3.3.7: - resolution: - { - integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==, - } - engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 } + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true /natural-compare/1.4.0: - resolution: - { - integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==, - } + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true /negotiator/0.6.3: - resolution: - { - integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} + engines: {node: '>= 0.6'} dev: true /neo-async/2.6.2: - resolution: - { - integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==, - } + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} /netmask/2.0.2: - resolution: - { - integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==, - } - engines: { node: ">= 0.4.0" } + resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} + engines: {node: '>= 0.4.0'} dev: true /nice-try/1.0.5: - resolution: - { - integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==, - } + resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} dev: true /nise/5.1.4: - resolution: - { - integrity: sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==, - } - dependencies: - "@sinonjs/commons": 2.0.0 - "@sinonjs/fake-timers": 10.3.0 - "@sinonjs/text-encoding": 0.7.2 + resolution: {integrity: sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==} + dependencies: + '@sinonjs/commons': 2.0.0 + '@sinonjs/fake-timers': 10.3.0 + '@sinonjs/text-encoding': 0.7.2 just-extend: 4.2.1 path-to-regexp: 1.8.0 dev: true /node-cmd/3.0.0: - resolution: - { - integrity: sha512-SBvtm39iEkhEEDbUowR0O2YVaqpbD2nRvQ3fxXP/Tn1FgRpZAaUb8yKeEtFulBIv+xTHDodOKkj4EXIBANj+AQ==, - } + resolution: {integrity: sha512-SBvtm39iEkhEEDbUowR0O2YVaqpbD2nRvQ3fxXP/Tn1FgRpZAaUb8yKeEtFulBIv+xTHDodOKkj4EXIBANj+AQ==} dev: true /node-domexception/1.0.0: - resolution: - { - integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==, - } - engines: { node: ">=10.5.0" } + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} dev: true /node-fetch/2.7.0: - resolution: - { - integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==, - } - engines: { node: 4.x || >=6.0.0 } + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} peerDependencies: encoding: ^0.1.0 peerDependenciesMeta: @@ -8458,11 +6178,8 @@ packages: whatwg-url: 5.0.0 /node-fetch/3.3.2: - resolution: - { - integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==, - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: data-uri-to-buffer: 4.0.1 fetch-blob: 3.2.0 @@ -8470,24 +6187,15 @@ packages: dev: true /node-releases/2.0.13: - resolution: - { - integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==, - } + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} dev: true /node-releases/2.0.14: - resolution: - { - integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==, - } + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true /normalize-package-data/2.5.0: - resolution: - { - integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==, - } + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 resolve: 1.22.6 @@ -8496,19 +6204,13 @@ packages: dev: true /normalize-path/3.0.0: - resolution: - { - integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} dev: true /npm-run-all/4.1.5: - resolution: - { - integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==, - } - engines: { node: ">= 4" } + resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} + engines: {node: '>= 4'} hasBin: true dependencies: ansi-styles: 3.2.1 @@ -8523,62 +6225,41 @@ packages: dev: true /npm-run-path/5.3.0: - resolution: - { - integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==, - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: path-key: 4.0.0 dev: true /oauth-sign/0.9.0: - resolution: - { - integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==, - } + resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==} dev: true /object-assign/4.1.1: - resolution: - { - integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} dev: true /object-inspect/1.12.3: - resolution: - { - integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==, - } + resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} dev: true /object-is/1.1.5: - resolution: - { - integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.1 dev: true /object-keys/1.1.1: - resolution: - { - integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} dev: true /object.assign/4.1.4: - resolution: - { - integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.1 @@ -8587,67 +6268,46 @@ packages: dev: true /on-finished/2.3.0: - resolution: - { - integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} + engines: {node: '>= 0.8'} dependencies: ee-first: 1.1.1 dev: true /on-finished/2.4.1: - resolution: - { - integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} dependencies: ee-first: 1.1.1 dev: true /on-headers/1.0.2: - resolution: - { - integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==} + engines: {node: '>= 0.8'} dev: true /once/1.4.0: - resolution: - { - integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==, - } + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 dev: true /one-time/1.0.0: - resolution: - { - integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==, - } + resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==} dependencies: fn.name: 1.1.0 dev: true /onetime/6.0.0: - resolution: - { - integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} dependencies: mimic-fn: 4.0.0 dev: true /open/8.4.2: - resolution: - { - integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} dependencies: define-lazy-prop: 2.0.0 is-docker: 2.2.1 @@ -8655,19 +6315,13 @@ packages: dev: true /openapi-types/7.2.3: - resolution: - { - integrity: sha512-olbaNxz12R27+mTyJ/ZAFEfUruauHH27AkeQHDHRq5AF0LdNkK1SSV7EourXQDK+4aX7dv2HtyirAGK06WMAsA==, - } + resolution: {integrity: sha512-olbaNxz12R27+mTyJ/ZAFEfUruauHH27AkeQHDHRq5AF0LdNkK1SSV7EourXQDK+4aX7dv2HtyirAGK06WMAsA==} /optionator/0.9.3: - resolution: - { - integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==, - } - engines: { node: ">= 0.8.0" } + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + engines: {node: '>= 0.8.0'} dependencies: - "@aashutoshrathi/word-wrap": 1.2.6 + '@aashutoshrathi/word-wrap': 1.2.6 deep-is: 0.1.4 fast-levenshtein: 2.0.6 levn: 0.4.1 @@ -8676,71 +6330,50 @@ packages: dev: true /p-limit/2.3.0: - resolution: - { - integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} dependencies: p-try: 2.2.0 dev: true /p-limit/3.1.0: - resolution: - { - integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 dev: true /p-limit/5.0.0: - resolution: - { - integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} + engines: {node: '>=18'} dependencies: yocto-queue: 1.0.0 dev: true /p-locate/4.1.0: - resolution: - { - integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} dependencies: p-limit: 2.3.0 dev: true /p-locate/5.0.0: - resolution: - { - integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} dependencies: p-limit: 3.1.0 dev: true /p-try/2.2.0: - resolution: - { - integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} dev: true /pac-proxy-agent/7.0.1: - resolution: - { - integrity: sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==} + engines: {node: '>= 14'} dependencies: - "@tootallnate/quickjs-emscripten": 0.23.0 + '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.0 debug: 4.3.4 get-uri: 6.0.2 @@ -8753,11 +6386,8 @@ packages: dev: true /pac-resolver/7.0.0: - resolution: - { - integrity: sha512-Fd9lT9vJbHYRACT8OhCbZBbxr6KRSawSovFpy8nDGshaK99S/EBhVIHp9+crhxrsZOuvLpgL1n23iyPg6Rl2hg==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-Fd9lT9vJbHYRACT8OhCbZBbxr6KRSawSovFpy8nDGshaK99S/EBhVIHp9+crhxrsZOuvLpgL1n23iyPg6Rl2hg==} + engines: {node: '>= 14'} dependencies: degenerator: 5.0.1 ip: 1.1.8 @@ -8765,243 +6395,156 @@ packages: dev: true /package-json-from-dist/1.0.0: - resolution: - { - integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==, - } + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} dev: true /parent-module/1.0.1: - resolution: - { - integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} dependencies: callsites: 3.1.0 dev: true /parse-json/4.0.0: - resolution: - { - integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} + engines: {node: '>=4'} dependencies: error-ex: 1.3.2 json-parse-better-errors: 1.0.2 dev: true /parse-json/5.2.0: - resolution: - { - integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} dependencies: - "@babel/code-frame": 7.24.7 + '@babel/code-frame': 7.24.7 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 dev: true /parseurl/1.3.3: - resolution: - { - integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} dev: true /path-browserify/1.0.1: - resolution: - { - integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==, - } + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} /path-exists/4.0.0: - resolution: - { - integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} dev: true /path-is-absolute/1.0.1: - resolution: - { - integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} dev: true /path-key/2.0.1: - resolution: - { - integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} + engines: {node: '>=4'} dev: true /path-key/3.1.1: - resolution: - { - integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} dev: true /path-key/4.0.0: - resolution: - { - integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} dev: true /path-parse/1.0.7: - resolution: - { - integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==, - } + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true /path-scurry/1.10.1: - resolution: - { - integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==, - } - engines: { node: ">=16 || 14 >=14.17" } + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} dependencies: lru-cache: 10.0.1 minipass: 7.1.2 dev: true /path-scurry/2.0.0: - resolution: - { - integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==, - } - engines: { node: 20 || >=22 } + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} dependencies: lru-cache: 11.0.0 minipass: 7.1.2 dev: true /path-to-regexp/0.1.7: - resolution: - { - integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==, - } + resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} dev: true /path-to-regexp/1.8.0: - resolution: - { - integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==, - } + resolution: {integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==} dependencies: isarray: 0.0.1 dev: true /path-type/3.0.0: - resolution: - { - integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} + engines: {node: '>=4'} dependencies: pify: 3.0.0 dev: true /path-type/4.0.0: - resolution: - { - integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} dev: true /path-type/5.0.0: - resolution: - { - integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} + engines: {node: '>=12'} /pathe/1.1.2: - resolution: - { - integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==, - } + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} dev: true /pathval/1.1.1: - resolution: - { - integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==, - } + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true /pend/1.2.0: - resolution: - { - integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==, - } + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: true /performance-now/2.1.0: - resolution: - { - integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==, - } + resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} dev: true /picocolors/1.0.1: - resolution: - { - integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==, - } + resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} /picomatch/2.3.1: - resolution: - { - integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==, - } - engines: { node: ">=8.6" } + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} /pidtree/0.3.1: - resolution: - { - integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==, - } - engines: { node: ">=0.10" } + resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} + engines: {node: '>=0.10'} hasBin: true dev: true /pify/3.0.0: - resolution: - { - integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} + engines: {node: '>=4'} dev: true /pkg-dir/4.2.0: - resolution: - { - integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} dependencies: find-up: 4.1.0 dev: true /pkg-types/1.1.1: - resolution: - { - integrity: sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ==, - } + resolution: {integrity: sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ==} dependencies: confbox: 0.1.7 mlly: 1.7.1 @@ -9009,18 +6552,12 @@ packages: dev: true /pluralize/8.0.0: - resolution: - { - integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} /postcss/8.4.38: - resolution: - { - integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==, - } - engines: { node: ^10 || ^12 || >=14 } + resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} + engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 picocolors: 1.0.1 @@ -9028,101 +6565,68 @@ packages: dev: true /prelude-ls/1.2.1: - resolution: - { - integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==, - } - engines: { node: ">= 0.8.0" } + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} dev: true /prettier/3.1.1: - resolution: - { - integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==, - } - engines: { node: ">=14" } + resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} + engines: {node: '>=14'} hasBin: true /prettier/3.3.3: - resolution: - { - integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==, - } - engines: { node: ">=14" } + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} hasBin: true /pretty-format/29.7.0: - resolution: - { - integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==, - } - engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - "@jest/schemas": 29.6.3 + '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.3.1 dev: true /process-nextick-args/2.0.1: - resolution: - { - integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==, - } + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true /process/0.11.10: - resolution: - { - integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==, - } - engines: { node: ">= 0.6.0" } + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} /progress/2.0.3: - resolution: - { - integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==, - } - engines: { node: ">=0.4.0" } + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} dev: true /prompts/2.4.2: - resolution: - { - integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==, - } - engines: { node: ">= 6" } + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} dependencies: kleur: 3.0.3 sisteransi: 1.0.5 /proper-lockfile/2.0.1: - resolution: - { - integrity: sha512-rjaeGbsmhNDcDInmwi4MuI6mRwJu6zq8GjYCLuSuE7GF+4UjgzkL69sVKKJ2T2xH61kK7rXvGYpvaTu909oXaQ==, - } - engines: { node: ">=4.0.0" } + resolution: {integrity: sha512-rjaeGbsmhNDcDInmwi4MuI6mRwJu6zq8GjYCLuSuE7GF+4UjgzkL69sVKKJ2T2xH61kK7rXvGYpvaTu909oXaQ==} + engines: {node: '>=4.0.0'} dependencies: graceful-fs: 4.2.11 retry: 0.10.1 dev: false /proxy-addr/2.0.7: - resolution: - { - integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==, - } - engines: { node: ">= 0.10" } + resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + engines: {node: '>= 0.10'} dependencies: forwarded: 0.2.0 ipaddr.js: 1.9.1 dev: true /proxy-agent/6.4.0: - resolution: - { - integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==} + engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 debug: 4.3.4 @@ -9137,45 +6641,30 @@ packages: dev: true /proxy-from-env/1.1.0: - resolution: - { - integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==, - } + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} dev: true /psl/1.9.0: - resolution: - { - integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==, - } + resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} dev: true /pump/3.0.0: - resolution: - { - integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==, - } + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: end-of-stream: 1.4.4 once: 1.4.0 dev: true /punycode/2.3.0: - resolution: - { - integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} + engines: {node: '>=6'} dev: true /puppeteer-core/22.4.1: - resolution: - { - integrity: sha512-l9nf8NcirYOHdID12CIMWyy7dqcJCVtgVS+YAiJuUJHg8+9yjgPiG2PcNhojIEEpCkvw3FxvnyITVfKVmkWpjA==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-l9nf8NcirYOHdID12CIMWyy7dqcJCVtgVS+YAiJuUJHg8+9yjgPiG2PcNhojIEEpCkvw3FxvnyITVfKVmkWpjA==} + engines: {node: '>=18'} dependencies: - "@puppeteer/browsers": 2.1.0 + '@puppeteer/browsers': 2.1.0 chromium-bidi: 0.5.12_74t7hwmhzgczi6zz4gvli4zmpa cross-fetch: 4.0.0 debug: 4.3.4 @@ -9189,15 +6678,12 @@ packages: dev: true /puppeteer/22.4.1_typescript@5.5.3: - resolution: - { - integrity: sha512-Mag1wRLanzwS4yEUyrDRBUgsKlH3dpL6oAfVwNHG09oxd0+ySsatMvYj7HwjynWy/S+Hg+XHLgjyC/F6CsL/lg==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-Mag1wRLanzwS4yEUyrDRBUgsKlH3dpL6oAfVwNHG09oxd0+ySsatMvYj7HwjynWy/S+Hg+XHLgjyC/F6CsL/lg==} + engines: {node: '>=18'} hasBin: true requiresBuild: true dependencies: - "@puppeteer/browsers": 2.1.0 + '@puppeteer/browsers': 2.1.0 cosmiconfig: 9.0.0_typescript@5.5.3 puppeteer-core: 22.4.1 transitivePeerDependencies: @@ -9209,67 +6695,43 @@ packages: dev: true /qjobs/1.2.0: - resolution: - { - integrity: sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==, - } - engines: { node: ">=0.9" } + resolution: {integrity: sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==} + engines: {node: '>=0.9'} dev: true /qs/6.11.0: - resolution: - { - integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==, - } - engines: { node: ">=0.6" } + resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} + engines: {node: '>=0.6'} dependencies: side-channel: 1.0.4 dev: true /qs/6.5.3: - resolution: - { - integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==, - } - engines: { node: ">=0.6" } + resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} + engines: {node: '>=0.6'} dev: true /queue-microtask/1.2.3: - resolution: - { - integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==, - } + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} /queue-tick/1.0.1: - resolution: - { - integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==, - } + resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} dev: true /randombytes/2.1.0: - resolution: - { - integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==, - } + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: safe-buffer: 5.2.1 dev: true /range-parser/1.2.1: - resolution: - { - integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} + engines: {node: '>= 0.6'} dev: true /raw-body/2.5.1: - resolution: - { - integrity: sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==} + engines: {node: '>= 0.8'} dependencies: bytes: 3.1.2 http-errors: 2.0.0 @@ -9278,11 +6740,8 @@ packages: dev: true /raw-body/2.5.2: - resolution: - { - integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} + engines: {node: '>= 0.8'} dependencies: bytes: 3.1.2 http-errors: 2.0.0 @@ -9291,18 +6750,12 @@ packages: dev: true /react-is/18.3.1: - resolution: - { - integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==, - } + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} dev: true /read-pkg/3.0.0: - resolution: - { - integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} + engines: {node: '>=4'} dependencies: load-json-file: 4.0.0 normalize-package-data: 2.5.0 @@ -9310,10 +6763,7 @@ packages: dev: true /readable-stream/2.3.8: - resolution: - { - integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==, - } + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} dependencies: core-util-is: 1.0.2 inherits: 2.0.4 @@ -9325,11 +6775,8 @@ packages: dev: true /readable-stream/3.6.2: - resolution: - { - integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==, - } - engines: { node: ">= 6" } + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} dependencies: inherits: 2.0.4 string_decoder: 1.3.0 @@ -9337,38 +6784,26 @@ packages: dev: true /readdirp/3.6.0: - resolution: - { - integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==, - } - engines: { node: ">=8.10.0" } + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 dev: true /rechoir/0.7.1: - resolution: - { - integrity: sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==, - } - engines: { node: ">= 0.10" } + resolution: {integrity: sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==} + engines: {node: '>= 0.10'} dependencies: resolve: 1.22.6 dev: true /regenerator-runtime/0.14.1: - resolution: - { - integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==, - } + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} dev: false /regexp.prototype.flags/1.5.1: - resolution: - { - integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.1 @@ -9376,11 +6811,8 @@ packages: dev: true /request-promise-core/1.1.4_request@2.88.2: - resolution: - { - integrity: sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==} + engines: {node: '>=0.10.0'} peerDependencies: request: ^2.34 dependencies: @@ -9389,11 +6821,8 @@ packages: dev: true /request-promise-native/1.0.9_request@2.88.2: - resolution: - { - integrity: sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==, - } - engines: { node: ">=0.12.0" } + resolution: {integrity: sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==} + engines: {node: '>=0.12.0'} deprecated: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 peerDependencies: request: ^2.34 @@ -9405,11 +6834,8 @@ packages: dev: true /request/2.88.2: - resolution: - { - integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==, - } - engines: { node: ">= 6" } + resolution: {integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==} + engines: {node: '>= 6'} deprecated: request has been deprecated, see https://github.com/request/request/issues/3142 dependencies: aws-sign2: 0.7.0 @@ -9435,64 +6861,40 @@ packages: dev: true /require-directory/2.1.1: - resolution: - { - integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} /require-from-string/2.0.2: - resolution: - { - integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} /requires-port/1.0.0: - resolution: - { - integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==, - } + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} dev: true /resolve-cwd/3.0.0: - resolution: - { - integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} + engines: {node: '>=8'} dependencies: resolve-from: 5.0.0 dev: true /resolve-from/4.0.0: - resolution: - { - integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} dev: true /resolve-from/5.0.0: - resolution: - { - integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} dev: true /resolve-pkg-maps/1.0.0: - resolution: - { - integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==, - } + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true /resolve/1.22.6: - resolution: - { - integrity: sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==, - } + resolution: {integrity: sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==} hasBin: true dependencies: is-core-module: 2.13.0 @@ -9501,90 +6903,66 @@ packages: dev: true /retry/0.10.1: - resolution: - { - integrity: sha512-ZXUSQYTHdl3uS7IuCehYfMzKyIDBNoAuUblvy5oGO5UJSUTmStUUVPXbA9Qxd173Bgre53yCQczQuHgRWAdvJQ==, - } + resolution: {integrity: sha512-ZXUSQYTHdl3uS7IuCehYfMzKyIDBNoAuUblvy5oGO5UJSUTmStUUVPXbA9Qxd173Bgre53yCQczQuHgRWAdvJQ==} dev: false /reusify/1.0.4: - resolution: - { - integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==, - } - engines: { iojs: ">=1.0.0", node: ">=0.10.0" } + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} /rfdc/1.3.0: - resolution: - { - integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==, - } + resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} dev: true /rimraf/3.0.2: - resolution: - { - integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==, - } + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true dependencies: glob: 7.2.3 dev: true /rimraf/5.0.4: - resolution: - { - integrity: sha512-rizQI/o/YAMM1us0Zyax0uRfIK39XR52EAjjOi0fzMolpGp0onj6CWzBAXuOx6+6Xi9Rgi0d9tUZojhJerLUmQ==, - } - engines: { node: ">=14" } + resolution: {integrity: sha512-rizQI/o/YAMM1us0Zyax0uRfIK39XR52EAjjOi0fzMolpGp0onj6CWzBAXuOx6+6Xi9Rgi0d9tUZojhJerLUmQ==} + engines: {node: '>=14'} hasBin: true dependencies: glob: 10.3.9 dev: true /rollup/4.18.0: - resolution: - { - integrity: sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==, - } - engines: { node: ">=18.0.0", npm: ">=8.0.0" } + resolution: {integrity: sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: - "@types/estree": 1.0.5 + '@types/estree': 1.0.5 optionalDependencies: - "@rollup/rollup-android-arm-eabi": 4.18.0 - "@rollup/rollup-android-arm64": 4.18.0 - "@rollup/rollup-darwin-arm64": 4.18.0 - "@rollup/rollup-darwin-x64": 4.18.0 - "@rollup/rollup-linux-arm-gnueabihf": 4.18.0 - "@rollup/rollup-linux-arm-musleabihf": 4.18.0 - "@rollup/rollup-linux-arm64-gnu": 4.18.0 - "@rollup/rollup-linux-arm64-musl": 4.18.0 - "@rollup/rollup-linux-powerpc64le-gnu": 4.18.0 - "@rollup/rollup-linux-riscv64-gnu": 4.18.0 - "@rollup/rollup-linux-s390x-gnu": 4.18.0 - "@rollup/rollup-linux-x64-gnu": 4.18.0 - "@rollup/rollup-linux-x64-musl": 4.18.0 - "@rollup/rollup-win32-arm64-msvc": 4.18.0 - "@rollup/rollup-win32-ia32-msvc": 4.18.0 - "@rollup/rollup-win32-x64-msvc": 4.18.0 + '@rollup/rollup-android-arm-eabi': 4.18.0 + '@rollup/rollup-android-arm64': 4.18.0 + '@rollup/rollup-darwin-arm64': 4.18.0 + '@rollup/rollup-darwin-x64': 4.18.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.18.0 + '@rollup/rollup-linux-arm-musleabihf': 4.18.0 + '@rollup/rollup-linux-arm64-gnu': 4.18.0 + '@rollup/rollup-linux-arm64-musl': 4.18.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.18.0 + '@rollup/rollup-linux-riscv64-gnu': 4.18.0 + '@rollup/rollup-linux-s390x-gnu': 4.18.0 + '@rollup/rollup-linux-x64-gnu': 4.18.0 + '@rollup/rollup-linux-x64-musl': 4.18.0 + '@rollup/rollup-win32-arm64-msvc': 4.18.0 + '@rollup/rollup-win32-ia32-msvc': 4.18.0 + '@rollup/rollup-win32-x64-msvc': 4.18.0 fsevents: 2.3.3 dev: true /run-parallel/1.2.0: - resolution: - { - integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==, - } + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 /safe-array-concat/1.0.1: - resolution: - { - integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==, - } - engines: { node: ">=0.4" } + resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} + engines: {node: '>=0.4'} dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 @@ -9593,24 +6971,15 @@ packages: dev: true /safe-buffer/5.1.2: - resolution: - { - integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==, - } + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} dev: true /safe-buffer/5.2.1: - resolution: - { - integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==, - } + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true /safe-regex-test/1.0.0: - resolution: - { - integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==, - } + resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 @@ -9618,89 +6987,59 @@ packages: dev: true /safe-stable-stringify/2.4.3: - resolution: - { - integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} + engines: {node: '>=10'} dev: true /safer-buffer/2.1.2: - resolution: - { - integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==, - } + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true /sax/1.2.4: - resolution: - { - integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==, - } + resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==} /schema-utils/3.3.0: - resolution: - { - integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==, - } - engines: { node: ">= 10.13.0" } + resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} + engines: {node: '>= 10.13.0'} dependencies: - "@types/json-schema": 7.0.13 + '@types/json-schema': 7.0.13 ajv: 6.12.6 ajv-keywords: 3.5.2_ajv@6.12.6 dev: true /semver/5.7.2: - resolution: - { - integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==, - } + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true dev: true /semver/6.3.1: - resolution: - { - integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==, - } + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true dev: true /semver/7.5.4: - resolution: - { - integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} hasBin: true dependencies: lru-cache: 6.0.0 /semver/7.6.0: - resolution: - { - integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + engines: {node: '>=10'} hasBin: true dependencies: lru-cache: 6.0.0 dev: true /semver/7.6.3: - resolution: - { - integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} hasBin: true /send/0.18.0: - resolution: - { - integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==, - } - engines: { node: ">= 0.8.0" } + resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} + engines: {node: '>= 0.8.0'} dependencies: debug: 2.6.9 depd: 2.0.0 @@ -9718,29 +7057,20 @@ packages: dev: true /serialize-javascript/6.0.0: - resolution: - { - integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==, - } + resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} dependencies: randombytes: 2.1.0 dev: true /serialize-javascript/6.0.1: - resolution: - { - integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==, - } + resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==} dependencies: randombytes: 2.1.0 dev: true /serve-static/1.15.0: - resolution: - { - integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==, - } - engines: { node: ">= 0.8.0" } + resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} + engines: {node: '>= 0.8.0'} dependencies: encodeurl: 1.0.2 escape-html: 1.0.3 @@ -9749,11 +7079,8 @@ packages: dev: true /set-function-name/2.0.1: - resolution: - { - integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} + engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.0 functions-have-names: 1.2.3 @@ -9761,70 +7088,46 @@ packages: dev: true /setprototypeof/1.2.0: - resolution: - { - integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==, - } + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} dev: true /shallow-clone/3.0.1: - resolution: - { - integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} + engines: {node: '>=8'} dependencies: kind-of: 6.0.3 dev: true /shebang-command/1.2.0: - resolution: - { - integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} dependencies: shebang-regex: 1.0.0 dev: true /shebang-command/2.0.0: - resolution: - { - integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} dependencies: shebang-regex: 3.0.0 dev: true /shebang-regex/1.0.0: - resolution: - { - integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} dev: true /shebang-regex/3.0.0: - resolution: - { - integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} dev: true /shell-quote/1.8.1: - resolution: - { - integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==, - } + resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true /side-channel/1.0.4: - resolution: - { - integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==, - } + resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 @@ -9832,78 +7135,51 @@ packages: dev: true /siginfo/2.0.0: - resolution: - { - integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==, - } + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} dev: true /signal-exit/4.1.0: - resolution: - { - integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==, - } - engines: { node: ">=14" } + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} dev: true /simple-swizzle/0.2.2: - resolution: - { - integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==, - } + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} dependencies: is-arrayish: 0.3.2 dev: true /sinon/10.0.1: - resolution: - { - integrity: sha512-1rf86mvW4Mt7JitEIgmNaLXaWnrWd/UrVKZZlL+kbeOujXVf9fmC4kQEQ/YeHoiIA23PLNngYWK+dngIx/AumA==, - } + resolution: {integrity: sha512-1rf86mvW4Mt7JitEIgmNaLXaWnrWd/UrVKZZlL+kbeOujXVf9fmC4kQEQ/YeHoiIA23PLNngYWK+dngIx/AumA==} deprecated: Breaking change found in this patch version dependencies: - "@sinonjs/commons": 1.8.6 - "@sinonjs/fake-timers": 7.1.2 - "@sinonjs/samsam": 6.1.3 + '@sinonjs/commons': 1.8.6 + '@sinonjs/fake-timers': 7.1.2 + '@sinonjs/samsam': 6.1.3 diff: 4.0.2 nise: 5.1.4 supports-color: 7.2.0 dev: true /sisteransi/1.0.5: - resolution: - { - integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==, - } + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} /slash/3.0.0: - resolution: - { - integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} dev: true /slash/5.1.0: - resolution: - { - integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==, - } - engines: { node: ">=14.16" } + resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} + engines: {node: '>=14.16'} /smart-buffer/4.2.0: - resolution: - { - integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==, - } - engines: { node: ">= 6.0.0", npm: ">= 3.0.0" } + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} dev: true /socket.io-adapter/2.5.2: - resolution: - { - integrity: sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==, - } + resolution: {integrity: sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==} dependencies: ws: 8.11.0 transitivePeerDependencies: @@ -9912,24 +7188,18 @@ packages: dev: true /socket.io-parser/4.2.4: - resolution: - { - integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==, - } - engines: { node: ">=10.0.0" } + resolution: {integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==} + engines: {node: '>=10.0.0'} dependencies: - "@socket.io/component-emitter": 3.1.0 + '@socket.io/component-emitter': 3.1.0 debug: 4.3.4 transitivePeerDependencies: - supports-color dev: true /socket.io/4.7.2: - resolution: - { - integrity: sha512-bvKVS29/I5fl2FGLNHuXlQaUH/BlzX1IN6S+NKLNZpBsPZIDH+90eQmCs2Railn4YUiww4SzUedJ6+uzwFnKLw==, - } - engines: { node: ">=10.2.0" } + resolution: {integrity: sha512-bvKVS29/I5fl2FGLNHuXlQaUH/BlzX1IN6S+NKLNZpBsPZIDH+90eQmCs2Railn4YUiww4SzUedJ6+uzwFnKLw==} + engines: {node: '>=10.2.0'} dependencies: accepts: 1.3.8 base64id: 2.0.0 @@ -9945,11 +7215,8 @@ packages: dev: true /socks-proxy-agent/8.0.2: - resolution: - { - integrity: sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==} + engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 debug: 4.3.4 @@ -9959,30 +7226,21 @@ packages: dev: true /socks/2.7.1: - resolution: - { - integrity: sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==, - } - engines: { node: ">= 10.13.0", npm: ">= 3.0.0" } + resolution: {integrity: sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==} + engines: {node: '>= 10.13.0', npm: '>= 3.0.0'} dependencies: ip: 2.0.0 smart-buffer: 4.2.0 dev: true /source-map-js/1.2.0: - resolution: - { - integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + engines: {node: '>=0.10.0'} dev: true /source-map-loader/1.1.3_webpack@5.88.2: - resolution: - { - integrity: sha512-6YHeF+XzDOrT/ycFJNI53cgEsp/tHTMl37hi7uVyqFAlTXW109JazaQCkbc+jjoL2637qkH1amLi+JzrIpt5lA==, - } - engines: { node: ">= 10.13.0" } + resolution: {integrity: sha512-6YHeF+XzDOrT/ycFJNI53cgEsp/tHTMl37hi7uVyqFAlTXW109JazaQCkbc+jjoL2637qkH1amLi+JzrIpt5lA==} + engines: {node: '>= 10.13.0'} peerDependencies: webpack: ^4.0.0 || ^5.0.0 dependencies: @@ -9996,68 +7254,44 @@ packages: dev: true /source-map-support/0.5.21: - resolution: - { - integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==, - } + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: buffer-from: 1.1.2 source-map: 0.6.1 /source-map/0.6.1: - resolution: - { - integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} /spdx-correct/3.2.0: - resolution: - { - integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==, - } + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: spdx-expression-parse: 3.0.1 spdx-license-ids: 3.0.15 dev: true /spdx-exceptions/2.3.0: - resolution: - { - integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==, - } + resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} dev: true /spdx-expression-parse/3.0.1: - resolution: - { - integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==, - } + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 spdx-license-ids: 3.0.15 dev: true /spdx-license-ids/3.0.15: - resolution: - { - integrity: sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ==, - } + resolution: {integrity: sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ==} dev: true /sprintf-js/1.0.3: - resolution: - { - integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==, - } + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: true /sshpk/1.17.0: - resolution: - { - integrity: sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==} + engines: {node: '>=0.10.0'} hasBin: true dependencies: asn1: 0.2.6 @@ -10072,74 +7306,47 @@ packages: dev: true /stack-trace/0.0.10: - resolution: - { - integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==, - } + resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} dev: true /stackback/0.0.2: - resolution: - { - integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==, - } + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true /statuses/1.5.0: - resolution: - { - integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} + engines: {node: '>= 0.6'} dev: true /statuses/2.0.1: - resolution: - { - integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} dev: true /std-env/3.7.0: - resolution: - { - integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==, - } + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} dev: true /stealthy-require/1.1.1: - resolution: - { - integrity: sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==} + engines: {node: '>=0.10.0'} dev: true /stop-iteration-iterator/1.0.0: - resolution: - { - integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} + engines: {node: '>= 0.4'} dependencies: internal-slot: 1.0.5 dev: true /stoppable/1.1.0: - resolution: - { - integrity: sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==, - } - engines: { node: ">=4", npm: ">=6" } + resolution: {integrity: sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==} + engines: {node: '>=4', npm: '>=6'} dev: true /streamroller/3.1.5: - resolution: - { - integrity: sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==, - } - engines: { node: ">=8.0" } + resolution: {integrity: sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==} + engines: {node: '>=8.0'} dependencies: date-format: 4.0.14 debug: 4.3.4 @@ -10149,48 +7356,33 @@ packages: dev: true /streamsearch/1.1.0: - resolution: - { - integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==, - } - engines: { node: ">=10.0.0" } + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} dev: true /streamx/2.15.6: - resolution: - { - integrity: sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==, - } + resolution: {integrity: sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==} dependencies: fast-fifo: 1.3.2 queue-tick: 1.0.1 dev: true /string-argv/0.3.2: - resolution: - { - integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==, - } - engines: { node: ">=0.6.19" } + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} dev: true /string-width/4.2.3: - resolution: - { - integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} dependencies: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 /string-width/5.1.2: - resolution: - { - integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} dependencies: eastasianwidth: 0.2.0 emoji-regex: 9.2.2 @@ -10198,11 +7390,8 @@ packages: dev: true /string.prototype.padend/3.1.5: - resolution: - { - integrity: sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.1 @@ -10210,18 +7399,12 @@ packages: dev: true /string.prototype.repeat/0.2.0: - resolution: - { - integrity: sha512-1BH+X+1hSthZFW+X+JaUkjkkUPwIlLEMJBLANN3hOob3RhEk5snLWNECDnYbgn/m5c5JV7Ersu1Yubaf+05cIA==, - } + resolution: {integrity: sha512-1BH+X+1hSthZFW+X+JaUkjkkUPwIlLEMJBLANN3hOob3RhEk5snLWNECDnYbgn/m5c5JV7Ersu1Yubaf+05cIA==} dev: true /string.prototype.trim/1.2.8: - resolution: - { - integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.1 @@ -10229,10 +7412,7 @@ packages: dev: true /string.prototype.trimend/1.0.7: - resolution: - { - integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==, - } + resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: call-bind: 1.0.2 define-properties: 1.2.1 @@ -10240,10 +7420,7 @@ packages: dev: true /string.prototype.trimstart/1.0.7: - resolution: - { - integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==, - } + resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: call-bind: 1.0.2 define-properties: 1.2.1 @@ -10251,131 +7428,86 @@ packages: dev: true /string_decoder/1.1.1: - resolution: - { - integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==, - } + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 dev: true /string_decoder/1.3.0: - resolution: - { - integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==, - } + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 dev: true /strip-ansi/6.0.1: - resolution: - { - integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 /strip-ansi/7.1.0: - resolution: - { - integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} dependencies: ansi-regex: 6.0.1 dev: true /strip-bom/3.0.0: - resolution: - { - integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} dev: true /strip-final-newline/3.0.0: - resolution: - { - integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} dev: true /strip-json-comments/3.1.1: - resolution: - { - integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} dev: true /strip-literal/2.1.0: - resolution: - { - integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==, - } + resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} dependencies: js-tokens: 9.0.0 dev: true /strnum/1.0.5: - resolution: - { - integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==, - } + resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} dev: true /supports-color/5.5.0: - resolution: - { - integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} dependencies: has-flag: 3.0.0 /supports-color/7.2.0: - resolution: - { - integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} dependencies: has-flag: 4.0.0 /supports-color/8.1.1: - resolution: - { - integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} dependencies: has-flag: 4.0.0 dev: true /supports-preserve-symlinks-flag/1.0.0: - resolution: - { - integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} dev: true /tapable/2.2.1: - resolution: - { - integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} dev: true /tar-fs/3.0.5: - resolution: - { - integrity: sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==, - } + resolution: {integrity: sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==} dependencies: pump: 3.0.0 tar-stream: 3.1.6 @@ -10385,10 +7517,7 @@ packages: dev: true /tar-stream/3.1.6: - resolution: - { - integrity: sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==, - } + resolution: {integrity: sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==} dependencies: b4a: 1.6.4 fast-fifo: 1.3.2 @@ -10396,39 +7525,30 @@ packages: dev: true /temporal-polyfill/0.2.5: - resolution: - { - integrity: sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==, - } + resolution: {integrity: sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==} dependencies: temporal-spec: 0.2.4 /temporal-spec/0.2.4: - resolution: - { - integrity: sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==, - } + resolution: {integrity: sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==} /terser-webpack-plugin/5.3.9_webpack@5.88.2: - resolution: - { - integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==, - } - engines: { node: ">= 10.13.0" } + resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} + engines: {node: '>= 10.13.0'} peerDependencies: - "@swc/core": "*" - esbuild: "*" - uglify-js: "*" + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' webpack: ^5.1.0 peerDependenciesMeta: - "@swc/core": + '@swc/core': optional: true esbuild: optional: true uglify-js: optional: true dependencies: - "@jridgewell/trace-mapping": 0.3.25 + '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 @@ -10437,180 +7557,126 @@ packages: dev: true /terser/5.20.0: - resolution: - { - integrity: sha512-e56ETryaQDyebBwJIWYB2TT6f2EZ0fL0sW/JRXNMN26zZdKi2u/E/5my5lG6jNxym6qsrVXfFRmOdV42zlAgLQ==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-e56ETryaQDyebBwJIWYB2TT6f2EZ0fL0sW/JRXNMN26zZdKi2u/E/5my5lG6jNxym6qsrVXfFRmOdV42zlAgLQ==} + engines: {node: '>=10'} hasBin: true dependencies: - "@jridgewell/source-map": 0.3.5 + '@jridgewell/source-map': 0.3.5 acorn: 8.11.3 commander: 2.20.3 source-map-support: 0.5.21 dev: true /test-exclude/6.0.0: - resolution: - { - integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + engines: {node: '>=8'} dependencies: - "@istanbuljs/schema": 0.1.3 + '@istanbuljs/schema': 0.1.3 glob: 7.2.3 minimatch: 3.1.2 dev: true /text-hex/1.0.0: - resolution: - { - integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==, - } + resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} dev: true /text-table/0.2.0: - resolution: - { - integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==, - } + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true /through/2.3.8: - resolution: - { - integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==, - } + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true /tinybench/2.8.0: - resolution: - { - integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==, - } + resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} dev: true /tinypool/0.8.4: - resolution: - { - integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==, - } - engines: { node: ">=14.0.0" } + resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} + engines: {node: '>=14.0.0'} dev: true /tinyspy/2.2.1: - resolution: - { - integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==, - } - engines: { node: ">=14.0.0" } + resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + engines: {node: '>=14.0.0'} dev: true /tmp/0.2.1: - resolution: - { - integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==, - } - engines: { node: ">=8.17.0" } + resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} + engines: {node: '>=8.17.0'} dependencies: rimraf: 3.0.2 dev: true /to-fast-properties/2.0.0: - resolution: - { - integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} dev: true /to-regex-range/5.0.1: - resolution: - { - integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==, - } - engines: { node: ">=8.0" } + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 /toidentifier/1.0.1: - resolution: - { - integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==, - } - engines: { node: ">=0.6" } + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} dev: true /tough-cookie/2.5.0: - resolution: - { - integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==, - } - engines: { node: ">=0.8" } + resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} + engines: {node: '>=0.8'} dependencies: psl: 1.9.0 punycode: 2.3.0 dev: true /tr46/0.0.3: - resolution: - { - integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==, - } + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} /triple-beam/1.4.1: - resolution: - { - integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==, - } - engines: { node: ">= 14.0.0" } + resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} + engines: {node: '>= 14.0.0'} dev: true /ts-api-utils/1.0.3_typescript@5.5.3: - resolution: - { - integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==, - } - engines: { node: ">=16.13.0" } + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} peerDependencies: - typescript: ">=4.2.0" + typescript: '>=4.2.0' dependencies: typescript: 5.5.3 dev: true /ts-morph/23.0.0: - resolution: - { - integrity: sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==, - } + resolution: {integrity: sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==} dependencies: - "@ts-morph/common": 0.24.0 + '@ts-morph/common': 0.24.0 code-block-writer: 13.0.2 dev: false /ts-node/10.9.1_zn7yththkfcgqhkmzzvsumdxyy: - resolution: - { - integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==, - } + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: - "@swc/core": ">=1.2.50" - "@swc/wasm": ">=1.2.50" - "@types/node": "*" - typescript: ">=2.7" + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' peerDependenciesMeta: - "@swc/core": + '@swc/core': optional: true - "@swc/wasm": + '@swc/wasm': optional: true dependencies: - "@cspotcode/source-map-support": 0.8.1 - "@tsconfig/node10": 1.0.9 - "@tsconfig/node12": 1.0.11 - "@tsconfig/node14": 1.0.3 - "@tsconfig/node16": 1.0.4 - "@types/node": 18.18.0 + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 18.18.0 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -10623,14 +7689,11 @@ packages: dev: true /ts-node/8.10.2_typescript@5.5.3: - resolution: - { - integrity: sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==, - } - engines: { node: ">=6.0.0" } + resolution: {integrity: sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==} + engines: {node: '>=6.0.0'} hasBin: true peerDependencies: - typescript: ">=2.7" + typescript: '>=2.7' dependencies: arg: 4.1.3 diff: 4.0.2 @@ -10641,17 +7704,11 @@ packages: dev: true /tslib/2.6.2: - resolution: - { - integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==, - } + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} /tsx/4.17.0: - resolution: - { - integrity: sha512-eN4mnDA5UMKDt4YZixo9tBioibaMBpoxBkD+rIPAjVmYERSG0/dWEY1CEFuV89CgASlKL499q8AhmkMnnjtOJg==, - } - engines: { node: ">=18.0.0" } + resolution: {integrity: sha512-eN4mnDA5UMKDt4YZixo9tBioibaMBpoxBkD+rIPAjVmYERSG0/dWEY1CEFuV89CgASlKL499q8AhmkMnnjtOJg==} + engines: {node: '>=18.0.0'} hasBin: true dependencies: esbuild: 0.23.0 @@ -10661,71 +7718,47 @@ packages: dev: true /tunnel-agent/0.6.0: - resolution: - { - integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==, - } + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: safe-buffer: 5.2.1 dev: true /tunnel/0.0.6: - resolution: - { - integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==, - } - engines: { node: ">=0.6.11 <=0.7.0 || >=0.7.3" } + resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} + engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} /tweetnacl/0.14.5: - resolution: - { - integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==, - } + resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} dev: true /type-check/0.4.0: - resolution: - { - integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==, - } - engines: { node: ">= 0.8.0" } + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 dev: true /type-detect/4.0.8: - resolution: - { - integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==, - } - engines: { node: ">=4" } + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} dev: true /type-fest/0.20.2: - resolution: - { - integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} dev: true /type-is/1.6.18: - resolution: - { - integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==, - } - engines: { node: ">= 0.6" } + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} dependencies: media-typer: 0.3.0 mime-types: 2.1.35 dev: true /typed-array-buffer/1.0.0: - resolution: - { - integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 @@ -10733,11 +7766,8 @@ packages: dev: true /typed-array-byte-length/1.0.0: - resolution: - { - integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 for-each: 0.3.3 @@ -10746,11 +7776,8 @@ packages: dev: true /typed-array-byte-offset/1.0.0: - resolution: - { - integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 call-bind: 1.0.2 @@ -10760,10 +7787,7 @@ packages: dev: true /typed-array-length/1.0.4: - resolution: - { - integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==, - } + resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: call-bind: 1.0.2 for-each: 0.3.3 @@ -10771,60 +7795,39 @@ packages: dev: true /typedarray/0.0.6: - resolution: - { - integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==, - } + resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true /typescript/5.4.2: - resolution: - { - integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==, - } - engines: { node: ">=14.17" } + resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} + engines: {node: '>=14.17'} hasBin: true dev: true /typescript/5.5.3: - resolution: - { - integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==, - } - engines: { node: ">=14.17" } + resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} + engines: {node: '>=14.17'} hasBin: true dev: true /ua-parser-js/0.7.36: - resolution: - { - integrity: sha512-CPPLoCts2p7D8VbybttE3P2ylv0OBZEAy7a12DsulIEcAiMtWJy+PBgMXgWDI80D5UwqE8oQPHYnk13tm38M2Q==, - } + resolution: {integrity: sha512-CPPLoCts2p7D8VbybttE3P2ylv0OBZEAy7a12DsulIEcAiMtWJy+PBgMXgWDI80D5UwqE8oQPHYnk13tm38M2Q==} dev: true /ufo/1.5.3: - resolution: - { - integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==, - } + resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} dev: true /uglify-js/3.17.4: - resolution: - { - integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==, - } - engines: { node: ">=0.8.0" } + resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} + engines: {node: '>=0.8.0'} hasBin: true requiresBuild: true dev: false optional: true /unbox-primitive/1.0.2: - resolution: - { - integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==, - } + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: call-bind: 1.0.2 has-bigints: 1.0.2 @@ -10833,67 +7836,43 @@ packages: dev: true /unbzip2-stream/1.4.3: - resolution: - { - integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==, - } + resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} dependencies: buffer: 5.7.1 through: 2.3.8 dev: true /underscore/1.13.6: - resolution: - { - integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==, - } + resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} dev: true /undici-types/6.13.0: - resolution: - { - integrity: sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==, - } + resolution: {integrity: sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==} dev: true /unicorn-magic/0.1.0: - resolution: - { - integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==, - } - engines: { node: ">=18" } + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} /universalify/0.1.2: - resolution: - { - integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==, - } - engines: { node: ">= 4.0.0" } + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} dev: true /universalify/2.0.0: - resolution: - { - integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==, - } - engines: { node: ">= 10.0.0" } + resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + engines: {node: '>= 10.0.0'} /unpipe/1.0.0: - resolution: - { - integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} dev: true /update-browserslist-db/1.0.13_browserslist@4.21.11: - resolution: - { - integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==, - } + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: - browserslist: ">= 4.21.0" + browserslist: '>= 4.21.0' dependencies: browserslist: 4.21.11 escalade: 3.1.2 @@ -10901,13 +7880,10 @@ packages: dev: true /update-browserslist-db/1.0.16_browserslist@4.23.1: - resolution: - { - integrity: sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==, - } + resolution: {integrity: sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==} hasBin: true peerDependencies: - browserslist: ">= 4.21.0" + browserslist: '>= 4.21.0' dependencies: browserslist: 4.23.1 escalade: 3.1.2 @@ -10915,83 +7891,53 @@ packages: dev: true /uri-js/4.4.1: - resolution: - { - integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==, - } + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.3.0 dev: true /urlpattern-polyfill/10.0.0: - resolution: - { - integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==, - } + resolution: {integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==} dev: true /util-deprecate/1.0.2: - resolution: - { - integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==, - } + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true /utils-merge/1.0.1: - resolution: - { - integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==, - } - engines: { node: ">= 0.4.0" } + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} + engines: {node: '>= 0.4.0'} dev: true /uuid/3.4.0: - resolution: - { - integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==, - } + resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. hasBin: true dev: true /uuid/8.3.2: - resolution: - { - integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==, - } + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true /v8-compile-cache-lib/3.0.1: - resolution: - { - integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==, - } + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true /validate-npm-package-license/3.0.4: - resolution: - { - integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==, - } + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 dev: true /vary/1.1.2: - resolution: - { - integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==, - } - engines: { node: ">= 0.8" } + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} dev: true /verror/1.10.0: - resolution: - { - integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==, - } - engines: { "0": node >=0.6.0 } + resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} + engines: {'0': node >=0.6.0} dependencies: assert-plus: 1.0.0 core-util-is: 1.0.2 @@ -10999,11 +7945,8 @@ packages: dev: true /vite-node/1.6.0_@types+node@18.18.0: - resolution: - { - integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==, - } - engines: { node: ^18.0.0 || >=20.0.0 } + resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: cac: 6.7.14 @@ -11012,7 +7955,7 @@ packages: picocolors: 1.0.1 vite: 5.2.13_@types+node@18.18.0 transitivePeerDependencies: - - "@types/node" + - '@types/node' - less - lightningcss - sass @@ -11023,22 +7966,19 @@ packages: dev: true /vite/5.2.13_@types+node@18.18.0: - resolution: - { - integrity: sha512-SSq1noJfY9pR3I1TUENL3rQYDQCFqgD+lM6fTRAM8Nv6Lsg5hDLaXkjETVeBt+7vZBCMoibD+6IWnT2mJ+Zb/A==, - } - engines: { node: ^18.0.0 || >=20.0.0 } + resolution: {integrity: sha512-SSq1noJfY9pR3I1TUENL3rQYDQCFqgD+lM6fTRAM8Nv6Lsg5hDLaXkjETVeBt+7vZBCMoibD+6IWnT2mJ+Zb/A==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: - "@types/node": ^18.0.0 || >=20.0.0 - less: "*" + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' lightningcss: ^1.21.0 - sass: "*" - stylus: "*" - sugarss: "*" + sass: '*' + stylus: '*' + sugarss: '*' terser: ^5.4.0 peerDependenciesMeta: - "@types/node": + '@types/node': optional: true less: optional: true @@ -11053,7 +7993,7 @@ packages: terser: optional: true dependencies: - "@types/node": 18.18.0 + '@types/node': 18.18.0 esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.18.0 @@ -11062,39 +8002,36 @@ packages: dev: true /vitest/1.6.0_@types+node@18.18.0: - resolution: - { - integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==, - } - engines: { node: ^18.0.0 || >=20.0.0 } + resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: - "@edge-runtime/vm": "*" - "@types/node": ^18.0.0 || >=20.0.0 - "@vitest/browser": 1.6.0 - "@vitest/ui": 1.6.0 - happy-dom: "*" - jsdom: "*" + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 1.6.0 + '@vitest/ui': 1.6.0 + happy-dom: '*' + jsdom: '*' peerDependenciesMeta: - "@edge-runtime/vm": + '@edge-runtime/vm': optional: true - "@types/node": + '@types/node': optional: true - "@vitest/browser": + '@vitest/browser': optional: true - "@vitest/ui": + '@vitest/ui': optional: true happy-dom: optional: true jsdom: optional: true dependencies: - "@types/node": 18.18.0 - "@vitest/expect": 1.6.0 - "@vitest/runner": 1.6.0 - "@vitest/snapshot": 1.6.0 - "@vitest/spy": 1.6.0 - "@vitest/utils": 1.6.0 + '@types/node': 18.18.0 + '@vitest/expect': 1.6.0 + '@vitest/runner': 1.6.0 + '@vitest/snapshot': 1.6.0 + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 acorn-walk: 8.3.2 chai: 4.4.1 debug: 4.3.4 @@ -11121,64 +8058,40 @@ packages: dev: true /void-elements/2.0.1: - resolution: - { - integrity: sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==, - } - engines: { node: ">=0.10.0" } + resolution: {integrity: sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==} + engines: {node: '>=0.10.0'} dev: true /vscode-jsonrpc/3.6.2: - resolution: - { - integrity: sha512-T24Jb5V48e4VgYliUXMnZ379ItbrXgOimweKaJshD84z+8q7ZOZjJan0MeDe+Ugb+uqERDVV8SBmemaGMSMugA==, - } - engines: { node: ">=4.0.0 || >=6.0.0" } + resolution: {integrity: sha512-T24Jb5V48e4VgYliUXMnZ379ItbrXgOimweKaJshD84z+8q7ZOZjJan0MeDe+Ugb+uqERDVV8SBmemaGMSMugA==} + engines: {node: '>=4.0.0 || >=6.0.0'} dev: false /vscode-jsonrpc/8.2.0: - resolution: - { - integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==, - } - engines: { node: ">=14.0.0" } + resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==} + engines: {node: '>=14.0.0'} /vscode-languageserver-protocol/3.17.5: - resolution: - { - integrity: sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==, - } + resolution: {integrity: sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==} dependencies: vscode-jsonrpc: 8.2.0 vscode-languageserver-types: 3.17.5 /vscode-languageserver-textdocument/1.0.11: - resolution: - { - integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==, - } + resolution: {integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==} /vscode-languageserver-types/3.17.5: - resolution: - { - integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==, - } + resolution: {integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==} /vscode-languageserver/9.0.1: - resolution: - { - integrity: sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==, - } + resolution: {integrity: sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==} hasBin: true dependencies: vscode-languageserver-protocol: 3.17.5 /wait-port/0.2.14: - resolution: - { - integrity: sha512-kIzjWcr6ykl7WFbZd0TMae8xovwqcqbx6FM9l+7agOgUByhzdjfzZBPK2CPufldTOMxbUivss//Sh9MFawmPRQ==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-kIzjWcr6ykl7WFbZd0TMae8xovwqcqbx6FM9l+7agOgUByhzdjfzZBPK2CPufldTOMxbUivss//Sh9MFawmPRQ==} + engines: {node: '>=8'} hasBin: true dependencies: chalk: 2.4.2 @@ -11189,57 +8102,45 @@ packages: dev: true /watchpack/2.4.0: - resolution: - { - integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==, - } - engines: { node: ">=10.13.0" } + resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==} + engines: {node: '>=10.13.0'} dependencies: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 dev: true /web-streams-polyfill/3.2.1: - resolution: - { - integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==, - } - engines: { node: ">= 8" } + resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} + engines: {node: '>= 8'} dev: true /webidl-conversions/3.0.1: - resolution: - { - integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==, - } + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} /webpack-cli/4.10.0_webpack@5.88.2: - resolution: - { - integrity: sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==, - } - engines: { node: ">=10.13.0" } + resolution: {integrity: sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==} + engines: {node: '>=10.13.0'} hasBin: true peerDependencies: - "@webpack-cli/generators": "*" - "@webpack-cli/migrate": "*" + '@webpack-cli/generators': '*' + '@webpack-cli/migrate': '*' webpack: 4.x.x || 5.x.x - webpack-bundle-analyzer: "*" - webpack-dev-server: "*" + webpack-bundle-analyzer: '*' + webpack-dev-server: '*' peerDependenciesMeta: - "@webpack-cli/generators": + '@webpack-cli/generators': optional: true - "@webpack-cli/migrate": + '@webpack-cli/migrate': optional: true webpack-bundle-analyzer: optional: true webpack-dev-server: optional: true dependencies: - "@discoveryjs/json-ext": 0.5.7 - "@webpack-cli/configtest": 1.2.0_w3wu7rcwmvifygnqiqkxwjppse - "@webpack-cli/info": 1.5.0_webpack-cli@4.10.0 - "@webpack-cli/serve": 1.7.0_webpack-cli@4.10.0 + '@discoveryjs/json-ext': 0.5.7 + '@webpack-cli/configtest': 1.2.0_w3wu7rcwmvifygnqiqkxwjppse + '@webpack-cli/info': 1.5.0_webpack-cli@4.10.0 + '@webpack-cli/serve': 1.7.0_webpack-cli@4.10.0 colorette: 2.0.20 commander: 7.2.0 cross-spawn: 7.0.3 @@ -11252,42 +8153,33 @@ packages: dev: true /webpack-merge/5.9.0: - resolution: - { - integrity: sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==, - } - engines: { node: ">=10.0.0" } + resolution: {integrity: sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==} + engines: {node: '>=10.0.0'} dependencies: clone-deep: 4.0.1 wildcard: 2.0.1 dev: true /webpack-sources/3.2.3: - resolution: - { - integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==, - } - engines: { node: ">=10.13.0" } + resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} + engines: {node: '>=10.13.0'} dev: true /webpack/5.88.2_webpack-cli@4.10.0: - resolution: - { - integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==, - } - engines: { node: ">=10.13.0" } + resolution: {integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==} + engines: {node: '>=10.13.0'} hasBin: true peerDependencies: - webpack-cli: "*" + webpack-cli: '*' peerDependenciesMeta: webpack-cli: optional: true dependencies: - "@types/eslint-scope": 3.7.5 - "@types/estree": 1.0.2 - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/wasm-edit": 1.11.6 - "@webassemblyjs/wasm-parser": 1.11.6 + '@types/eslint-scope': 3.7.5 + '@types/estree': 1.0.2 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/wasm-edit': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 acorn: 8.10.0 acorn-import-assertions: 1.9.0_acorn@8.10.0 browserslist: 4.21.11 @@ -11309,32 +8201,23 @@ packages: webpack-cli: 4.10.0_webpack@5.88.2 webpack-sources: 3.2.3 transitivePeerDependencies: - - "@swc/core" + - '@swc/core' - esbuild - uglify-js dev: true /whatwg-mimetype/2.3.0: - resolution: - { - integrity: sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==, - } + resolution: {integrity: sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==} dev: true /whatwg-url/5.0.0: - resolution: - { - integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==, - } + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 /which-boxed-primitive/1.0.2: - resolution: - { - integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==, - } + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: is-bigint: 1.0.4 is-boolean-object: 1.1.2 @@ -11344,10 +8227,7 @@ packages: dev: true /which-collection/1.0.1: - resolution: - { - integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==, - } + resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} dependencies: is-map: 2.0.2 is-set: 2.0.2 @@ -11356,11 +8236,8 @@ packages: dev: true /which-typed-array/1.1.11: - resolution: - { - integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==, - } - engines: { node: ">= 0.4" } + resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} + engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 call-bind: 1.0.2 @@ -11370,32 +8247,23 @@ packages: dev: true /which/1.3.1: - resolution: - { - integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==, - } + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true dependencies: isexe: 2.0.0 dev: true /which/2.0.2: - resolution: - { - integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==, - } - engines: { node: ">= 8" } + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} hasBin: true dependencies: isexe: 2.0.0 dev: true /why-is-node-running/2.2.2: - resolution: - { - integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==, - } - engines: { node: ">=8" } + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} hasBin: true dependencies: siginfo: 2.0.0 @@ -11403,18 +8271,12 @@ packages: dev: true /wildcard/2.0.1: - resolution: - { - integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==, - } + resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} dev: true /winston-transport/4.5.0: - resolution: - { - integrity: sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==, - } - engines: { node: ">= 6.4.0" } + resolution: {integrity: sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==} + engines: {node: '>= 6.4.0'} dependencies: logform: 2.6.1 readable-stream: 3.6.2 @@ -11422,11 +8284,8 @@ packages: dev: true /winston-transport/4.7.1: - resolution: - { - integrity: sha512-wQCXXVgfv/wUPOfb2x0ruxzwkcZfxcktz6JIMUaPLmcNhO4bZTwA/WtDWK74xV3F2dKu8YadrFv0qhwYjVEwhA==, - } - engines: { node: ">= 12.0.0" } + resolution: {integrity: sha512-wQCXXVgfv/wUPOfb2x0ruxzwkcZfxcktz6JIMUaPLmcNhO4bZTwA/WtDWK74xV3F2dKu8YadrFv0qhwYjVEwhA==} + engines: {node: '>= 12.0.0'} dependencies: logform: 2.6.1 readable-stream: 3.6.2 @@ -11434,14 +8293,11 @@ packages: dev: true /winston/3.10.0: - resolution: - { - integrity: sha512-nT6SIDaE9B7ZRO0u3UvdrimG0HkB7dSTAgInQnNR2SOPJ4bvq5q79+pXLftKmP52lJGW15+H5MCK0nM9D3KB/g==, - } - engines: { node: ">= 12.0.0" } - dependencies: - "@colors/colors": 1.5.0 - "@dabh/diagnostics": 2.0.3 + resolution: {integrity: sha512-nT6SIDaE9B7ZRO0u3UvdrimG0HkB7dSTAgInQnNR2SOPJ4bvq5q79+pXLftKmP52lJGW15+H5MCK0nM9D3KB/g==} + engines: {node: '>= 12.0.0'} + dependencies: + '@colors/colors': 1.5.0 + '@dabh/diagnostics': 2.0.3 async: 3.2.4 is-stream: 2.0.1 logform: 2.5.1 @@ -11454,14 +8310,11 @@ packages: dev: true /winston/3.14.1: - resolution: - { - integrity: sha512-CJi4Il/msz8HkdDfXOMu+r5Au/oyEjFiOZzbX2d23hRLY0narGjqfE5lFlrT5hfYJhPtM8b85/GNFsxIML/RVA==, - } - engines: { node: ">= 12.0.0" } - dependencies: - "@colors/colors": 1.6.0 - "@dabh/diagnostics": 2.0.3 + resolution: {integrity: sha512-CJi4Il/msz8HkdDfXOMu+r5Au/oyEjFiOZzbX2d23hRLY0narGjqfE5lFlrT5hfYJhPtM8b85/GNFsxIML/RVA==} + engines: {node: '>= 12.0.0'} + dependencies: + '@colors/colors': 1.6.0 + '@dabh/diagnostics': 2.0.3 async: 3.2.4 is-stream: 2.0.1 logform: 2.6.1 @@ -11474,43 +8327,28 @@ packages: dev: true /wordwrap/1.0.0: - resolution: - { - integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==, - } + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: false /workerpool/6.2.0: - resolution: - { - integrity: sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==, - } + resolution: {integrity: sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==} dev: true /workerpool/6.2.1: - resolution: - { - integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==, - } + resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} dev: true /wrap-ansi/7.0.0: - resolution: - { - integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} dependencies: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 /wrap-ansi/8.1.0: - resolution: - { - integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} dependencies: ansi-styles: 6.2.1 string-width: 5.1.2 @@ -11518,18 +8356,12 @@ packages: dev: true /wrappy/1.0.2: - resolution: - { - integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==, - } + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true /ws/8.11.0: - resolution: - { - integrity: sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==, - } - engines: { node: ">=10.0.0" } + resolution: {integrity: sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==} + engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -11541,14 +8373,11 @@ packages: dev: true /ws/8.16.0: - resolution: - { - integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==, - } - engines: { node: ">=10.0.0" } + resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} + engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" + utf-8-validate: '>=5.0.2' peerDependenciesMeta: bufferutil: optional: true @@ -11557,116 +8386,74 @@ packages: dev: true /xml-formatter/3.6.3: - resolution: - { - integrity: sha512-++x1TlRO1FRlQ82AZ4WnoCSufaI/PT/sycn4K8nRl4gnrNC1uYY2VV/67aALZ2m0Q4Q/BLj/L69K360Itw9NNg==, - } - engines: { node: ">= 16" } + resolution: {integrity: sha512-++x1TlRO1FRlQ82AZ4WnoCSufaI/PT/sycn4K8nRl4gnrNC1uYY2VV/67aALZ2m0Q4Q/BLj/L69K360Itw9NNg==} + engines: {node: '>= 16'} dependencies: xml-parser-xo: 4.1.2 dev: true /xml-parser-xo/4.1.2: - resolution: - { - integrity: sha512-Z/DRB0ZAKj5vAQg++XsfQQKfT73Vfj5n5lKIVXobBDQEva6NHWUTxOA6OohJmEcpoy8AEqBmSGkXXAnFwt5qAA==, - } - engines: { node: ">= 16" } + resolution: {integrity: sha512-Z/DRB0ZAKj5vAQg++XsfQQKfT73Vfj5n5lKIVXobBDQEva6NHWUTxOA6OohJmEcpoy8AEqBmSGkXXAnFwt5qAA==} + engines: {node: '>= 16'} dev: true /xml2js/0.5.0: - resolution: - { - integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==, - } - engines: { node: ">=4.0.0" } + resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==} + engines: {node: '>=4.0.0'} dependencies: sax: 1.2.4 xmlbuilder: 11.0.1 /xml2js/0.6.2: - resolution: - { - integrity: sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==, - } - engines: { node: ">=4.0.0" } + resolution: {integrity: sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==} + engines: {node: '>=4.0.0'} dependencies: sax: 1.2.4 xmlbuilder: 11.0.1 dev: true /xmlbuilder/11.0.1: - resolution: - { - integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==, - } - engines: { node: ">=4.0" } + resolution: {integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==} + engines: {node: '>=4.0'} /xtend/4.0.2: - resolution: - { - integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==, - } - engines: { node: ">=0.4" } + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} dev: true /y18n/5.0.8: - resolution: - { - integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} /yallist/3.1.1: - resolution: - { - integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==, - } + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: true /yallist/4.0.0: - resolution: - { - integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==, - } + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} /yaml/2.4.5: - resolution: - { - integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==, - } - engines: { node: ">= 14" } + resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} + engines: {node: '>= 14'} hasBin: true /yargs-parser/20.2.4: - resolution: - { - integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} + engines: {node: '>=10'} dev: true /yargs-parser/20.2.9: - resolution: - { - integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} dev: true /yargs-parser/21.1.1: - resolution: - { - integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} /yargs-unparser/2.0.0: - resolution: - { - integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} dependencies: camelcase: 6.3.0 decamelize: 4.0.0 @@ -11675,11 +8462,8 @@ packages: dev: true /yargs/16.2.0: - resolution: - { - integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} dependencies: cliui: 7.0.4 escalade: 3.1.2 @@ -11691,11 +8475,8 @@ packages: dev: true /yargs/17.7.2: - resolution: - { - integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==, - } - engines: { node: ">=12" } + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} dependencies: cliui: 8.0.1 escalade: 3.1.1 @@ -11706,35 +8487,23 @@ packages: yargs-parser: 21.1.1 /yauzl/2.10.0: - resolution: - { - integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==, - } + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} dependencies: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 dev: true /yn/3.1.1: - resolution: - { - integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==, - } - engines: { node: ">=6" } + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} dev: true /yocto-queue/0.1.0: - resolution: - { - integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==, - } - engines: { node: ">=10" } + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} dev: true /yocto-queue/1.0.0: - resolution: - { - integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==, - } - engines: { node: ">=12.20" } + resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + engines: {node: '>=12.20'} dev: true From c7e6437107349f3f7b8e6a803ff6257c262b82e8 Mon Sep 17 00:00:00 2001 From: "Jiao Di (MSFT)" <80496810+v-jiaodi@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:54:36 +0800 Subject: [PATCH 67/83] update --- .../typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts | 2 +- .../typespec-ts/samples-dev/dataProductsCreateSample.ts | 2 +- .../typespec-ts/samples-dev/dataProductsDeleteSample.ts | 2 +- .../dataProductsGenerateStorageAccountSasTokenSample.ts | 2 +- .../samples-dev/dataProductsListByResourceGroupSample.ts | 2 +- .../typespec-ts/samples-dev/dataProductsRotateKeySample.ts | 2 +- .../typespec-ts/samples-dev/dataProductsUpdateSample.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts index d304daf4e0..fee700dc8f 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsAddUserRoleSample.ts @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts index e68c3328d6..0b6070fc3f 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsCreateSample.ts @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts index f05e4fb419..4a1ab43787 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts index 6c086ccd87..b71a43c023 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsGenerateStorageAccountSasTokenSample.ts @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts index 8b93bdecae..f056967ce9 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsListByResourceGroupSample.ts @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts index d6b0d724ba..688db35f9d 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts index 7b618c6c86..17053028cb 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsUpdateSample.ts @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. import { NetworkAnalyticsClient } from "@azure/arm-networkanalytics"; import { DefaultAzureCredential } from "@azure/identity"; From 310f4530e6826243ca1107ff52146fe3f557be93 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 3 Sep 2024 14:10:49 +0800 Subject: [PATCH 68/83] Refactor with client and method parameters --- .../typespec-ts/src/modular/emitSamples.ts | 168 ++++++------------ 1 file changed, 57 insertions(+), 111 deletions(-) diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 6a05178c8d..934ee041e3 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -42,6 +42,7 @@ interface ExampleValue { name: string; value: string; isOptional: boolean; + onClient: boolean; } interface EmitSampleOptions { @@ -148,13 +149,14 @@ function emitMethodSamples( }; const parameterMap: Record = buildParameterValueMap(example); - // prepare client-level parameters - const clientParamValues = prepareClientExampleParameters( + const parameters = prepareExampleParameters( dpgContext, method, parameterMap, options.topLevelClient ); + // prepare client-level parameters + const clientParamValues = parameters.filter((p) => p.onClient); const clientParams: string[] = clientParamValues .filter((p) => !p.isOptional) .map((param) => { @@ -177,12 +179,7 @@ function emitMethodSamples( ); // prepare operation-level parameters - const methodParamValues = prepareMethodExampleParameters( - dpgContext, - exampleName, - method, - parameterMap - ); + const methodParamValues = parameters.filter((p) => !p.onClient); const methodParams = methodParamValues .filter((p) => !p.isOptional) .map((p) => `${p.value}`); @@ -249,87 +246,7 @@ function buildParameterValueMap(example: SdkHttpOperationExample) { return parameterMap; } -function prepareMethodExampleParameters( - dpgContext: SdkContext, - exampleName: string, - method: SdkServiceMethod, - parameterMap: Record -): ExampleValue[] { - const parameters: ExampleValue[] = []; - for (const param of method.operation.parameters) { - if ( - param.optional === true || - param.onClient === true || - param.type.kind === "constant" - ) { - continue; - } - const exampleValue = parameterMap[param.serializedName]; - if (!exampleValue || !exampleValue.value) { - // report diagnostic if required parameter is missing - reportDiagnostic(dpgContext.program, { - code: "required-sample-parameter", - format: { - exampleName: exampleName, - paramName: param.name - }, - target: NoTarget - }); - continue; - } - - parameters.push({ - name: param.name, - value: getParameterValue(exampleValue.value), - isOptional: false - }); - } - // required/optional body parameters - const bodyParam = method.operation.bodyParam; - const bodyName = bodyParam?.name; - const bodyExample = parameterMap[bodyName ?? ""]; - if (bodyName && bodyExample && bodyExample.value) { - if ( - isSpreadBodyParameter(bodyParam) && - bodyParam.type.kind === "model" && - bodyExample.value.kind === "model" - ) { - for (const prop of bodyParam.type.properties) { - const propExample = bodyExample.value.value[prop.name]; - if (!propExample) { - continue; - } - parameters.push({ - name: prop.name, - value: getParameterValue(propExample), - isOptional: Boolean(prop.optional) - }); - } - } else { - parameters.push({ - name: bodyName, - value: getParameterValue(bodyExample.value), - isOptional: Boolean(method.operation.bodyParam?.optional) - }); - } - } - // optional parameters - method.operation.parameters - .filter( - (param) => param.optional === true && parameterMap[param.serializedName] - ) - .map((param) => parameterMap[param.serializedName]!) - .forEach((param) => { - parameters.push({ - name: param.parameter.name, - value: getParameterValue(param.value), - isOptional: true - }); - }); - return parameters; -} - -function prepareClientExampleParameters( +function prepareExampleParameters( dpgContext: SdkContext, method: SdkServiceMethod, parameterMap: Record, @@ -347,13 +264,9 @@ function prepareClientExampleParameters( } let subscriptionIdValue = `"00000000-0000-0000-0000-00000000000"`; - // required client-level parameters + // required parameters for (const param of method.operation.parameters) { - if ( - param.onClient === false || - param.optional === true || - param.type.kind === "constant" - ) { + if (param.optional === true || param.type.kind === "constant") { continue; } @@ -382,7 +295,8 @@ function prepareClientExampleParameters( result.push({ name: exampleValue.parameter.name, value: getParameterValue(exampleValue.value), - isOptional: Boolean(param.optional) + isOptional: Boolean(param.optional), + onClient: Boolean(param.onClient) }); } // always add subscriptionId for ARM clients @@ -390,23 +304,53 @@ function prepareClientExampleParameters( result.push({ name: "subscriptionId", value: subscriptionIdValue, - isOptional: false + isOptional: false, + onClient: true }); } + // required/optional body parameters + const bodyParam = method.operation.bodyParam; + const bodyName = bodyParam?.name; + const bodyExample = parameterMap[bodyName ?? ""]; + if (bodyName && bodyExample && bodyExample.value) { + if ( + isSpreadBodyParameter(bodyParam) && + bodyParam.type.kind === "model" && + bodyExample.value.kind === "model" + ) { + for (const prop of bodyParam.type.properties) { + const propExample = bodyExample.value.value[prop.name]; + if (!propExample) { + continue; + } + result.push({ + name: prop.name, + value: getParameterValue(propExample), + isOptional: Boolean(prop.optional), + onClient: Boolean(prop.onClient) + }); + } + } else { + result.push({ + name: bodyName, + value: getParameterValue(bodyExample.value), + isOptional: Boolean(method.operation.bodyParam?.optional), + onClient: Boolean(method.operation.bodyParam?.onClient) + }); + } + } // optional parameters method.operation.parameters .filter( - (param) => - param.onClient === true && - param.optional === true && - parameterMap[param.serializedName] + (param) => param.optional === true && parameterMap[param.serializedName] ) .map((param) => parameterMap[param.serializedName]!) .forEach((param) => { result.push({ name: param.parameter.name, value: getParameterValue(param.value), - isOptional: true + isOptional: true, + onClient: Boolean(param.parameter.onClient) }); }); @@ -419,30 +363,32 @@ function getCredentialExampleValue( ): ExampleValue | undefined { const keyCredential = hasKeyCredential(initialization), tokenCredential = hasTokenCredential(initialization); + const defaultSetting = { + isOptional: false, + onClient: true, + name: "credential" + }; if (keyCredential || tokenCredential) { if (isAzurePackage({ options: dpgContext.rlcOptions })) { // Support DefaultAzureCredential for Azure packages return { - name: "credential", + ...defaultSetting, value: `new ${resolveReference( AzureIdentityDependencies.DefaultAzureCredential - )}()`, - isOptional: false + )}()` }; } else if (keyCredential) { // Support ApiKeyCredential for non-Azure packages return { - name: "credential", - value: `{ key: "INPUT_YOUR_KEY_HERE" }`, - isOptional: false + ...defaultSetting, + value: `{ key: "INPUT_YOUR_KEY_HERE" }` }; } else if (tokenCredential) { // Support TokenCredential for non-Azure packages return { - name: "credential", + ...defaultSetting, value: `{ getToken: async () => { - return { token: "INPUT_YOUR_TOKEN_HERE", expiresOnTimestamp: now() }; } }`, - isOptional: false + return { token: "INPUT_YOUR_TOKEN_HERE", expiresOnTimestamp: now() }; } }` }; } } From eaf7545abc812d39408c1cd42fd807adb36b3b6e Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 3 Sep 2024 14:45:46 +0800 Subject: [PATCH 69/83] Update the samples and skip console void result --- packages/typespec-ts/src/modular/emitSamples.ts | 3 +++ .../samples/client/apiKeyCredentialClient.md | 2 +- .../samples/client/disableHierarchyClient.md | 8 ++++---- .../samples/client/enableHierarchyClient.md | 8 ++++---- .../scenarios/samples/client/multipleClient.md | 4 ++-- .../samples/operations/armCurdOperations.md | 12 ++++-------- .../samples/parameters/bodyOptionalCheck.md | 4 ++-- .../samples/parameters/paramaterSpreadCheck.md | 2 +- .../samples/parameters/parameterTypesCheck.md | 15 ++++++++++++--- 9 files changed, 33 insertions(+), 25 deletions(-) diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 934ee041e3..cbd6b20eef 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -202,6 +202,9 @@ function emitMethodSamples( `for await (let item of ${methodCall}) { resArray.push(item); }` ); exampleFunctionBody.push(`console.log(resArray);`); + } else if (method.response.type === undefined) { + // skip response handling for void methods + exampleFunctionBody.push(`await ${methodCall};`); } else { exampleFunctionBody.push(`const result = await ${methodCall};`); exampleFunctionBody.push(`console.log(result);`); diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md index 64b3f20c97..e96fc59aa7 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/apiKeyCredentialClient.md @@ -26,7 +26,7 @@ enum Versions { } @doc("show example demo") -op read(name: string): void; +op read(name: string): { @body body: {}}; ``` This is the tspconfig.yaml. diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md index 6aa0ca691d..e7da48be5b 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md @@ -19,19 +19,19 @@ namespace B { prop3: string; } interface C { - op opBEC(@body body: A): void + op opBEC(@body body: A): { @body body: {}}; } } - op opB(@body body: A): void; + op opB(@body body: A): { @body body: {}}; } @route("/d") interface D { @doc("show example opD") - op opD(@body body: A): void; + op opD(@body body: A): { @body body: {}}; } @doc("show example opTopLevel") -op opTopLevel(@body body: A): void; +op opTopLevel(@body body: A): { @body body: {}}; ``` This is the tspconfig.yaml. diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md index 8b1ee83b51..b0a9e9da7b 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md @@ -19,19 +19,19 @@ namespace B { prop3: string; } interface C { - op opBEC(@body body: A): void + op opBEC(@body body: A): { @body body: {}}; } } - op opB(@body body: A): void; + op opB(@body body: A): { @body body: {}}; } @route("/d") interface D { @doc("show example opD") - op opD(@body body: A): void; + op opD(@body body: A): { @body body: {}}; } @doc("show example opTopLevel") -op opTopLevel(@body body: A): void; +op opTopLevel(@body body: A): { @body body: {}}; ``` This is the tspconfig.yaml. diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClient.md index a5ccba88fb..298be25e95 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/multipleClient.md @@ -30,9 +30,9 @@ enum Versions { @route("b") namespace Sub { @route("foo") - op foo(): void; + op foo(): { @body body: {}}; @route("bar") - op bar(): void; + op bar(): { @body body: {}}; } @client({ diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md index 6d714adbd6..6ec08e6ce3 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md @@ -204,11 +204,11 @@ async function employeesCreateOrUpdate() { properties: { age: 30, city: "gydhnntudughbmxlkyzrskcdkotrxn", - profile: "ms", + profile: "ms" }, tags: { key2913: "urperxmkkhhkp" }, - location: "itajgxyqozseoygnl", - }, + location: "itajgxyqozseoygnl" + } ); console.log(result); } @@ -233,11 +233,7 @@ async function employeesDelete() { const credential = new DefaultAzureCredential(); const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; const client = new ContosoClient(credential, subscriptionId); - const result = await client.employees.delete( - "rgopenapi", - "5vX--BxSu3ux48rI4O9OQ569", - ); - console.log(result); + await client.employees.delete("rgopenapi", "5vX--BxSu3ux48rI4O9OQ569"); } async function main() { diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md index c80d8b4fb2..274dde348c 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md @@ -27,7 +27,7 @@ model CompositeRequest { } @doc("show example demo") -op read(...CompositeRequest): void; +op read(...CompositeRequest): { @body body: {}}; ``` ## Example @@ -72,7 +72,7 @@ async function read() { const client = new TestingClient(); const result = await client.read("required path param", "required query", { body: { name: "body name" }, - optionalQuery: "renamed optional query", + optionalQuery: "renamed optional query" }); console.log(result); } diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md index d1ec8d7ecd..04901853b8 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/paramaterSpreadCheck.md @@ -36,7 +36,7 @@ model CompositeRequest { } @doc("show example demo") -op read(...CompositeRequest): void; +op read(...CompositeRequest): { @body body: {}}; ``` ## Example diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index a14271d6b5..182a8fe178 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -22,10 +22,13 @@ model Widget { @clientName("jsClientName", "javascript") renamedProp: string; ...Record; + stringLiteral: "foo"; + booleanLiteral: true; + numberLiteral: 12; } @doc("show example demo") -op read(@bodyRoot body: Widget): void; +op read(@bodyRoot body: Widget): { @body body: {}}; ``` ## Example @@ -48,7 +51,10 @@ op read(@bodyRoot body: Widget): void; "unionValue": "test", "nullValue": null, "additionalProp": "additional prop", - "renamedProp": "prop renamed" + "renamedProp": "prop renamed", + "stringLiteral": "foo", + "booleanLiteral": true, + "numberLiteral": 12 } }, "responses": { @@ -83,7 +89,10 @@ async function read() { unionValue: test, nullValue: null, jsClientName: "prop renamed", - additionalProp: "additional prop", + stringLiteral: "foo", + booleanLiteral: true, + numberLiteral: 12, + additionalProp: "additional prop" }); console.log(result); } From 0bfe1afd90bb714818a346e3bbc9558b6cfe8fab Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 3 Sep 2024 14:55:46 +0800 Subject: [PATCH 70/83] Update the required body cases --- .../samples/parameters/bodyRequiredCheck.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyRequiredCheck.md diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyRequiredCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyRequiredCheck.md new file mode 100644 index 0000000000..355ebf760c --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyRequiredCheck.md @@ -0,0 +1,89 @@ +# Should generate required body in option parameter + +Should generate required body in option parameter. + +## TypeSpec + +This is tsp definition. + +```tsp +@doc("This is a simple model.") +model BodyParameter { + name: string; +} +@doc("This is a model with all http request decorator.") +model CompositeRequest { + @path + name: string; + + @query + requiredQuery: string; + + @query + optionalQuery?: string; + + @body + body: BodyParameter; +} + +@doc("show example demo") +op read(...CompositeRequest): { @body body: {}}; +``` + +## Example + +Raw json files. + +```json +{ + "title": "read", + "operationId": "read", + "parameters": { + "name": "required path param", + "optionalQuery": "renamed optional query", + "required-header": "required header", + "optional-header": "optional header", + "requiredQuery": "required query", + "body": { + "name": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +## Samples + +Generate required body in option parameter: + +```ts samples +/** This file path is /samples-dev/readSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example demo + * + * @summary show example demo + * x-ms-original-file: 2021-10-01-preview/json.json + */ +async function read() { + const client = new TestingClient(); + const result = await client.read( + "required path param", + "required query", + { name: "body name" }, + { + optionalQuery: "renamed optional query" + } + ); + console.log(result); +} + +async function main() { + read(); +} + +main().catch(console.error); +``` From efe501a23cb887a0afe01e35c00146328de5a650 Mon Sep 17 00:00:00 2001 From: "Jiao Di (MSFT)" <80496810+v-jiaodi@users.noreply.github.com> Date: Tue, 3 Sep 2024 17:06:49 +0800 Subject: [PATCH 71/83] fix ci --- .../typespec-ts/samples-dev/dataProductsDeleteSample.ts | 6 +----- .../samples-dev/dataProductsRotateKeySample.ts | 9 +++------ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts index 4a1ab43787..f83ca7a9e0 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsDeleteSample.ts @@ -14,11 +14,7 @@ async function dataProductsDeleteMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.delete( - "aoiresourceGroupName", - "dataproduct01", - ); - console.log(result); + await client.dataProducts.delete("aoiresourceGroupName", "dataproduct01"); } async function main() { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts index 688db35f9d..20a946a18a 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/samples-dev/dataProductsRotateKeySample.ts @@ -14,12 +14,9 @@ async function dataProductsRotateKeyMaximumSetGen() { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new NetworkAnalyticsClient(credential, subscriptionId); - const result = await client.dataProducts.rotateKey( - "aoiresourceGroupName", - "dataproduct01", - { keyVaultUrl: "https://myKeyVault.vault.azure.net" }, - ); - console.log(result); + await client.dataProducts.rotateKey("aoiresourceGroupName", "dataproduct01", { + keyVaultUrl: "https://myKeyVault.vault.azure.net", + }); } async function main() { From 61da2caf8bf0f12c3ee3cabde6325066a6826885 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Thu, 5 Sep 2024 11:15:48 +0800 Subject: [PATCH 72/83] update the deduplicateProperties --- .../src/generators/modelsGenerator.ts | 120 ++++++++++-------- 1 file changed, 68 insertions(+), 52 deletions(-) diff --git a/packages/autorest.typescript/src/generators/modelsGenerator.ts b/packages/autorest.typescript/src/generators/modelsGenerator.ts index 3460c118ed..a07b89b97b 100644 --- a/packages/autorest.typescript/src/generators/modelsGenerator.ts +++ b/packages/autorest.typescript/src/generators/modelsGenerator.ts @@ -82,10 +82,10 @@ export function generateModels(clientDetails: ClientDetails, project: Project) { modelsIndexFile.fixUnusedIdentifiers(); const allTypes = modelsIndexFile.getTypeAliases(); clientDetails.allTypes = allTypes - .filter(item => { + .filter((item) => { return item.isExported(); }) - .map(item => { + .map((item) => { return item.getName(); }); } @@ -96,7 +96,7 @@ const writeClientModels = ( ) => { const { useCoreV2, coreHttpCompatMode } = getAutorestOptions(); let clientOptionalParams = clientDetails.parameters.filter( - p => + (p) => (!p.required || p.defaultValue) && p.implementationLocation === ImplementationLocation.Client ); @@ -109,8 +109,8 @@ const writeClientModels = ( baseClass: !useCoreV2 ? "coreHttp.ServiceClientOptions" : coreHttpCompatMode - ? "coreHttpCompat.ExtendedServiceClientOptions" - : "coreClient.ServiceClientOptions" + ? "coreHttpCompat.ExtendedServiceClientOptions" + : "coreClient.ServiceClientOptions" } ); }; @@ -120,8 +120,8 @@ const writeOperationModels = ( modelsIndexFile: SourceFile ) => { const modelsNames = getAllModelsNames(clientDetails); - return clientDetails.operationGroups.forEach(operationGroup => { - operationGroup.operations.forEach(operation => { + return clientDetails.operationGroups.forEach((operationGroup) => { + operationGroup.operations.forEach((operation) => { writeOptionsParameter(clientDetails, operation, modelsIndexFile); writeResponseTypes(operation, modelsIndexFile, modelsNames); }); @@ -148,7 +148,7 @@ function writeOptionsParameter( const operationRequestMediaTypes = new Set(); operation.requests.forEach( - r => r.mediaType && operationRequestMediaTypes.add(r.mediaType) + (r) => r.mediaType && operationRequestMediaTypes.add(r.mediaType) ); writeOptionalParameters( operation.typeDetails.typeName, @@ -195,7 +195,7 @@ function writeResponseTypes( ({ isError, mappers }) => !isError && (mappers.bodyMapper || mappers.headersMapper) ) - .forEach(operation => { + .forEach((operation) => { const { statusCodes, ...coreResponse } = operation; if (addedResponses.length === 0) { // Define possible values for response @@ -204,13 +204,13 @@ function writeResponseTypes( docs: [`Contains response data for the ${name} operation.`], isExported: true, type: buildResponseType(operation, isLro), - leadingTrivia: writer => writer.blankLine(), + leadingTrivia: (writer) => writer.blankLine(), kind: StructureKind.TypeAlias }); addedResponses.push({ name: responseName, response: coreResponse }); } - const existingResponse = addedResponses.find(r => r.name === name); + const existingResponse = addedResponses.find((r) => r.name === name); if ( existingResponse && isEqual(existingResponse.response, coreResponse) @@ -245,7 +245,7 @@ function writeResponseTypes( parsedBody: ResourceGroup; }; }`, - leadingTrivia: writer => writer.blankLine(), + leadingTrivia: (writer) => writer.blankLine(), kind: StructureKind.TypeAlias }); } @@ -278,9 +278,8 @@ function getBodyProperties({ // Used when the bodyType is not a primitive, or for binary media types with no defined bodyType. const mainProperties: OptionalKind[] = []; // These are the additional default properties to add under the _response property in the response type - const internalResponseProperties: OptionalKind< - PropertySignatureStructure - >[] = []; + const internalResponseProperties: OptionalKind[] = + []; if (bodyType) { if (hasBodyProperty) { @@ -294,14 +293,14 @@ function getBodyProperties({ { name: "bodyAsText", type: "string", - leadingTrivia: writer => writer.blankLine(), + leadingTrivia: (writer) => writer.blankLine(), docs: ["The response body as text (string format)"] }, { name: "parsedBody", docs: ["The response body as parsed JSON or XML"], type: bodyType.typeName, - leadingTrivia: writer => writer.blankLine() + leadingTrivia: (writer) => writer.blankLine() } ); } else if (mediaType === KnownMediaType.Binary) { @@ -410,7 +409,7 @@ function buildResponseType( }) ) : "coreHttp.HttpResponse", - leadingTrivia: writer => writer.blankLine() + leadingTrivia: (writer) => writer.blankLine() } ] }); @@ -474,7 +473,7 @@ const writeChoices = ( clientDetails: ClientDetails, modelsIndexFile: SourceFile ) => { - clientDetails.unions.forEach(choice => { + clientDetails.unions.forEach((choice) => { if (choice.schemaType === SchemaType.Choice) { writeExtensibleChoice(choice, modelsIndexFile); } else { @@ -501,7 +500,7 @@ const writeExtensibleChoice = ( docs: [ `Known values of {@link ${choice.name}} that the service accepts.` ], - members: choice.properties.map(p => ({ + members: choice.properties.map((p) => ({ name: p.name, value: p.value, docs: [p.description ? p.description : p.name] @@ -514,7 +513,7 @@ const writeExtensibleChoice = ( docs: [getExtensibleChoiceDescription(choice)], isExported: true, type: choice.itemType || SchemaType.String, - trailingTrivia: writer => writer.newLine() + trailingTrivia: (writer) => writer.newLine() }); }; @@ -537,7 +536,7 @@ function getExtensibleChoiceDescription(choice: UnionDetails) { ); const valueDescriptions = choice.properties - .map(p => `**${p.value}**${p.description ? `: ${p.description}` : ""}`) + .map((p) => `**${p.value}**${p.description ? `: ${p.description}` : ""}`) .join(` \\\n`) // Escape the character / to make sure we don't incorrectly announce a comment blocks /** */ .replace(/^\//g, "\\/") @@ -558,7 +557,7 @@ const writeSealedChoice = ( modelsIndexFile: SourceFile ) => { const values = choice.properties - .map(p => + .map((p) => choice.itemType === SchemaType.String ? `"${p.value}"` : p.value ) .join(" | "); @@ -568,7 +567,7 @@ const writeSealedChoice = ( docs: [choice.description], isExported: true, type: values, - trailingTrivia: writer => writer.newLine() + trailingTrivia: (writer) => writer.newLine() }); }; @@ -577,18 +576,17 @@ const writeObjects = ( modelsIndexFile: SourceFile ) => clientDetails.objects.forEach(writeObjectSignature(modelsIndexFile)); -const writeObjectSignature = (modelsIndexFile: SourceFile) => ( - model: ObjectDetails -) => { - modelsIndexFile.addInterface({ - name: model.name, - docs: model.description ? [model.description] : [], - isExported: true, - extends: model.parents.map(p => p.name), - properties: getPropertiesSignatures(model), - leadingTrivia: writer => writer.blankLine() - }); -}; +const writeObjectSignature = + (modelsIndexFile: SourceFile) => (model: ObjectDetails) => { + modelsIndexFile.addInterface({ + name: model.name, + docs: model.description ? [model.description] : [], + isExported: true, + extends: model.parents.map((p) => p.name), + properties: getPropertiesSignatures(model), + leadingTrivia: (writer) => writer.blankLine() + }); + }; /** * This function writes all UnionTypes, these types represent the options a request can use for a Polymorphic parameter @@ -596,13 +594,13 @@ const writeObjectSignature = (modelsIndexFile: SourceFile) => ( function writeUniontypes({ objects }: ClientDetails, modelsFile: SourceFile) { objects .filter( - obj => obj.kind === ObjectKind.Polymorphic && obj.children.length > 0 + (obj) => obj.kind === ObjectKind.Polymorphic && obj.children.length > 0 ) - .forEach(obj => { + .forEach((obj) => { const polymorphicObject = obj as PolymorphicObjectDetails; const childrenNames = [ [polymorphicObject.name], - ...polymorphicObject.children.map(c => { + ...polymorphicObject.children.map((c) => { return c.schema.children && c.schema.children.immediate.length ? `${c.name}Union` : c.name; @@ -612,7 +610,7 @@ function writeUniontypes({ objects }: ClientDetails, modelsFile: SourceFile) { name: `${obj.name}Union`, isExported: true, type: childrenNames.join(" | "), - trailingTrivia: writer => writer.newLine() + trailingTrivia: (writer) => writer.newLine() }); }); } @@ -638,10 +636,10 @@ function getOptionalGroups( ({ parameter: { groupedBy, flattened } }) => groupedBy && !groupedBy.required && !flattened ) - .forEach(p => { + .forEach((p) => { const { parameter } = p; const groupName = getLanguageMetadata(parameter.groupedBy!.language).name; - const isAlreadyTracked = optionalGroups.some(p => { + const isAlreadyTracked = optionalGroups.some((p) => { const { name } = getLanguageMetadata(p.language); return name === groupName; }); @@ -652,7 +650,7 @@ function getOptionalGroups( pull(optionalParams, p); }); - return optionalGroups.map(group => { + return optionalGroups.map((group) => { const { name, description } = getLanguageMetadata(group.language); return { name: normalizeName(name, NameType.Parameter, true), @@ -717,7 +715,7 @@ function writeOptionalParameters( ...optionalGroupDeclarations, ...optionalParams .filter( - p => !p.targetMediaType || p.targetMediaType === mediaType + (p) => !p.targetMediaType || p.targetMediaType === mediaType ) .map(buildParamDetails) ]) @@ -735,7 +733,7 @@ function writeOptionalParameters( ); } if (operationIsLro) - interfaces.forEach(iface => { + interfaces.forEach((iface) => { iface.addProperties([ { name: "updateIntervalInMs", @@ -798,7 +796,25 @@ function getNonDiscriminatorProperties( ): PropertyDetails[] { const { properties } = objectDetails; - return properties.filter(property => !property.isDiscriminator); + return properties.filter((property) => !property.isDiscriminator); +} + +/** + * Deduplicates properties from an object by removing duplicated ones + */ +function deduplicateProperties( + properties: PropertyDetails[] +): PropertyDetails[] { + const isExisting = new Set(); + + return properties.filter((property) => { + if (isExisting.has(property.name)) { + return false; + } + + isExisting.add(property.name); + return true; + }); } function getPropertyDescription({ description, readOnly }: PropertyDetails) { @@ -827,7 +843,7 @@ function withDiscriminator( } const discProps = keys(discriminatorValues).map( - key => { + (key) => { // Remove enclosing quotes from the key to get the real property name const propertyName = key.replace(/(^")|("$)/g, ""); const name = normalizeName(propertyName, NameType.Property); @@ -836,14 +852,14 @@ function withDiscriminator( `Polymorphic discriminator, which specifies the different types this object can be` ], name: `"${name}"`, - type: discriminatorValues[key].map(disc => `"${disc}"`).join(" | "), + type: discriminatorValues[key].map((disc) => `"${disc}"`).join(" | "), kind: StructureKind.PropertySignature }; } ); const propertiesWithoutDiscriminator = properties.filter( - p => !discProps.some(dp => dp.name === p.name) + (p) => !discProps.some((dp) => dp.name === p.name) ); return [...discProps, ...propertiesWithoutDiscriminator]; @@ -881,9 +897,9 @@ function withAdditionalProperties( */ const getPropertiesSignatures = (objectDetails: ObjectDetails) => { const { ignoreNullableOnOptional = false } = getAutorestOptions(); - const properties = getNonDiscriminatorProperties(objectDetails).map< - PropertySignatureStructure - >(property => ({ + const properties = deduplicateProperties( + getNonDiscriminatorProperties(objectDetails) + ).map((property) => ({ name: `"${property.name}"`, hasQuestionToken: !property.required, isReadonly: property.readOnly, From 9b444400616fdf209eca877298b459cb0e636b4f Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 9 Sep 2024 17:19:53 +0800 Subject: [PATCH 73/83] Resolve conflicts --- .../src/generators/modelsGenerator.ts | 116 ++++++++---------- 1 file changed, 50 insertions(+), 66 deletions(-) diff --git a/packages/autorest.typescript/src/generators/modelsGenerator.ts b/packages/autorest.typescript/src/generators/modelsGenerator.ts index 5a02d65b27..7662c35e20 100644 --- a/packages/autorest.typescript/src/generators/modelsGenerator.ts +++ b/packages/autorest.typescript/src/generators/modelsGenerator.ts @@ -82,10 +82,10 @@ export function generateModels(clientDetails: ClientDetails, project: Project) { modelsIndexFile.fixUnusedIdentifiers(); const allTypes = modelsIndexFile.getTypeAliases(); clientDetails.allTypes = allTypes - .filter((item) => { + .filter(item => { return item.isExported(); }) - .map((item) => { + .map(item => { return item.getName(); }); } @@ -96,7 +96,7 @@ const writeClientModels = ( ) => { const { useCoreV2, coreHttpCompatMode } = getAutorestOptions(); let clientOptionalParams = clientDetails.parameters.filter( - (p) => + p => (!p.required || p.defaultValue) && p.implementationLocation === ImplementationLocation.Client ); @@ -109,8 +109,8 @@ const writeClientModels = ( baseClass: !useCoreV2 ? "coreHttp.ServiceClientOptions" : coreHttpCompatMode - ? "coreHttpCompat.ExtendedServiceClientOptions" - : "coreClient.ServiceClientOptions" + ? "coreHttpCompat.ExtendedServiceClientOptions" + : "coreClient.ServiceClientOptions" } ); }; @@ -120,8 +120,8 @@ const writeOperationModels = ( modelsIndexFile: SourceFile ) => { const modelsNames = getAllModelsNames(clientDetails); - return clientDetails.operationGroups.forEach((operationGroup) => { - operationGroup.operations.forEach((operation) => { + return clientDetails.operationGroups.forEach(operationGroup => { + operationGroup.operations.forEach(operation => { writeOptionsParameter(clientDetails, operation, modelsIndexFile); writeResponseTypes(operation, modelsIndexFile, modelsNames); }); @@ -148,7 +148,7 @@ function writeOptionsParameter( const operationRequestMediaTypes = new Set(); operation.requests.forEach( - (r) => r.mediaType && operationRequestMediaTypes.add(r.mediaType) + r => r.mediaType && operationRequestMediaTypes.add(r.mediaType) ); writeOptionalParameters( operation.typeDetails.typeName, @@ -195,7 +195,7 @@ function writeResponseTypes( ({ isError, mappers }) => !isError && (mappers.bodyMapper || mappers.headersMapper) ) - .forEach((operation) => { + .forEach(operation => { const { statusCodes, ...coreResponse } = operation; if (addedResponses.length === 0) { // Define possible values for response @@ -204,13 +204,13 @@ function writeResponseTypes( docs: [`Contains response data for the ${name} operation.`], isExported: true, type: buildResponseType(operation, isLro), - leadingTrivia: (writer) => writer.blankLine(), + leadingTrivia: writer => writer.blankLine(), kind: StructureKind.TypeAlias }); addedResponses.push({ name: responseName, response: coreResponse }); } - const existingResponse = addedResponses.find((r) => r.name === name); + const existingResponse = addedResponses.find(r => r.name === name); if ( existingResponse && isEqual(existingResponse.response, coreResponse) @@ -245,7 +245,7 @@ function writeResponseTypes( parsedBody: ResourceGroup; }; }`, - leadingTrivia: (writer) => writer.blankLine(), + leadingTrivia: writer => writer.blankLine(), kind: StructureKind.TypeAlias }); } @@ -278,8 +278,9 @@ function getBodyProperties({ // Used when the bodyType is not a primitive, or for binary media types with no defined bodyType. const mainProperties: OptionalKind[] = []; // These are the additional default properties to add under the _response property in the response type - const internalResponseProperties: OptionalKind[] = - []; + const internalResponseProperties: OptionalKind< + PropertySignatureStructure + >[] = []; if (bodyType) { if (hasBodyProperty) { @@ -293,14 +294,14 @@ function getBodyProperties({ { name: "bodyAsText", type: "string", - leadingTrivia: (writer) => writer.blankLine(), + leadingTrivia: writer => writer.blankLine(), docs: ["The response body as text (string format)"] }, { name: "parsedBody", docs: ["The response body as parsed JSON or XML"], type: bodyType.typeName, - leadingTrivia: (writer) => writer.blankLine() + leadingTrivia: writer => writer.blankLine() } ); } else if (mediaType === KnownMediaType.Binary) { @@ -409,7 +410,7 @@ function buildResponseType( }) ) : "coreHttp.HttpResponse", - leadingTrivia: (writer) => writer.blankLine() + leadingTrivia: writer => writer.blankLine() } ] }); @@ -473,7 +474,7 @@ const writeChoices = ( clientDetails: ClientDetails, modelsIndexFile: SourceFile ) => { - clientDetails.unions.forEach((choice) => { + clientDetails.unions.forEach(choice => { if (choice.schemaType === SchemaType.Choice) { writeExtensibleChoice(choice, modelsIndexFile); } else { @@ -500,7 +501,7 @@ const writeExtensibleChoice = ( docs: [ `Known values of {@link ${choice.name}} that the service accepts.` ], - members: choice.properties.map((p) => ({ + members: choice.properties.map(p => ({ name: p.name, value: p.value, docs: [p.description ? p.description : p.name] @@ -513,7 +514,7 @@ const writeExtensibleChoice = ( docs: [getExtensibleChoiceDescription(choice)], isExported: true, type: choice.itemType || SchemaType.String, - trailingTrivia: (writer) => writer.newLine() + trailingTrivia: writer => writer.newLine() }); }; @@ -536,7 +537,7 @@ function getExtensibleChoiceDescription(choice: UnionDetails) { ); const valueDescriptions = choice.properties - .map((p) => `**${p.value}**${p.description ? `: ${p.description}` : ""}`) + .map(p => `**${p.value}**${p.description ? `: ${p.description}` : ""}`) .join(` \\\n`) // Escape the character / to make sure we don't incorrectly announce a comment blocks /** */ .replace(/^\//g, "\\/") @@ -557,7 +558,7 @@ const writeSealedChoice = ( modelsIndexFile: SourceFile ) => { const values = choice.properties - .map((p) => + .map(p => choice.itemType === SchemaType.String ? `"${p.value}"` : p.value ) .join(" | "); @@ -567,7 +568,7 @@ const writeSealedChoice = ( docs: [choice.description], isExported: true, type: values, - trailingTrivia: (writer) => writer.newLine() + trailingTrivia: writer => writer.newLine() }); }; @@ -576,17 +577,18 @@ const writeObjects = ( modelsIndexFile: SourceFile ) => clientDetails.objects.forEach(writeObjectSignature(modelsIndexFile)); -const writeObjectSignature = - (modelsIndexFile: SourceFile) => (model: ObjectDetails) => { - modelsIndexFile.addInterface({ - name: model.name, - docs: model.description ? [model.description] : [], - isExported: true, - extends: model.parents.map((p) => p.name), - properties: getPropertiesSignatures(model), - leadingTrivia: (writer) => writer.blankLine() - }); - }; +const writeObjectSignature = (modelsIndexFile: SourceFile) => ( + model: ObjectDetails +) => { + modelsIndexFile.addInterface({ + name: model.name, + docs: model.description ? [model.description] : [], + isExported: true, + extends: model.parents.map(p => p.name), + properties: getPropertiesSignatures(model), + leadingTrivia: writer => writer.blankLine() + }); +}; /** * This function writes all UnionTypes, these types represent the options a request can use for a Polymorphic parameter @@ -594,13 +596,13 @@ const writeObjectSignature = function writeUniontypes({ objects }: ClientDetails, modelsFile: SourceFile) { objects .filter( - (obj) => obj.kind === ObjectKind.Polymorphic && obj.children.length > 0 + obj => obj.kind === ObjectKind.Polymorphic && obj.children.length > 0 ) - .forEach((obj) => { + .forEach(obj => { const polymorphicObject = obj as PolymorphicObjectDetails; const childrenNames = [ [polymorphicObject.name], - ...polymorphicObject.children.map((c) => { + ...polymorphicObject.children.map(c => { return c.schema.children && c.schema.children.immediate.length ? `${c.name}Union` : c.name; @@ -610,7 +612,7 @@ function writeUniontypes({ objects }: ClientDetails, modelsFile: SourceFile) { name: `${obj.name}Union`, isExported: true, type: childrenNames.join(" | "), - trailingTrivia: (writer) => writer.newLine() + trailingTrivia: writer => writer.newLine() }); }); } @@ -636,10 +638,10 @@ function getOptionalGroups( ({ parameter: { groupedBy, flattened } }) => groupedBy && !groupedBy.required && !flattened ) - .forEach((p) => { + .forEach(p => { const { parameter } = p; const groupName = getLanguageMetadata(parameter.groupedBy!.language).name; - const isAlreadyTracked = optionalGroups.some((p) => { + const isAlreadyTracked = optionalGroups.some(p => { const { name } = getLanguageMetadata(p.language); return name === groupName; }); @@ -650,7 +652,7 @@ function getOptionalGroups( pull(optionalParams, p); }); - return optionalGroups.map((group) => { + return optionalGroups.map(group => { const { name, description } = getLanguageMetadata(group.language); return { name: normalizeName(name, NameType.Parameter, true), @@ -715,7 +717,7 @@ function writeOptionalParameters( ...optionalGroupDeclarations, ...optionalParams .filter( - (p) => !p.targetMediaType || p.targetMediaType === mediaType + p => !p.targetMediaType || p.targetMediaType === mediaType ) .map(buildParamDetails) ]) @@ -733,7 +735,7 @@ function writeOptionalParameters( ); } if (operationIsLro) - interfaces.forEach((iface) => { + interfaces.forEach(iface => { iface.addProperties([ { name: "updateIntervalInMs", @@ -796,25 +798,7 @@ function getNonDiscriminatorProperties( ): PropertyDetails[] { const { properties } = objectDetails; - return properties.filter((property) => !property.isDiscriminator); -} - -/** - * Deduplicates properties from an object by removing duplicated ones - */ -function deduplicateProperties( - properties: PropertyDetails[] -): PropertyDetails[] { - const isExisting = new Set(); - - return properties.filter((property) => { - if (isExisting.has(property.name)) { - return false; - } - - isExisting.add(property.name); - return true; - }); + return properties.filter(property => !property.isDiscriminator); } /** @@ -861,7 +845,7 @@ function withDiscriminator( } const discProps = keys(discriminatorValues).map( - (key) => { + key => { // Remove enclosing quotes from the key to get the real property name const propertyName = key.replace(/(^")|("$)/g, ""); const name = normalizeName(propertyName, NameType.Property); @@ -870,14 +854,14 @@ function withDiscriminator( `Polymorphic discriminator, which specifies the different types this object can be` ], name: `"${name}"`, - type: discriminatorValues[key].map((disc) => `"${disc}"`).join(" | "), + type: discriminatorValues[key].map(disc => `"${disc}"`).join(" | "), kind: StructureKind.PropertySignature }; } ); const propertiesWithoutDiscriminator = properties.filter( - (p) => !discProps.some((dp) => dp.name === p.name) + p => !discProps.some(dp => dp.name === p.name) ); return [...discProps, ...propertiesWithoutDiscriminator]; @@ -933,4 +917,4 @@ const getPropertiesSignatures = (objectDetails: ObjectDetails) => { objectDetails, withAdditionalProperties(objectDetails, properties) ); -}; +}; \ No newline at end of file From 99d78b33d3e0d8cc333190775bcd1445b9a6038e Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Mon, 9 Sep 2024 17:20:25 +0800 Subject: [PATCH 74/83] Update packages/autorest.typescript/src/generators/modelsGenerator.ts --- packages/autorest.typescript/src/generators/modelsGenerator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/autorest.typescript/src/generators/modelsGenerator.ts b/packages/autorest.typescript/src/generators/modelsGenerator.ts index 7662c35e20..89a8d93523 100644 --- a/packages/autorest.typescript/src/generators/modelsGenerator.ts +++ b/packages/autorest.typescript/src/generators/modelsGenerator.ts @@ -917,4 +917,4 @@ const getPropertiesSignatures = (objectDetails: ObjectDetails) => { objectDetails, withAdditionalProperties(objectDetails, properties) ); -}; \ No newline at end of file +}; From ae61bd41c36d0e52439a9bde2f6cf3ffde55ee93 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 10 Sep 2024 10:53:11 +0800 Subject: [PATCH 75/83] Resolve comments --- .../typespec-ts/src/modular/emitSamples.ts | 5 +- packages/typespec-ts/src/utils/clientUtils.ts | 6 +- .../typespec-ts/src/utils/credentialUtils.ts | 6 +- .../samples/client/disableHierarchyClient.md | 76 ++++++++++++++++++- .../samples/operations/armCurdOperations.md | 6 +- .../samples/parameters/bodyOptionalCheck.md | 2 - .../samples/parameters/bodyRequiredCheck.md | 4 +- .../samples/parameters/parameterTypesCheck.md | 2 +- 8 files changed, 85 insertions(+), 22 deletions(-) diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index cbd6b20eef..a09672a7ba 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -24,7 +24,6 @@ import { join } from "path"; import { AzureIdentityDependencies } from "../modular/external-dependencies.js"; import { reportDiagnostic } from "../index.js"; import { NoTarget } from "@typespec/compiler"; -import { isArm } from "../utils/clientUtils.js"; import { buildPropertyNameMapper, isSpreadBodyParameter @@ -289,7 +288,7 @@ function prepareExampleParameters( if ( param.name.toLowerCase() === "subscriptionid" && - isArm(dpgContext) && + dpgContext.arm && exampleValue ) { subscriptionIdValue = getParameterValue(exampleValue.value); @@ -303,7 +302,7 @@ function prepareExampleParameters( }); } // always add subscriptionId for ARM clients - if (isArm(dpgContext)) { + if (dpgContext.arm) { result.push({ name: "subscriptionId", value: subscriptionIdValue, diff --git a/packages/typespec-ts/src/utils/clientUtils.ts b/packages/typespec-ts/src/utils/clientUtils.ts index e0491c435e..b3baba6241 100644 --- a/packages/typespec-ts/src/utils/clientUtils.ts +++ b/packages/typespec-ts/src/utils/clientUtils.ts @@ -12,7 +12,7 @@ export function getRLCClients(dpgContext: SdkContext): SdkClient[] { name: clientName, service: service.type, type: service.type, - arm: isArm(dpgContext), + arm: Boolean(dpgContext.arm), crossLanguageDefinitionId: `${getNamespaceFullName( service.type )}.${clientName}` @@ -20,10 +20,6 @@ export function getRLCClients(dpgContext: SdkContext): SdkClient[] { }); } -export function isArm(dpgContext: SdkContext): boolean { - return dpgContext.rlcOptions?.azureArm ?? dpgContext.arm ?? false; -} - export function isRLCMultiEndpoint(dpgContext: SdkContext): boolean { return getRLCClients(dpgContext).length > 1; } diff --git a/packages/typespec-ts/src/utils/credentialUtils.ts b/packages/typespec-ts/src/utils/credentialUtils.ts index 1e31a2427f..865604f852 100644 --- a/packages/typespec-ts/src/utils/credentialUtils.ts +++ b/packages/typespec-ts/src/utils/credentialUtils.ts @@ -48,7 +48,7 @@ export function isSupportedKeyCredential(auth: HttpAuth): boolean { } export function isSupportedTokenCredential(auth: HttpAuth): boolean { - return auth.type === "oauth2" || auth.type === "openIdConnect"; + return auth.type === "oauth2"; } export function hasKeyCredential(initialization: SdkInitializationType) { @@ -74,9 +74,7 @@ function getAuthScheme(initialization: SdkInitializationType): HttpAuth[] { authScheme.push(credentialParams.type.scheme); } else if (kind === "union") { for (const param of credentialParams.type.values) { - if (param.kind === "credential") { - authScheme.push(param.scheme); - } + authScheme.push(param.scheme); } } return authScheme; diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md index e7da48be5b..b3026ae199 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md @@ -19,10 +19,12 @@ namespace B { prop3: string; } interface C { + @route("bec") op opBEC(@body body: A): { @body body: {}}; } + op foo(@body body: A): { @body body: {}}; } - op opB(@body body: A): { @body body: {}}; + op foo(@body body: A): { @body body: {}}; } @route("/d") @@ -89,6 +91,36 @@ Raw json files. } ``` +```json for B_foo +{ + "title": "B_foo", + "operationId": "B_foo", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +```json for E_foo +{ + "title": "E_foo", + "operationId": "E_foo", + "parameters": { + "body": { + "prop3": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + ## Samples Generate samples for non-hierarchy cases: @@ -115,6 +147,48 @@ async function main() { main().catch(console.error); +/** This file path is /samples-dev/bFooSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to execute foo + * + * @summary execute foo + * x-ms-original-file: 2021-10-01-preview/json_for_B_foo.json + */ +async function bFoo() { + const client = new TestingClient(); + const result = await client.b.foo({ prop1: "body name" }); + console.log(result); +} + +async function main() { + bFoo(); +} + +main().catch(console.error); + +/** This file path is /samples-dev/eFooSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to execute foo + * + * @summary execute foo + * x-ms-original-file: 2021-10-01-preview/json_for_E_foo.json + */ +async function eFoo() { + const client = new TestingClient(); + const result = await client.e.foo({ prop3: "body name" }); + console.log(result); +} + +async function main() { + eFoo(); +} + +main().catch(console.error); + /** This file path is /samples-dev/cOpBECSample.ts */ import { TestingClient } from "@azure/internal-test"; diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md index 6ec08e6ce3..a7f97dca16 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md @@ -204,11 +204,11 @@ async function employeesCreateOrUpdate() { properties: { age: 30, city: "gydhnntudughbmxlkyzrskcdkotrxn", - profile: "ms" + profile: "ms", }, tags: { key2913: "urperxmkkhhkp" }, - location: "itajgxyqozseoygnl" - } + location: "itajgxyqozseoygnl", + }, ); console.log(result); } diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md index 274dde348c..5cb2d85245 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md @@ -41,8 +41,6 @@ Raw json files. "parameters": { "name": "required path param", "optionalQuery": "renamed optional query", - "required-header": "required header", - "optional-header": "optional header", "requiredQuery": "required query", "body": { "name": "body name" diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyRequiredCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyRequiredCheck.md index 355ebf760c..210cd9e4ed 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyRequiredCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyRequiredCheck.md @@ -74,9 +74,7 @@ async function read() { "required path param", "required query", { name: "body name" }, - { - optionalQuery: "renamed optional query" - } + { optionalQuery: "renamed optional query" }, ); console.log(result); } diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index 182a8fe178..3b86ba712d 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -92,7 +92,7 @@ async function read() { stringLiteral: "foo", booleanLiteral: true, numberLiteral: 12, - additionalProp: "additional prop" + additionalProp: "additional prop", }); console.log(result); } From 72af6580c6c257a3d561121ccbe6d03efb5063d0 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 10 Sep 2024 12:25:03 +0800 Subject: [PATCH 76/83] Update date and time cases --- packages/typespec-ts/src/modular/emitSamples.ts | 1 - .../test/modularUnit/scenarios.spec.ts | 4 ++-- .../samples/parameters/bodyOptionalCheck.md | 2 +- .../samples/parameters/parameterTypesCheck.md | 17 ++++++++++++++++- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index a09672a7ba..85d62471c4 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -403,7 +403,6 @@ function getParameterValue(value: SdkTypeExample): string { case "string": { switch (value.type.kind) { case "utcDateTime": - case "offsetDateTime": retValue = `new Date("${value.value}")`; break; default: diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index 1aac22a2a6..cc138ab840 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -12,7 +12,7 @@ import { prettierTypeScriptOptions } from "../../src/lib.js"; const SCENARIOS_LOCATION = "./test/modularUnit/scenarios"; -const SCENARIOS_UPDATE = process.env["SCENARIOS_UPDATE"] === "true"; +const SCENARIOS_UPDATE = true; type EmitterFunction = ( tsp: string, @@ -116,7 +116,7 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { } }; -describe("Scenarios", function () { +describe.only("Scenarios", function () { describeScenarios(SCENARIOS_LOCATION); }); diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md index 5cb2d85245..f441e161a9 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md @@ -70,7 +70,7 @@ async function read() { const client = new TestingClient(); const result = await client.read("required path param", "required query", { body: { name: "body name" }, - optionalQuery: "renamed optional query" + optionalQuery: "renamed optional query", }); console.log(result); } diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md index 3b86ba712d..ebf2accc42 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/parameterTypesCheck.md @@ -25,6 +25,11 @@ model Widget { stringLiteral: "foo"; booleanLiteral: true; numberLiteral: 12; + plainDateProp: plainDate; + plainTimeProp: plainTime; + utcDateTimeProp: utcDateTime; + offsetDateTimeProp: offsetDateTime; + durationProp: duration; } @doc("show example demo") @@ -54,7 +59,12 @@ op read(@bodyRoot body: Widget): { @body body: {}}; "renamedProp": "prop renamed", "stringLiteral": "foo", "booleanLiteral": true, - "numberLiteral": 12 + "numberLiteral": 12, + "plainDateProp": "2022-12-12", + "plainTimeProp": "13:06:12", + "utcDateTimeProp": "2022-08-26T18:38:00Z", + "offsetDateTimeProp": "2022-08-26T18:38:00Z", + "durationProp": "P123DT22H14M12.011S" } }, "responses": { @@ -92,6 +102,11 @@ async function read() { stringLiteral: "foo", booleanLiteral: true, numberLiteral: 12, + plainDateProp: "2022-12-12", + plainTimeProp: "13:06:12", + utcDateTimeProp: new Date("2022-08-26T18:38:00Z"), + offsetDateTimeProp: "2022-08-26T18:38:00Z", + durationProp: "P123DT22H14M12.011S", additionalProp: "additional prop", }); console.log(result); From 7213fb4f70d5beec2a15a5d05a1ee949990854b3 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 10 Sep 2024 13:58:25 +0800 Subject: [PATCH 77/83] Update the sample with sperated file and json pair --- .../test/modularUnit/scenarios.spec.ts | 33 ++-- .../samples/client/disableHierarchyClient.md | 184 +++++++++-------- .../samples/client/enableHierarchyClient.md | 100 +++++----- .../samples/operations/armCurdOperations.md | 106 +++++----- .../samples/operations/multipleExamples.md | 187 ++++++++++++++++++ packages/typespec-ts/test/util/emitUtil.ts | 3 +- packages/typespec-ts/test/util/testUtil.ts | 13 +- 7 files changed, 435 insertions(+), 191 deletions(-) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamples.md diff --git a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts index cc138ab840..50b3fcb1d7 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios.spec.ts +++ b/packages/typespec-ts/test/modularUnit/scenarios.spec.ts @@ -6,13 +6,13 @@ import { emitModularOperationsFromTypeSpec, emitSamplesFromTypeSpec } from "../util/emitUtil.js"; -import { assertEqualContent } from "../util/testUtil.js"; +import { assertEqualContent, ExampleJson } from "../util/testUtil.js"; import { format } from "prettier"; import { prettierTypeScriptOptions } from "../../src/lib.js"; const SCENARIOS_LOCATION = "./test/modularUnit/scenarios"; -const SCENARIOS_UPDATE = true; +const SCENARIOS_UPDATE = process.env["SCENARIOS_UPDATE"] === "true"; type EmitterFunction = ( tsp: string, @@ -102,10 +102,8 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { throw new Error(`Expected 'examples' to be passed in as an argument`); } const configs = namedUnknownArgs["configs"] as Record; - const examples = namedUnknownArgs["examples"] as Record; - const counts = Object.keys(examples).length; + const examples = namedUnknownArgs["examples"] as ExampleJson[]; const result = await emitSamplesFromTypeSpec(tsp, examples, configs); - assert.equal(result?.length, counts, `Expected exactly ${counts} files`); const text = result .map( (x) => @@ -116,7 +114,7 @@ const OUTPUT_CODE_BLOCK_TYPES: Record = { } }; -describe.only("Scenarios", function () { +describe("Scenarios", function () { describeScenarios(SCENARIOS_LOCATION); }); @@ -145,9 +143,12 @@ function describeScenarioFile(scenarioFile: string): void { const jsonBlocks = codeBlocks.filter((x) => x.heading.startsWith("json") ); - const examples: Record = {}; + const allExamples: ExampleJson[] = []; for (const block of jsonBlocks) { - examples[block.heading.trim().replace(/ /g, "_")] = block.content; + allExamples.push({ + filename: block.heading.trim().replace(/ /g, "_"), + rawContent: block.content + }); } const yamlConfigs = codeBlocks.filter((x) => x.heading.startsWith("yaml") @@ -164,7 +165,7 @@ function describeScenarioFile(scenarioFile: string): void { const testCases: { block: CodeScenarioPart; - fn: () => Promise; + fn: (examples?: ExampleJson[]) => Promise; }[] = outputCodeBlocks .map((x) => { for (const [template, fn] of Object.entries( @@ -180,8 +181,11 @@ function describeScenarioFile(scenarioFile: string): void { if (match !== null) { return { block: x, - fn: () => - fn(inputTsp, match.groups! ?? {}, { examples, configs }) + fn: (examples?: ExampleJson[]) => + fn(inputTsp, match.groups! ?? {}, { + examples, + configs + }) }; } } @@ -190,9 +194,14 @@ function describeScenarioFile(scenarioFile: string): void { }) .filter((x) => x !== undefined); + let index = 0; for (const testCase of testCases) { it(testCase.block.heading, async () => { - const result = await testCase.fn!(); + const examples = + Object.entries(allExamples).length === testCases.length + ? [allExamples[index++]!] + : allExamples; + const result = await testCase.fn!(examples); if (SCENARIOS_UPDATE) { // Update the content; this makes the tests pass diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md index b3026ae199..dea6908193 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md @@ -42,7 +42,7 @@ This is the tspconfig.yaml. hierarchyClient: false ``` -## Example +## Provide examples and generated samples Raw json files. @@ -61,6 +61,33 @@ Raw json files. } ``` +Generated samples. + +```ts samples +/** This file path is /samples-dev/opTopLevelSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example opTopLevel + * + * @summary show example opTopLevel + * x-ms-original-file: 2021-10-01-preview/json_for_opTopLevel.json + */ +async function opTopLevel() { + const client = new TestingClient(); + const result = await client.opTopLevel({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opTopLevel(); +} + +main().catch(console.error); +``` + +Raw json files. + ```json for opD { "title": "opD", @@ -76,40 +103,37 @@ Raw json files. } ``` -```json for opBEC -{ - "title": "opBEC", - "operationId": "C_opBEC", - "parameters": { - "body": { - "prop3": "body name" - } - }, - "responses": { - "200": {} - } +Generated samples. + +```ts samples +/** This file path is /samples-dev/dOpDSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example opD + * + * @summary show example opD + * x-ms-original-file: 2021-10-01-preview/json_for_opD.json + */ +async function opD() { + const client = new TestingClient(); + const result = await client.d.opD({ prop1: "body name" }); + console.log(result); } -``` -```json for B_foo -{ - "title": "B_foo", - "operationId": "B_foo", - "parameters": { - "body": { - "prop1": "body name" - } - }, - "responses": { - "200": {} - } +async function main() { + opD(); } + +main().catch(console.error); ``` -```json for E_foo +Raw json files. + +```json for opBEC { - "title": "E_foo", - "operationId": "E_foo", + "title": "opBEC", + "operationId": "C_opBEC", "parameters": { "body": { "prop3": "body name" @@ -121,32 +145,51 @@ Raw json files. } ``` -## Samples - -Generate samples for non-hierarchy cases: +Generated samples. ```ts samples -/** This file path is /samples-dev/opTopLevelSample.ts */ +/** This file path is /samples-dev/cOpBECSample.ts */ import { TestingClient } from "@azure/internal-test"; /** - * This sample demonstrates how to show example opTopLevel + * This sample demonstrates how to execute opBEC * - * @summary show example opTopLevel - * x-ms-original-file: 2021-10-01-preview/json_for_opTopLevel.json + * @summary execute opBEC + * x-ms-original-file: 2021-10-01-preview/json_for_opBEC.json */ -async function opTopLevel() { +async function opBEC() { const client = new TestingClient(); - const result = await client.opTopLevel({ prop1: "body name" }); + const result = await client.c.opBEC({ prop3: "body name" }); console.log(result); } async function main() { - opTopLevel(); + opBEC(); } main().catch(console.error); +``` + +Raw json files. + +```json for B_foo +{ + "title": "B_foo", + "operationId": "B_foo", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +Generated samples. +```ts samples /** This file path is /samples-dev/bFooSample.ts */ import { TestingClient } from "@azure/internal-test"; @@ -167,7 +210,28 @@ async function main() { } main().catch(console.error); +``` + +Raw json files. + +```json for E_foo +{ + "title": "E_foo", + "operationId": "E_foo", + "parameters": { + "body": { + "prop3": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +Generated samples. +```ts samples /** This file path is /samples-dev/eFooSample.ts */ import { TestingClient } from "@azure/internal-test"; @@ -187,47 +251,5 @@ async function main() { eFoo(); } -main().catch(console.error); - -/** This file path is /samples-dev/cOpBECSample.ts */ -import { TestingClient } from "@azure/internal-test"; - -/** - * This sample demonstrates how to execute opBEC - * - * @summary execute opBEC - * x-ms-original-file: 2021-10-01-preview/json_for_opBEC.json - */ -async function opBEC() { - const client = new TestingClient(); - const result = await client.c.opBEC({ prop3: "body name" }); - console.log(result); -} - -async function main() { - opBEC(); -} - -main().catch(console.error); - -/** This file path is /samples-dev/dOpDSample.ts */ -import { TestingClient } from "@azure/internal-test"; - -/** - * This sample demonstrates how to show example opD - * - * @summary show example opD - * x-ms-original-file: 2021-10-01-preview/json_for_opD.json - */ -async function opD() { - const client = new TestingClient(); - const result = await client.d.opD({ prop1: "body name" }); - console.log(result); -} - -async function main() { - opD(); -} - main().catch(console.error); ``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md index b0a9e9da7b..18abbe4762 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md @@ -59,6 +59,33 @@ Raw json files. } ``` +Generated samples. + +```ts samples +/** This file path is /samples-dev/opTopLevelSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example opTopLevel + * + * @summary show example opTopLevel + * x-ms-original-file: 2021-10-01-preview/json_for_opTopLevel.json + */ +async function opTopLevel() { + const client = new TestingClient(); + const result = await client.opTopLevel({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opTopLevel(); +} + +main().catch(console.error); +``` + +Raw json files. + ```json for opD { "title": "opD", @@ -74,6 +101,33 @@ Raw json files. } ``` +Generated samples. + +```ts samples +/** This file path is /samples-dev/dOpDSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to show example opD + * + * @summary show example opD + * x-ms-original-file: 2021-10-01-preview/json_for_opD.json + */ +async function opD() { + const client = new TestingClient(); + const result = await client.d.opD({ prop1: "body name" }); + console.log(result); +} + +async function main() { + opD(); +} + +main().catch(console.error); +``` + +Raw json files. + ```json for opBEC { "title": "opBEC", @@ -89,32 +143,9 @@ Raw json files. } ``` -## Samples - -Generate samples for hierarchy cases: +Generated samples. ```ts samples -/** This file path is /samples-dev/opTopLevelSample.ts */ -import { TestingClient } from "@azure/internal-test"; - -/** - * This sample demonstrates how to show example opTopLevel - * - * @summary show example opTopLevel - * x-ms-original-file: 2021-10-01-preview/json_for_opTopLevel.json - */ -async function opTopLevel() { - const client = new TestingClient(); - const result = await client.opTopLevel({ prop1: "body name" }); - console.log(result); -} - -async function main() { - opTopLevel(); -} - -main().catch(console.error); - /** This file path is /samples-dev/bECOpBECSample.ts */ import { TestingClient } from "@azure/internal-test"; @@ -134,26 +165,5 @@ async function main() { opBEC(); } -main().catch(console.error); - -/** This file path is /samples-dev/dOpDSample.ts */ -import { TestingClient } from "@azure/internal-test"; - -/** - * This sample demonstrates how to show example opD - * - * @summary show example opD - * x-ms-original-file: 2021-10-01-preview/json_for_opD.json - */ -async function opD() { - const client = new TestingClient(); - const result = await client.d.opD({ prop1: "body name" }); - console.log(result); -} - -async function main() { - opD(); -} - main().catch(console.error); ``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md index a7f97dca16..4c56b5cc7c 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/armCurdOperations.md @@ -107,51 +107,6 @@ Raw json files. } ``` -```json for Employees_CreateOrUpdate -{ - "title": "Employees_CreateOrUpdate", - "operationId": "Employees_CreateOrUpdate", - "parameters": { - "api-version": "2021-10-01-preview", - "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", - "resourceGroupName": "rgopenapi", - "employeeName": "9KF-f-8b", - "resource": { - "properties": { - "age": 30, - "city": "gydhnntudughbmxlkyzrskcdkotrxn", - "profile": "ms" - }, - "tags": { - "key2913": "urperxmkkhhkp" - }, - "location": "itajgxyqozseoygnl" - } - }, - "responses": { - "200": {} - } -} -``` - -```json for Employees_Delete -{ - "title": "Employees_Delete", - "operationId": "Employees_Delete", - "parameters": { - "api-version": "2021-10-01-preview", - "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", - "resourceGroupName": "rgopenapi", - "employeeName": "5vX--BxSu3ux48rI4O9OQ569" - }, - "responses": { - "202": {} - } -} -``` - -## Samples - Generate samples for arm cases: ```ts samples @@ -182,7 +137,40 @@ async function main() { } main().catch(console.error); +``` + +Raw json files. + +```json for Employees_CreateOrUpdate +{ + "title": "Employees_CreateOrUpdate", + "operationId": "Employees_CreateOrUpdate", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgopenapi", + "employeeName": "9KF-f-8b", + "resource": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms" + }, + "tags": { + "key2913": "urperxmkkhhkp" + }, + "location": "itajgxyqozseoygnl" + } + }, + "responses": { + "200": {} + } +} +``` + +Generate samples for arm cases: +```ts samples /** This file path is /samples-dev/employeesCreateOrUpdateSample.ts */ import { ContosoClient } from "@azure/internal-test"; import { DefaultAzureCredential } from "@azure/identity"; @@ -204,11 +192,11 @@ async function employeesCreateOrUpdate() { properties: { age: 30, city: "gydhnntudughbmxlkyzrskcdkotrxn", - profile: "ms", + profile: "ms" }, tags: { key2913: "urperxmkkhhkp" }, - location: "itajgxyqozseoygnl", - }, + location: "itajgxyqozseoygnl" + } ); console.log(result); } @@ -218,7 +206,29 @@ async function main() { } main().catch(console.error); +``` +Raw json files. + +```json for Employees_Delete +{ + "title": "Employees_Delete", + "operationId": "Employees_Delete", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgopenapi", + "employeeName": "5vX--BxSu3ux48rI4O9OQ569" + }, + "responses": { + "202": {} + } +} +``` + +Generate samples for arm cases: + +```ts samples /** This file path is /samples-dev/employeesDeleteSample.ts */ import { ContosoClient } from "@azure/internal-test"; import { DefaultAzureCredential } from "@azure/identity"; diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamples.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamples.md new file mode 100644 index 0000000000..68f9c63ce9 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamples.md @@ -0,0 +1,187 @@ +# Should generate samples for ARM operations + +Sample generation should arm template and operations successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.ResourceManager; + +/** Microsoft.Contoso Resource Provider management API. */ +@armProviderNamespace +@service({ + title: "Microsoft.Contoso management service", +}) +@versioned(Microsoft.Contoso.Versions) +namespace Microsoft.Contoso; + +/** The available API versions. */ +enum Versions { + /** 2021-10-01-preview version */ + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) + v2021_10_01_preview: "2021-10-01-preview", +} + +interface Operations extends Azure.ResourceManager.Operations {} + +/** Employee resource */ +model Employee is TrackedResource { + ...ResourceNameParameter; +} + +/** Employee properties */ +model EmployeeProperties { + /** Age of employee */ + age?: int32; + + /** City of employee */ + city?: string; + + /** Profile of employee */ + @encode("base64url") + profile?: bytes; + + /** The status of the last operation. */ + @visibility("read") + provisioningState?: ProvisioningState; +} + +/** The resource provisioning state. */ +@lroStatus +union ProvisioningState { + ResourceProvisioningState, + + /** The resource is being provisioned */ + Provisioning: "Provisioning", + + /** The resource is updating */ + Updating: "Updating", + + /** The resource is being deleted */ + Deleting: "Deleting", + + /** The resource create request has been accepted */ + Accepted: "Accepted", + + string, +} + +@armResourceOperations +interface Employees { + createOrUpdate is ArmResourceCreateOrReplaceAsync; +} +``` + +## Example and generated samples + +Raw json files. + +```json for Employees_CreateOrUpdate_maxage +{ + "title": "Employees_CreateOrUpdate_maxage", + "operationId": "Employees_CreateOrUpdate", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgopenapi", + "employeeName": "9KF-f-8b", + "resource": { + "properties": { + "age": 110, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms" + }, + "tags": { + "key2913": "urperxmkkhhkp" + }, + "location": "itajgxyqozseoygnl" + } + }, + "responses": { + "200": {} + } +} +``` + +Raw json files. + +```json for Employees_CreateOrUpdate_minage +{ + "title": "Employees_CreateOrUpdate_minage", + "operationId": "Employees_CreateOrUpdate_minage", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgopenapi", + "employeeName": "9KF-f-8b", + "resource": { + "properties": { + "age": 1, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms" + }, + "tags": { + "key2913": "urperxmkkhhkp" + }, + "location": "itajgxyqozseoygnl" + } + }, + "responses": { + "200": {} + } +} +``` + +Generate samples for arm cases: + +```ts samples +/** This file path is /samples-dev/employeesCreateOrUpdateSample.ts */ +import { ContosoClient } from "@azure/internal-test"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a Employee + * + * @summary create a Employee + * x-ms-original-file: 2021-10-01-preview/json_for_Employees_CreateOrUpdate_maxage.json + */ +async function employeesCreateOrUpdateMaxage() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + const client = new ContosoClient(credential, subscriptionId); + const result = await client.employees.createOrUpdate( + "rgopenapi", + "9KF-f-8b", + { + properties: { + age: 110, + city: "gydhnntudughbmxlkyzrskcdkotrxn", + profile: "ms" + }, + tags: { key2913: "urperxmkkhhkp" }, + location: "itajgxyqozseoygnl" + } + ); + console.log(result); +} + +async function main() { + employeesCreateOrUpdateMaxage(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/util/emitUtil.ts b/packages/typespec-ts/test/util/emitUtil.ts index 31b062b070..81e11b6bcb 100644 --- a/packages/typespec-ts/test/util/emitUtil.ts +++ b/packages/typespec-ts/test/util/emitUtil.ts @@ -17,6 +17,7 @@ import { import { compileTypeSpecFor, createDpgContextTestHelper, + ExampleJson, rlcEmitterFor } from "./testUtil.js"; import { @@ -570,7 +571,7 @@ export async function emitModularClientFromTypeSpec( export async function emitSamplesFromTypeSpec( tspContent: string, - examples: Record, + examples: ExampleJson[], configs: Record = {} ) { const context = await compileTypeSpecFor(tspContent, examples); diff --git a/packages/typespec-ts/test/util/testUtil.ts b/packages/typespec-ts/test/util/testUtil.ts index f545f8e3a5..067ae22281 100644 --- a/packages/typespec-ts/test/util/testUtil.ts +++ b/packages/typespec-ts/test/util/testUtil.ts @@ -32,6 +32,11 @@ import { AzurePollingDependencies } from "../../src/modular/external-dependencies.js"; +export interface ExampleJson { + filename: string; + rawContent: string; +} + const { __dirname } = getDirname(import.meta.url); export async function createRLCEmitterTestHost() { @@ -110,7 +115,7 @@ ${code} export async function compileTypeSpecFor( code: string, - exampleJson: Record = {} + examples: ExampleJson[] = [] ) { let prefix = ""; if (!code.includes("import")) { @@ -121,10 +126,10 @@ export async function compileTypeSpecFor( } const host: TestHost = await createRLCEmitterTestHost(); host.addTypeSpecFile("main.tsp", `${prefix}${code}`); - for (const example in exampleJson) { + for (const example of examples) { host.addTypeSpecFile( - `./examples/2021-10-01-preview/${example}.json`, - exampleJson[example] + `./examples/2021-10-01-preview/${example.filename}.json`, + example.rawContent ); } await host.compile("./", { From e27635985e485843dc962b071cc8f05bbdb4a51a Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 10 Sep 2024 17:32:57 +0800 Subject: [PATCH 78/83] Updated cases for hierachy and operation groups --- .../typespec-ts/src/modular/emitSamples.ts | 2 + .../disableHierarchy/disableOperationGroup.md | 121 ++++++++++++++++++ .../disableHierarchy/enableOperationGroup.md | 121 ++++++++++++++++++ .../disableOperationGroup.md} | 101 ++------------- .../enableOperationGroup.md} | 5 +- 5 files changed, 255 insertions(+), 95 deletions(-) create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchy/disableOperationGroup.md create mode 100644 packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchy/enableOperationGroup.md rename packages/typespec-ts/test/modularUnit/scenarios/samples/client/{disableHierarchyClient.md => enableHierarchy/disableOperationGroup.md} (58%) rename packages/typespec-ts/test/modularUnit/scenarios/samples/client/{enableHierarchyClient.md => enableHierarchy/enableOperationGroup.md} (95%) diff --git a/packages/typespec-ts/src/modular/emitSamples.ts b/packages/typespec-ts/src/modular/emitSamples.ts index 85d62471c4..4149093044 100644 --- a/packages/typespec-ts/src/modular/emitSamples.ts +++ b/packages/typespec-ts/src/modular/emitSamples.ts @@ -91,6 +91,8 @@ function emitClientSamples( (options.classicalMethodPrefix ? `${options.classicalMethodPrefix}.` : "") + prefix; + } else if (dpgContext.rlcOptions?.enableOperationGroup === false) { + prefix = ""; } emitClientSamples(dpgContext, operationOrGroup.response, { diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchy/disableOperationGroup.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchy/disableOperationGroup.md new file mode 100644 index 0000000000..a79f1d6371 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchy/disableOperationGroup.md @@ -0,0 +1,121 @@ +# Should generate samples for disabled hierarchy client and disabled operation group + +Will prompt all operations into top-level. + +## TypeSpec + +This is tsp definition. + +```tsp +model A { + prop1: string; +} + +@route("b") +namespace B { + model A { + prop2: string; + } + interface C { + op foo(@body body: A): { @body body: {}}; + } +} + +@route("/d") +interface D { + op bar(@body body: A): { @body body: {}}; +} +``` + +This is the tspconfig.yaml. + +```yaml +hierarchyClient: false +enableOperationGroup: false +``` + +## Provide examples and generated samples + +Raw json files. + +```json for bar +{ + "title": "bar", + "operationId": "D_bar", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +Generated samples. + +```ts samples +/** This file path is /samples-dev/barSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to execute bar + * + * @summary execute bar + * x-ms-original-file: 2021-10-01-preview/json_for_bar.json + */ +async function bar() { + const client = new TestingClient(); + const result = await client.bar({ prop1: "body name" }); + console.log(result); +} + +async function main() { + bar(); +} + +main().catch(console.error); +``` + +Raw json files. + +```json for foo +{ + "title": "foo", + "operationId": "C_foo", + "parameters": { + "body": { + "prop2": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +Generated samples. + +```ts samples +/** This file path is /samples-dev/fooSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to execute foo + * + * @summary execute foo + * x-ms-original-file: 2021-10-01-preview/json_for_foo.json + */ +async function foo() { + const client = new TestingClient(); + const result = await client.foo({ prop2: "body name" }); + console.log(result); +} + +async function main() { + foo(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchy/enableOperationGroup.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchy/enableOperationGroup.md new file mode 100644 index 0000000000..038fa9a5ea --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchy/enableOperationGroup.md @@ -0,0 +1,121 @@ +# Should generate samples for disabled hierarchy client and enabled operation group + +Sample generation should handle hierarchy client successfully. + +## TypeSpec + +This is tsp definition. + +```tsp +model A { + prop1: string; +} + +@route("b") +namespace B { + model A { + prop2: string; + } + interface C { + op foo(@body body: A): { @body body: {}}; + } +} + +@route("/d") +interface D { + op bar(@body body: A): { @body body: {}}; +} +``` + +This is the tspconfig.yaml. + +```yaml +hierarchyClient: false +enableOperationGroup: true +``` + +## Provide examples and generated samples + +Raw json files. + +```json for bar +{ + "title": "bar", + "operationId": "D_bar", + "parameters": { + "body": { + "prop1": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +Generated samples. + +```ts samples +/** This file path is /samples-dev/dBarSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to execute bar + * + * @summary execute bar + * x-ms-original-file: 2021-10-01-preview/json_for_bar.json + */ +async function bar() { + const client = new TestingClient(); + const result = await client.d.bar({ prop1: "body name" }); + console.log(result); +} + +async function main() { + bar(); +} + +main().catch(console.error); +``` + +Raw json files. + +```json for foo +{ + "title": "foo", + "operationId": "C_foo", + "parameters": { + "body": { + "prop2": "body name" + } + }, + "responses": { + "200": {} + } +} +``` + +Generated samples. + +```ts samples +/** This file path is /samples-dev/cFooSample.ts */ +import { TestingClient } from "@azure/internal-test"; + +/** + * This sample demonstrates how to execute foo + * + * @summary execute foo + * x-ms-original-file: 2021-10-01-preview/json_for_foo.json + */ +async function foo() { + const client = new TestingClient(); + const result = await client.c.foo({ prop2: "body name" }); + console.log(result); +} + +async function main() { + foo(); +} + +main().catch(console.error); +``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchy/disableOperationGroup.md similarity index 58% rename from packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md rename to packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchy/disableOperationGroup.md index dea6908193..3cb6c2912d 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/disableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchy/disableOperationGroup.md @@ -1,4 +1,4 @@ -# Should generate samples for disabled hierarchy client +# Should generate samples for enabled hierarchy client but disabled operation group Sample generation should handle hierarchy client successfully. @@ -19,18 +19,16 @@ namespace B { prop3: string; } interface C { - @route("bec") op opBEC(@body body: A): { @body body: {}}; } - op foo(@body body: A): { @body body: {}}; } - op foo(@body body: A): { @body body: {}}; + op opB(@body body: A): { @body body: {}}; } @route("/d") interface D { @doc("show example opD") - op opD(@body body: A): { @body body: {}}; + op opD(@body body: A): { @body body: {}}; } @doc("show example opTopLevel") op opTopLevel(@body body: A): { @body body: {}}; @@ -39,10 +37,11 @@ op opTopLevel(@body body: A): { @body body: {}}; This is the tspconfig.yaml. ```yaml -hierarchyClient: false +hierarchyClient: true +enableOperationGroup: false ``` -## Provide examples and generated samples +## Provided examples and generated samples Raw json files. @@ -148,7 +147,7 @@ Raw json files. Generated samples. ```ts samples -/** This file path is /samples-dev/cOpBECSample.ts */ +/** This file path is /samples-dev/bECOpBECSample.ts */ import { TestingClient } from "@azure/internal-test"; /** @@ -159,7 +158,7 @@ import { TestingClient } from "@azure/internal-test"; */ async function opBEC() { const client = new TestingClient(); - const result = await client.c.opBEC({ prop3: "body name" }); + const result = await client.b.e.c.opBEC({ prop3: "body name" }); console.log(result); } @@ -169,87 +168,3 @@ async function main() { main().catch(console.error); ``` - -Raw json files. - -```json for B_foo -{ - "title": "B_foo", - "operationId": "B_foo", - "parameters": { - "body": { - "prop1": "body name" - } - }, - "responses": { - "200": {} - } -} -``` - -Generated samples. - -```ts samples -/** This file path is /samples-dev/bFooSample.ts */ -import { TestingClient } from "@azure/internal-test"; - -/** - * This sample demonstrates how to execute foo - * - * @summary execute foo - * x-ms-original-file: 2021-10-01-preview/json_for_B_foo.json - */ -async function bFoo() { - const client = new TestingClient(); - const result = await client.b.foo({ prop1: "body name" }); - console.log(result); -} - -async function main() { - bFoo(); -} - -main().catch(console.error); -``` - -Raw json files. - -```json for E_foo -{ - "title": "E_foo", - "operationId": "E_foo", - "parameters": { - "body": { - "prop3": "body name" - } - }, - "responses": { - "200": {} - } -} -``` - -Generated samples. - -```ts samples -/** This file path is /samples-dev/eFooSample.ts */ -import { TestingClient } from "@azure/internal-test"; - -/** - * This sample demonstrates how to execute foo - * - * @summary execute foo - * x-ms-original-file: 2021-10-01-preview/json_for_E_foo.json - */ -async function eFoo() { - const client = new TestingClient(); - const result = await client.e.foo({ prop3: "body name" }); - console.log(result); -} - -async function main() { - eFoo(); -} - -main().catch(console.error); -``` diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchy/enableOperationGroup.md similarity index 95% rename from packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md rename to packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchy/enableOperationGroup.md index 18abbe4762..d5b0f98ea1 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchyClient.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/client/enableHierarchy/enableOperationGroup.md @@ -1,4 +1,4 @@ -# Should generate samples for enabled hierarchy client +# Should generate samples for enabled hierarchy client and operation group Sample generation should handle hierarchy client successfully. @@ -38,9 +38,10 @@ This is the tspconfig.yaml. ```yaml hierarchyClient: true +enableOperationGroup: true ``` -## Example +## Provided examples and generated samples Raw json files. From 3b10e5843a658400eaadbdeb0cf28c6f263e2f0f Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 10 Sep 2024 17:35:09 +0800 Subject: [PATCH 79/83] Just renamings --- .../{multipleExamples.md => multipleExamplesInOneFile.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/typespec-ts/test/modularUnit/scenarios/samples/operations/{multipleExamples.md => multipleExamplesInOneFile.md} (100%) diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamples.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamplesInOneFile.md similarity index 100% rename from packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamples.md rename to packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamplesInOneFile.md From adf158a022498c99e09a73d5b8fd6949fe211d48 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Tue, 10 Sep 2024 17:47:12 +0800 Subject: [PATCH 80/83] Merge to main --- common/config/rush/pnpm-lock.yaml | 48 +++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 8a197c2827..de19703a04 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -229,10 +229,10 @@ importers: ../../packages/typespec-ts: specifiers: '@azure-rest/core-client': ^2.1.0 - '@azure-tools/cadl-ranch': ^0.14.3 + '@azure-tools/cadl-ranch': ^0.14.5 '@azure-tools/cadl-ranch-api': ^0.4.6 - '@azure-tools/cadl-ranch-expect': ^0.15.1 - '@azure-tools/cadl-ranch-specs': ^0.36.1 + '@azure-tools/cadl-ranch-expect': ^0.15.3 + '@azure-tools/cadl-ranch-specs': ^0.37.1 '@azure-tools/rlc-common': workspace:^0.33.0 '@azure-tools/typespec-autorest': '>=0.45.0 <1.0.0' '@azure-tools/typespec-azure-core': '>=0.45.0 <1.0.0' @@ -287,11 +287,11 @@ importers: ts-morph: 23.0.0 tslib: 2.6.2 devDependencies: - '@azure-rest/core-client': 2.2.0 - '@azure-tools/cadl-ranch': 0.14.3_e53zy5pp4bbrxbruosuhuay6sm + '@azure-rest/core-client': 2.1.0 + '@azure-tools/cadl-ranch': 0.14.5_e53zy5pp4bbrxbruosuhuay6sm '@azure-tools/cadl-ranch-api': 0.4.6 - '@azure-tools/cadl-ranch-expect': 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu - '@azure-tools/cadl-ranch-specs': 0.36.1_cvode6xhpuyl3aj5dk75xzx5nu + '@azure-tools/cadl-ranch-expect': 0.15.3_y3yxhtjg35d3g6m2dacugmsjfu + '@azure-tools/cadl-ranch-specs': 0.37.1_rlqyi2csgeth45ysk6yolt4cci '@azure-tools/typespec-autorest': 0.45.0_ch4e7dmaodljkmzs7h7dd2lznu '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte '@azure-tools/typespec-azure-resource-manager': 0.45.0_rxzquxnvxkwebgrumlsfc6ni5i @@ -387,15 +387,15 @@ packages: - supports-color dev: false - /@azure-rest/core-client/2.2.0: - resolution: {integrity: sha512-2uPSZPRb2TRyYONl5IcsWhX7C1xbm6Gof/tcLlDnYg7fCVcEfASfySKZ9OTHxhNeFgo79LhrT6juEoxTHvrXkQ==} + /@azure-rest/core-client/2.1.0: + resolution: {integrity: sha512-Ekq5PXiLyBF1PnfoXeC0IIAmFm1DVBiJdZGzk4lK0wsk8l8KdYDAWDfDQ8P0nqjvEQQjFaWd45pIidri94ih3Q==} engines: {node: '>=18.0.0'} dependencies: '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.6.0 '@azure/core-rest-pipeline': 1.14.0 - '@azure/core-tracing': 1.1.2 - '@azure/core-util': 1.9.0 + '@azure/core-tracing': 1.0.1 + '@azure/core-util': 1.5.0 tslib: 2.6.2 transitivePeerDependencies: - supports-color @@ -429,8 +429,8 @@ packages: - '@types/express' dev: true - /@azure-tools/cadl-ranch-coverage-sdk/0.8.3: - resolution: {integrity: sha512-tYgSawBWKRMwaA8sW4CuVynMlxnxmwjH0pG3qkHDuX8oIxvi/yawrLimLDNV29zAQiESHJkFU7THh/qG51oYPQ==} + /@azure-tools/cadl-ranch-coverage-sdk/0.8.4: + resolution: {integrity: sha512-N207EZEdJrXDKUVmi5Cnw/4y+/Ou9dTbdhMPDoLaalUxZp8T/YK+Y057/M88G0dY76PEAwWPPDolLchW62LZNQ==} engines: {node: '>=16.0.0'} dependencies: '@azure/identity': 4.4.1 @@ -440,8 +440,8 @@ packages: - supports-color dev: true - /@azure-tools/cadl-ranch-expect/0.15.1_y3yxhtjg35d3g6m2dacugmsjfu: - resolution: {integrity: sha512-gVu077Rtry3YM0JvsMocXi2KMQPUBaMSF7BKiIKzsxIB/YKAYKe+WEAMfkbFs3BQrbbYMMEWSMQQVUFzfaWpog==} + /@azure-tools/cadl-ranch-expect/0.15.3_y3yxhtjg35d3g6m2dacugmsjfu: + resolution: {integrity: sha512-ulUf2aN9UznF71NMwqVjcvEOw3F5BlL1HqeTwHZl3ZgRs8x2+HRLE+lwIEjfQi6h1ISn9u3kr+wslB03uOaoIQ==} engines: {node: '>=16.0.0'} peerDependencies: '@typespec/compiler': ~0.59.0 @@ -455,11 +455,11 @@ packages: '@typespec/versioning': 0.59.0_@typespec+compiler@0.59.0 dev: true - /@azure-tools/cadl-ranch-specs/0.36.1_cvode6xhpuyl3aj5dk75xzx5nu: - resolution: {integrity: sha512-DmgSaMeEhM6N3ZTFCDcBAy73hz8o1PYUdAKCN9P6WCj8sOVzZ8FCD9CGi2XjKBMqeJr4KHHooIgceglODJWSwQ==} + /@azure-tools/cadl-ranch-specs/0.37.1_rlqyi2csgeth45ysk6yolt4cci: + resolution: {integrity: sha512-XR8UxsbTQTSYbgyObcytRP0PLNWrU6cA8dTwQYh+VA/92HrSQYaJ8cQZZ/EyIFjFuSEVGQ74Rx6hpGvfKUrh2w==} engines: {node: '>=16.0.0'} peerDependencies: - '@azure-tools/cadl-ranch-expect': ~0.15.1 + '@azure-tools/cadl-ranch-expect': ~0.15.3 '@azure-tools/typespec-azure-core': ~0.45.0 '@typespec/compiler': ~0.59.0 '@typespec/http': ~0.59.0 @@ -467,9 +467,9 @@ packages: '@typespec/versioning': ~0.59.0 '@typespec/xml': ~0.59.0 dependencies: - '@azure-tools/cadl-ranch': 0.14.3_e53zy5pp4bbrxbruosuhuay6sm + '@azure-tools/cadl-ranch': 0.14.5_e53zy5pp4bbrxbruosuhuay6sm '@azure-tools/cadl-ranch-api': 0.4.6 - '@azure-tools/cadl-ranch-expect': 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu + '@azure-tools/cadl-ranch-expect': 0.15.3_y3yxhtjg35d3g6m2dacugmsjfu '@azure-tools/typespec-azure-core': 0.45.0_alrznhyrw66bvx6gp4zrtdfkte '@typespec/compiler': 0.59.0 '@typespec/http': 0.59.0_@typespec+compiler@0.59.0 @@ -481,14 +481,14 @@ packages: - supports-color dev: true - /@azure-tools/cadl-ranch/0.14.3_e53zy5pp4bbrxbruosuhuay6sm: - resolution: {integrity: sha512-7UVhTi5dHR9hH6OnpWQONvDJGx5t5sU9q8BYHoJU0gdaTy0x23EHie5GTMg7aIFI896kuksu4iggUnQaCm2AnA==} + /@azure-tools/cadl-ranch/0.14.5_e53zy5pp4bbrxbruosuhuay6sm: + resolution: {integrity: sha512-vF98b9ru49YvzcFnuSW6A/gpDOSZcTd/0S42XnmTyTVuF+fp3XOatXTvoUlKnQ25du8hZTm7JFzcZeOova7Xbw==} engines: {node: '>=16.0.0'} hasBin: true dependencies: '@azure-tools/cadl-ranch-api': 0.4.6 - '@azure-tools/cadl-ranch-coverage-sdk': 0.8.3 - '@azure-tools/cadl-ranch-expect': 0.15.1_y3yxhtjg35d3g6m2dacugmsjfu + '@azure-tools/cadl-ranch-coverage-sdk': 0.8.4 + '@azure-tools/cadl-ranch-expect': 0.15.3_y3yxhtjg35d3g6m2dacugmsjfu '@azure/identity': 4.4.1 '@types/js-yaml': 4.0.6 '@typespec/compiler': 0.59.0 From a8cf4171552f9a4802af7bc39cb4f614422c0bdf Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Wed, 11 Sep 2024 17:08:52 +0800 Subject: [PATCH 81/83] Update the test cases --- .../operations/multipleExamplesInOneFile.md | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamplesInOneFile.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamplesInOneFile.md index 68f9c63ce9..98b792f85f 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamplesInOneFile.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamplesInOneFile.md @@ -122,7 +122,7 @@ Raw json files. ```json for Employees_CreateOrUpdate_minage { "title": "Employees_CreateOrUpdate_minage", - "operationId": "Employees_CreateOrUpdate_minage", + "operationId": "Employees_CreateOrUpdate", "parameters": { "api-version": "2021-10-01-preview", "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", @@ -179,8 +179,35 @@ async function employeesCreateOrUpdateMaxage() { console.log(result); } +/** + * This sample demonstrates how to create a Employee + * + * @summary create a Employee + * x-ms-original-file: 2021-10-01-preview/json_for_Employees_CreateOrUpdate_minage.json + */ +async function employeesCreateOrUpdateMinage() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + const client = new ContosoClient(credential, subscriptionId); + const result = await client.employees.createOrUpdate( + "rgopenapi", + "9KF-f-8b", + { + properties: { + age: 1, + city: "gydhnntudughbmxlkyzrskcdkotrxn", + profile: "ms" + }, + tags: { key2913: "urperxmkkhhkp" }, + location: "itajgxyqozseoygnl" + } + ); + console.log(result); +} + async function main() { employeesCreateOrUpdateMaxage(); + employeesCreateOrUpdateMinage(); } main().catch(console.error); From 9b185cb0e3850b8498fb65b4b9229c3baf4c245f Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Fri, 13 Sep 2024 15:07:50 +0800 Subject: [PATCH 82/83] update the descriptions --- .../samples/operations/multipleExamplesInOneFile.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamplesInOneFile.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamplesInOneFile.md index 98b792f85f..916895aeb8 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamplesInOneFile.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/operations/multipleExamplesInOneFile.md @@ -1,6 +1,6 @@ -# Should generate samples for ARM operations +# Should generate in one file when one method has multiple samples -Sample generation should arm template and operations successfully. +Sample generation should generate in one file when one method has multiple samples. ## TypeSpec @@ -146,7 +146,7 @@ Raw json files. } ``` -Generate samples for arm cases: +Generate one file for multiple samples: ```ts samples /** This file path is /samples-dev/employeesCreateOrUpdateSample.ts */ From 956fe2c37bf260bc1a498f24ae0d8c1f9ab23542 Mon Sep 17 00:00:00 2001 From: Mary Gao Date: Wed, 18 Sep 2024 11:13:15 +0800 Subject: [PATCH 83/83] Skip optional body test cases --- .../scenarios/samples/parameters/bodyOptionalCheck.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md index f441e161a9..c62ca98795 100644 --- a/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md +++ b/packages/typespec-ts/test/modularUnit/scenarios/samples/parameters/bodyOptionalCheck.md @@ -1,7 +1,9 @@ -# Should generate optional body in option parameter +# skip: Should generate optional body in option parameter Should generate optional body in option parameter. +// FIXME: issue tracked: https://github.com/Azure/autorest.typescript/issues/2827 + ## TypeSpec This is tsp definition. @@ -70,7 +72,7 @@ async function read() { const client = new TestingClient(); const result = await client.read("required path param", "required query", { body: { name: "body name" }, - optionalQuery: "renamed optional query", + optionalQuery: "renamed optional query" }); console.log(result); }