From 3ff74ff3f2d26bc64bd2964a750401750f1ddfa7 Mon Sep 17 00:00:00 2001 From: Deyaaeldeen Almahallawi Date: Fri, 2 Oct 2020 15:09:03 -0400 Subject: [PATCH] [Anomaly Detector] Does not ignore ts-naming options (#11508) * [Anomaly Detector] Renable ts-naming-options * do not ignore for methods as well --- .../review/ai-anomaly-detector.api.md | 15 ++++++++++++--- .../src/AnomalyDetectorClient.ts | 14 +++++++------- .../ai-anomaly-detector/src/index.ts | 7 ++++++- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/sdk/anomalydetector/ai-anomaly-detector/review/ai-anomaly-detector.api.md b/sdk/anomalydetector/ai-anomaly-detector/review/ai-anomaly-detector.api.md index 167a5b55f785..83fe35bdf105 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/review/ai-anomaly-detector.api.md +++ b/sdk/anomalydetector/ai-anomaly-detector/review/ai-anomaly-detector.api.md @@ -13,9 +13,9 @@ import { TokenCredential } from '@azure/core-auth'; // @public export class AnomalyDetectorClient { constructor(endpointUrl: string, credential: TokenCredential | KeyCredential, options?: AnomalyDetectorClientOptions); - detectChangePoint(body: DetectChangePointRequest, options?: OperationOptions): Promise; - detectEntireSeries(body: DetectRequest, options?: OperationOptions): Promise; - detectLastPoint(body: DetectRequest, options?: OperationOptions): Promise; + detectChangePoint(body: DetectChangePointRequest, options?: DetectChangePointOptions): Promise; + detectEntireSeries(body: DetectRequest, options?: DetectEntireSeriesOptions): Promise; + detectLastPoint(body: DetectRequest, options?: DetectLastPointOptions): Promise; } // @public @@ -46,6 +46,9 @@ export type AnomalyDetectorClientDetectLastPointResponse = DetectLastPointRespon export interface AnomalyDetectorClientOptions extends PipelineOptions { } +// @public (undocumented) +export type DetectChangePointOptions = OperationOptions; + // @public (undocumented) export interface DetectChangePointRequest { customInterval?: number; @@ -74,6 +77,12 @@ export interface DetectEntireResponse { upperMargins: number[]; } +// @public (undocumented) +export type DetectEntireSeriesOptions = OperationOptions; + +// @public (undocumented) +export type DetectLastPointOptions = OperationOptions; + // @public (undocumented) export interface DetectLastPointResponse { expectedValue: number; diff --git a/sdk/anomalydetector/ai-anomaly-detector/src/AnomalyDetectorClient.ts b/sdk/anomalydetector/ai-anomaly-detector/src/AnomalyDetectorClient.ts index 9d53dd2dc420..bfe27c751715 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/src/AnomalyDetectorClient.ts +++ b/sdk/anomalydetector/ai-anomaly-detector/src/AnomalyDetectorClient.ts @@ -29,6 +29,10 @@ import { logger } from "./logger"; import { createSpan } from "./tracing"; import { CanonicalCode } from "@opentelemetry/api"; +export type DetectEntireSeriesOptions = OperationOptions; +export type DetectLastPointOptions = OperationOptions; +export type DetectChangePointOptions = OperationOptions; + /** * Client class for interacting with Azure Anomaly Detector service. */ @@ -64,7 +68,6 @@ export class AnomalyDetectorClient { constructor( endpointUrl: string, credential: TokenCredential | KeyCredential, - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options options?: AnomalyDetectorClientOptions ) { this.endpointUrl = endpointUrl; @@ -110,8 +113,7 @@ export class AnomalyDetectorClient { */ public detectEntireSeries( body: DetectRequest, - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options - options?: OperationOptions + options?: DetectEntireSeriesOptions ): Promise { const realOptions = options || {}; const { span, updatedOptions: finalOptions } = createSpan( @@ -142,8 +144,7 @@ export class AnomalyDetectorClient { */ public detectLastPoint( body: DetectRequest, - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options - options?: OperationOptions + options?: DetectLastPointOptions ): Promise { const realOptions = options || {}; const { span, updatedOptions: finalOptions } = createSpan( @@ -172,8 +173,7 @@ export class AnomalyDetectorClient { */ detectChangePoint( body: DetectChangePointRequest, - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options - options?: OperationOptions + options?: DetectChangePointOptions ): Promise { const realOptions = options || {}; const { span, updatedOptions: finalOptions } = createSpan( diff --git a/sdk/anomalydetector/ai-anomaly-detector/src/index.ts b/sdk/anomalydetector/ai-anomaly-detector/src/index.ts index 52631785a055..1af5c1e09314 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/src/index.ts +++ b/sdk/anomalydetector/ai-anomaly-detector/src/index.ts @@ -1,5 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export { AnomalyDetectorClient } from "./AnomalyDetectorClient"; +export { + AnomalyDetectorClient, + DetectEntireSeriesOptions, + DetectLastPointOptions, + DetectChangePointOptions +} from "./AnomalyDetectorClient"; export * from "./models";