Skip to content

Commit 06aabf2

Browse files
author
SDKAuto
committed
CodeGen from PR 3207 in test-repo-billy/azure-rest-api-specs
Merge 1f924dd2b806880b15c874ef98eaffd2606edd34 into 3430f822fc0e515e7215a4f50db1fd69f54788af
1 parent ba8ca02 commit 06aabf2

File tree

18 files changed

+787
-659
lines changed

18 files changed

+787
-659
lines changed

common/config/rush/pnpm-lock.yaml

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

sdk/servicelinker/arm-servicelinker/CHANGELOG.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# Release History
2+
3+
## 2.2.0 (2024-02-09)
4+
5+
**Features**
26

3-
## 2.1.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
12-
7+
- Enum KnownClientType has a new value KafkaSpringBoot
8+
9+
1310
## 2.1.0 (2022-12-16)
1411

1512
**Features**
@@ -45,4 +42,4 @@
4542

4643
## 1.0.0 (2022-04-27)
4744

48-
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 ).
45+
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).

sdk/servicelinker/arm-servicelinker/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2022 Microsoft
3+
Copyright (c) 2024 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "eeb81e9f8a12ad473e8df3a71f2d58682741bcd2",
3-
"readme": "specification\\servicelinker\\resource-manager\\readme.md",
4-
"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",
5-
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.4",
7-
"use": "@autorest/[email protected].0-rc.5.20221215.1"
2+
"commit": "56a5f9aa238ff3d55e579a9429d16f36182a7db4",
3+
"readme": "specification/servicelinker/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=/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",
5+
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs.git",
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.4",
7+
"use": "@autorest/typescript@^6.0.11"
88
}

sdk/servicelinker/arm-servicelinker/package.json

Lines changed: 15 additions & 22 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 ServiceLinkerManagementClient.",
6-
"version": "2.1.1",
6+
"version": "2.2.0",
77
"engines": {
88
"node": ">=18.0.0"
99
},
1010
"dependencies": {
11-
"@azure/core-lro": "^2.2.0",
11+
"@azure/core-lro": "^2.5.4",
1212
"@azure/abort-controller": "^1.0.0",
1313
"@azure/core-paging": "^1.2.0",
14-
"@azure/core-client": "^1.6.1",
15-
"@azure/core-auth": "^1.3.0",
16-
"@azure/core-rest-pipeline": "^1.8.0",
14+
"@azure/core-client": "^1.7.0",
15+
"@azure/core-auth": "^1.6.0",
16+
"@azure/core-rest-pipeline": "^1.14.0",
1717
"tslib": "^2.2.0"
1818
},
1919
"keywords": [
@@ -29,20 +29,22 @@
2929
"types": "./types/arm-servicelinker.d.ts",
3030
"devDependencies": {
3131
"@microsoft/api-extractor": "^7.31.1",
32-
"mkdirp": "^1.0.4",
33-
"typescript": "~5.2.0",
32+
"mkdirp": "^2.1.2",
33+
"typescript": "~5.3.3",
3434
"uglify-js": "^3.4.9",
35-
"rimraf": "^3.0.0",
35+
"rimraf": "^5.0.0",
3636
"dotenv": "^16.0.0",
37-
"@azure/identity": "^3.3.0",
37+
"@azure/dev-tool": "^1.0.0",
38+
"@azure/identity": "^4.0.1",
3839
"@azure-tools/test-recorder": "^3.0.0",
3940
"@azure-tools/test-credential": "^1.0.0",
4041
"mocha": "^10.0.0",
42+
"@types/mocha": "^10.0.0",
43+
"esm": "^3.2.18",
4144
"@types/chai": "^4.2.8",
4245
"chai": "^4.2.0",
4346
"cross-env": "^7.0.2",
4447
"@types/node": "^18.0.0",
45-
"@azure/dev-tool": "^1.0.0",
4648
"ts-node": "^10.0.0"
4749
},
4850
"repository": {
@@ -76,8 +78,7 @@
7678
"pack": "npm pack 2>&1",
7779
"extract-api": "api-extractor run --local",
7880
"lint": "echo skipped",
79-
"audit": "echo skipped",
80-
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
81+
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
8182
"build:node": "echo skipped",
8283
"build:browser": "echo skipped",
8384
"build:test": "echo skipped",
@@ -105,13 +106,5 @@
105106
]
106107
},
107108
"autoPublish": true,
108-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker",
109-
"//sampleConfiguration": {
110-
"productName": "",
111-
"productSlugs": [
112-
"azure"
113-
],
114-
"disableDocsMs": true,
115-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-servicelinker?view=azure-node-preview"
116-
}
117-
}
109+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker"
110+
}

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
import * as coreAuth from '@azure/core-auth';
88
import * as coreClient from '@azure/core-client';
9+
import { OperationState } from '@azure/core-lro';
910
import { PagedAsyncIterableIterator } from '@azure/core-paging';
10-
import { PollerLike } from '@azure/core-lro';
11-
import { PollOperationState } from '@azure/core-lro';
11+
import { SimplePollerLike } from '@azure/core-lro';
1212

1313
// @public
1414
export type ActionType = string;
@@ -127,6 +127,7 @@ export enum KnownClientType {
127127
Dotnet = "dotnet",
128128
Go = "go",
129129
Java = "java",
130+
KafkaSpringBoot = "kafka-springBoot",
130131
Nodejs = "nodejs",
131132
None = "none",
132133
Php = "php",
@@ -179,13 +180,13 @@ export enum KnownVNetSolutionType {
179180

180181
// @public
181182
export interface Linker {
182-
beginCreateOrUpdate(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<LinkerCreateOrUpdateResponse>, LinkerCreateOrUpdateResponse>>;
183+
beginCreateOrUpdate(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<LinkerCreateOrUpdateResponse>, LinkerCreateOrUpdateResponse>>;
183184
beginCreateOrUpdateAndWait(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise<LinkerCreateOrUpdateResponse>;
184-
beginDelete(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
185+
beginDelete(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
185186
beginDeleteAndWait(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise<void>;
186-
beginUpdate(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise<PollerLike<PollOperationState<LinkerUpdateResponse>, LinkerUpdateResponse>>;
187+
beginUpdate(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise<SimplePollerLike<OperationState<LinkerUpdateResponse>, LinkerUpdateResponse>>;
187188
beginUpdateAndWait(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise<LinkerUpdateResponse>;
188-
beginValidate(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise<PollerLike<PollOperationState<LinkerValidateResponse>, LinkerValidateResponse>>;
189+
beginValidate(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise<SimplePollerLike<OperationState<LinkerValidateResponse>, LinkerValidateResponse>>;
189190
beginValidateAndWait(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise<LinkerValidateResponse>;
190191
get(resourceUri: string, linkerName: string, options?: LinkerGetOptionalParams): Promise<LinkerGetResponse>;
191192
list(resourceUri: string, options?: LinkerListOptionalParams): PagedAsyncIterableIterator<LinkerResource>;

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

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,37 @@
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
*/
88

9+
// Copyright (c) Microsoft Corporation.
10+
// Licensed under the MIT license.
11+
12+
import { AbortSignalLike } from "@azure/abort-controller";
913
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
1014

11-
export class LroImpl<T> implements LongRunningOperation<T> {
12-
constructor(
13-
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
14-
private args: Record<string, unknown>,
15-
private spec: {
16-
readonly requestBody?: unknown;
17-
readonly path?: string;
18-
readonly httpMethod: string;
19-
} & Record<string, any>,
20-
public requestPath: string = spec.path!,
21-
public requestMethod: string = spec.httpMethod
22-
) {}
23-
public async sendInitialRequest(): Promise<LroResponse<T>> {
24-
return this.sendOperationFn(this.args, this.spec);
25-
}
26-
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
27-
const { requestBody, ...restSpec } = this.spec;
28-
return this.sendOperationFn(this.args, {
29-
...restSpec,
30-
path,
31-
httpMethod: "GET"
32-
});
33-
}
15+
export function createLroSpec<T>(inputs: {
16+
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
17+
args: Record<string, unknown>;
18+
spec: {
19+
readonly requestBody?: unknown;
20+
readonly path?: string;
21+
readonly httpMethod: string;
22+
} & Record<string, any>;
23+
}): LongRunningOperation<T> {
24+
const { args, spec, sendOperationFn } = inputs;
25+
return {
26+
requestMethod: spec.httpMethod,
27+
requestPath: spec.path!,
28+
sendInitialRequest: () => sendOperationFn(args, spec),
29+
sendPollRequest: (
30+
path: string,
31+
options?: { abortSignal?: AbortSignalLike },
32+
) => {
33+
const { requestBody, ...restSpec } = spec;
34+
return sendOperationFn(args, {
35+
...restSpec,
36+
httpMethod: "GET",
37+
path,
38+
abortSignal: options?.abortSignal,
39+
});
40+
},
41+
};
3442
}

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ export enum KnownTargetServiceType {
448448
/** ConfluentBootstrapServer */
449449
ConfluentBootstrapServer = "ConfluentBootstrapServer",
450450
/** ConfluentSchemaRegistry */
451-
ConfluentSchemaRegistry = "ConfluentSchemaRegistry"
451+
ConfluentSchemaRegistry = "ConfluentSchemaRegistry",
452452
}
453453

454454
/**
@@ -473,7 +473,7 @@ export enum KnownAuthType {
473473
/** ServicePrincipalCertificate */
474474
ServicePrincipalCertificate = "servicePrincipalCertificate",
475475
/** Secret */
476-
Secret = "secret"
476+
Secret = "secret",
477477
}
478478

479479
/**
@@ -510,7 +510,9 @@ export enum KnownClientType {
510510
/** Nodejs */
511511
Nodejs = "nodejs",
512512
/** SpringBoot */
513-
SpringBoot = "springBoot"
513+
SpringBoot = "springBoot",
514+
/** KafkaSpringBoot */
515+
KafkaSpringBoot = "kafka-springBoot",
514516
}
515517

516518
/**
@@ -527,7 +529,8 @@ export enum KnownClientType {
527529
* **ruby** \
528530
* **django** \
529531
* **nodejs** \
530-
* **springBoot**
532+
* **springBoot** \
533+
* **kafka-springBoot**
531534
*/
532535
export type ClientType = string;
533536

@@ -536,7 +539,7 @@ export enum KnownVNetSolutionType {
536539
/** ServiceEndpoint */
537540
ServiceEndpoint = "serviceEndpoint",
538541
/** PrivateLink */
539-
PrivateLink = "privateLink"
542+
PrivateLink = "privateLink",
540543
}
541544

542545
/**
@@ -558,7 +561,7 @@ export enum KnownCreatedByType {
558561
/** ManagedIdentity */
559562
ManagedIdentity = "ManagedIdentity",
560563
/** Key */
561-
Key = "Key"
564+
Key = "Key",
562565
}
563566

564567
/**
@@ -580,7 +583,7 @@ export enum KnownValidationResultStatus {
580583
/** Failure */
581584
Failure = "failure",
582585
/** Warning */
583-
Warning = "warning"
586+
Warning = "warning",
584587
}
585588

586589
/**
@@ -601,7 +604,7 @@ export enum KnownOrigin {
601604
/** System */
602605
System = "system",
603606
/** UserSystem */
604-
UserSystem = "user,system"
607+
UserSystem = "user,system",
605608
}
606609

607610
/**
@@ -618,7 +621,7 @@ export type Origin = string;
618621
/** Known values of {@link ActionType} that the service accepts. */
619622
export enum KnownActionType {
620623
/** Internal */
621-
Internal = "Internal"
624+
Internal = "Internal",
622625
}
623626

624627
/**
@@ -633,7 +636,7 @@ export type ActionType = string;
633636
/** Known values of {@link AzureResourceType} that the service accepts. */
634637
export enum KnownAzureResourceType {
635638
/** KeyVault */
636-
KeyVault = "KeyVault"
639+
KeyVault = "KeyVault",
637640
}
638641

639642
/**
@@ -652,7 +655,7 @@ export enum KnownSecretType {
652655
/** KeyVaultSecretUri */
653656
KeyVaultSecretUri = "keyVaultSecretUri",
654657
/** KeyVaultSecretReference */
655-
KeyVaultSecretReference = "keyVaultSecretReference"
658+
KeyVaultSecretReference = "keyVaultSecretReference",
656659
}
657660

658661
/**

0 commit comments

Comments
 (0)