@azure-rest/ai-anomaly-detector 1.0.0-beta.1 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/LICENSE +4 -4
- package/README.md +272 -17
- package/dist/browser/anomalyDetectorRest.d.ts +13 -0
- package/dist/browser/anomalyDetectorRest.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/anomalyDetectorRest.js +13 -8
- package/dist/browser/anomalyDetectorRest.js.map +1 -0
- package/dist/browser/clientDefinitions.d.ts +95 -0
- package/dist/browser/clientDefinitions.d.ts.map +1 -0
- package/dist/browser/clientDefinitions.js +4 -0
- package/dist/browser/clientDefinitions.js.map +1 -0
- package/dist/browser/index.d.ts +11 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +13 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/isUnexpected.d.ts +12 -0
- package/dist/browser/isUnexpected.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/isUnexpected.js +5 -6
- package/dist/browser/isUnexpected.js.map +1 -0
- package/dist/browser/models.d.ts +252 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/models.js +4 -0
- package/{dist-esm/src → dist/browser}/models.js.map +1 -1
- package/dist/browser/outputModels.d.ts +367 -0
- package/dist/browser/outputModels.d.ts.map +1 -0
- package/dist/browser/outputModels.js +4 -0
- package/{dist-esm/src → dist/browser}/outputModels.js.map +1 -1
- package/dist/browser/package.json +3 -0
- package/dist/browser/paginateHelper.d.ts +47 -0
- package/dist/browser/paginateHelper.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/paginateHelper.js +2 -2
- package/dist/browser/paginateHelper.js.map +1 -0
- package/dist/browser/parameters.d.ts +46 -0
- package/dist/browser/parameters.d.ts.map +1 -0
- package/dist/browser/parameters.js +4 -0
- package/dist/browser/parameters.js.map +1 -0
- package/dist/browser/responses.d.ts +155 -0
- package/dist/browser/responses.d.ts.map +1 -0
- package/dist/browser/responses.js +4 -0
- package/dist/browser/responses.js.map +1 -0
- package/dist/commonjs/anomalyDetectorRest.d.ts +13 -0
- package/dist/commonjs/anomalyDetectorRest.d.ts.map +1 -0
- package/dist/commonjs/anomalyDetectorRest.js +34 -0
- package/dist/commonjs/anomalyDetectorRest.js.map +1 -0
- package/dist/commonjs/clientDefinitions.d.ts +95 -0
- package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/clientDefinitions.js +5 -0
- package/dist/commonjs/clientDefinitions.js.map +1 -0
- package/dist/commonjs/index.d.ts +11 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +16 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/isUnexpected.d.ts +12 -0
- package/dist/commonjs/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/isUnexpected.js +81 -0
- package/dist/commonjs/isUnexpected.js.map +1 -0
- package/dist/commonjs/models.d.ts +252 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +5 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/outputModels.d.ts +367 -0
- package/dist/commonjs/outputModels.d.ts.map +1 -0
- package/dist/commonjs/outputModels.js +5 -0
- package/dist/commonjs/outputModels.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/paginateHelper.d.ts +47 -0
- package/dist/commonjs/paginateHelper.d.ts.map +1 -0
- package/dist/commonjs/paginateHelper.js +106 -0
- package/dist/commonjs/paginateHelper.js.map +1 -0
- package/dist/commonjs/parameters.d.ts +46 -0
- package/dist/commonjs/parameters.d.ts.map +1 -0
- package/dist/commonjs/parameters.js +5 -0
- package/dist/commonjs/parameters.js.map +1 -0
- package/dist/commonjs/responses.d.ts +155 -0
- package/dist/commonjs/responses.d.ts.map +1 -0
- package/dist/commonjs/responses.js +5 -0
- package/dist/commonjs/responses.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/anomalyDetectorRest.d.ts +13 -0
- package/dist/esm/anomalyDetectorRest.d.ts.map +1 -0
- package/dist/esm/anomalyDetectorRest.js +31 -0
- package/dist/esm/anomalyDetectorRest.js.map +1 -0
- package/dist/esm/clientDefinitions.d.ts +95 -0
- package/dist/esm/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/clientDefinitions.js +4 -0
- package/dist/esm/clientDefinitions.js.map +1 -0
- package/dist/esm/index.d.ts +11 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +13 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/isUnexpected.d.ts +12 -0
- package/dist/esm/isUnexpected.d.ts.map +1 -0
- package/dist/esm/isUnexpected.js +78 -0
- package/dist/esm/isUnexpected.js.map +1 -0
- package/dist/esm/models.d.ts +252 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +4 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/outputModels.d.ts +367 -0
- package/dist/esm/outputModels.d.ts.map +1 -0
- package/dist/esm/outputModels.js +4 -0
- package/dist/esm/outputModels.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/paginateHelper.d.ts +47 -0
- package/dist/esm/paginateHelper.d.ts.map +1 -0
- package/dist/esm/paginateHelper.js +103 -0
- package/dist/esm/paginateHelper.js.map +1 -0
- package/dist/esm/parameters.d.ts +46 -0
- package/dist/esm/parameters.d.ts.map +1 -0
- package/dist/esm/parameters.js +4 -0
- package/dist/esm/parameters.js.map +1 -0
- package/dist/esm/responses.d.ts +155 -0
- package/dist/esm/responses.d.ts.map +1 -0
- package/dist/esm/responses.js +4 -0
- package/dist/esm/responses.js.map +1 -0
- package/dist/react-native/anomalyDetectorRest.d.ts +13 -0
- package/dist/react-native/anomalyDetectorRest.d.ts.map +1 -0
- package/dist/react-native/anomalyDetectorRest.js +31 -0
- package/dist/react-native/anomalyDetectorRest.js.map +1 -0
- package/dist/react-native/clientDefinitions.d.ts +95 -0
- package/dist/react-native/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/clientDefinitions.js +4 -0
- package/dist/react-native/clientDefinitions.js.map +1 -0
- package/dist/react-native/index.d.ts +11 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +13 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/isUnexpected.d.ts +12 -0
- package/dist/react-native/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/isUnexpected.js +78 -0
- package/dist/react-native/isUnexpected.js.map +1 -0
- package/dist/react-native/models.d.ts +252 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +4 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/outputModels.d.ts +367 -0
- package/dist/react-native/outputModels.d.ts.map +1 -0
- package/dist/react-native/outputModels.js +4 -0
- package/dist/react-native/outputModels.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/paginateHelper.d.ts +47 -0
- package/dist/react-native/paginateHelper.d.ts.map +1 -0
- package/dist/react-native/paginateHelper.js +103 -0
- package/dist/react-native/paginateHelper.js.map +1 -0
- package/dist/react-native/parameters.d.ts +46 -0
- package/dist/react-native/parameters.d.ts.map +1 -0
- package/dist/react-native/parameters.js +4 -0
- package/dist/react-native/parameters.js.map +1 -0
- package/dist/react-native/responses.d.ts +155 -0
- package/dist/react-native/responses.d.ts.map +1 -0
- package/dist/react-native/responses.js +4 -0
- package/dist/react-native/responses.js.map +1 -0
- package/package.json +86 -80
- package/review/{ai-anomaly-detector.api.md → ai-anomaly-detector-node.api.md} +9 -9
- package/dist/index.js +0 -216
- package/dist/index.js.map +0 -1
- package/dist-esm/src/anomalyDetectorRest.js.map +0 -1
- package/dist-esm/src/clientDefinitions.js +0 -4
- package/dist-esm/src/clientDefinitions.js.map +0 -1
- package/dist-esm/src/index.js +0 -13
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/isUnexpected.js.map +0 -1
- package/dist-esm/src/models.js +0 -4
- package/dist-esm/src/outputModels.js +0 -4
- package/dist-esm/src/paginateHelper.js.map +0 -1
- package/dist-esm/src/parameters.js +0 -4
- package/dist-esm/src/parameters.js.map +0 -1
- package/dist-esm/src/responses.js +0 -4
- package/dist-esm/src/responses.js.map +0 -1
- package/types/ai-anomaly-detector.d.ts +0 -1086
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type {\n UnivariateDetectionOptions,\n UnivariateChangePointDetectionOptions,\n ModelInfo,\n MultivariateBatchDetectionOptions,\n MultivariateLastDetectionOptions,\n} from \"./models.js\";\n\nexport interface DetectUnivariateEntireSeriesBodyParam {\n /** Method of univariate anomaly detection. */\n body: UnivariateDetectionOptions;\n}\n\nexport type DetectUnivariateEntireSeriesParameters = DetectUnivariateEntireSeriesBodyParam &\n RequestParameters;\n\nexport interface DetectUnivariateLastPointBodyParam {\n /** Method of univariate anomaly detection. */\n body: UnivariateDetectionOptions;\n}\n\nexport type DetectUnivariateLastPointParameters = DetectUnivariateLastPointBodyParam &\n RequestParameters;\n\nexport interface DetectUnivariateChangePointBodyParam {\n /** Method of univariate anomaly detection. */\n body: UnivariateChangePointDetectionOptions;\n}\n\nexport type DetectUnivariateChangePointParameters = DetectUnivariateChangePointBodyParam &\n RequestParameters;\nexport type GetMultivariateBatchDetectionResultParameters = RequestParameters;\n\nexport interface TrainMultivariateModelBodyParam {\n /** Model information. */\n body: ModelInfo;\n}\n\nexport type TrainMultivariateModelParameters = TrainMultivariateModelBodyParam & RequestParameters;\n\nexport interface ListMultivariateModelsQueryParamProperties {\n /** Skip indicates how many models will be skipped. */\n skip?: number;\n /** Top indicates how many models will be fetched. */\n top?: number;\n}\n\nexport interface ListMultivariateModelsQueryParam {\n queryParameters?: ListMultivariateModelsQueryParamProperties;\n}\n\nexport type ListMultivariateModelsParameters = ListMultivariateModelsQueryParam & RequestParameters;\nexport type DeleteMultivariateModelParameters = RequestParameters;\nexport type GetMultivariateModelParameters = RequestParameters;\n\nexport interface DetectMultivariateBatchAnomalyBodyParam {\n /** Request of multivariate anomaly detection. */\n body: MultivariateBatchDetectionOptions;\n}\n\nexport type DetectMultivariateBatchAnomalyParameters = DetectMultivariateBatchAnomalyBodyParam &\n RequestParameters;\n\nexport interface DetectMultivariateLastAnomalyBodyParam {\n /** Request of last detection. */\n body: MultivariateLastDetectionOptions;\n}\n\nexport type DetectMultivariateLastAnomalyParameters = DetectMultivariateLastAnomalyBodyParam &\n RequestParameters;\n"]}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { RawHttpHeaders } from "@azure/core-rest-pipeline";
|
|
2
|
+
import type { HttpResponse } from "@azure-rest/core-client";
|
|
3
|
+
import type { UnivariateEntireDetectionResultOutput, AnomalyDetectorErrorOutput, UnivariateLastDetectionResultOutput, UnivariateChangePointDetectionResultOutput, MultivariateDetectionResultOutput, ErrorResponseOutput, AnomalyDetectionModelOutput, ModelListOutput, MultivariateLastDetectionResultOutput } from "./outputModels.js";
|
|
4
|
+
/** The request has succeeded. */
|
|
5
|
+
export interface DetectUnivariateEntireSeries200Response extends HttpResponse {
|
|
6
|
+
status: "200";
|
|
7
|
+
body: UnivariateEntireDetectionResultOutput;
|
|
8
|
+
}
|
|
9
|
+
export interface DetectUnivariateEntireSeriesDefaultHeaders {
|
|
10
|
+
/** Error code. */
|
|
11
|
+
"x-ms-error-code"?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DetectUnivariateEntireSeriesDefaultResponse extends HttpResponse {
|
|
14
|
+
status: string;
|
|
15
|
+
body: AnomalyDetectorErrorOutput;
|
|
16
|
+
headers: RawHttpHeaders & DetectUnivariateEntireSeriesDefaultHeaders;
|
|
17
|
+
}
|
|
18
|
+
/** The request has succeeded. */
|
|
19
|
+
export interface DetectUnivariateLastPoint200Response extends HttpResponse {
|
|
20
|
+
status: "200";
|
|
21
|
+
body: UnivariateLastDetectionResultOutput;
|
|
22
|
+
}
|
|
23
|
+
export interface DetectUnivariateLastPointDefaultHeaders {
|
|
24
|
+
/** Error code. */
|
|
25
|
+
"x-ms-error-code"?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface DetectUnivariateLastPointDefaultResponse extends HttpResponse {
|
|
28
|
+
status: string;
|
|
29
|
+
body: AnomalyDetectorErrorOutput;
|
|
30
|
+
headers: RawHttpHeaders & DetectUnivariateLastPointDefaultHeaders;
|
|
31
|
+
}
|
|
32
|
+
/** The request has succeeded. */
|
|
33
|
+
export interface DetectUnivariateChangePoint200Response extends HttpResponse {
|
|
34
|
+
status: "200";
|
|
35
|
+
body: UnivariateChangePointDetectionResultOutput;
|
|
36
|
+
}
|
|
37
|
+
export interface DetectUnivariateChangePointDefaultHeaders {
|
|
38
|
+
/** Error code. */
|
|
39
|
+
"x-ms-error-code"?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface DetectUnivariateChangePointDefaultResponse extends HttpResponse {
|
|
42
|
+
status: string;
|
|
43
|
+
body: AnomalyDetectorErrorOutput;
|
|
44
|
+
headers: RawHttpHeaders & DetectUnivariateChangePointDefaultHeaders;
|
|
45
|
+
}
|
|
46
|
+
/** The request has succeeded. */
|
|
47
|
+
export interface GetMultivariateBatchDetectionResult200Response extends HttpResponse {
|
|
48
|
+
status: "200";
|
|
49
|
+
body: MultivariateDetectionResultOutput;
|
|
50
|
+
}
|
|
51
|
+
export interface GetMultivariateBatchDetectionResultDefaultHeaders {
|
|
52
|
+
/** Error code. */
|
|
53
|
+
"x-ms-error-code"?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface GetMultivariateBatchDetectionResultDefaultResponse extends HttpResponse {
|
|
56
|
+
status: string;
|
|
57
|
+
body: ErrorResponseOutput;
|
|
58
|
+
headers: RawHttpHeaders & GetMultivariateBatchDetectionResultDefaultHeaders;
|
|
59
|
+
}
|
|
60
|
+
export interface TrainMultivariateModel201Headers {
|
|
61
|
+
/** Location and ID of the model. */
|
|
62
|
+
location: string;
|
|
63
|
+
}
|
|
64
|
+
/** The request has succeeded and a new resource has been created as a result. */
|
|
65
|
+
export interface TrainMultivariateModel201Response extends HttpResponse {
|
|
66
|
+
status: "201";
|
|
67
|
+
body: AnomalyDetectionModelOutput;
|
|
68
|
+
headers: RawHttpHeaders & TrainMultivariateModel201Headers;
|
|
69
|
+
}
|
|
70
|
+
export interface TrainMultivariateModelDefaultHeaders {
|
|
71
|
+
/** Error code. */
|
|
72
|
+
"x-ms-error-code"?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface TrainMultivariateModelDefaultResponse extends HttpResponse {
|
|
75
|
+
status: string;
|
|
76
|
+
body: ErrorResponseOutput;
|
|
77
|
+
headers: RawHttpHeaders & TrainMultivariateModelDefaultHeaders;
|
|
78
|
+
}
|
|
79
|
+
/** The request has succeeded. */
|
|
80
|
+
export interface ListMultivariateModels200Response extends HttpResponse {
|
|
81
|
+
status: "200";
|
|
82
|
+
body: ModelListOutput;
|
|
83
|
+
}
|
|
84
|
+
export interface ListMultivariateModelsDefaultHeaders {
|
|
85
|
+
/** Error code. */
|
|
86
|
+
"x-ms-error-code"?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface ListMultivariateModelsDefaultResponse extends HttpResponse {
|
|
89
|
+
status: string;
|
|
90
|
+
body: ErrorResponseOutput;
|
|
91
|
+
headers: RawHttpHeaders & ListMultivariateModelsDefaultHeaders;
|
|
92
|
+
}
|
|
93
|
+
/** There is no content to send for this request, but the headers may be useful. */
|
|
94
|
+
export interface DeleteMultivariateModel204Response extends HttpResponse {
|
|
95
|
+
status: "204";
|
|
96
|
+
}
|
|
97
|
+
export interface DeleteMultivariateModelDefaultHeaders {
|
|
98
|
+
/** Error code. */
|
|
99
|
+
"x-ms-error-code"?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface DeleteMultivariateModelDefaultResponse extends HttpResponse {
|
|
102
|
+
status: string;
|
|
103
|
+
body: ErrorResponseOutput;
|
|
104
|
+
headers: RawHttpHeaders & DeleteMultivariateModelDefaultHeaders;
|
|
105
|
+
}
|
|
106
|
+
/** The request has succeeded. */
|
|
107
|
+
export interface GetMultivariateModel200Response extends HttpResponse {
|
|
108
|
+
status: "200";
|
|
109
|
+
body: AnomalyDetectionModelOutput;
|
|
110
|
+
}
|
|
111
|
+
export interface GetMultivariateModelDefaultHeaders {
|
|
112
|
+
/** Error code. */
|
|
113
|
+
"x-ms-error-code"?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface GetMultivariateModelDefaultResponse extends HttpResponse {
|
|
116
|
+
status: string;
|
|
117
|
+
body: ErrorResponseOutput;
|
|
118
|
+
headers: RawHttpHeaders & GetMultivariateModelDefaultHeaders;
|
|
119
|
+
}
|
|
120
|
+
export interface DetectMultivariateBatchAnomaly202Headers {
|
|
121
|
+
/** Id of the detection result. */
|
|
122
|
+
"operation-id": string;
|
|
123
|
+
/** Location of the detection result. */
|
|
124
|
+
"operation-location": string;
|
|
125
|
+
}
|
|
126
|
+
/** The request has been accepted for processing, but processing has not yet completed. */
|
|
127
|
+
export interface DetectMultivariateBatchAnomaly202Response extends HttpResponse {
|
|
128
|
+
status: "202";
|
|
129
|
+
body: MultivariateDetectionResultOutput;
|
|
130
|
+
headers: RawHttpHeaders & DetectMultivariateBatchAnomaly202Headers;
|
|
131
|
+
}
|
|
132
|
+
export interface DetectMultivariateBatchAnomalyDefaultHeaders {
|
|
133
|
+
/** Error code. */
|
|
134
|
+
"x-ms-error-code"?: string;
|
|
135
|
+
}
|
|
136
|
+
export interface DetectMultivariateBatchAnomalyDefaultResponse extends HttpResponse {
|
|
137
|
+
status: string;
|
|
138
|
+
body: ErrorResponseOutput;
|
|
139
|
+
headers: RawHttpHeaders & DetectMultivariateBatchAnomalyDefaultHeaders;
|
|
140
|
+
}
|
|
141
|
+
/** The request has succeeded. */
|
|
142
|
+
export interface DetectMultivariateLastAnomaly200Response extends HttpResponse {
|
|
143
|
+
status: "200";
|
|
144
|
+
body: MultivariateLastDetectionResultOutput;
|
|
145
|
+
}
|
|
146
|
+
export interface DetectMultivariateLastAnomalyDefaultHeaders {
|
|
147
|
+
/** Error code. */
|
|
148
|
+
"x-ms-error-code"?: string;
|
|
149
|
+
}
|
|
150
|
+
export interface DetectMultivariateLastAnomalyDefaultResponse extends HttpResponse {
|
|
151
|
+
status: string;
|
|
152
|
+
body: ErrorResponseOutput;
|
|
153
|
+
headers: RawHttpHeaders & DetectMultivariateLastAnomalyDefaultHeaders;
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=responses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EACV,qCAAqC,EACrC,0BAA0B,EAC1B,mCAAmC,EACnC,0CAA0C,EAC1C,iCAAiC,EACjC,mBAAmB,EACnB,2BAA2B,EAC3B,eAAe,EACf,qCAAqC,EACtC,MAAM,mBAAmB,CAAC;AAE3B,iCAAiC;AACjC,MAAM,WAAW,uCAAwC,SAAQ,YAAY;IAC3E,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,qCAAqC,CAAC;CAC7C;AAED,MAAM,WAAW,0CAA0C;IACzD,kBAAkB;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,2CAA4C,SAAQ,YAAY;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,cAAc,GAAG,0CAA0C,CAAC;CACtE;AAED,iCAAiC;AACjC,M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vE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,EAAE,cAAc,GAAG,kCAAkC,CAAC;CAC9D;AAED,MAAM,WAAW,wCAAwC;IACvD,kCAAkC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,0FAA0F;AAC1F,MAAM,WAAW,yCAA0C,SAAQ,YAAY;IAC7E,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,cAAc,GAAG,wCAAwC,CAAC;CACpE;AAED,MAAM,WAAW,4CAA4C;IAC3D,kBAAkB;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,6CAA8C,SAAQ,YAAY;IACjF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,EAAE,cAAc,GAAG,4CAA4C,CAAC;CACxE;AAED,iCAAiC;AACjC,MAAM,WAAW,wCAAyC,SAAQ,YAAY;IAC5E,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,qCAAqC,CAAC;CAC7C;AAED,MAAM,WAAW,2CAA2C;IAC1D,kBAAkB;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,4CAA6C,SAAQ,YAAY;IAChF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,EAAE,cAAc,GAAG,2CAA2C,CAAC;CACvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type { HttpResponse } from \"@azure-rest/core-client\";\nimport type {\n UnivariateEntireDetectionResultOutput,\n AnomalyDetectorErrorOutput,\n UnivariateLastDetectionResultOutput,\n UnivariateChangePointDetectionResultOutput,\n MultivariateDetectionResultOutput,\n ErrorResponseOutput,\n AnomalyDetectionModelOutput,\n ModelListOutput,\n MultivariateLastDetectionResultOutput,\n} from \"./outputModels.js\";\n\n/** The request has succeeded. */\nexport interface DetectUnivariateEntireSeries200Response extends HttpResponse {\n status: \"200\";\n body: UnivariateEntireDetectionResultOutput;\n}\n\nexport interface DetectUnivariateEntireSeriesDefaultHeaders {\n /** Error code. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DetectUnivariateEntireSeriesDefaultResponse extends HttpResponse {\n status: string;\n body: AnomalyDetectorErrorOutput;\n headers: RawHttpHeaders & DetectUnivariateEntireSeriesDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface DetectUnivariateLastPoint200Response extends HttpResponse {\n status: \"200\";\n body: UnivariateLastDetectionResultOutput;\n}\n\nexport interface DetectUnivariateLastPointDefaultHeaders {\n /** Error code. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DetectUnivariateLastPointDefaultResponse extends HttpResponse {\n status: string;\n body: AnomalyDetectorErrorOutput;\n headers: RawHttpHeaders & DetectUnivariateLastPointDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface DetectUnivariateChangePoint200Response extends HttpResponse {\n status: \"200\";\n body: UnivariateChangePointDetectionResultOutput;\n}\n\nexport interface DetectUnivariateChangePointDefaultHeaders {\n /** Error code. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DetectUnivariateChangePointDefaultResponse extends HttpResponse {\n status: string;\n body: AnomalyDetectorErrorOutput;\n headers: RawHttpHeaders & DetectUnivariateChangePointDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface GetMultivariateBatchDetectionResult200Response extends HttpResponse {\n status: \"200\";\n body: MultivariateDetectionResultOutput;\n}\n\nexport interface GetMultivariateBatchDetectionResultDefaultHeaders {\n /** Error code. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetMultivariateBatchDetectionResultDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n headers: RawHttpHeaders & GetMultivariateBatchDetectionResultDefaultHeaders;\n}\n\nexport interface TrainMultivariateModel201Headers {\n /** Location and ID of the model. */\n location: string;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface TrainMultivariateModel201Response extends HttpResponse {\n status: \"201\";\n body: AnomalyDetectionModelOutput;\n headers: RawHttpHeaders & TrainMultivariateModel201Headers;\n}\n\nexport interface TrainMultivariateModelDefaultHeaders {\n /** Error code. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface TrainMultivariateModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n headers: RawHttpHeaders & TrainMultivariateModelDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface ListMultivariateModels200Response extends HttpResponse {\n status: \"200\";\n body: ModelListOutput;\n}\n\nexport interface ListMultivariateModelsDefaultHeaders {\n /** Error code. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListMultivariateModelsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n headers: RawHttpHeaders & ListMultivariateModelsDefaultHeaders;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteMultivariateModel204Response extends HttpResponse {\n status: \"204\";\n}\n\nexport interface DeleteMultivariateModelDefaultHeaders {\n /** Error code. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeleteMultivariateModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n headers: RawHttpHeaders & DeleteMultivariateModelDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface GetMultivariateModel200Response extends HttpResponse {\n status: \"200\";\n body: AnomalyDetectionModelOutput;\n}\n\nexport interface GetMultivariateModelDefaultHeaders {\n /** Error code. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetMultivariateModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n headers: RawHttpHeaders & GetMultivariateModelDefaultHeaders;\n}\n\nexport interface DetectMultivariateBatchAnomaly202Headers {\n /** Id of the detection result. */\n \"operation-id\": string;\n /** Location of the detection result. */\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface DetectMultivariateBatchAnomaly202Response extends HttpResponse {\n status: \"202\";\n body: MultivariateDetectionResultOutput;\n headers: RawHttpHeaders & DetectMultivariateBatchAnomaly202Headers;\n}\n\nexport interface DetectMultivariateBatchAnomalyDefaultHeaders {\n /** Error code. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DetectMultivariateBatchAnomalyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n headers: RawHttpHeaders & DetectMultivariateBatchAnomalyDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface DetectMultivariateLastAnomaly200Response extends HttpResponse {\n status: \"200\";\n body: MultivariateLastDetectionResultOutput;\n}\n\nexport interface DetectMultivariateLastAnomalyDefaultHeaders {\n /** Error code. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DetectMultivariateLastAnomalyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n headers: RawHttpHeaders & DetectMultivariateLastAnomalyDefaultHeaders;\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ClientOptions } from "@azure-rest/core-client";
|
|
2
|
+
import type { KeyCredential } from "@azure/core-auth";
|
|
3
|
+
import type { AnomalyDetectorRestClient } from "./clientDefinitions.js";
|
|
4
|
+
export interface AnomalyDetectorRestClientOptions extends ClientOptions {
|
|
5
|
+
ApiVersion?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Initialize a new instance of the class AnomalyDetectorRestClient class.
|
|
9
|
+
* @param Endpoint type: string
|
|
10
|
+
* @param credentials type: KeyCredential
|
|
11
|
+
*/
|
|
12
|
+
export default function createClient(Endpoint: string, credentials: KeyCredential, options?: AnomalyDetectorRestClientOptions): AnomalyDetectorRestClient;
|
|
13
|
+
//# sourceMappingURL=anomalyDetectorRest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anomalyDetectorRest.d.ts","sourceRoot":"","sources":["../../src/anomalyDetectorRest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,MAAM,WAAW,gCAAiC,SAAQ,aAAa;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,aAAa,EAC1B,OAAO,GAAE,gCAAqC,GAC7C,yBAAyB,CA0B3B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { getClient } from "@azure-rest/core-client";
|
|
4
|
+
/**
|
|
5
|
+
* Initialize a new instance of the class AnomalyDetectorRestClient class.
|
|
6
|
+
* @param Endpoint type: string
|
|
7
|
+
* @param credentials type: KeyCredential
|
|
8
|
+
*/
|
|
9
|
+
export default function createClient(Endpoint, credentials, options = {}) {
|
|
10
|
+
const ApiVersion = options.ApiVersion ?? "v1.1";
|
|
11
|
+
const baseUrl = options.baseUrl ?? `${Endpoint}/anomalydetector/${ApiVersion}`;
|
|
12
|
+
options = {
|
|
13
|
+
...options,
|
|
14
|
+
credentials: {
|
|
15
|
+
apiKeyHeaderName: "Ocp-Apim-Subscription-Key",
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
const userAgentInfo = `azsdk-js-ai-anomaly-detector-rest/1.0.0-beta.1`;
|
|
19
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
20
|
+
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
21
|
+
: `${userAgentInfo}`;
|
|
22
|
+
options = {
|
|
23
|
+
...options,
|
|
24
|
+
userAgentOptions: {
|
|
25
|
+
userAgentPrefix,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const client = getClient(baseUrl, credentials, options);
|
|
29
|
+
return client;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=anomalyDetectorRest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anomalyDetectorRest.js","sourceRoot":"","sources":["../../src/anomalyDetectorRest.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAQpD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAgB,EAChB,WAA0B,EAC1B,UAA4C,EAAE;IAE9C,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,MAAM,CAAC;IAChD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,GAAG,QAAQ,oBAAoB,UAAU,EAAE,CAAC;IAE/E,OAAO,GAAG;QACR,GAAG,OAAO;QACV,WAAW,EAAE;YACX,gBAAgB,EAAE,2BAA2B;SAC9C;KACF,CAAC;IAEF,MAAM,aAAa,GAAG,gDAAgD,CAAC;IACvE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,GAAG;QACR,GAAG,OAAO;QACV,gBAAgB,EAAE;YAChB,eAAe;SAChB;KACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAA8B,CAAC;IAErF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential } from \"@azure/core-auth\";\nimport type { AnomalyDetectorRestClient } from \"./clientDefinitions.js\";\n\nexport interface AnomalyDetectorRestClientOptions extends ClientOptions {\n ApiVersion?: string;\n}\n\n/**\n * Initialize a new instance of the class AnomalyDetectorRestClient class.\n * @param Endpoint type: string\n * @param credentials type: KeyCredential\n */\nexport default function createClient(\n Endpoint: string,\n credentials: KeyCredential,\n options: AnomalyDetectorRestClientOptions = {},\n): AnomalyDetectorRestClient {\n const ApiVersion = options.ApiVersion ?? \"v1.1\";\n const baseUrl = options.baseUrl ?? `${Endpoint}/anomalydetector/${ApiVersion}`;\n\n options = {\n ...options,\n credentials: {\n apiKeyHeaderName: \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n const userAgentInfo = `azsdk-js-ai-anomaly-detector-rest/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n };\n\n const client = getClient(baseUrl, credentials, options) as AnomalyDetectorRestClient;\n\n return client;\n}\n"]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { DetectUnivariateEntireSeriesParameters, DetectUnivariateLastPointParameters, DetectUnivariateChangePointParameters, GetMultivariateBatchDetectionResultParameters, TrainMultivariateModelParameters, ListMultivariateModelsParameters, DeleteMultivariateModelParameters, GetMultivariateModelParameters, DetectMultivariateBatchAnomalyParameters, DetectMultivariateLastAnomalyParameters } from "./parameters.js";
|
|
2
|
+
import type { DetectUnivariateEntireSeries200Response, DetectUnivariateEntireSeriesDefaultResponse, DetectUnivariateLastPoint200Response, DetectUnivariateLastPointDefaultResponse, DetectUnivariateChangePoint200Response, DetectUnivariateChangePointDefaultResponse, GetMultivariateBatchDetectionResult200Response, GetMultivariateBatchDetectionResultDefaultResponse, TrainMultivariateModel201Response, TrainMultivariateModelDefaultResponse, ListMultivariateModels200Response, ListMultivariateModelsDefaultResponse, DeleteMultivariateModel204Response, DeleteMultivariateModelDefaultResponse, GetMultivariateModel200Response, GetMultivariateModelDefaultResponse, DetectMultivariateBatchAnomaly202Response, DetectMultivariateBatchAnomalyDefaultResponse, DetectMultivariateLastAnomaly200Response, DetectMultivariateLastAnomalyDefaultResponse } from "./responses.js";
|
|
3
|
+
import type { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
4
|
+
export interface DetectUnivariateEntireSeries {
|
|
5
|
+
/**
|
|
6
|
+
* This operation generates a model with an entire series, each point is detected
|
|
7
|
+
* with the same model. With this method, points before and after a certain point
|
|
8
|
+
* are used to determine whether it is an anomaly. The entire detection can give
|
|
9
|
+
* user an overall status of the time series.
|
|
10
|
+
*/
|
|
11
|
+
post(options: DetectUnivariateEntireSeriesParameters): StreamableMethod<DetectUnivariateEntireSeries200Response | DetectUnivariateEntireSeriesDefaultResponse>;
|
|
12
|
+
}
|
|
13
|
+
export interface DetectUnivariateLastPoint {
|
|
14
|
+
/**
|
|
15
|
+
* This operation generates a model using the points that you sent into the API,
|
|
16
|
+
* and based on all data to determine whether the last point is anomalous.
|
|
17
|
+
*/
|
|
18
|
+
post(options: DetectUnivariateLastPointParameters): StreamableMethod<DetectUnivariateLastPoint200Response | DetectUnivariateLastPointDefaultResponse>;
|
|
19
|
+
}
|
|
20
|
+
export interface DetectUnivariateChangePoint {
|
|
21
|
+
/** Evaluate change point score of every series point */
|
|
22
|
+
post(options: DetectUnivariateChangePointParameters): StreamableMethod<DetectUnivariateChangePoint200Response | DetectUnivariateChangePointDefaultResponse>;
|
|
23
|
+
}
|
|
24
|
+
export interface GetMultivariateBatchDetectionResult {
|
|
25
|
+
/**
|
|
26
|
+
* For asynchronous inference, get multivariate anomaly detection result based on
|
|
27
|
+
* resultId returned by the BatchDetectAnomaly api.
|
|
28
|
+
*/
|
|
29
|
+
get(options?: GetMultivariateBatchDetectionResultParameters): StreamableMethod<GetMultivariateBatchDetectionResult200Response | GetMultivariateBatchDetectionResultDefaultResponse>;
|
|
30
|
+
}
|
|
31
|
+
export interface TrainMultivariateModel {
|
|
32
|
+
/**
|
|
33
|
+
* Create and train a multivariate anomaly detection model. The request must
|
|
34
|
+
* include a source parameter to indicate an externally accessible Azure blob
|
|
35
|
+
* storage URI.There are two types of data input: An URI pointed to an Azure blob
|
|
36
|
+
* storage folder which contains multiple CSV files, and each CSV file contains
|
|
37
|
+
* two columns, timestamp and variable. Another type of input is an URI pointed to
|
|
38
|
+
* a CSV file in Azure blob storage, which contains all the variables and a
|
|
39
|
+
* timestamp column.
|
|
40
|
+
*/
|
|
41
|
+
post(options: TrainMultivariateModelParameters): StreamableMethod<TrainMultivariateModel201Response | TrainMultivariateModelDefaultResponse>;
|
|
42
|
+
/** List models of a resource. */
|
|
43
|
+
get(options?: ListMultivariateModelsParameters): StreamableMethod<ListMultivariateModels200Response | ListMultivariateModelsDefaultResponse>;
|
|
44
|
+
}
|
|
45
|
+
export interface DeleteMultivariateModel {
|
|
46
|
+
/** Delete an existing multivariate model according to the modelId */
|
|
47
|
+
delete(options?: DeleteMultivariateModelParameters): StreamableMethod<DeleteMultivariateModel204Response | DeleteMultivariateModelDefaultResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Get detailed information of multivariate model, including the training status
|
|
50
|
+
* and variables used in the model.
|
|
51
|
+
*/
|
|
52
|
+
get(options?: GetMultivariateModelParameters): StreamableMethod<GetMultivariateModel200Response | GetMultivariateModelDefaultResponse>;
|
|
53
|
+
}
|
|
54
|
+
export interface DetectMultivariateBatchAnomaly {
|
|
55
|
+
/**
|
|
56
|
+
* Submit multivariate anomaly detection task with the modelId of trained model
|
|
57
|
+
* and inference data, the input schema should be the same with the training
|
|
58
|
+
* request. The request will complete asynchronously and return a resultId to
|
|
59
|
+
* query the detection result.The request should be a source link to indicate an
|
|
60
|
+
* externally accessible Azure storage Uri, either pointed to an Azure blob
|
|
61
|
+
* storage folder, or pointed to a CSV file in Azure blob storage.
|
|
62
|
+
*/
|
|
63
|
+
post(options: DetectMultivariateBatchAnomalyParameters): StreamableMethod<DetectMultivariateBatchAnomaly202Response | DetectMultivariateBatchAnomalyDefaultResponse>;
|
|
64
|
+
}
|
|
65
|
+
export interface DetectMultivariateLastAnomaly {
|
|
66
|
+
/**
|
|
67
|
+
* Submit multivariate anomaly detection task with the modelId of trained model
|
|
68
|
+
* and inference data, and the inference data should be put into request body in a
|
|
69
|
+
* JSON format. The request will complete synchronously and return the detection
|
|
70
|
+
* immediately in the response body.
|
|
71
|
+
*/
|
|
72
|
+
post(options: DetectMultivariateLastAnomalyParameters): StreamableMethod<DetectMultivariateLastAnomaly200Response | DetectMultivariateLastAnomalyDefaultResponse>;
|
|
73
|
+
}
|
|
74
|
+
export interface Routes {
|
|
75
|
+
/** Resource for '/timeseries/entire/detect' has methods for the following verbs: post */
|
|
76
|
+
(path: "/timeseries/entire/detect"): DetectUnivariateEntireSeries;
|
|
77
|
+
/** Resource for '/timeseries/last/detect' has methods for the following verbs: post */
|
|
78
|
+
(path: "/timeseries/last/detect"): DetectUnivariateLastPoint;
|
|
79
|
+
/** Resource for '/timeseries/changepoint/detect' has methods for the following verbs: post */
|
|
80
|
+
(path: "/timeseries/changepoint/detect"): DetectUnivariateChangePoint;
|
|
81
|
+
/** Resource for '/multivariate/detect-batch/\{resultId\}' has methods for the following verbs: get */
|
|
82
|
+
(path: "/multivariate/detect-batch/{resultId}", resultId: string): GetMultivariateBatchDetectionResult;
|
|
83
|
+
/** Resource for '/multivariate/models' has methods for the following verbs: post, get */
|
|
84
|
+
(path: "/multivariate/models"): TrainMultivariateModel;
|
|
85
|
+
/** Resource for '/multivariate/models/\{modelId\}' has methods for the following verbs: delete, get */
|
|
86
|
+
(path: "/multivariate/models/{modelId}", modelId: string): DeleteMultivariateModel;
|
|
87
|
+
/** Resource for '/multivariate/models/\{modelId\}:detect-batch' has methods for the following verbs: post */
|
|
88
|
+
(path: "/multivariate/models/{modelId}:detect-batch", modelId: string): DetectMultivariateBatchAnomaly;
|
|
89
|
+
/** Resource for '/multivariate/models/\{modelId\}:detect-last' has methods for the following verbs: post */
|
|
90
|
+
(path: "/multivariate/models/{modelId}:detect-last", modelId: string): DetectMultivariateLastAnomaly;
|
|
91
|
+
}
|
|
92
|
+
export type AnomalyDetectorRestClient = Client & {
|
|
93
|
+
path: Routes;
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=clientDefinitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,sCAAsC,EACtC,mCAAmC,EACnC,qCAAqC,EACrC,6CAA6C,EAC7C,gCAAgC,EAChC,gCAAgC,EAChC,iCAAiC,EACjC,8BAA8B,EAC9B,wCAAwC,EACxC,uCAAuC,EACxC,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,uCAAuC,EACvC,2CAA2C,EAC3C,oCAAoC,EACpC,wCAAwC,EACxC,sCAAsC,EACtC,0CAA0C,EAC1C,8CAA8C,EAC9C,kDAAkD,EAClD,iCAAiC,EACjC,qCAAqC,EACrC,iCAAiC,EACjC,qCAAqC,EACrC,kCAAkC,EAClC,sCAAsC,EACtC,+BAA+B,EAC/B,mCAAmC,EACnC,yCAAyC,EACzC,6CAA6C,EAC7C,wCAAwC,EACxC,4CAA4C,EAC7C,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE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CAAC;CACH;AAED,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,IAAI,CACF,OAAO,EAAE,uCAAuC,GAC/C,gBAAgB,CACjB,wCAAwC,GAAG,4CAA4C,CACxF,CAAC;CACH;AAED,MAAM,WAAW,MAAM;IACrB,yFAAyF;IACzF,CAAC,IAAI,EAAE,2BAA2B,GAAG,4BAA4B,CAAC;IAClE,uFAAuF;IACvF,CAAC,IAAI,EAAE,yBAAyB,GAAG,yBAAyB,CAAC;IAC7D,8FAA8F;IAC9F,CAAC,IAAI,EAAE,gCAAgC,GAAG,2BAA2B,CAAC;IACtE,sGAAsG;IACtG,CACE,IAAI,EAAE,uCAAuC,EAC7C,QAAQ,EAAE,MAAM,GACf,mCAAmC,CAAC;IACvC,yFAAyF;IACzF,CAAC,IAAI,EAAE,sBAAsB,GAAG,sBAAsB,CAAC;IACvD,uGAAuG;IACvG,CAAC,IAAI,EAAE,gCAAgC,EAAE,OAAO,EAAE,MAAM,GAAG,uBAAuB,CAAC;IACnF,6GAA6G;IAC7G,CACE,IAAI,EAAE,6CAA6C,EACnD,OAAO,EAAE,MAAM,GACd,8BAA8B,CAAC;IAClC,4GAA4G;IAC5G,CACE,IAAI,EAAE,4CAA4C,EAClD,OAAO,EAAE,MAAM,GACd,6BAA6B,CAAC;CAClC;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n DetectUnivariateEntireSeriesParameters,\n DetectUnivariateLastPointParameters,\n DetectUnivariateChangePointParameters,\n GetMultivariateBatchDetectionResultParameters,\n TrainMultivariateModelParameters,\n ListMultivariateModelsParameters,\n DeleteMultivariateModelParameters,\n GetMultivariateModelParameters,\n DetectMultivariateBatchAnomalyParameters,\n DetectMultivariateLastAnomalyParameters,\n} from \"./parameters.js\";\nimport type {\n DetectUnivariateEntireSeries200Response,\n DetectUnivariateEntireSeriesDefaultResponse,\n DetectUnivariateLastPoint200Response,\n DetectUnivariateLastPointDefaultResponse,\n DetectUnivariateChangePoint200Response,\n DetectUnivariateChangePointDefaultResponse,\n GetMultivariateBatchDetectionResult200Response,\n GetMultivariateBatchDetectionResultDefaultResponse,\n TrainMultivariateModel201Response,\n TrainMultivariateModelDefaultResponse,\n ListMultivariateModels200Response,\n ListMultivariateModelsDefaultResponse,\n DeleteMultivariateModel204Response,\n DeleteMultivariateModelDefaultResponse,\n GetMultivariateModel200Response,\n GetMultivariateModelDefaultResponse,\n DetectMultivariateBatchAnomaly202Response,\n DetectMultivariateBatchAnomalyDefaultResponse,\n DetectMultivariateLastAnomaly200Response,\n DetectMultivariateLastAnomalyDefaultResponse,\n} from \"./responses.js\";\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface DetectUnivariateEntireSeries {\n /**\n * This operation generates a model with an entire series, each point is detected\n * with the same model. With this method, points before and after a certain point\n * are used to determine whether it is an anomaly. The entire detection can give\n * user an overall status of the time series.\n */\n post(\n options: DetectUnivariateEntireSeriesParameters,\n ): StreamableMethod<\n DetectUnivariateEntireSeries200Response | DetectUnivariateEntireSeriesDefaultResponse\n >;\n}\n\nexport interface DetectUnivariateLastPoint {\n /**\n * This operation generates a model using the points that you sent into the API,\n * and based on all data to determine whether the last point is anomalous.\n */\n post(\n options: DetectUnivariateLastPointParameters,\n ): StreamableMethod<\n DetectUnivariateLastPoint200Response | DetectUnivariateLastPointDefaultResponse\n >;\n}\n\nexport interface DetectUnivariateChangePoint {\n /** Evaluate change point score of every series point */\n post(\n options: DetectUnivariateChangePointParameters,\n ): StreamableMethod<\n DetectUnivariateChangePoint200Response | DetectUnivariateChangePointDefaultResponse\n >;\n}\n\nexport interface GetMultivariateBatchDetectionResult {\n /**\n * For asynchronous inference, get multivariate anomaly detection result based on\n * resultId returned by the BatchDetectAnomaly api.\n */\n get(\n options?: GetMultivariateBatchDetectionResultParameters,\n ): StreamableMethod<\n | GetMultivariateBatchDetectionResult200Response\n | GetMultivariateBatchDetectionResultDefaultResponse\n >;\n}\n\nexport interface TrainMultivariateModel {\n /**\n * Create and train a multivariate anomaly detection model. The request must\n * include a source parameter to indicate an externally accessible Azure blob\n * storage URI.There are two types of data input: An URI pointed to an Azure blob\n * storage folder which contains multiple CSV files, and each CSV file contains\n * two columns, timestamp and variable. Another type of input is an URI pointed to\n * a CSV file in Azure blob storage, which contains all the variables and a\n * timestamp column.\n */\n post(\n options: TrainMultivariateModelParameters,\n ): StreamableMethod<TrainMultivariateModel201Response | TrainMultivariateModelDefaultResponse>;\n /** List models of a resource. */\n get(\n options?: ListMultivariateModelsParameters,\n ): StreamableMethod<ListMultivariateModels200Response | ListMultivariateModelsDefaultResponse>;\n}\n\nexport interface DeleteMultivariateModel {\n /** Delete an existing multivariate model according to the modelId */\n delete(\n options?: DeleteMultivariateModelParameters,\n ): StreamableMethod<DeleteMultivariateModel204Response | DeleteMultivariateModelDefaultResponse>;\n /**\n * Get detailed information of multivariate model, including the training status\n * and variables used in the model.\n */\n get(\n options?: GetMultivariateModelParameters,\n ): StreamableMethod<GetMultivariateModel200Response | GetMultivariateModelDefaultResponse>;\n}\n\nexport interface DetectMultivariateBatchAnomaly {\n /**\n * Submit multivariate anomaly detection task with the modelId of trained model\n * and inference data, the input schema should be the same with the training\n * request. The request will complete asynchronously and return a resultId to\n * query the detection result.The request should be a source link to indicate an\n * externally accessible Azure storage Uri, either pointed to an Azure blob\n * storage folder, or pointed to a CSV file in Azure blob storage.\n */\n post(\n options: DetectMultivariateBatchAnomalyParameters,\n ): StreamableMethod<\n DetectMultivariateBatchAnomaly202Response | DetectMultivariateBatchAnomalyDefaultResponse\n >;\n}\n\nexport interface DetectMultivariateLastAnomaly {\n /**\n * Submit multivariate anomaly detection task with the modelId of trained model\n * and inference data, and the inference data should be put into request body in a\n * JSON format. The request will complete synchronously and return the detection\n * immediately in the response body.\n */\n post(\n options: DetectMultivariateLastAnomalyParameters,\n ): StreamableMethod<\n DetectMultivariateLastAnomaly200Response | DetectMultivariateLastAnomalyDefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/timeseries/entire/detect' has methods for the following verbs: post */\n (path: \"/timeseries/entire/detect\"): DetectUnivariateEntireSeries;\n /** Resource for '/timeseries/last/detect' has methods for the following verbs: post */\n (path: \"/timeseries/last/detect\"): DetectUnivariateLastPoint;\n /** Resource for '/timeseries/changepoint/detect' has methods for the following verbs: post */\n (path: \"/timeseries/changepoint/detect\"): DetectUnivariateChangePoint;\n /** Resource for '/multivariate/detect-batch/\\{resultId\\}' has methods for the following verbs: get */\n (\n path: \"/multivariate/detect-batch/{resultId}\",\n resultId: string,\n ): GetMultivariateBatchDetectionResult;\n /** Resource for '/multivariate/models' has methods for the following verbs: post, get */\n (path: \"/multivariate/models\"): TrainMultivariateModel;\n /** Resource for '/multivariate/models/\\{modelId\\}' has methods for the following verbs: delete, get */\n (path: \"/multivariate/models/{modelId}\", modelId: string): DeleteMultivariateModel;\n /** Resource for '/multivariate/models/\\{modelId\\}:detect-batch' has methods for the following verbs: post */\n (\n path: \"/multivariate/models/{modelId}:detect-batch\",\n modelId: string,\n ): DetectMultivariateBatchAnomaly;\n /** Resource for '/multivariate/models/\\{modelId\\}:detect-last' has methods for the following verbs: post */\n (\n path: \"/multivariate/models/{modelId}:detect-last\",\n modelId: string,\n ): DetectMultivariateLastAnomaly;\n}\n\nexport type AnomalyDetectorRestClient = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import AnomalyDetectorRest from "./anomalyDetectorRest.js";
|
|
2
|
+
export * from "./anomalyDetectorRest.js";
|
|
3
|
+
export * from "./parameters.js";
|
|
4
|
+
export * from "./responses.js";
|
|
5
|
+
export * from "./clientDefinitions.js";
|
|
6
|
+
export * from "./isUnexpected.js";
|
|
7
|
+
export * from "./models.js";
|
|
8
|
+
export * from "./outputModels.js";
|
|
9
|
+
export * from "./paginateHelper.js";
|
|
10
|
+
export default AnomalyDetectorRest;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import AnomalyDetectorRest from "./anomalyDetectorRest.js";
|
|
4
|
+
export * from "./anomalyDetectorRest.js";
|
|
5
|
+
export * from "./parameters.js";
|
|
6
|
+
export * from "./responses.js";
|
|
7
|
+
export * from "./clientDefinitions.js";
|
|
8
|
+
export * from "./isUnexpected.js";
|
|
9
|
+
export * from "./models.js";
|
|
10
|
+
export * from "./outputModels.js";
|
|
11
|
+
export * from "./paginateHelper.js";
|
|
12
|
+
export default AnomalyDetectorRest;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,eAAe,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport AnomalyDetectorRest from \"./anomalyDetectorRest.js\";\n\nexport * from \"./anomalyDetectorRest.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\nexport * from \"./paginateHelper.js\";\n\nexport default AnomalyDetectorRest;\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DetectUnivariateEntireSeries200Response, DetectUnivariateEntireSeriesDefaultResponse, DetectUnivariateLastPoint200Response, DetectUnivariateLastPointDefaultResponse, DetectUnivariateChangePoint200Response, DetectUnivariateChangePointDefaultResponse, GetMultivariateBatchDetectionResult200Response, GetMultivariateBatchDetectionResultDefaultResponse, TrainMultivariateModel201Response, TrainMultivariateModelDefaultResponse, ListMultivariateModels200Response, ListMultivariateModelsDefaultResponse, DeleteMultivariateModel204Response, DeleteMultivariateModelDefaultResponse, GetMultivariateModel200Response, GetMultivariateModelDefaultResponse, DetectMultivariateBatchAnomaly202Response, DetectMultivariateBatchAnomalyDefaultResponse, DetectMultivariateLastAnomaly200Response, DetectMultivariateLastAnomalyDefaultResponse } from "./responses.js";
|
|
2
|
+
export declare function isUnexpected(response: DetectUnivariateEntireSeries200Response | DetectUnivariateEntireSeriesDefaultResponse): response is DetectUnivariateEntireSeriesDefaultResponse;
|
|
3
|
+
export declare function isUnexpected(response: DetectUnivariateLastPoint200Response | DetectUnivariateLastPointDefaultResponse): response is DetectUnivariateLastPointDefaultResponse;
|
|
4
|
+
export declare function isUnexpected(response: DetectUnivariateChangePoint200Response | DetectUnivariateChangePointDefaultResponse): response is DetectUnivariateChangePointDefaultResponse;
|
|
5
|
+
export declare function isUnexpected(response: GetMultivariateBatchDetectionResult200Response | GetMultivariateBatchDetectionResultDefaultResponse): response is GetMultivariateBatchDetectionResultDefaultResponse;
|
|
6
|
+
export declare function isUnexpected(response: TrainMultivariateModel201Response | TrainMultivariateModelDefaultResponse): response is TrainMultivariateModelDefaultResponse;
|
|
7
|
+
export declare function isUnexpected(response: ListMultivariateModels200Response | ListMultivariateModelsDefaultResponse): response is ListMultivariateModelsDefaultResponse;
|
|
8
|
+
export declare function isUnexpected(response: DeleteMultivariateModel204Response | DeleteMultivariateModelDefaultResponse): response is DeleteMultivariateModelDefaultResponse;
|
|
9
|
+
export declare function isUnexpected(response: GetMultivariateModel200Response | GetMultivariateModelDefaultResponse): response is GetMultivariateModelDefaultResponse;
|
|
10
|
+
export declare function isUnexpected(response: DetectMultivariateBatchAnomaly202Response | DetectMultivariateBatchAnomalyDefaultResponse): response is DetectMultivariateBatchAnomalyDefaultResponse;
|
|
11
|
+
export declare function isUnexpected(response: DetectMultivariateLastAnomaly200Response | DetectMultivariateLastAnomalyDefaultResponse): response is DetectMultivariateLastAnomalyDefaultResponse;
|
|
12
|
+
//# sourceMappingURL=isUnexpected.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,uCAAuC,EACvC,2CAA2C,EAC3C,oCAAoC,EACpC,wCAAwC,EACxC,sCAAsC,EACtC,0CAA0C,EAC1C,8CAA8C,EAC9C,kDAAkD,EAClD,iCAAiC,EACjC,qCAAqC,EACrC,iCAAiC,EACjC,qCAAqC,EACrC,kCAAkC,EAClC,sCAAsC,EACtC,+BAA+B,EAC/B,mCAAmC,EACnC,yCAAyC,EACzC,6CAA6C,EAC7C,wCAAwC,EACxC,4CAA4C,EAC7C,MAAM,gBAAgB,CAAC;AAexB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,uCAAuC,GAAG,2CAA2C,GAC9F,QAAQ,IAAI,2CAA2C,CAAC;AAC3D,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,oCAAoC,GAAG,wCAAwC,GACxF,QAAQ,IAAI,wCAAwC,CAAC;AACxD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,sCAAsC,GAAG,0CAA0C,GAC5F,QAAQ,IAAI,0CAA0C,CAAC;AAC1D,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,8CAA8C,GAC9C,kDAAkD,GACrD,QAAQ,IAAI,kDAAkD,CAAC;AAClE,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,iCAAiC,GAAG,qCAAqC,GAClF,QAAQ,IAAI,qCAAqC,CAAC;AACrD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,iCAAiC,GAAG,qCAAqC,GAClF,QAAQ,IAAI,qCAAqC,CAAC;AACrD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,kCAAkC,GAAG,sCAAsC,GACpF,QAAQ,IAAI,sCAAsC,CAAC;AACtD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,+BAA+B,GAAG,mCAAmC,GAC9E,QAAQ,IAAI,mCAAmC,CAAC;AACnD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,yCAAyC,GACzC,6CAA6C,GAChD,QAAQ,IAAI,6CAA6C,CAAC;AAC7D,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,wCAAwC,GAAG,4CAA4C,GAChG,QAAQ,IAAI,4CAA4C,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
const responseMap = {
|
|
4
|
+
"POST /timeseries/entire/detect": ["200"],
|
|
5
|
+
"POST /timeseries/last/detect": ["200"],
|
|
6
|
+
"POST /timeseries/changepoint/detect": ["200"],
|
|
7
|
+
"GET /multivariate/detect-batch/{resultId}": ["200"],
|
|
8
|
+
"POST /multivariate/models": ["201"],
|
|
9
|
+
"GET /multivariate/models": ["200"],
|
|
10
|
+
"DELETE /multivariate/models/{modelId}": ["204"],
|
|
11
|
+
"GET /multivariate/models/{modelId}": ["200"],
|
|
12
|
+
"POST /multivariate/models/{modelId}:detect-batch": ["202"],
|
|
13
|
+
"POST /multivariate/models/{modelId}:detect-last": ["200"],
|
|
14
|
+
};
|
|
15
|
+
export function isUnexpected(response) {
|
|
16
|
+
const lroOriginal = response.headers["x-ms-original-url"];
|
|
17
|
+
const url = new URL(lroOriginal ?? response.request.url);
|
|
18
|
+
const method = response.request.method;
|
|
19
|
+
let pathDetails = responseMap[`${method} ${url.pathname}`];
|
|
20
|
+
if (!pathDetails) {
|
|
21
|
+
pathDetails = getParametrizedPathSuccess(method, url.pathname);
|
|
22
|
+
}
|
|
23
|
+
return !pathDetails.includes(response.status);
|
|
24
|
+
}
|
|
25
|
+
function getParametrizedPathSuccess(method, path) {
|
|
26
|
+
const pathParts = path.split("/");
|
|
27
|
+
// Traverse list to match the longest candidate
|
|
28
|
+
// matchedLen: the length of candidate path
|
|
29
|
+
// matchedValue: the matched status code array
|
|
30
|
+
let matchedLen = -1, matchedValue = [];
|
|
31
|
+
// Iterate the responseMap to find a match
|
|
32
|
+
for (const [key, value] of Object.entries(responseMap)) {
|
|
33
|
+
// Extracting the path from the map key which is in format
|
|
34
|
+
// GET /path/foo
|
|
35
|
+
if (!key.startsWith(method)) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const candidatePath = getPathFromMapKey(key);
|
|
39
|
+
// Get each part of the url path
|
|
40
|
+
const candidateParts = candidatePath.split("/");
|
|
41
|
+
// track if we have found a match to return the values found.
|
|
42
|
+
let found = true;
|
|
43
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
44
|
+
if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
|
|
45
|
+
const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
|
|
46
|
+
// If the current part of the candidate is a "template" part
|
|
47
|
+
// Try to use the suffix of pattern to match the path
|
|
48
|
+
// {guid} ==> $
|
|
49
|
+
// {guid}:export ==> :export$
|
|
50
|
+
const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
|
|
51
|
+
if (!isMatched) {
|
|
52
|
+
found = false;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
// If the candidate part is not a template and
|
|
58
|
+
// the parts don't match mark the candidate as not found
|
|
59
|
+
// to move on with the next candidate path.
|
|
60
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
61
|
+
found = false;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// We finished evaluating the current candidate parts
|
|
66
|
+
// Update the matched value if and only if we found the longer pattern
|
|
67
|
+
if (found && candidatePath.length > matchedLen) {
|
|
68
|
+
matchedLen = candidatePath.length;
|
|
69
|
+
matchedValue = value;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return matchedValue;
|
|
73
|
+
}
|
|
74
|
+
function getPathFromMapKey(mapKey) {
|
|
75
|
+
const pathStart = mapKey.indexOf("/");
|
|
76
|
+
return mapKey.slice(pathStart);
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=isUnexpected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAyBlC,MAAM,WAAW,GAA6B;IAC5C,gCAAgC,EAAE,CAAC,KAAK,CAAC;IACzC,8BAA8B,EAAE,CAAC,KAAK,CAAC;IACvC,qCAAqC,EAAE,CAAC,KAAK,CAAC;IAC9C,2CAA2C,EAAE,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SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n DetectUnivariateEntireSeries200Response,\n DetectUnivariateEntireSeriesDefaultResponse,\n DetectUnivariateLastPoint200Response,\n DetectUnivariateLastPointDefaultResponse,\n DetectUnivariateChangePoint200Response,\n DetectUnivariateChangePointDefaultResponse,\n GetMultivariateBatchDetectionResult200Response,\n GetMultivariateBatchDetectionResultDefaultResponse,\n TrainMultivariateModel201Response,\n TrainMultivariateModelDefaultResponse,\n ListMultivariateModels200Response,\n ListMultivariateModelsDefaultResponse,\n DeleteMultivariateModel204Response,\n DeleteMultivariateModelDefaultResponse,\n GetMultivariateModel200Response,\n GetMultivariateModelDefaultResponse,\n DetectMultivariateBatchAnomaly202Response,\n DetectMultivariateBatchAnomalyDefaultResponse,\n DetectMultivariateLastAnomaly200Response,\n DetectMultivariateLastAnomalyDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"POST /timeseries/entire/detect\": [\"200\"],\n \"POST /timeseries/last/detect\": [\"200\"],\n \"POST /timeseries/changepoint/detect\": [\"200\"],\n \"GET /multivariate/detect-batch/{resultId}\": [\"200\"],\n \"POST /multivariate/models\": [\"201\"],\n \"GET /multivariate/models\": [\"200\"],\n \"DELETE /multivariate/models/{modelId}\": [\"204\"],\n \"GET /multivariate/models/{modelId}\": [\"200\"],\n \"POST /multivariate/models/{modelId}:detect-batch\": [\"202\"],\n \"POST /multivariate/models/{modelId}:detect-last\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: DetectUnivariateEntireSeries200Response | DetectUnivariateEntireSeriesDefaultResponse,\n): response is DetectUnivariateEntireSeriesDefaultResponse;\nexport function isUnexpected(\n response: DetectUnivariateLastPoint200Response | DetectUnivariateLastPointDefaultResponse,\n): response is DetectUnivariateLastPointDefaultResponse;\nexport function isUnexpected(\n response: DetectUnivariateChangePoint200Response | DetectUnivariateChangePointDefaultResponse,\n): response is DetectUnivariateChangePointDefaultResponse;\nexport function isUnexpected(\n response:\n | GetMultivariateBatchDetectionResult200Response\n | GetMultivariateBatchDetectionResultDefaultResponse,\n): response is GetMultivariateBatchDetectionResultDefaultResponse;\nexport function isUnexpected(\n response: TrainMultivariateModel201Response | TrainMultivariateModelDefaultResponse,\n): response is TrainMultivariateModelDefaultResponse;\nexport function isUnexpected(\n response: ListMultivariateModels200Response | ListMultivariateModelsDefaultResponse,\n): response is ListMultivariateModelsDefaultResponse;\nexport function isUnexpected(\n response: DeleteMultivariateModel204Response | DeleteMultivariateModelDefaultResponse,\n): response is DeleteMultivariateModelDefaultResponse;\nexport function isUnexpected(\n response: GetMultivariateModel200Response | GetMultivariateModelDefaultResponse,\n): response is GetMultivariateModelDefaultResponse;\nexport function isUnexpected(\n response:\n | DetectMultivariateBatchAnomaly202Response\n | DetectMultivariateBatchAnomalyDefaultResponse,\n): response is DetectMultivariateBatchAnomalyDefaultResponse;\nexport function isUnexpected(\n response: DetectMultivariateLastAnomaly200Response | DetectMultivariateLastAnomalyDefaultResponse,\n): response is DetectMultivariateLastAnomalyDefaultResponse;\nexport function isUnexpected(\n response:\n | DetectUnivariateEntireSeries200Response\n | DetectUnivariateEntireSeriesDefaultResponse\n | DetectUnivariateLastPoint200Response\n | DetectUnivariateLastPointDefaultResponse\n | DetectUnivariateChangePoint200Response\n | DetectUnivariateChangePointDefaultResponse\n | GetMultivariateBatchDetectionResult200Response\n | GetMultivariateBatchDetectionResultDefaultResponse\n | TrainMultivariateModel201Response\n | TrainMultivariateModelDefaultResponse\n | ListMultivariateModels200Response\n | ListMultivariateModelsDefaultResponse\n | DeleteMultivariateModel204Response\n | DeleteMultivariateModelDefaultResponse\n | GetMultivariateModel200Response\n | GetMultivariateModelDefaultResponse\n | DetectMultivariateBatchAnomaly202Response\n | DetectMultivariateBatchAnomalyDefaultResponse\n | DetectMultivariateLastAnomaly200Response\n | DetectMultivariateLastAnomalyDefaultResponse,\n): response is\n | DetectUnivariateEntireSeriesDefaultResponse\n | DetectUnivariateLastPointDefaultResponse\n | DetectUnivariateChangePointDefaultResponse\n | GetMultivariateBatchDetectionResultDefaultResponse\n | TrainMultivariateModelDefaultResponse\n | ListMultivariateModelsDefaultResponse\n | DeleteMultivariateModelDefaultResponse\n | GetMultivariateModelDefaultResponse\n | DetectMultivariateBatchAnomalyDefaultResponse\n | DetectMultivariateLastAnomalyDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|