Skip to content

Commit

Permalink
[Anomaly Detector] Does not ignore ts-naming options (#11508)
Browse files Browse the repository at this point in the history
* [Anomaly Detector] Renable ts-naming-options

* do not ignore for methods as well
  • Loading branch information
deyaaeldeen authored Oct 2, 2020
1 parent f1d2614 commit 3ff74ff
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<AnomalyDetectorClientDetectChangePointResponse>;
detectEntireSeries(body: DetectRequest, options?: OperationOptions): Promise<AnomalyDetectorClientDetectEntireResponse>;
detectLastPoint(body: DetectRequest, options?: OperationOptions): Promise<AnomalyDetectorClientDetectLastPointResponse>;
detectChangePoint(body: DetectChangePointRequest, options?: DetectChangePointOptions): Promise<AnomalyDetectorClientDetectChangePointResponse>;
detectEntireSeries(body: DetectRequest, options?: DetectEntireSeriesOptions): Promise<AnomalyDetectorClientDetectEntireResponse>;
detectLastPoint(body: DetectRequest, options?: DetectLastPointOptions): Promise<AnomalyDetectorClientDetectLastPointResponse>;
}

// @public
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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<AnomalyDetectorClientDetectEntireResponse> {
const realOptions = options || {};
const { span, updatedOptions: finalOptions } = createSpan(
Expand Down Expand Up @@ -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<AnomalyDetectorClientDetectLastPointResponse> {
const realOptions = options || {};
const { span, updatedOptions: finalOptions } = createSpan(
Expand Down Expand Up @@ -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<AnomalyDetectorClientDetectChangePointResponse> {
const realOptions = options || {};
const { span, updatedOptions: finalOptions } = createSpan(
Expand Down
7 changes: 6 additions & 1 deletion sdk/anomalydetector/ai-anomaly-detector/src/index.ts
Original file line number Diff line number Diff line change
@@ -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";

0 comments on commit 3ff74ff

Please sign in to comment.