Skip to content

Commit 25c3dde

Browse files
author
SDKAuto
committed
CodeGen from PR 34447 in Azure/azure-rest-api-specs
Merge 7864c57651856184a47ae5550b299f0db5e547fd into ebabd96a91be0af107cc66f3149b0b41d7d44a8f
1 parent 1c8eb4d commit 25c3dde

36 files changed

+304
-566
lines changed

sdk/frontdoor/arm-frontdoor/CHANGELOG.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# Release History
2-
3-
## 5.3.1 (Unreleased)
4-
2+
3+
## 5.4.0 (2025-05-05)
4+
55
### Features Added
66

7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
12-
7+
- Interface PolicySettings has a new optional parameter captchaExpirationInMinutes
8+
- Enum KnownActionType has a new value Captcha
9+
10+
1311
## 5.3.0 (2024-04-15)
1412

1513
### Features Added

sdk/frontdoor/arm-frontdoor/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

sdk/frontdoor/arm-frontdoor/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ npm install @azure/identity
4444
```
4545

4646
You will also need to **register a new AAD application and grant access to Azure FrontDoorManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
47-
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
4847

4948
For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
5049

@@ -64,16 +63,14 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur
6463
import { InteractiveBrowserCredential } from "@azure/identity";
6564
import { FrontDoorManagementClient } from "@azure/arm-frontdoor";
6665

67-
const subscriptionId = "00000000-0000-0000-0000-000000000000";
6866
const credential = new InteractiveBrowserCredential({
6967
tenantId: "<YOUR_TENANT_ID>",
70-
clientId: "<YOUR_CLIENT_ID>",
71-
});
68+
clientId: "<YOUR_CLIENT_ID>"
69+
});
7270
const client = new FrontDoorManagementClient(credential, subscriptionId);
7371
```
7472

7573
### JavaScript Bundle
76-
7774
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
7875

7976
## Key concepts
@@ -109,7 +106,6 @@ If you'd like to contribute to this library, please read the [contributing guide
109106
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
110107

111108

112-
113109
[azure_cli]: https://learn.microsoft.com/cli/azure
114110
[azure_sub]: https://azure.microsoft.com/free/
115111
[azure_sub]: https://azure.microsoft.com/free/
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "b54ffc9278eff071455b1dbb4ad2e772afce885d",
2+
"commit": "0358f2e912fbe62d7e827062a008ae3b842254bb",
33
"readme": "specification/frontdoor/resource-manager/readme.md",
4-
"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\\frontdoor\\resource-manager\\readme.md --use=@autorest/[email protected].20 --generate-sample=true",
4+
"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/frontdoor/resource-manager/readme.md --use=@autorest/typescript@^6.0.12",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/[email protected].5",
7-
"use": "@autorest/[email protected].20"
6+
"release_tool": "@azure-tools/[email protected].26",
7+
"use": "@autorest/typescript@^6.0.12"
88
}

sdk/frontdoor/arm-frontdoor/api-extractor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
}
2929
}
3030
}
31-
}
31+
}

sdk/frontdoor/arm-frontdoor/package.json

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for FrontDoorManagementClient.",
6-
"version": "5.3.1",
6+
"version": "5.4.0",
77
"engines": {
88
"node": ">=18.0.0"
99
},
1010
"dependencies": {
1111
"@azure/abort-controller": "^2.1.2",
1212
"@azure/core-auth": "^1.9.0",
13-
"@azure/core-client": "^1.9.2",
13+
"@azure/core-client": "^1.9.4",
1414
"@azure/core-lro": "^2.5.4",
1515
"@azure/core-paging": "^1.6.2",
16-
"@azure/core-rest-pipeline": "^1.18.2",
16+
"@azure/core-rest-pipeline": "^1.20.0",
1717
"tslib": "^2.8.1"
1818
},
1919
"keywords": [
@@ -28,18 +28,19 @@
2828
"main": "./dist/commonjs/index.js",
2929
"module": "./dist/esm/index.js",
3030
"types": "./dist/commonjs/index.d.ts",
31+
"type": "module",
3132
"devDependencies": {
3233
"@azure-tools/test-credential": "^2.0.0",
3334
"@azure-tools/test-recorder": "^4.1.0",
3435
"@azure-tools/test-utils-vitest": "^1.0.0",
3536
"@azure/dev-tool": "^1.0.0",
36-
"@azure/identity": "^4.6.0",
37-
"@azure/logger": "^1.1.4",
37+
"@azure/identity": "^4.9.1",
38+
"@azure/logger": "^1.2.0",
3839
"@types/node": "^18.0.0",
3940
"@vitest/browser": "^3.0.9",
4041
"@vitest/coverage-istanbul": "^3.0.9",
4142
"dotenv": "^16.0.0",
42-
"playwright": "^1.50.1",
43+
"playwright": "^1.52.0",
4344
"typescript": "~5.8.2",
4445
"vitest": "^3.0.9"
4546
},
@@ -60,16 +61,16 @@
6061
"build:node": "echo skipped",
6162
"build:samples": "echo skipped.",
6263
"build:test": "echo skipped",
63-
"check-format": "echo skipped",
64+
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
6465
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
6566
"execute:samples": "echo skipped",
6667
"extract-api": "dev-tool run extract-api",
67-
"format": "echo skipped",
68+
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
6869
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
6970
"integration-test:browser": "echo skipped",
7071
"integration-test:node": "dev-tool run test:vitest --esm",
7172
"lint": "echo skipped",
72-
"minify": "echo skipped",
73+
"minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
7374
"pack": "npm pack 2>&1",
7475
"prepack": "npm run build",
7576
"test": "npm run integration-test",
@@ -90,16 +91,9 @@
9091
]
9192
},
9293
"autoPublish": true,
94+
"browser": "./dist/browser/index.js",
95+
"react-native": "./dist/react-native/index.js",
9396
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/frontdoor/arm-frontdoor",
94-
"//sampleConfiguration": {
95-
"productName": "",
96-
"productSlugs": [
97-
"azure"
98-
],
99-
"disableDocsMs": true,
100-
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-frontdoor?view=azure-node-preview"
101-
},
102-
"type": "module",
10397
"tshy": {
10498
"project": "./tsconfig.src.json",
10599
"exports": {
@@ -116,8 +110,6 @@
116110
],
117111
"selfLink": false
118112
},
119-
"browser": "./dist/browser/index.js",
120-
"react-native": "./dist/react-native/index.js",
121113
"exports": {
122114
"./package.json": "./package.json",
123115
".": {
@@ -139,4 +131,4 @@
139131
}
140132
}
141133
}
142-
}
134+
}

sdk/frontdoor/arm-frontdoor/review/arm-frontdoor.api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,7 @@ export enum KnownActionType {
666666
Allow = "Allow",
667667
AnomalyScoring = "AnomalyScoring",
668668
Block = "Block",
669+
Captcha = "CAPTCHA",
669670
JSChallenge = "JSChallenge",
670671
Log = "Log",
671672
Redirect = "Redirect"
@@ -1433,6 +1434,7 @@ export type PolicyResourceState = string;
14331434

14341435
// @public
14351436
export interface PolicySettings {
1437+
captchaExpirationInMinutes?: number;
14361438
customBlockResponseBody?: string;
14371439
customBlockResponseStatusCode?: number;
14381440
enabledState?: PolicyEnabledState;
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
# App registration secret for AAD authentication
2-
AZURE_CLIENT_SECRET=
3-
AZURE_CLIENT_ID=
4-
AZURE_TENANT_ID=
1+
# Feel free to add your own environment variables.

sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class FrontDoorManagementClient extends coreClient.ServiceClient {
8585
credential: credentials,
8686
};
8787

88-
const packageDetails = `azsdk-js-arm-frontdoor/5.3.1`;
88+
const packageDetails = `azsdk-js-arm-frontdoor/5.4.0`;
8989
const userAgentPrefix =
9090
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
9191
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -97,8 +97,7 @@ export class FrontDoorManagementClient extends coreClient.ServiceClient {
9797
userAgentOptions: {
9898
userAgentPrefix,
9999
},
100-
endpoint:
101-
options.endpoint ?? options.baseUri ?? "https://management.azure.com",
100+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
102101
};
103102
super(optionsWithDefaults);
104103

@@ -108,8 +107,7 @@ export class FrontDoorManagementClient extends coreClient.ServiceClient {
108107
options.pipeline.getOrderedPolicies();
109108
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
110109
(pipelinePolicy) =>
111-
pipelinePolicy.name ===
112-
coreRestPipeline.bearerTokenAuthenticationPolicyName,
110+
pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName,
113111
);
114112
}
115113
if (
@@ -125,11 +123,9 @@ export class FrontDoorManagementClient extends coreClient.ServiceClient {
125123
coreRestPipeline.bearerTokenAuthenticationPolicy({
126124
credential: credentials,
127125
scopes:
128-
optionsWithDefaults.credentialScopes ??
129-
`${optionsWithDefaults.endpoint}/.default`,
126+
optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,
130127
challengeCallbacks: {
131-
authorizeRequestOnChallenge:
132-
coreClient.authorizeRequestOnClaimChallenge,
128+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
133129
},
134130
}),
135131
);

sdk/frontdoor/arm-frontdoor/src/lroImpl.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
*/
8+
89
import { AbortSignalLike } from "@azure/abort-controller";
910
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
1011

@@ -22,10 +23,7 @@ export function createLroSpec<T>(inputs: {
2223
requestMethod: spec.httpMethod,
2324
requestPath: spec.path!,
2425
sendInitialRequest: () => sendOperationFn(args, spec),
25-
sendPollRequest: (
26-
path: string,
27-
options?: { abortSignal?: AbortSignalLike },
28-
) => {
26+
sendPollRequest: (path: string, options?: { abortSignal?: AbortSignalLike }) => {
2927
const { requestBody, ...restSpec } = spec;
3028
return sendOperationFn(args, {
3129
...restSpec,

0 commit comments

Comments
 (0)