@@ -53,35 +53,35 @@ export class Documents extends APIResource {
5353 }
5454
5555 /**
56- * Retrieves information about a specific page. The request parameters define what
57- * information you would like to receive.
56+ * Retrives a list of document metadata information that matches the provided
57+ * filters.
58+ *
59+ * The documents returned will be sorted by ID in ascending order. `id_gt` can be
60+ * used for pagination, and should be set to the ID of the last document returned
61+ * in the previous call.
5862 *
5963 * A `404 Not Found` will be returned if either the collection name does not exist,
6064 * or the document path does not exist within the provided collection.
6165 */
62- getPageInfo (
63- body : DocumentGetPageInfoParams ,
66+ getInfoList (
67+ body : DocumentGetInfoListParams ,
6468 options ?: Core . RequestOptions ,
65- ) : Core . APIPromise < DocumentGetPageInfoResponse > {
66- return this . _client . post ( '/documents/get-page -info' , { body, ...options } ) ;
69+ ) : Core . APIPromise < DocumentGetInfoListResponse > {
70+ return this . _client . post ( '/documents/get-document -info-list ' , { body, ...options } ) ;
6771 }
6872
6973 /**
70- * Retrives a list of document metadata information that matches the provided
71- * filters.
72- *
73- * The documents returned will be sorted by ID in ascending order. `id_gt` can be
74- * used for pagination, and should be set to the ID of the last document returned
75- * in the previous call.
74+ * Retrieves information about a specific page. The request parameters define what
75+ * information you would like to receive.
7676 *
7777 * A `404 Not Found` will be returned if either the collection name does not exist,
7878 * or the document path does not exist within the provided collection.
7979 */
80- listInfo (
81- body : DocumentListInfoParams ,
80+ getPageInfo (
81+ body : DocumentGetPageInfoParams ,
8282 options ?: Core . RequestOptions ,
83- ) : Core . APIPromise < DocumentListInfoResponse > {
84- return this . _client . post ( '/documents/get-document -info-list ' , { body, ...options } ) ;
83+ ) : Core . APIPromise < DocumentGetPageInfoResponse > {
84+ return this . _client . post ( '/documents/get-page -info' , { body, ...options } ) ;
8585 }
8686}
8787
@@ -129,6 +129,31 @@ export namespace DocumentGetInfoResponse {
129129 }
130130}
131131
132+ export interface DocumentGetInfoListResponse {
133+ documents : Array < DocumentGetInfoListResponse . Document > ;
134+ }
135+
136+ export namespace DocumentGetInfoListResponse {
137+ export interface Document {
138+ id : string ;
139+
140+ collection_name : string ;
141+
142+ index_status : 'parsing_failed' | 'not_parsed' | 'not_indexed' | 'indexing' | 'indexed' ;
143+
144+ metadata : Record < string , string | Array < string > > ;
145+
146+ /**
147+ * The number of pages in this document. This will be `null` if the document is
148+ * parsing or failed to parse. It can also be `null` if the document is a filetype
149+ * that does not support pages.
150+ */
151+ num_pages : number | null ;
152+
153+ path : string ;
154+ }
155+ }
156+
132157export interface DocumentGetPageInfoResponse {
133158 page : DocumentGetPageInfoResponse . Page ;
134159}
@@ -171,31 +196,6 @@ export namespace DocumentGetPageInfoResponse {
171196 }
172197}
173198
174- export interface DocumentListInfoResponse {
175- documents : Array < DocumentListInfoResponse . Document > ;
176- }
177-
178- export namespace DocumentListInfoResponse {
179- export interface Document {
180- id : string ;
181-
182- collection_name : string ;
183-
184- index_status : 'parsing_failed' | 'not_parsed' | 'not_indexed' | 'indexing' | 'indexed' ;
185-
186- metadata : Record < string , string | Array < string > > ;
187-
188- /**
189- * The number of pages in this document. This will be `null` if the document is
190- * parsing or failed to parse. It can also be `null` if the document is a filetype
191- * that does not support pages.
192- */
193- num_pages : number | null ;
194-
195- path : string ;
196- }
197- }
198-
199199export interface DocumentAddDocumentParams {
200200 /**
201201 * The name of the collection to be used for this request. A `404 Not Found` status
@@ -315,6 +315,25 @@ export interface DocumentGetInfoParams {
315315 include_content ?: boolean ;
316316}
317317
318+ export interface DocumentGetInfoListParams {
319+ /**
320+ * The name of the collection.
321+ */
322+ collection_name : string ;
323+
324+ /**
325+ * All documents returned will have a UUID strictly greater than the provided UUID.
326+ * (Comparison will be on the binary representations of the UUIDs)
327+ */
328+ id_gt ?: string | null ;
329+
330+ /**
331+ * The maximum number of documents to return. This field is by default 1024, and
332+ * cannot be set larger than 1024
333+ */
334+ limit ?: number ;
335+ }
336+
318337export interface DocumentGetPageInfoParams {
319338 /**
320339 * The name of the collection.
@@ -354,36 +373,17 @@ export interface DocumentGetPageInfoParams {
354373 include_image ?: boolean ;
355374}
356375
357- export interface DocumentListInfoParams {
358- /**
359- * The name of the collection.
360- */
361- collection_name : string ;
362-
363- /**
364- * All documents returned will have a UUID strictly greater than the provided UUID.
365- * (Comparison will be on the binary representations of the UUIDs)
366- */
367- id_gt ?: string | null ;
368-
369- /**
370- * The maximum number of documents to return. This field is by default 1024, and
371- * cannot be set larger than 1024
372- */
373- limit ?: number ;
374- }
375-
376376export declare namespace Documents {
377377 export {
378378 type DocumentAddDocumentResponse as DocumentAddDocumentResponse ,
379379 type DocumentDeleteDocumentResponse as DocumentDeleteDocumentResponse ,
380380 type DocumentGetInfoResponse as DocumentGetInfoResponse ,
381+ type DocumentGetInfoListResponse as DocumentGetInfoListResponse ,
381382 type DocumentGetPageInfoResponse as DocumentGetPageInfoResponse ,
382- type DocumentListInfoResponse as DocumentListInfoResponse ,
383383 type DocumentAddDocumentParams as DocumentAddDocumentParams ,
384384 type DocumentDeleteDocumentParams as DocumentDeleteDocumentParams ,
385385 type DocumentGetInfoParams as DocumentGetInfoParams ,
386+ type DocumentGetInfoListParams as DocumentGetInfoListParams ,
386387 type DocumentGetPageInfoParams as DocumentGetPageInfoParams ,
387- type DocumentListInfoParams as DocumentListInfoParams ,
388388 } ;
389389}
0 commit comments