Skip to content

Commit e444c1c

Browse files
feat(api): update via SDK Studio
1 parent 85d6bde commit e444c1c

File tree

4 files changed

+31
-33
lines changed

4 files changed

+31
-33
lines changed

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Methods:
3737
- <code title="post /documents/delete-document">client.documents.<a href="./src/resources/documents.ts">delete</a>({ ...params }) -> DocumentDeleteResponse</code>
3838
- <code title="post /documents/add-document">client.documents.<a href="./src/resources/documents.ts">add</a>({ ...params }) -> DocumentAddResponse</code>
3939
- <code title="post /documents/get-document-info">client.documents.<a href="./src/resources/documents.ts">getInfo</a>({ ...params }) -> DocumentGetInfoResponse</code>
40-
- <code title="post /documents/get-document-info-list">client.documents.<a href="./src/resources/documents.ts">getInfoList</a>({ ...params }) -> DocumentGetInfoListResponse</code>
40+
- <code title="post /documents/get-document-info-list">client.documents.<a href="./src/resources/documents.ts">getInfoList</a>({ ...params }) -> DocumentGetInfoListResponsesGetDocumentInfoListCursor</code>
4141
- <code title="post /documents/get-page-info">client.documents.<a href="./src/resources/documents.ts">getPageInfo</a>({ ...params }) -> DocumentGetPageInfoResponse</code>
4242

4343
# Queries

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
DocumentDeleteResponse,
2424
DocumentGetInfoListParams,
2525
DocumentGetInfoListResponse,
26+
DocumentGetInfoListResponsesGetDocumentInfoListCursor,
2627
DocumentGetInfoParams,
2728
DocumentGetInfoResponse,
2829
DocumentGetPageInfoParams,
@@ -201,6 +202,8 @@ export class Zeroentropy extends Core.APIClient {
201202
Zeroentropy.Status = Status;
202203
Zeroentropy.Collections = Collections;
203204
Zeroentropy.Documents = Documents;
205+
Zeroentropy.DocumentGetInfoListResponsesGetDocumentInfoListCursor =
206+
DocumentGetInfoListResponsesGetDocumentInfoListCursor;
204207
Zeroentropy.Queries = Queries;
205208
Zeroentropy.Parsers = Parsers;
206209
Zeroentropy.Models = Models;
@@ -236,6 +239,7 @@ export declare namespace Zeroentropy {
236239
type DocumentGetInfoResponse as DocumentGetInfoResponse,
237240
type DocumentGetInfoListResponse as DocumentGetInfoListResponse,
238241
type DocumentGetPageInfoResponse as DocumentGetPageInfoResponse,
242+
DocumentGetInfoListResponsesGetDocumentInfoListCursor as DocumentGetInfoListResponsesGetDocumentInfoListCursor,
239243
type DocumentDeleteParams as DocumentDeleteParams,
240244
type DocumentAddParams as DocumentAddParams,
241245
type DocumentGetInfoParams as DocumentGetInfoParams,

src/resources/documents.ts

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { APIResource } from '../resource';
44
import * as Core from '../core';
5+
import { GetDocumentInfoListCursor, type GetDocumentInfoListCursorParams } from '../pagination';
56

67
export class Documents extends APIResource {
78
/**
@@ -60,8 +61,12 @@ export class Documents extends APIResource {
6061
getInfoList(
6162
body: DocumentGetInfoListParams,
6263
options?: Core.RequestOptions,
63-
): Core.APIPromise<DocumentGetInfoListResponse> {
64-
return this._client.post('/documents/get-document-info-list', { body, ...options });
64+
): Core.PagePromise<DocumentGetInfoListResponsesGetDocumentInfoListCursor, DocumentGetInfoListResponse> {
65+
return this._client.getAPIList(
66+
'/documents/get-document-info-list',
67+
DocumentGetInfoListResponsesGetDocumentInfoListCursor,
68+
{ body, method: 'post', ...options },
69+
);
6570
}
6671

6772
/**
@@ -79,6 +84,8 @@ export class Documents extends APIResource {
7984
}
8085
}
8186

87+
export class DocumentGetInfoListResponsesGetDocumentInfoListCursor extends GetDocumentInfoListCursor<DocumentGetInfoListResponse> {}
88+
8289
export interface DocumentDeleteResponse {
8390
/**
8491
* This string will always be "Success!". This may change in the future.
@@ -124,28 +131,22 @@ export namespace DocumentGetInfoResponse {
124131
}
125132

126133
export interface DocumentGetInfoListResponse {
127-
documents: Array<DocumentGetInfoListResponse.Document>;
128-
}
134+
id: string;
129135

130-
export namespace DocumentGetInfoListResponse {
131-
export interface Document {
132-
id: string;
133-
134-
collection_name: string;
136+
collection_name: string;
135137

136-
index_status: 'parsing_failed' | 'not_parsed' | 'not_indexed' | 'indexing' | 'indexed';
138+
index_status: 'parsing_failed' | 'not_parsed' | 'not_indexed' | 'indexing' | 'indexed';
137139

138-
metadata: Record<string, string | Array<string>>;
140+
metadata: Record<string, string | Array<string>>;
139141

140-
/**
141-
* The number of pages in this document. This will be `null` if the document is
142-
* parsing or failed to parse. It can also be `null` if the document is a filetype
143-
* that does not support pages.
144-
*/
145-
num_pages: number | null;
142+
/**
143+
* The number of pages in this document. This will be `null` if the document is
144+
* parsing or failed to parse. It can also be `null` if the document is a filetype
145+
* that does not support pages.
146+
*/
147+
num_pages: number | null;
146148

147-
path: string;
148-
}
149+
path: string;
149150
}
150151

151152
export interface DocumentGetPageInfoResponse {
@@ -309,23 +310,11 @@ export interface DocumentGetInfoParams {
309310
include_content?: boolean;
310311
}
311312

312-
export interface DocumentGetInfoListParams {
313+
export interface DocumentGetInfoListParams extends GetDocumentInfoListCursorParams {
313314
/**
314315
* The name of the collection.
315316
*/
316317
collection_name: string;
317-
318-
/**
319-
* All documents returned will have a UUID strictly greater than the provided UUID.
320-
* (Comparison will be on the binary representations of the UUIDs)
321-
*/
322-
id_gt?: string | null;
323-
324-
/**
325-
* The maximum number of documents to return. This field is by default 1024, and
326-
* cannot be set larger than 1024
327-
*/
328-
limit?: number;
329318
}
330319

331320
export interface DocumentGetPageInfoParams {
@@ -367,13 +356,17 @@ export interface DocumentGetPageInfoParams {
367356
include_image?: boolean;
368357
}
369358

359+
Documents.DocumentGetInfoListResponsesGetDocumentInfoListCursor =
360+
DocumentGetInfoListResponsesGetDocumentInfoListCursor;
361+
370362
export declare namespace Documents {
371363
export {
372364
type DocumentDeleteResponse as DocumentDeleteResponse,
373365
type DocumentAddResponse as DocumentAddResponse,
374366
type DocumentGetInfoResponse as DocumentGetInfoResponse,
375367
type DocumentGetInfoListResponse as DocumentGetInfoListResponse,
376368
type DocumentGetPageInfoResponse as DocumentGetPageInfoResponse,
369+
DocumentGetInfoListResponsesGetDocumentInfoListCursor as DocumentGetInfoListResponsesGetDocumentInfoListCursor,
377370
type DocumentDeleteParams as DocumentDeleteParams,
378371
type DocumentAddParams as DocumentAddParams,
379372
type DocumentGetInfoParams as DocumentGetInfoParams,

src/resources/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export {
1010
type CollectionGetListParams,
1111
} from './collections';
1212
export {
13+
DocumentGetInfoListResponsesGetDocumentInfoListCursor,
1314
Documents,
1415
type DocumentDeleteResponse,
1516
type DocumentAddResponse,

0 commit comments

Comments
 (0)