Skip to content

Commit

Permalink
modified readme of [DocumentIntelligence] wrong import of AnalyzeOper… (
Browse files Browse the repository at this point in the history
#32412)

…ationOutput. changes in changelog, samples and release note for GA
1.0.0 #32326


### Packages impacted by this PR
Azure Documentintelligence

### Issues associated with this PR
Fixed wrong import of AnalyzeOperationOutput 

### Describe the problem that is addressed by this PR
Previously in the readme of Azure DocumentIntelligence (formerly
FormRecognizer) REST client library for JavaScript in Continue creating
the poller from initial response section the import of
AnalyzeOperationOutput was wrongly added as AnalyzeResultOperationOutput
in 3 counts that has been modified.

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
It was the only simple solution

### Are there test cases added in this PR? _(If not, why?)_
No just modified readme to update documentation of wrong import

### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
  • Loading branch information
Nikhilprasad-r authored Jan 3, 2025
1 parent eb67e3d commit 6030c77
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ Continue creating the poller from initial response
```ts
import {
getLongRunningPoller,
AnalyzeResultOperationOutput,
AnalyzeOperationOutput,
isUnexpected,
} from "@azure-rest/ai-document-intelligence";

if (isUnexpected(initialResponse)) {
throw initialResponse.body.error;
}
const poller = getLongRunningPoller(client, initialResponse);
const result = (await poller.pollUntilDone()).body as AnalyzeResultOperationOutput;
const result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;
console.log(result);
// {
// status: 'succeeded',
Expand Down Expand Up @@ -365,7 +365,7 @@ if (isUnexpected(initialResponse)) {

const poller = getLongRunningPoller(client, initialResponse, { ...testPollingOptions });

const result = (await poller.pollUntilDone()).body as AnalyzeResultOperationOutput;
const result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;
const figures = result.analyzeResult?.figures;
assert.isArray(figures);
assert.isNotEmpty(figures?.[0]);
Expand Down

0 comments on commit 6030c77

Please sign in to comment.