Skip to content

Commit 138c20a

Browse files
author
SDKAuto
committed
CodeGen from PR 18793 in Azure/azure-rest-api-specs
Merge e9036c56841b6a3f8342e8ba98a7dcf30fc3e9c3 into 680efa4deb7068eeea0c8e3247f424af7c93caff
1 parent a67bdbd commit 138c20a

File tree

14 files changed

+153
-106
lines changed

14 files changed

+153
-106
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 11 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/datafactory/arm-datafactory/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Release History
22

3+
## 10.5.0 (2022-04-24)
4+
5+
**Features**
6+
7+
- Added Interface PrivateEndpoint
8+
- Interface PrivateLinkConnectionApprovalRequest has a new optional parameter privateEndpoint
9+
10+
311
## 10.4.0 (2022-04-20)
412

513
**Features**

sdk/datafactory/arm-datafactory/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ The Azure Data Factory V2 management API provides a RESTful set of web services
1616
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
1717
- Latest versions of Safari, Chrome, Edge and Firefox.
1818

19-
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
20-
2119
### Prerequisites
2220

2321
- An [Azure subscription][azure_sub].
@@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this
5149
```javascript
5250
const { DataFactoryManagementClient } = require("@azure/arm-datafactory");
5351
const { DefaultAzureCredential } = require("@azure/identity");
54-
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
55-
5652
const subscriptionId = "00000000-0000-0000-0000-000000000000";
5753
const client = new DataFactoryManagementClient(new DefaultAzureCredential(), subscriptionId);
58-
59-
// For client-side applications running in the browser, use this code instead:
60-
// const credential = new InteractiveBrowserCredential({
61-
// tenantId: "<YOUR_TENANT_ID>",
62-
// clientId: "<YOUR_CLIENT_ID>"
63-
// });
64-
// const client = new DataFactoryManagementClient(credential, subscriptionId);
6554
```
6655

6756

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "8a9bd9c5b65e5c3e5a8536f3c5b2b15bf9920b5d",
2+
"commit": "0e66a511fe951cf62994f6736caef8069efdc3e9",
33
"readme": "specification/datafactory/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\datafactory\\resource-manager\\readme.md --use=@autorest/[email protected].19.20220408.1",
4+
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --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/datafactory/resource-manager/readme.md --use=@autorest/[email protected].16.20220105.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
7-
"use": "@autorest/[email protected].19.20220408.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.0",
7+
"use": "@autorest/[email protected].16.20220105.1"
88
}

sdk/datafactory/arm-datafactory/package.json

Lines changed: 11 additions & 19 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 DataFactoryManagementClient.",
6-
"version": "10.4.0",
6+
"version": "10.5.0",
77
"engines": {
88
"node": ">=12.0.0"
99
},
1010
"dependencies": {
1111
"@azure/core-lro": "^2.2.0",
1212
"@azure/abort-controller": "^1.0.0",
1313
"@azure/core-paging": "^1.2.0",
14-
"@azure/core-client": "^1.5.0",
14+
"@azure/core-client": "^1.0.0",
1515
"@azure/core-auth": "^1.3.0",
16-
"@azure/core-rest-pipeline": "^1.8.0",
16+
"@azure/core-rest-pipeline": "^1.1.0",
1717
"tslib": "^2.2.0"
1818
},
1919
"keywords": [
@@ -28,14 +28,14 @@
2828
"module": "./dist-esm/src/index.js",
2929
"types": "./types/arm-datafactory.d.ts",
3030
"devDependencies": {
31-
"@microsoft/api-extractor": "7.18.11",
32-
"@rollup/plugin-commonjs": "^21.0.1",
33-
"@rollup/plugin-json": "^4.1.0",
34-
"@rollup/plugin-multi-entry": "^4.1.0",
35-
"@rollup/plugin-node-resolve": "^13.1.3",
31+
"@microsoft/api-extractor": "^7.18.11",
32+
"@rollup/plugin-commonjs": "11.0.2",
33+
"@rollup/plugin-json": "^4.0.0",
34+
"@rollup/plugin-multi-entry": "^3.0.0",
35+
"@rollup/plugin-node-resolve": "^8.0.0",
3636
"mkdirp": "^1.0.4",
37-
"rollup": "^2.66.1",
38-
"rollup-plugin-sourcemaps": "^0.6.3",
37+
"rollup": "^1.16.3",
38+
"rollup-plugin-sourcemaps": "^0.4.2",
3939
"typescript": "~4.2.0",
4040
"uglify-js": "^3.4.9",
4141
"rimraf": "^3.0.0",
@@ -98,13 +98,5 @@
9898
"docs": "echo skipped"
9999
},
100100
"sideEffects": false,
101-
"//metadata": {
102-
"constantPaths": [
103-
{
104-
"path": "src/dataFactoryManagementClient.ts",
105-
"prefix": "packageDetails"
106-
}
107-
]
108-
},
109101
"autoPublish": true
110-
}
102+
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6330,6 +6330,11 @@ export type PrestoSource = TabularSource & {
63306330
query?: Record<string, unknown>;
63316331
};
63326332

6333+
// @public
6334+
export interface PrivateEndpoint {
6335+
id?: string;
6336+
}
6337+
63336338
// @public
63346339
export interface PrivateEndpointConnection {
63356340
createOrUpdate(resourceGroupName: string, factoryName: string, privateEndpointConnectionName: string, privateEndpointWrapper: PrivateLinkConnectionApprovalRequestResource, options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams): Promise<PrivateEndpointConnectionCreateOrUpdateResponse>;
@@ -6389,6 +6394,7 @@ export type PrivateEndPointConnectionsListByFactoryResponse = PrivateEndpointCon
63896394

63906395
// @public
63916396
export interface PrivateLinkConnectionApprovalRequest {
6397+
privateEndpoint?: PrivateEndpoint;
63926398
privateLinkServiceConnectionState?: PrivateLinkConnectionState;
63936399
}
63946400

sdk/datafactory/arm-datafactory/rollup.config.js

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,62 @@ import json from "@rollup/plugin-json";
1414

1515
import nodeBuiltins from "builtin-modules";
1616

17+
/**
18+
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
19+
*
20+
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
21+
* __exportStar downleveled helper function to declare its exports which confuses
22+
* rollup's automatic discovery mechanism.
23+
*
24+
* @returns an object reference that can be `...`'d into your cjs() configuration.
25+
*/
26+
export function openTelemetryCommonJs() {
27+
const namedExports = {};
28+
29+
for (const key of [
30+
"@opentelemetry/api",
31+
"@azure/core-tracing/node_modules/@opentelemetry/api"
32+
]) {
33+
namedExports[key] = [
34+
"SpanKind",
35+
"TraceFlags",
36+
"getSpan",
37+
"setSpan",
38+
"SpanStatusCode",
39+
"getSpanContext",
40+
"setSpanContext"
41+
];
42+
}
43+
44+
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
45+
46+
for (const version of releasedOpenTelemetryVersions) {
47+
namedExports[
48+
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
49+
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
50+
] = [
51+
"SpanKind",
52+
"TraceFlags",
53+
"getSpan",
54+
"setSpan",
55+
"StatusCode",
56+
"CanonicalCode",
57+
"getSpanContext",
58+
"setSpanContext"
59+
];
60+
}
61+
62+
return namedExports;
63+
}
64+
1765
// #region Warning Handler
1866

1967
/**
20-
* A function that can determine whether a rollup warning should be ignored. If
68+
* A function that can determine whether a rollupwarning should be ignored. If
2169
* the function returns `true`, then the warning will not be displayed.
2270
*/
2371

24-
function ignoreNiseSinonEval(warning) {
72+
function ignoreNiseSinonEvalWarnings(warning) {
2573
return (
2674
warning.code === "EVAL" &&
2775
warning.id &&
@@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) {
3078
);
3179
}
3280

33-
function ignoreChaiCircularDependency(warning) {
81+
function ignoreChaiCircularDependencyWarnings(warning) {
3482
return (
3583
warning.code === "CIRCULAR_DEPENDENCY" &&
3684
warning.importer && warning.importer.includes("node_modules/chai") === true
3785
);
3886
}
3987

40-
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
88+
const warningInhibitors = [
89+
ignoreChaiCircularDependencyWarnings,
90+
ignoreNiseSinonEvalWarnings
91+
];
4192

4293
/**
4394
* Construct a warning handler for the shared rollup configuration
@@ -71,7 +122,22 @@ function makeBrowserTestConfig() {
71122
nodeResolve({
72123
mainFields: ["module", "browser"]
73124
}),
74-
cjs(),
125+
cjs({
126+
namedExports: {
127+
// Chai's strange internal architecture makes it impossible to statically
128+
// analyze its exports.
129+
chai: [
130+
"version",
131+
"use",
132+
"util",
133+
"config",
134+
"expect",
135+
"should",
136+
"assert"
137+
],
138+
...openTelemetryCommonJs()
139+
}
140+
}),
75141
json(),
76142
sourcemaps()
77143
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@@ -107,7 +173,7 @@ export function makeConfig(pkg, options) {
107173
],
108174
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
109175
preserveSymlinks: false,
110-
plugins: [sourcemaps(), nodeResolve()]
176+
plugins: [sourcemaps(), nodeResolve(), cjs()]
111177
};
112178

113179
const config = [baseConfig];

sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
import * as coreClient from "@azure/core-client";
10-
import * as coreRestPipeline from "@azure/core-rest-pipeline";
1110
import * as coreAuth from "@azure/core-auth";
1211
import {
1312
OperationsImpl,
@@ -87,7 +86,7 @@ export class DataFactoryManagementClient extends coreClient.ServiceClient {
8786
credential: credentials
8887
};
8988

90-
const packageDetails = `azsdk-js-arm-datafactory/10.4.0`;
89+
const packageDetails = `azsdk-js-arm-datafactory/10.5.0`;
9190
const userAgentPrefix =
9291
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
9392
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -102,33 +101,9 @@ export class DataFactoryManagementClient extends coreClient.ServiceClient {
102101
userAgentOptions: {
103102
userAgentPrefix
104103
},
105-
baseUri:
106-
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
104+
baseUri: options.endpoint || "https://management.azure.com"
107105
};
108106
super(optionsWithDefaults);
109-
110-
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
111-
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
112-
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
113-
(pipelinePolicy) =>
114-
pipelinePolicy.name ===
115-
coreRestPipeline.bearerTokenAuthenticationPolicyName
116-
);
117-
if (!bearerTokenAuthenticationPolicyFound) {
118-
this.pipeline.removePolicy({
119-
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
120-
});
121-
this.pipeline.addPolicy(
122-
coreRestPipeline.bearerTokenAuthenticationPolicy({
123-
scopes: `${optionsWithDefaults.baseUri}/.default`,
124-
challengeCallbacks: {
125-
authorizeRequestOnChallenge:
126-
coreClient.authorizeRequestOnClaimChallenge
127-
}
128-
})
129-
);
130-
}
131-
}
132107
// Parameter assignments
133108
this.subscriptionId = subscriptionId;
134109

sdk/datafactory/arm-datafactory/src/models/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,6 +2261,14 @@ export interface PrivateLinkConnectionState {
22612261
export interface PrivateLinkConnectionApprovalRequest {
22622262
/** The state of a private link connection */
22632263
privateLinkServiceConnectionState?: PrivateLinkConnectionState;
2264+
/** The resource of private endpoint. */
2265+
privateEndpoint?: PrivateEndpoint;
2266+
}
2267+
2268+
/** Private endpoint which a connection belongs to. */
2269+
export interface PrivateEndpoint {
2270+
/** The resource Id for private endpoint */
2271+
id?: string;
22642272
}
22652273

22662274
/** Wrapper for a collection of private link resources */

0 commit comments

Comments
 (0)