|
1 | 1 | # PartitionResponse
|
2 | 2 |
|
3 |
| -## Example Usage |
| 3 | + |
| 4 | +## Supported Types |
| 5 | + |
| 6 | +### `string` |
4 | 7 |
|
5 | 8 | ```typescript
|
6 |
| -import { PartitionResponse } from "unstructured-client/sdk/models/operations"; |
| 9 | +const value: string = "<value>"; |
| 10 | +``` |
7 | 11 |
|
8 |
| -let value: PartitionResponse = { |
9 |
| - contentType: "<value>", |
10 |
| - statusCode: 306, |
11 |
| - rawResponse: new Response("{\"message\": \"hello world\"}", { |
12 |
| - headers: { "Content-Type": "application/json" }, |
13 |
| - }), |
14 |
| - elements: [ |
15 |
| - { |
16 |
| - "type": "Title", |
17 |
| - "element_id": "6aa0ff22f91bbe7e26e8e25ca8052acd", |
18 |
| - "text": |
19 |
| - "LayoutParser: A Unified Toolkit for Deep Learning Based Document Image Analysis", |
20 |
| - "metadata": { |
21 |
| - "languages": [ |
22 |
| - "eng", |
23 |
| - ], |
24 |
| - "page_number": 1, |
25 |
| - "filename": "layout-parser-paper.pdf", |
26 |
| - "filetype": "application/pdf", |
27 |
| - }, |
| 12 | +### `{ [k: string]: any }[]` |
| 13 | + |
| 14 | +```typescript |
| 15 | +const value: { [k: string]: any }[] = [ |
| 16 | + { |
| 17 | + "type": "Title", |
| 18 | + "element_id": "6aa0ff22f91bbe7e26e8e25ca8052acd", |
| 19 | + "text": |
| 20 | + "LayoutParser: A Unified Toolkit for Deep Learning Based Document Image Analysis", |
| 21 | + "metadata": { |
| 22 | + "languages": [ |
| 23 | + "eng", |
| 24 | + ], |
| 25 | + "page_number": 1, |
| 26 | + "filename": "layout-parser-paper.pdf", |
| 27 | + "filetype": "application/pdf", |
28 | 28 | },
|
29 |
| - ], |
30 |
| -}; |
| 29 | + }, |
| 30 | +]; |
31 | 31 | ```
|
32 | 32 |
|
33 |
| -## Fields |
34 |
| - |
35 |
| -| Field | Type | Required | Description | |
36 |
| -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | |
37 |
| -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | |
38 |
| -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | |
39 |
| -| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
40 |
| -| `csvElements` | *string* | :heavy_minus_sign: | Successful Response | |
41 |
| -| `elements` | Record<string, *any*>[] | :heavy_minus_sign: | Successful Response | |
0 commit comments