ZiWei Chen 2024-05-11 11:26:09 +08:00 коммит произвёл GitHub
Родитель 5bdb96ba1c
Коммит 1733bfa3b6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
22 изменённых файлов: 177 добавлений и 83 удалений

Просмотреть файл

@ -1211,6 +1211,19 @@ packages:
- supports-color
dev: false
/@azure-tools/test-credential@1.1.0:
resolution: {integrity: sha512-KFICQ9ke2OIQms3ZCoidKmH/opUsP9rHub4pdH8JTHh4atiYq2AKviMIgMyBC3ZYdOfsFfnMrm5PcH+0VDRafw==}
engines: {node: '>=18.0.0'}
dependencies:
'@azure-tools/test-recorder': 3.2.0
'@azure/core-auth': 1.7.2
'@azure/core-util': 1.9.0
'@azure/identity': 4.2.0
tslib: 2.6.2
transitivePeerDependencies:
- supports-color
dev: false
/@azure-tools/test-recorder@3.2.0:
resolution: {integrity: sha512-Y7e3H4isrxCdc6Qjc2bXPIgW8dP/aD387mQ6w7W07eRFZLqAj7sGSQWQ6UrMUkS3Bv9k6JEyjO4WSNrSKEFpaA==}
engines: {node: '>=18.0.0'}
@ -17024,11 +17037,11 @@ packages:
dev: false
file:projects/arm-selfhelp.tgz:
resolution: {integrity: sha512-AV9E4kptyBbma5l1sQ/Dm8IfaZrP9hQCZ66bU6RgOhGnF82HlylansZ1Im/Lo72udfTnRVT9NrUZSba9afXzXQ==, tarball: file:projects/arm-selfhelp.tgz}
resolution: {integrity: sha512-2hUPoU+gKUGR3eMSfcruhUC9Jv2icxCwcimPRk86Wskq2kETMxkklFwiI8y4E7OoJ8iftpbqBzp8RJTGlhdIaA==, tarball: file:projects/arm-selfhelp.tgz}
name: '@rush-temp/arm-selfhelp'
version: 0.0.0
dependencies:
'@azure-tools/test-credential': 1.0.4
'@azure-tools/test-credential': 1.1.0
'@azure-tools/test-recorder': 3.2.0
'@azure/abort-controller': 1.1.0
'@azure/core-lro': 2.7.2
@ -17040,6 +17053,7 @@ packages:
chai: 4.3.10
cross-env: 7.0.3
dotenv: 16.4.5
esm: 3.2.25
mkdirp: 3.0.1
mocha: 10.4.0
rimraf: 5.0.5

Просмотреть файл

@ -1,15 +1,124 @@
# Release History
## 2.0.0-beta.4 (2024-05-10)
**Features**
## 2.0.0-beta.4 (Unreleased)
- Added operation group CheckNameAvailability
- Added operation group DiscoverySolutionNLPSubscriptionScope
- Added operation group DiscoverySolutionNLPTenantScope
- Added operation group SimplifiedSolutions
- Added operation group Solution
- Added operation group SolutionSelfHelp
- Added operation group Troubleshooters
- Added Interface AutomatedCheckResult
- Added Interface CheckNameAvailabilityPostOptionalParams
- Added Interface ClassificationService
- Added Interface ContinueRequestBody
- Added Interface DiscoveryNlpRequest
- Added Interface DiscoveryNlpResponse
- Added Interface DiscoverySolutionNLPSubscriptionScopePostOptionalParams
- Added Interface DiscoverySolutionNLPTenantScopePostOptionalParams
- Added Interface Filter
- Added Interface FilterGroup
- Added Interface MetricsBasedChart
- Added Interface ReplacementMaps
- Added Interface ReplacementMapsSelfHelp
- Added Interface ResponseOption
- Added Interface ResponseValidationProperties
- Added Interface RestartTroubleshooterResponse
- Added Interface SearchResult
- Added Interface Section
- Added Interface SectionSelfHelp
- Added Interface SimplifiedSolutionsCreateOptionalParams
- Added Interface SimplifiedSolutionsGetOptionalParams
- Added Interface SimplifiedSolutionsResource
- Added Interface SolutionCreateOptionalParams
- Added Interface SolutionGetOptionalParams
- Added Interface SolutionMetadataProperties
- Added Interface SolutionNlpMetadataResource
- Added Interface SolutionPatchRequestBody
- Added Interface SolutionResource
- Added Interface SolutionResourceSelfHelp
- Added Interface SolutionsDiagnostic
- Added Interface SolutionSelfHelpGetOptionalParams
- Added Interface SolutionsTroubleshooters
- Added Interface SolutionUpdateHeaders
- Added Interface SolutionUpdateOptionalParams
- Added Interface SolutionWarmUpOptionalParams
- Added Interface SolutionWarmUpRequestBody
- Added Interface Step
- Added Interface StepInput
- Added Interface TriggerCriterion
- Added Interface TroubleshooterResource
- Added Interface TroubleshooterResponse
- Added Interface TroubleshootersContinueHeaders
- Added Interface TroubleshootersContinueOptionalParams
- Added Interface TroubleshootersCreateOptionalParams
- Added Interface TroubleshootersEndHeaders
- Added Interface TroubleshootersEndOptionalParams
- Added Interface TroubleshootersGetOptionalParams
- Added Interface TroubleshootersRestartHeaders
- Added Interface TroubleshootersRestartOptionalParams
- Added Interface Video
- Added Interface VideoGroup
- Added Interface VideoGroupVideo
- Added Interface WebResult
- Added Type Alias AggregationType
- Added Type Alias AutomatedCheckResultType
- Added Type Alias CheckNameAvailabilityPostResponse
- Added Type Alias Confidence
- Added Type Alias DiagnosticProvisioningState
- Added Type Alias DiscoverySolutionNLPSubscriptionScopePostResponse
- Added Type Alias DiscoverySolutionNLPTenantScopePostResponse
- Added Type Alias ExecutionStatus
- Added Type Alias Name
- Added Type Alias QuestionContentType
- Added Type Alias QuestionType
- Added Type Alias ResultType
- Added Type Alias SimplifiedSolutionsCreateResponse
- Added Type Alias SimplifiedSolutionsGetResponse
- Added Type Alias SolutionCreateResponse
- Added Type Alias SolutionGetResponse
- Added Type Alias SolutionProvisioningState
- Added Type Alias SolutionSelfHelpGetResponse
- Added Type Alias SolutionType
- Added Type Alias SolutionUpdateResponse
- Added Type Alias TroubleshooterProvisioningState
- Added Type Alias TroubleshootersContinueResponse
- Added Type Alias TroubleshootersCreateResponse
- Added Type Alias TroubleshootersEndResponse
- Added Type Alias TroubleshootersGetResponse
- Added Type Alias TroubleshootersRestartResponse
- Added Type Alias Type
- Added Type Alias ValidationScope
- Interface SolutionMetadataResource has a new optional parameter solutions
- Added Enum KnownAggregationType
- Added Enum KnownAutomatedCheckResultType
- Added Enum KnownConfidence
- Added Enum KnownDiagnosticProvisioningState
- Added Enum KnownExecutionStatus
- Added Enum KnownName
- Added Enum KnownQuestionContentType
- Added Enum KnownQuestionType
- Added Enum KnownResultType
- Added Enum KnownSolutionProvisioningState
- Added Enum KnownSolutionType
- Added Enum KnownTroubleshooterProvisioningState
- Added Enum KnownType
- Added Enum KnownValidationScope
### Features Added
### Breaking Changes
### Bugs Fixed
### Other Changes
**Breaking Changes**
- Removed operation Diagnostics.checkNameAvailability
- Operation DiscoverySolution.list has a new signature
- Interface SolutionMetadataResource no longer has parameter description
- Interface SolutionMetadataResource no longer has parameter requiredParameterSets
- Interface SolutionMetadataResource no longer has parameter solutionId
- Interface SolutionMetadataResource no longer has parameter solutionType
- Type of parameter provisioningState of interface DiagnosticResource is changed from ProvisioningState to DiagnosticProvisioningState
- Removed Enum KnownProvisioningState
## 2.0.0-beta.3 (2024-04-19)
**Features**

Просмотреть файл

@ -53,15 +53,14 @@ const { HelpRP } = require("@azure/arm-selfhelp");
const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new HelpRP(new DefaultAzureCredential(), subscriptionId);
const client = new HelpRP(new DefaultAzureCredential());
// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new HelpRP(credential, subscriptionId);
// const client = new HelpRP(credential);
```

Просмотреть файл

@ -1,8 +1,8 @@
{
"commit": "db6282dd0d04c5f13375e98e88b09d04c2009ae8",
"commit": "68c8da604a93740f5f074046f9d8ffe23c5a2f41",
"readme": "specification/help/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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\help\\resource-manager\\readme.md --use=@autorest/typescript@6.0.20 --generate-sample=true",
"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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\help\\resource-manager\\readme.md --use=@autorest/typescript@6.0.21 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.5",
"use": "@autorest/typescript@6.0.20"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.7",
"use": "@autorest/typescript@6.0.21"
}

Просмотреть файл

@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/selfhelp/arm-selfhelp",
"Tag": "js/selfhelp/arm-selfhelp_56bdb44654"
"Tag": "js/selfhelp/arm-selfhelp_0b7f76cb88"
}

Просмотреть файл

@ -37,9 +37,10 @@
"@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",
"@azure-tools/test-credential": "^1.1.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",
@ -75,7 +76,7 @@
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"prepack": "npm run build",
"pack": "npm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"extract-api": "api-extractor run --local",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",

Просмотреть файл

@ -169,7 +169,7 @@ export type DiscoverySolutionListResponse = DiscoveryResponse;
// @public
export interface DiscoverySolutionNLPSubscriptionScope {
post(options?: DiscoverySolutionNLPSubscriptionScopePostOptionalParams): Promise<DiscoverySolutionNLPSubscriptionScopePostResponse>;
post(subscriptionId: string, options?: DiscoverySolutionNLPSubscriptionScopePostOptionalParams): Promise<DiscoverySolutionNLPSubscriptionScopePostResponse>;
}
// @public
@ -243,7 +243,6 @@ export function getContinuationToken(page: unknown): string | undefined;
export class HelpRP extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HelpRPOptionalParams);
constructor(credentials: coreAuth.TokenCredential, options?: HelpRPOptionalParams);
// (undocumented)
apiVersion: string;
@ -266,8 +265,6 @@ export class HelpRP extends coreClient.ServiceClient {
// (undocumented)
solutionSelfHelp: SolutionSelfHelp;
// (undocumented)
subscriptionId?: string;
// (undocumented)
troubleshooters: Troubleshooters;
}

Просмотреть файл

@ -25,9 +25,7 @@ dotenv.config();
* x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/DiscoverSolutionsAtSubscriptionScope.json
*/
async function discoverySolutionsUsingIssueSummaryAndServiceId() {
const subscriptionId =
process.env["SELFHELP_SUBSCRIPTION_ID"] ||
"0d0fcd2e-c4fd-4349-8497-200edb3923c6";
const subscriptionId = "0d0fcd2e-c4fd-4349-8497-200edb3923c6";
const discoverSolutionRequest: DiscoveryNlpRequest = {
issueSummary: "how to retrieve certs from deleted keyvault.",
resourceId:
@ -38,9 +36,11 @@ async function discoverySolutionsUsingIssueSummaryAndServiceId() {
discoverSolutionRequest,
};
const credential = new DefaultAzureCredential();
const client = new HelpRP(credential, subscriptionId);
const result =
await client.discoverySolutionNLPSubscriptionScope.post(options);
const client = new HelpRP(credential);
const result = await client.discoverySolutionNLPSubscriptionScope.post(
subscriptionId,
options,
);
console.log(result);
}

Просмотреть файл

@ -27,8 +27,6 @@ dotenv.config();
async function discoverySolutionsUsingIssueSummaryAndServiceId() {
const discoverSolutionRequest: DiscoveryNlpRequest = {
issueSummary: "how to retrieve certs from deleted keyvault.",
resourceId:
"subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read",
serviceId: "0d0fcd2e-c4fd-4349-8497-200edb39s3ca",
};
const options: DiscoverySolutionNLPTenantScopePostOptionalParams = {

Просмотреть файл

@ -21,11 +21,8 @@ dotenv.config();
* x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/ListOperations.json
*/
async function listAllOperations() {
const subscriptionId =
process.env["SELFHELP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new HelpRP(credential, subscriptionId);
const client = new HelpRP(credential);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);

Просмотреть файл

@ -19,8 +19,7 @@ require("dotenv").config();
* x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/DiscoverSolutionsAtSubscriptionScope.json
*/
async function discoverySolutionsUsingIssueSummaryAndServiceId() {
const subscriptionId =
process.env["SELFHELP_SUBSCRIPTION_ID"] || "0d0fcd2e-c4fd-4349-8497-200edb3923c6";
const subscriptionId = "0d0fcd2e-c4fd-4349-8497-200edb3923c6";
const discoverSolutionRequest = {
issueSummary: "how to retrieve certs from deleted keyvault.",
resourceId:
@ -31,8 +30,8 @@ async function discoverySolutionsUsingIssueSummaryAndServiceId() {
discoverSolutionRequest,
};
const credential = new DefaultAzureCredential();
const client = new HelpRP(credential, subscriptionId);
const result = await client.discoverySolutionNLPSubscriptionScope.post(options);
const client = new HelpRP(credential);
const result = await client.discoverySolutionNLPSubscriptionScope.post(subscriptionId, options);
console.log(result);
}

Просмотреть файл

@ -21,8 +21,6 @@ require("dotenv").config();
async function discoverySolutionsUsingIssueSummaryAndServiceId() {
const discoverSolutionRequest = {
issueSummary: "how to retrieve certs from deleted keyvault.",
resourceId:
"subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read",
serviceId: "0d0fcd2e-c4fd-4349-8497-200edb39s3ca",
};
const options = {

Просмотреть файл

@ -19,10 +19,8 @@ require("dotenv").config();
* x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/ListOperations.json
*/
async function listAllOperations() {
const subscriptionId =
process.env["SELFHELP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new HelpRP(credential, subscriptionId);
const client = new HelpRP(credential);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);

Просмотреть файл

@ -25,9 +25,7 @@ dotenv.config();
* x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/DiscoverSolutionsAtSubscriptionScope.json
*/
async function discoverySolutionsUsingIssueSummaryAndServiceId() {
const subscriptionId =
process.env["SELFHELP_SUBSCRIPTION_ID"] ||
"0d0fcd2e-c4fd-4349-8497-200edb3923c6";
const subscriptionId = "0d0fcd2e-c4fd-4349-8497-200edb3923c6";
const discoverSolutionRequest: DiscoveryNlpRequest = {
issueSummary: "how to retrieve certs from deleted keyvault.",
resourceId:
@ -38,9 +36,11 @@ async function discoverySolutionsUsingIssueSummaryAndServiceId() {
discoverSolutionRequest,
};
const credential = new DefaultAzureCredential();
const client = new HelpRP(credential, subscriptionId);
const result =
await client.discoverySolutionNLPSubscriptionScope.post(options);
const client = new HelpRP(credential);
const result = await client.discoverySolutionNLPSubscriptionScope.post(
subscriptionId,
options,
);
console.log(result);
}

Просмотреть файл

@ -27,8 +27,6 @@ dotenv.config();
async function discoverySolutionsUsingIssueSummaryAndServiceId() {
const discoverSolutionRequest: DiscoveryNlpRequest = {
issueSummary: "how to retrieve certs from deleted keyvault.",
resourceId:
"subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read",
serviceId: "0d0fcd2e-c4fd-4349-8497-200edb39s3ca",
};
const options: DiscoverySolutionNLPTenantScopePostOptionalParams = {

Просмотреть файл

@ -21,11 +21,8 @@ dotenv.config();
* x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/ListOperations.json
*/
async function listAllOperations() {
const subscriptionId =
process.env["SELFHELP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new HelpRP(credential, subscriptionId);
const client = new HelpRP(credential);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);

Просмотреть файл

@ -43,40 +43,20 @@ import { HelpRPOptionalParams } from "./models";
export class HelpRP extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
subscriptionId?: string;
/**
* Initializes a new instance of the HelpRP class.
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param subscriptionId The ID of the target subscription. The value must be an UUID.
* @param options The parameter options
*/
constructor(
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: HelpRPOptionalParams,
);
constructor(
credentials: coreAuth.TokenCredential,
options?: HelpRPOptionalParams,
);
constructor(
credentials: coreAuth.TokenCredential,
subscriptionIdOrOptions?: HelpRPOptionalParams | string,
options?: HelpRPOptionalParams,
) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
let subscriptionId: string | undefined;
if (typeof subscriptionIdOrOptions === "string") {
subscriptionId = subscriptionIdOrOptions;
} else if (typeof subscriptionIdOrOptions === "object") {
options = subscriptionIdOrOptions;
}
// Initializing default values for options
if (!options) {
options = {};
@ -135,8 +115,6 @@ export class HelpRP extends coreClient.ServiceClient {
}),
);
}
// Parameter assignments
this.subscriptionId = subscriptionId;
// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";

Просмотреть файл

@ -576,7 +576,7 @@ export interface SectionSelfHelp {
export interface DiscoveryNlpRequest {
/** Natural language description of the issue. */
issueSummary: string;
/** ARM resource Id of the resource that is having the issue. */
/** ARM resource Id of the resource that is having the issue. Only applicable for Discovery Solution NLP Subscription Scope. */
resourceId?: string;
/** ARM service Id of the service that is having the issue. For more information on service Id see https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP. */
serviceId?: string;

Просмотреть файл

@ -246,7 +246,8 @@ export const subscriptionId: OperationURLParameter = {
serializedName: "subscriptionId",
required: true,
type: {
name: "Uuid",
name: "String",
},
},
skipEncoding: true,
};

Просмотреть файл

@ -33,12 +33,17 @@ export class DiscoverySolutionNLPSubscriptionScopeImpl
/**
* Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue
* summary and subscription.
* @param subscriptionId The Azure subscription ID.
* @param options The options parameters.
*/
post(
subscriptionId: string,
options?: DiscoverySolutionNLPSubscriptionScopePostOptionalParams,
): Promise<DiscoverySolutionNLPSubscriptionScopePostResponse> {
return this.client.sendOperationRequest({ options }, postOperationSpec);
return this.client.sendOperationRequest(
{ subscriptionId, options },
postOperationSpec,
);
}
}
// Operation Specifications

Просмотреть файл

@ -16,9 +16,11 @@ export interface DiscoverySolutionNLPSubscriptionScope {
/**
* Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue
* summary and subscription.
* @param subscriptionId The Azure subscription ID.
* @param options The options parameters.
*/
post(
subscriptionId: string,
options?: DiscoverySolutionNLPSubscriptionScopePostOptionalParams,
): Promise<DiscoverySolutionNLPSubscriptionScopePostResponse>;
}

Просмотреть файл

@ -33,7 +33,7 @@ export const testPollingOptions = {
updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
};
describe.skip("help test", () => {
describe("help test", () => {
let recorder: Recorder;
let subscriptionId: string;
let client: HelpRP;
@ -89,4 +89,7 @@ describe.skip("help test", () => {
assert.notEqual(resArray.length, 0)
});
it("discoverySolutionNLPSubscriptionScope post test", async function () {
const res = await client.discoverySolutionNLPSubscriptionScope.post(subscriptionId, { discoverSolutionRequest: { issueSummary: "how to retrieve certs from deleted keyvault." } });
});
})