Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 8 additions & 37 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 25 additions & 10 deletions sdk/healthbot/arm-healthbot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
# Release History

## 3.0.0 (2023-03-28)

**Features**

## 2.1.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added operation Bots.beginUpdate
- Added operation Bots.beginUpdateAndWait
- Added operation Bots.listSecrets
- Added operation Bots.regenerateApiJwtSecret
- Added Interface BotsListSecretsOptionalParams
- Added Interface BotsRegenerateApiJwtSecretOptionalParams
- Added Interface HealthBotKey
- Added Interface HealthBotKeysResponse
- Added Interface KeyVaultProperties
- Added Type Alias BotsListSecretsResponse
- Added Type Alias BotsRegenerateApiJwtSecretResponse
- Interface BotsUpdateOptionalParams has a new optional parameter resumeFrom
- Interface BotsUpdateOptionalParams has a new optional parameter updateIntervalInMs
- Interface HealthBotProperties has a new optional parameter keyVaultProperties
- Interface HealthBotUpdateParameters has a new optional parameter properties

**Breaking Changes**

- Removed operation Bots.update


## 2.1.0 (2022-11-25)

**Features**
Expand Down
2 changes: 1 addition & 1 deletion sdk/healthbot/arm-healthbot/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) 2023 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
10 changes: 5 additions & 5 deletions sdk/healthbot/arm-healthbot/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "1f1d5b0b9ce6cc94605b2fd619dce374fb6e033a",
"readme": "specification\\healthbot\\resource-manager\\readme.md",
"autorest_command": "autorest --version=3.8.4 --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\\healthbot\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true",
"commit": "b78cd5f7aa24bb434f8e5b42df960615832d7b6e",
"readme": "specification/healthbot/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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/healthbot/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
"use": "@autorest/typescript@6.0.0-rc.3.20221108.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.0",
"use": "@autorest/typescript@6.0.0-rc.10"
}
21 changes: 7 additions & 14 deletions sdk/healthbot/arm-healthbot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for HealthbotClient.",
"version": "2.1.1",
"version": "3.0.0",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/core-lro": "^2.5.0",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.6.1",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0"
Expand All @@ -33,12 +33,13 @@
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-multi-entry": "^6.0.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"mkdirp": "^2.1.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.8.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"dotenv": "^16.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
Expand All @@ -49,7 +50,6 @@
"@types/node": "^14.0.0",
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthbot/arm-healthbot",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down Expand Up @@ -111,12 +111,5 @@
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-healthbot?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthbot/arm-healthbot"
}
50 changes: 45 additions & 5 deletions sdk/healthbot/arm-healthbot/review/arm-healthbot.api.md
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 interface AvailableOperations {
Expand All @@ -24,14 +24,17 @@ export interface BotResponseList {

// @public
export interface Bots {
beginCreate(resourceGroupName: string, botName: string, parameters: HealthBot, options?: BotsCreateOptionalParams): Promise<PollerLike<PollOperationState<BotsCreateResponse>, BotsCreateResponse>>;
beginCreate(resourceGroupName: string, botName: string, parameters: HealthBot, options?: BotsCreateOptionalParams): Promise<SimplePollerLike<OperationState<BotsCreateResponse>, BotsCreateResponse>>;
beginCreateAndWait(resourceGroupName: string, botName: string, parameters: HealthBot, options?: BotsCreateOptionalParams): Promise<BotsCreateResponse>;
beginDelete(resourceGroupName: string, botName: string, options?: BotsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDelete(resourceGroupName: string, botName: string, options?: BotsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, botName: string, options?: BotsDeleteOptionalParams): Promise<void>;
beginUpdate(resourceGroupName: string, botName: string, parameters: HealthBotUpdateParameters, options?: BotsUpdateOptionalParams): Promise<SimplePollerLike<OperationState<BotsUpdateResponse>, BotsUpdateResponse>>;
beginUpdateAndWait(resourceGroupName: string, botName: string, parameters: HealthBotUpdateParameters, options?: BotsUpdateOptionalParams): Promise<BotsUpdateResponse>;
get(resourceGroupName: string, botName: string, options?: BotsGetOptionalParams): Promise<BotsGetResponse>;
list(options?: BotsListOptionalParams): PagedAsyncIterableIterator<HealthBot>;
listByResourceGroup(resourceGroupName: string, options?: BotsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<HealthBot>;
update(resourceGroupName: string, botName: string, parameters: HealthBotUpdateParameters, options?: BotsUpdateOptionalParams): Promise<BotsUpdateResponse>;
listSecrets(resourceGroupName: string, botName: string, options?: BotsListSecretsOptionalParams): Promise<BotsListSecretsResponse>;
regenerateApiJwtSecret(resourceGroupName: string, botName: string, options?: BotsRegenerateApiJwtSecretOptionalParams): Promise<BotsRegenerateApiJwtSecretResponse>;
}

// @public
Expand Down Expand Up @@ -84,8 +87,24 @@ export interface BotsListOptionalParams extends coreClient.OperationOptions {
// @public
export type BotsListResponse = BotResponseList;

// @public
export interface BotsListSecretsOptionalParams extends coreClient.OperationOptions {
}

// @public
export type BotsListSecretsResponse = HealthBotKeysResponse;

// @public
export interface BotsRegenerateApiJwtSecretOptionalParams extends coreClient.OperationOptions {
}

// @public
export type BotsRegenerateApiJwtSecretResponse = HealthBotKey;

// @public
export interface BotsUpdateOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}

// @public
Expand Down Expand Up @@ -143,9 +162,21 @@ export interface HealthbotClientOptionalParams extends coreClient.ServiceClientO
endpoint?: string;
}

// @public
export interface HealthBotKey {
keyName?: string;
value?: string;
}

// @public
export interface HealthBotKeysResponse {
secrets?: HealthBotKey[];
}

// @public
export interface HealthBotProperties {
readonly botManagementPortalLink?: string;
keyVaultProperties?: KeyVaultProperties;
readonly provisioningState?: string;
}

Expand All @@ -154,6 +185,7 @@ export interface HealthBotUpdateParameters {
identity?: Identity;
// (undocumented)
location?: string;
properties?: HealthBotProperties;
sku?: Sku;
tags?: {
[propertyName: string]: string;
Expand All @@ -173,6 +205,14 @@ export interface Identity {
// @public
export type IdentityType = string;

// @public
export interface KeyVaultProperties {
keyName: string;
keyVaultUri: string;
keyVersion?: string;
userIdentity?: string;
}

// @public
export enum KnownIdentityType {
Application = "Application",
Expand Down
4 changes: 2 additions & 2 deletions sdk/healthbot/arm-healthbot/src/healthbotClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class HealthbotClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-healthbot/2.1.1`;
const packageDetails = `azsdk-js-arm-healthbot/3.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down Expand Up @@ -103,7 +103,7 @@ export class HealthbotClient extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2021-06-10";
this.apiVersion = options.apiVersion || "2022-08-08";
this.bots = new BotsImpl(this);
this.operations = new OperationsImpl(this);
this.addCustomApiVersionPolicy(options.apiVersion);
Expand Down
54 changes: 31 additions & 23 deletions sdk/healthbot/arm-healthbot/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
});
}
};
}
Loading