Skip to content

Commit

Permalink
CodeGen from PR 3207 in test-repo-billy/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 1f924dd2b806880b15c874ef98eaffd2606edd34 into 2a3aeccebd978831771083e30bb5bbce3c2e485a
  • Loading branch information
SDKAuto committed Feb 7, 2024
1 parent ba8ca02 commit 0a88b72
Show file tree
Hide file tree
Showing 18 changed files with 787 additions and 659 deletions.
189 changes: 156 additions & 33 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

19 changes: 8 additions & 11 deletions sdk/servicelinker/arm-servicelinker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Release History

## 2.2.0 (2024-02-07)

**Features**

## 2.1.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Enum KnownClientType has a new value KafkaSpringBoot


## 2.1.0 (2022-12-16)

**Features**
Expand Down Expand Up @@ -45,4 +42,4 @@

## 1.0.0 (2022-04-27)

The package of @azure/arm-servicelinker is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
The package of @azure/arm-servicelinker is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
2 changes: 1 addition & 1 deletion sdk/servicelinker/arm-servicelinker/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022 Microsoft
Copyright (c) 2024 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 6 additions & 6 deletions sdk/servicelinker/arm-servicelinker/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "eeb81e9f8a12ad473e8df3a71f2d58682741bcd2",
"readme": "specification\\servicelinker\\resource-manager\\readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\servicelinker\\resource-manager\\readme.md --use=@autorest/[email protected].0-rc.5.20221215.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.4",
"use": "@autorest/[email protected].0-rc.5.20221215.1"
"commit": "fdc208b15fbd1be88a9f05ac33ebe6723491d647",
"readme": "specification/servicelinker/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/servicelinker/resource-manager/readme.md --use=@autorest/typescript@^6.0.11",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.4",
"use": "@autorest/typescript@^6.0.11"
}
37 changes: 15 additions & 22 deletions sdk/servicelinker/arm-servicelinker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ServiceLinkerManagementClient.",
"version": "2.1.1",
"version": "2.2.0",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.6.1",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.6.0",
"@azure/core-rest-pipeline": "^1.14.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand All @@ -29,20 +29,22 @@
"types": "./types/arm-servicelinker.d.ts",
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"mkdirp": "^1.0.4",
"typescript": "~5.2.0",
"mkdirp": "^2.1.2",
"typescript": "~5.3.3",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"rimraf": "^5.0.0",
"dotenv": "^16.0.0",
"@azure/identity": "^3.3.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.0.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^10.0.0",
"@types/mocha": "^10.0.0",
"esm": "^3.2.18",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"@azure/dev-tool": "^1.0.0",
"ts-node": "^10.0.0"
},
"repository": {
Expand Down Expand Up @@ -76,8 +78,7 @@
"pack": "npm pack 2>&1",
"extract-api": "api-extractor run --local",
"lint": "echo skipped",
"audit": "echo skipped",
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
"build:test": "echo skipped",
Expand Down Expand Up @@ -105,13 +106,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-servicelinker?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import * as coreAuth from '@azure/core-auth';
import * as coreClient from '@azure/core-client';
import { OperationState } from '@azure/core-lro';
import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';
import { SimplePollerLike } from '@azure/core-lro';

// @public
export type ActionType = string;
Expand Down Expand Up @@ -127,6 +127,7 @@ export enum KnownClientType {
Dotnet = "dotnet",
Go = "go",
Java = "java",
KafkaSpringBoot = "kafka-springBoot",
Nodejs = "nodejs",
None = "none",
Php = "php",
Expand Down Expand Up @@ -179,13 +180,13 @@ export enum KnownVNetSolutionType {

// @public
export interface Linker {
beginCreateOrUpdate(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<LinkerCreateOrUpdateResponse>, LinkerCreateOrUpdateResponse>>;
beginCreateOrUpdate(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<LinkerCreateOrUpdateResponse>, LinkerCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise<LinkerCreateOrUpdateResponse>;
beginDelete(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDelete(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginDeleteAndWait(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise<void>;
beginUpdate(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise<PollerLike<PollOperationState<LinkerUpdateResponse>, LinkerUpdateResponse>>;
beginUpdate(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise<SimplePollerLike<OperationState<LinkerUpdateResponse>, LinkerUpdateResponse>>;
beginUpdateAndWait(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise<LinkerUpdateResponse>;
beginValidate(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise<PollerLike<PollOperationState<LinkerValidateResponse>, LinkerValidateResponse>>;
beginValidate(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise<SimplePollerLike<OperationState<LinkerValidateResponse>, LinkerValidateResponse>>;
beginValidateAndWait(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise<LinkerValidateResponse>;
get(resourceUri: string, linkerName: string, options?: LinkerGetOptionalParams): Promise<LinkerGetResponse>;
list(resourceUri: string, options?: LinkerListOptionalParams): PagedAsyncIterableIterator<LinkerResource>;
Expand Down
54 changes: 31 additions & 23 deletions sdk/servicelinker/arm-servicelinker/src/lroImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,37 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { AbortSignalLike } from "@azure/abort-controller";
import { LongRunningOperation, LroResponse } from "@azure/core-lro";

export class LroImpl<T> implements LongRunningOperation<T> {
constructor(
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
private args: Record<string, unknown>,
private spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>,
public requestPath: string = spec.path!,
public requestMethod: string = spec.httpMethod
) {}
public async sendInitialRequest(): Promise<LroResponse<T>> {
return this.sendOperationFn(this.args, this.spec);
}
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
const { requestBody, ...restSpec } = this.spec;
return this.sendOperationFn(this.args, {
...restSpec,
path,
httpMethod: "GET"
});
}
export function createLroSpec<T>(inputs: {
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
args: Record<string, unknown>;
spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>;
}): LongRunningOperation<T> {
const { args, spec, sendOperationFn } = inputs;
return {
requestMethod: spec.httpMethod,
requestPath: spec.path!,
sendInitialRequest: () => sendOperationFn(args, spec),
sendPollRequest: (
path: string,
options?: { abortSignal?: AbortSignalLike },
) => {
const { requestBody, ...restSpec } = spec;
return sendOperationFn(args, {
...restSpec,
httpMethod: "GET",
path,
abortSignal: options?.abortSignal,
});
},
};
}
25 changes: 14 additions & 11 deletions sdk/servicelinker/arm-servicelinker/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export enum KnownTargetServiceType {
/** ConfluentBootstrapServer */
ConfluentBootstrapServer = "ConfluentBootstrapServer",
/** ConfluentSchemaRegistry */
ConfluentSchemaRegistry = "ConfluentSchemaRegistry"
ConfluentSchemaRegistry = "ConfluentSchemaRegistry",
}

/**
Expand All @@ -473,7 +473,7 @@ export enum KnownAuthType {
/** ServicePrincipalCertificate */
ServicePrincipalCertificate = "servicePrincipalCertificate",
/** Secret */
Secret = "secret"
Secret = "secret",
}

/**
Expand Down Expand Up @@ -510,7 +510,9 @@ export enum KnownClientType {
/** Nodejs */
Nodejs = "nodejs",
/** SpringBoot */
SpringBoot = "springBoot"
SpringBoot = "springBoot",
/** KafkaSpringBoot */
KafkaSpringBoot = "kafka-springBoot",
}

/**
Expand All @@ -527,7 +529,8 @@ export enum KnownClientType {
* **ruby** \
* **django** \
* **nodejs** \
* **springBoot**
* **springBoot** \
* **kafka-springBoot**
*/
export type ClientType = string;

Expand All @@ -536,7 +539,7 @@ export enum KnownVNetSolutionType {
/** ServiceEndpoint */
ServiceEndpoint = "serviceEndpoint",
/** PrivateLink */
PrivateLink = "privateLink"
PrivateLink = "privateLink",
}

/**
Expand All @@ -558,7 +561,7 @@ export enum KnownCreatedByType {
/** ManagedIdentity */
ManagedIdentity = "ManagedIdentity",
/** Key */
Key = "Key"
Key = "Key",
}

/**
Expand All @@ -580,7 +583,7 @@ export enum KnownValidationResultStatus {
/** Failure */
Failure = "failure",
/** Warning */
Warning = "warning"
Warning = "warning",
}

/**
Expand All @@ -601,7 +604,7 @@ export enum KnownOrigin {
/** System */
System = "system",
/** UserSystem */
UserSystem = "user,system"
UserSystem = "user,system",
}

/**
Expand All @@ -618,7 +621,7 @@ export type Origin = string;
/** Known values of {@link ActionType} that the service accepts. */
export enum KnownActionType {
/** Internal */
Internal = "Internal"
Internal = "Internal",
}

/**
Expand All @@ -633,7 +636,7 @@ export type ActionType = string;
/** Known values of {@link AzureResourceType} that the service accepts. */
export enum KnownAzureResourceType {
/** KeyVault */
KeyVault = "KeyVault"
KeyVault = "KeyVault",
}

/**
Expand All @@ -652,7 +655,7 @@ export enum KnownSecretType {
/** KeyVaultSecretUri */
KeyVaultSecretUri = "keyVaultSecretUri",
/** KeyVaultSecretReference */
KeyVaultSecretReference = "keyVaultSecretReference"
KeyVaultSecretReference = "keyVaultSecretReference",
}

/**
Expand Down
Loading

0 comments on commit 0a88b72

Please sign in to comment.