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
16 changes: 8 additions & 8 deletions common/config/rush/pnpm-lock.yaml

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

32 changes: 22 additions & 10 deletions sdk/search/arm-search/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
# Release History

## 3.2.0 (2023-04-24)

**Features**

## 3.1.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added Interface DataPlaneAadOrApiKeyAuthOption
- Added Interface DataPlaneAuthOptions
- Added Interface EncryptionWithCmk
- Added Type Alias AadAuthFailureMode
- Added Type Alias PrivateLinkServiceConnectionProvisioningState
- Added Type Alias SearchEncryptionComplianceStatus
- Added Type Alias SearchEncryptionWithCmk
- Interface PrivateEndpointConnectionProperties has a new optional parameter groupId
- Interface PrivateEndpointConnectionProperties has a new optional parameter provisioningState
- Interface SearchService has a new optional parameter authOptions
- Interface SearchService has a new optional parameter disableLocalAuth
- Interface SearchService has a new optional parameter encryptionWithCmk
- Interface SearchServiceUpdate has a new optional parameter authOptions
- Interface SearchServiceUpdate has a new optional parameter disableLocalAuth
- Interface SearchServiceUpdate has a new optional parameter encryptionWithCmk
- Added Enum KnownPrivateLinkServiceConnectionProvisioningState


## 3.1.0 (2022-12-07)

**Features**
Expand Down
2 changes: 1 addition & 1 deletion sdk/search/arm-search/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/search/arm-search/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf",
"readme": "specification\\search\\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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\search\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.4 --generate-sample=true",
"commit": "17377159d52d9eaa40303a10bfc0ec270f1a684d",
"readme": "specification/search/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/search/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.5.2",
"use": "@autorest/typescript@6.0.0-rc.4"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.0",
"use": "@autorest/typescript@6.0.0-rc.10"
}
23 changes: 8 additions & 15 deletions sdk/search/arm-search/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 SearchManagementClient.",
"version": "3.1.1",
"version": "3.2.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": "~5.0.0",
"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/search/arm-search",
"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-search?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/search/arm-search"
}
57 changes: 52 additions & 5 deletions sdk/search/arm-search/review/arm-search.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@

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 type AadAuthFailureMode = "http403" | "http401WithBearerChallenge";

// @public
export type AdminKeyKind = "primary" | "secondary";
Expand Down Expand Up @@ -72,6 +75,23 @@ export interface CloudErrorBody {
target?: string;
}

// @public
export interface DataPlaneAadOrApiKeyAuthOption {
aadAuthFailureMode?: AadAuthFailureMode;
}

// @public
export interface DataPlaneAuthOptions {
aadOrApiKey?: DataPlaneAadOrApiKeyAuthOption;
apiKeyOnly?: Record<string, unknown>;
}

// @public
export interface EncryptionWithCmk {
readonly encryptionComplianceStatus?: SearchEncryptionComplianceStatus;
enforcement?: SearchEncryptionWithCmk;
}

// @public
export function getContinuationToken(page: unknown): string | undefined;

Expand All @@ -93,6 +113,16 @@ export interface IpRule {
value?: string;
}

// @public
export enum KnownPrivateLinkServiceConnectionProvisioningState {
Canceled = "Canceled",
Deleting = "Deleting",
Failed = "Failed",
Incomplete = "Incomplete",
Succeeded = "Succeeded",
Updating = "Updating"
}

// @public
export enum KnownSharedPrivateLinkResourceAsyncOperationResult {
Failed = "Failed",
Expand Down Expand Up @@ -162,8 +192,10 @@ export interface PrivateEndpointConnectionListResult {

// @public
export interface PrivateEndpointConnectionProperties {
groupId?: string;
privateEndpoint?: PrivateEndpointConnectionPropertiesPrivateEndpoint;
privateLinkServiceConnectionState?: PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState;
provisioningState?: PrivateLinkServiceConnectionProvisioningState;
}

// @public
Expand Down Expand Up @@ -257,6 +289,9 @@ export interface PrivateLinkResourcesResult {
readonly value?: PrivateLinkResource[];
}

// @public
export type PrivateLinkServiceConnectionProvisioningState = string;

// @public
export type PrivateLinkServiceConnectionStatus = "Pending" | "Approved" | "Rejected" | "Disconnected";

Expand Down Expand Up @@ -315,6 +350,12 @@ export interface Resource {
readonly type?: string;
}

// @public
export type SearchEncryptionComplianceStatus = "Compliant" | "NonCompliant";

// @public
export type SearchEncryptionWithCmk = "Disabled" | "Enabled" | "Unspecified";

// @public (undocumented)
export class SearchManagementClient extends coreClient.ServiceClient {
// (undocumented)
Expand Down Expand Up @@ -354,6 +395,9 @@ export interface SearchManagementRequestOptions {

// @public
export interface SearchService extends TrackedResource {
authOptions?: DataPlaneAuthOptions;
disableLocalAuth?: boolean;
encryptionWithCmk?: EncryptionWithCmk;
hostingMode?: HostingMode;
identity?: Identity;
networkRuleSet?: NetworkRuleSet;
Expand All @@ -379,6 +423,9 @@ export type SearchServiceStatus = "running" | "provisioning" | "deleting" | "deg

// @public
export interface SearchServiceUpdate extends Resource {
authOptions?: DataPlaneAuthOptions;
disableLocalAuth?: boolean;
encryptionWithCmk?: EncryptionWithCmk;
hostingMode?: HostingMode;
identity?: Identity;
location?: string;
Expand All @@ -399,7 +446,7 @@ export interface SearchServiceUpdate extends Resource {

// @public
export interface Services {
beginCreateOrUpdate(resourceGroupName: string, searchServiceName: string, service: SearchService, options?: ServicesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<ServicesCreateOrUpdateResponse>, ServicesCreateOrUpdateResponse>>;
beginCreateOrUpdate(resourceGroupName: string, searchServiceName: string, service: SearchService, options?: ServicesCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<ServicesCreateOrUpdateResponse>, ServicesCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, searchServiceName: string, service: SearchService, options?: ServicesCreateOrUpdateOptionalParams): Promise<ServicesCreateOrUpdateResponse>;
checkNameAvailability(name: string, options?: ServicesCheckNameAvailabilityOptionalParams): Promise<ServicesCheckNameAvailabilityResponse>;
delete(resourceGroupName: string, searchServiceName: string, options?: ServicesDeleteOptionalParams): Promise<void>;
Expand Down Expand Up @@ -522,9 +569,9 @@ export type SharedPrivateLinkResourceProvisioningState = "Updating" | "Deleting"

// @public
export interface SharedPrivateLinkResources {
beginCreateOrUpdate(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, sharedPrivateLinkResource: SharedPrivateLinkResource, options?: SharedPrivateLinkResourcesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<SharedPrivateLinkResourcesCreateOrUpdateResponse>, SharedPrivateLinkResourcesCreateOrUpdateResponse>>;
beginCreateOrUpdate(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, sharedPrivateLinkResource: SharedPrivateLinkResource, options?: SharedPrivateLinkResourcesCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<SharedPrivateLinkResourcesCreateOrUpdateResponse>, SharedPrivateLinkResourcesCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, sharedPrivateLinkResource: SharedPrivateLinkResource, options?: SharedPrivateLinkResourcesCreateOrUpdateOptionalParams): Promise<SharedPrivateLinkResourcesCreateOrUpdateResponse>;
beginDelete(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: SharedPrivateLinkResourcesDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDelete(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: SharedPrivateLinkResourcesDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: SharedPrivateLinkResourcesDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: SharedPrivateLinkResourcesGetOptionalParams): Promise<SharedPrivateLinkResourcesGetResponse>;
listByService(resourceGroupName: string, searchServiceName: string, options?: SharedPrivateLinkResourcesListByServiceOptionalParams): PagedAsyncIterableIterator<SharedPrivateLinkResource>;
Expand Down
54 changes: 31 additions & 23 deletions sdk/search/arm-search/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