Skip to content

Commit c75e419

Browse files
feat(api): update via SDK Studio
1 parent b12adb3 commit c75e419

File tree

7 files changed

+128
-128
lines changed

7 files changed

+128
-128
lines changed

api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Methods:
1212

1313
Types:
1414

15-
- <code><a href="./src/resources/collections.ts">CollectionListResponse</a></code>
1615
- <code><a href="./src/resources/collections.ts">CollectionAddCollectionResponse</a></code>
1716
- <code><a href="./src/resources/collections.ts">CollectionDeleteCollectionResponse</a></code>
17+
- <code><a href="./src/resources/collections.ts">CollectionGetListResponse</a></code>
1818

1919
Methods:
2020

21-
- <code title="post /collections/get-collection-list">client.collections.<a href="./src/resources/collections.ts">list</a>() -> CollectionListResponse</code>
2221
- <code title="post /collections/add-collection">client.collections.<a href="./src/resources/collections.ts">addCollection</a>({ ...params }) -> CollectionAddCollectionResponse</code>
2322
- <code title="post /collections/delete-collection">client.collections.<a href="./src/resources/collections.ts">deleteCollection</a>({ ...params }) -> CollectionDeleteCollectionResponse</code>
23+
- <code title="post /collections/get-collection-list">client.collections.<a href="./src/resources/collections.ts">getList</a>() -> CollectionGetListResponse</code>
2424

2525
# Documents
2626

@@ -29,16 +29,16 @@ Types:
2929
- <code><a href="./src/resources/documents.ts">DocumentAddDocumentResponse</a></code>
3030
- <code><a href="./src/resources/documents.ts">DocumentDeleteDocumentResponse</a></code>
3131
- <code><a href="./src/resources/documents.ts">DocumentGetInfoResponse</a></code>
32+
- <code><a href="./src/resources/documents.ts">DocumentGetInfoListResponse</a></code>
3233
- <code><a href="./src/resources/documents.ts">DocumentGetPageInfoResponse</a></code>
33-
- <code><a href="./src/resources/documents.ts">DocumentListInfoResponse</a></code>
3434

3535
Methods:
3636

3737
- <code title="post /documents/add-document">client.documents.<a href="./src/resources/documents.ts">addDocument</a>({ ...params }) -> DocumentAddDocumentResponse</code>
3838
- <code title="post /documents/delete-document">client.documents.<a href="./src/resources/documents.ts">deleteDocument</a>({ ...params }) -> DocumentDeleteDocumentResponse</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>
4041
- <code title="post /documents/get-page-info">client.documents.<a href="./src/resources/documents.ts">getPageInfo</a>({ ...params }) -> DocumentGetPageInfoResponse</code>
41-
- <code title="post /documents/get-document-info-list">client.documents.<a href="./src/resources/documents.ts">listInfo</a>({ ...params }) -> DocumentListInfoResponse</code>
4242

4343
# Queries
4444

src/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ import {
1010
CollectionAddCollectionResponse,
1111
CollectionDeleteCollectionParams,
1212
CollectionDeleteCollectionResponse,
13-
CollectionListParams,
14-
CollectionListResponse,
13+
CollectionGetListParams,
14+
CollectionGetListResponse,
1515
Collections,
1616
} from './resources/collections';
1717
import {
1818
DocumentAddDocumentParams,
1919
DocumentAddDocumentResponse,
2020
DocumentDeleteDocumentParams,
2121
DocumentDeleteDocumentResponse,
22+
DocumentGetInfoListParams,
23+
DocumentGetInfoListResponse,
2224
DocumentGetInfoParams,
2325
DocumentGetInfoResponse,
2426
DocumentGetPageInfoParams,
2527
DocumentGetPageInfoResponse,
26-
DocumentListInfoParams,
27-
DocumentListInfoResponse,
2828
Documents,
2929
} from './resources/documents';
3030
import { Models, StrJson } from './resources/models';
@@ -213,26 +213,26 @@ export declare namespace Zeroentropy {
213213

214214
export {
215215
Collections as Collections,
216-
type CollectionListResponse as CollectionListResponse,
217216
type CollectionAddCollectionResponse as CollectionAddCollectionResponse,
218217
type CollectionDeleteCollectionResponse as CollectionDeleteCollectionResponse,
219-
type CollectionListParams as CollectionListParams,
218+
type CollectionGetListResponse as CollectionGetListResponse,
220219
type CollectionAddCollectionParams as CollectionAddCollectionParams,
221220
type CollectionDeleteCollectionParams as CollectionDeleteCollectionParams,
221+
type CollectionGetListParams as CollectionGetListParams,
222222
};
223223

224224
export {
225225
Documents as Documents,
226226
type DocumentAddDocumentResponse as DocumentAddDocumentResponse,
227227
type DocumentDeleteDocumentResponse as DocumentDeleteDocumentResponse,
228228
type DocumentGetInfoResponse as DocumentGetInfoResponse,
229+
type DocumentGetInfoListResponse as DocumentGetInfoListResponse,
229230
type DocumentGetPageInfoResponse as DocumentGetPageInfoResponse,
230-
type DocumentListInfoResponse as DocumentListInfoResponse,
231231
type DocumentAddDocumentParams as DocumentAddDocumentParams,
232232
type DocumentDeleteDocumentParams as DocumentDeleteDocumentParams,
233233
type DocumentGetInfoParams as DocumentGetInfoParams,
234+
type DocumentGetInfoListParams as DocumentGetInfoListParams,
234235
type DocumentGetPageInfoParams as DocumentGetPageInfoParams,
235-
type DocumentListInfoParams as DocumentListInfoParams,
236236
};
237237

238238
export {

src/resources/collections.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ import { APIResource } from '../resource';
44
import * as Core from '../core';
55

66
export class Collections extends APIResource {
7-
/**
8-
* Gets a complete list of all of your collections.
9-
*/
10-
list(
11-
body?: CollectionListParams | null | undefined,
12-
options?: Core.RequestOptions,
13-
): Core.APIPromise<CollectionListResponse> {
14-
return this._client.post('/collections/get-collection-list', { body, ...options });
15-
}
16-
177
/**
188
* Adds a collection.
199
*
@@ -38,13 +28,16 @@ export class Collections extends APIResource {
3828
): Core.APIPromise<CollectionDeleteCollectionResponse> {
3929
return this._client.post('/collections/delete-collection', { body, ...options });
4030
}
41-
}
4231

43-
export interface CollectionListResponse {
4432
/**
45-
* The names of the matched collections.
33+
* Gets a complete list of all of your collections.
4634
*/
47-
collection_names: Array<string>;
35+
getList(
36+
body?: CollectionGetListParams | null | undefined,
37+
options?: Core.RequestOptions,
38+
): Core.APIPromise<CollectionGetListResponse> {
39+
return this._client.post('/collections/get-collection-list', { body, ...options });
40+
}
4841
}
4942

5043
export interface CollectionAddCollectionResponse {
@@ -61,7 +54,12 @@ export interface CollectionDeleteCollectionResponse {
6154
message?: string;
6255
}
6356

64-
export interface CollectionListParams {}
57+
export interface CollectionGetListResponse {
58+
/**
59+
* The names of the matched collections.
60+
*/
61+
collection_names: Array<string>;
62+
}
6563

6664
export interface CollectionAddCollectionParams {
6765
/**
@@ -79,13 +77,15 @@ export interface CollectionDeleteCollectionParams {
7977
collection_name: string;
8078
}
8179

80+
export interface CollectionGetListParams {}
81+
8282
export declare namespace Collections {
8383
export {
84-
type CollectionListResponse as CollectionListResponse,
8584
type CollectionAddCollectionResponse as CollectionAddCollectionResponse,
8685
type CollectionDeleteCollectionResponse as CollectionDeleteCollectionResponse,
87-
type CollectionListParams as CollectionListParams,
86+
type CollectionGetListResponse as CollectionGetListResponse,
8887
type CollectionAddCollectionParams as CollectionAddCollectionParams,
8988
type CollectionDeleteCollectionParams as CollectionDeleteCollectionParams,
89+
type CollectionGetListParams as CollectionGetListParams,
9090
};
9191
}

src/resources/documents.ts

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
132157
export 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-
199199
export 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+
318337
export 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-
376376
export 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
}

src/resources/index.ts

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

33
export {
44
Collections,
5-
type CollectionListResponse,
65
type CollectionAddCollectionResponse,
76
type CollectionDeleteCollectionResponse,
8-
type CollectionListParams,
7+
type CollectionGetListResponse,
98
type CollectionAddCollectionParams,
109
type CollectionDeleteCollectionParams,
10+
type CollectionGetListParams,
1111
} from './collections';
1212
export {
1313
Documents,
1414
type DocumentAddDocumentResponse,
1515
type DocumentDeleteDocumentResponse,
1616
type DocumentGetInfoResponse,
17+
type DocumentGetInfoListResponse,
1718
type DocumentGetPageInfoResponse,
18-
type DocumentListInfoResponse,
1919
type DocumentAddDocumentParams,
2020
type DocumentDeleteDocumentParams,
2121
type DocumentGetInfoParams,
22+
type DocumentGetInfoListParams,
2223
type DocumentGetPageInfoParams,
23-
type DocumentListInfoParams,
2424
} from './documents';
2525
export { Models, type StrJson } from './models';
2626
export { Parsers, type ParserParseResponse, type ParserParseParams } from './parsers';

0 commit comments

Comments
 (0)