Skip to content

Commit 4c24199

Browse files
authored
Upgrade V6 SDK Generator Version (Azure#13359)
1 parent d122851 commit 4c24199

File tree

8 files changed

+430
-811
lines changed

8 files changed

+430
-811
lines changed

sdk/textanalytics/ai-text-analytics/review/ai-text-analytics.api.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export interface HealthcareSuccessResult extends TextAnalyticsSuccessResult {
215215
export type HealthPollerLike = PollerLike<BeginAnalyzeHealthcareOperationState, PaginatedHealthcareEntities>;
216216

217217
// @public
218-
export type InnerErrorCodeValue = "InvalidParameterValue" | "InvalidRequestBodyFormat" | "EmptyRequest" | "MissingInputRecords" | "InvalidDocument" | "ModelVersionIncorrect" | "InvalidDocumentBatch" | "UnsupportedLanguageCode" | "InvalidCountryHint" | string;
218+
export type InnerErrorCodeValue = string;
219219

220220
// @public
221221
export interface JobManifestTasks {
@@ -229,6 +229,44 @@ export interface KeyPhrasesTask {
229229
modelVersion?: string;
230230
}
231231

232+
// @public
233+
export const enum KnownInnerErrorCodeValue {
234+
// (undocumented)
235+
EmptyRequest = "EmptyRequest",
236+
// (undocumented)
237+
InvalidCountryHint = "InvalidCountryHint",
238+
// (undocumented)
239+
InvalidDocument = "InvalidDocument",
240+
// (undocumented)
241+
InvalidDocumentBatch = "InvalidDocumentBatch",
242+
// (undocumented)
243+
InvalidParameterValue = "InvalidParameterValue",
244+
// (undocumented)
245+
InvalidRequestBodyFormat = "InvalidRequestBodyFormat",
246+
// (undocumented)
247+
MissingInputRecords = "MissingInputRecords",
248+
// (undocumented)
249+
ModelVersionIncorrect = "ModelVersionIncorrect",
250+
// (undocumented)
251+
UnsupportedLanguageCode = "UnsupportedLanguageCode"
252+
}
253+
254+
// @public
255+
export const enum KnownPiiTaskParametersDomain {
256+
// (undocumented)
257+
None = "none",
258+
// (undocumented)
259+
Phi = "phi"
260+
}
261+
262+
// @public
263+
export const enum KnownWarningCode {
264+
// (undocumented)
265+
DocumentTruncated = "DocumentTruncated",
266+
// (undocumented)
267+
LongWordsInDocument = "LongWordsInDocument"
268+
}
269+
232270
// @public
233271
export interface LinkedEntity {
234272
bingEntitySearchApiId?: string;
@@ -290,7 +328,7 @@ export type PiiTask = {
290328
};
291329

292330
// @public
293-
export type PiiTaskParametersDomain = "phi" | "none" | string;
331+
export type PiiTaskParametersDomain = string;
294332

295333
// @public
296334
export interface PollingOptions {
@@ -483,7 +521,7 @@ export interface TextDocumentStatistics {
483521
export type TokenSentimentValue = "positive" | "mixed" | "negative";
484522

485523
// @public
486-
export type WarningCode = "LongWordsInDocument" | "DocumentTruncated" | string;
524+
export type WarningCode = string;
487525

488526

489527
// (No @packageDocumentation comment for this package)

sdk/textanalytics/ai-text-analytics/src/generated/generatedClient.ts

Lines changed: 58 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
GeneratedClientSentimentResponse
3838
} from "./models";
3939

40+
/** @hidden */
4041
export class GeneratedClient extends GeneratedClientContext {
4142
/**
4243
* Initializes a new instance of the GeneratedClient class.
@@ -55,11 +56,11 @@ export class GeneratedClient extends GeneratedClientContext {
5556
analyze(
5657
options?: GeneratedClientAnalyzeOptionalParams
5758
): Promise<GeneratedClientAnalyzeResponse> {
58-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
59-
options || {}
60-
);
59+
const operationArguments: coreHttp.OperationArguments = {
60+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
61+
};
6162
return this.sendOperationRequest(
62-
{ options: operationOptions },
63+
operationArguments,
6364
analyzeOperationSpec
6465
) as Promise<GeneratedClientAnalyzeResponse>;
6566
}
@@ -75,11 +76,12 @@ export class GeneratedClient extends GeneratedClientContext {
7576
jobId: string,
7677
options?: GeneratedClientAnalyzeStatusOptionalParams
7778
): Promise<GeneratedClientAnalyzeStatusResponse> {
78-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
79-
options || {}
80-
);
79+
const operationArguments: coreHttp.OperationArguments = {
80+
jobId,
81+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
82+
};
8183
return this.sendOperationRequest(
82-
{ jobId, options: operationOptions },
84+
operationArguments,
8385
analyzeStatusOperationSpec
8486
) as Promise<GeneratedClientAnalyzeStatusResponse>;
8587
}
@@ -93,11 +95,12 @@ export class GeneratedClient extends GeneratedClientContext {
9395
jobId: string,
9496
options?: GeneratedClientHealthStatusOptionalParams
9597
): Promise<GeneratedClientHealthStatusResponse> {
96-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
97-
options || {}
98-
);
98+
const operationArguments: coreHttp.OperationArguments = {
99+
jobId,
100+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
101+
};
99102
return this.sendOperationRequest(
100-
{ jobId, options: operationOptions },
103+
operationArguments,
101104
healthStatusOperationSpec
102105
) as Promise<GeneratedClientHealthStatusResponse>;
103106
}
@@ -111,11 +114,12 @@ export class GeneratedClient extends GeneratedClientContext {
111114
jobId: string,
112115
options?: coreHttp.OperationOptions
113116
): Promise<GeneratedClientCancelHealthJobResponse> {
114-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
115-
options || {}
116-
);
117+
const operationArguments: coreHttp.OperationArguments = {
118+
jobId,
119+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
120+
};
117121
return this.sendOperationRequest(
118-
{ jobId, options: operationOptions },
122+
operationArguments,
119123
cancelHealthJobOperationSpec
120124
) as Promise<GeneratedClientCancelHealthJobResponse>;
121125
}
@@ -130,11 +134,12 @@ export class GeneratedClient extends GeneratedClientContext {
130134
input: MultiLanguageBatchInput,
131135
options?: GeneratedClientHealthOptionalParams
132136
): Promise<GeneratedClientHealthResponse> {
133-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
134-
options || {}
135-
);
137+
const operationArguments: coreHttp.OperationArguments = {
138+
input,
139+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
140+
};
136141
return this.sendOperationRequest(
137-
{ input, options: operationOptions },
142+
operationArguments,
138143
healthOperationSpec
139144
) as Promise<GeneratedClientHealthResponse>;
140145
}
@@ -151,11 +156,12 @@ export class GeneratedClient extends GeneratedClientContext {
151156
input: MultiLanguageBatchInput,
152157
options?: GeneratedClientEntitiesRecognitionGeneralOptionalParams
153158
): Promise<GeneratedClientEntitiesRecognitionGeneralResponse> {
154-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
155-
options || {}
156-
);
159+
const operationArguments: coreHttp.OperationArguments = {
160+
input,
161+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
162+
};
157163
return this.sendOperationRequest(
158-
{ input, options: operationOptions },
164+
operationArguments,
159165
entitiesRecognitionGeneralOperationSpec
160166
) as Promise<GeneratedClientEntitiesRecognitionGeneralResponse>;
161167
}
@@ -173,11 +179,12 @@ export class GeneratedClient extends GeneratedClientContext {
173179
input: MultiLanguageBatchInput,
174180
options?: GeneratedClientEntitiesRecognitionPiiOptionalParams
175181
): Promise<GeneratedClientEntitiesRecognitionPiiResponse> {
176-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
177-
options || {}
178-
);
182+
const operationArguments: coreHttp.OperationArguments = {
183+
input,
184+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
185+
};
179186
return this.sendOperationRequest(
180-
{ input, options: operationOptions },
187+
operationArguments,
181188
entitiesRecognitionPiiOperationSpec
182189
) as Promise<GeneratedClientEntitiesRecognitionPiiResponse>;
183190
}
@@ -193,11 +200,12 @@ export class GeneratedClient extends GeneratedClientContext {
193200
input: MultiLanguageBatchInput,
194201
options?: GeneratedClientEntitiesLinkingOptionalParams
195202
): Promise<GeneratedClientEntitiesLinkingResponse> {
196-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
197-
options || {}
198-
);
203+
const operationArguments: coreHttp.OperationArguments = {
204+
input,
205+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
206+
};
199207
return this.sendOperationRequest(
200-
{ input, options: operationOptions },
208+
operationArguments,
201209
entitiesLinkingOperationSpec
202210
) as Promise<GeneratedClientEntitiesLinkingResponse>;
203211
}
@@ -213,11 +221,12 @@ export class GeneratedClient extends GeneratedClientContext {
213221
input: MultiLanguageBatchInput,
214222
options?: GeneratedClientKeyPhrasesOptionalParams
215223
): Promise<GeneratedClientKeyPhrasesResponse> {
216-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
217-
options || {}
218-
);
224+
const operationArguments: coreHttp.OperationArguments = {
225+
input,
226+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
227+
};
219228
return this.sendOperationRequest(
220-
{ input, options: operationOptions },
229+
operationArguments,
221230
keyPhrasesOperationSpec
222231
) as Promise<GeneratedClientKeyPhrasesResponse>;
223232
}
@@ -234,11 +243,12 @@ export class GeneratedClient extends GeneratedClientContext {
234243
input: LanguageBatchInput,
235244
options?: GeneratedClientLanguagesOptionalParams
236245
): Promise<GeneratedClientLanguagesResponse> {
237-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
238-
options || {}
239-
);
246+
const operationArguments: coreHttp.OperationArguments = {
247+
input,
248+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
249+
};
240250
return this.sendOperationRequest(
241-
{ input, options: operationOptions },
251+
operationArguments,
242252
languagesOperationSpec
243253
) as Promise<GeneratedClientLanguagesResponse>;
244254
}
@@ -254,17 +264,17 @@ export class GeneratedClient extends GeneratedClientContext {
254264
input: MultiLanguageBatchInput,
255265
options?: GeneratedClientSentimentOptionalParams
256266
): Promise<GeneratedClientSentimentResponse> {
257-
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
258-
options || {}
259-
);
267+
const operationArguments: coreHttp.OperationArguments = {
268+
input,
269+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
270+
};
260271
return this.sendOperationRequest(
261-
{ input, options: operationOptions },
272+
operationArguments,
262273
sentimentOperationSpec
263274
) as Promise<GeneratedClientSentimentResponse>;
264275
}
265276
}
266277
// Operation Specifications
267-
268278
const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
269279

270280
const analyzeOperationSpec: coreHttp.OperationSpec = {
@@ -311,7 +321,7 @@ const analyzeStatusOperationSpec: coreHttp.OperationSpec = {
311321
Parameters.skip
312322
],
313323
urlParameters: [Parameters.endpoint, Parameters.jobId],
314-
headerParameters: [Parameters.accept1],
324+
headerParameters: [Parameters.accept],
315325
serializer
316326
};
317327
const healthStatusOperationSpec: coreHttp.OperationSpec = {
@@ -336,7 +346,7 @@ const healthStatusOperationSpec: coreHttp.OperationSpec = {
336346
Parameters.skip
337347
],
338348
urlParameters: [Parameters.endpoint, Parameters.jobId1],
339-
headerParameters: [Parameters.accept1],
349+
headerParameters: [Parameters.accept],
340350
serializer
341351
};
342352
const cancelHealthJobOperationSpec: coreHttp.OperationSpec = {
@@ -356,7 +366,7 @@ const cancelHealthJobOperationSpec: coreHttp.OperationSpec = {
356366
}
357367
},
358368
urlParameters: [Parameters.endpoint, Parameters.jobId1],
359-
headerParameters: [Parameters.accept1],
369+
headerParameters: [Parameters.accept],
360370
serializer
361371
};
362372
const healthOperationSpec: coreHttp.OperationSpec = {

sdk/textanalytics/ai-text-analytics/src/generated/generatedClientContext.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { GeneratedClientOptionalParams } from "./models";
1212
const packageName = "@azure/ai-text-analytics";
1313
const packageVersion = "5.1.0-beta.3";
1414

15+
/** @hidden */
1516
export class GeneratedClientContext extends coreHttp.ServiceClient {
1617
endpoint: string;
1718

0 commit comments

Comments
 (0)