IPublisherDocumentsQueryV2
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Query for one page of documents at a time. It reads no content, so it lists every document whatever its content is.
export interface IPublisherDocumentsQueryV2
Methods
Method | Description |
|---|---|
(ALPHA) Starts the query. | |
(ALPHA) Sets filter for the query. | |
(ALPHA) Sets origin for the query. | |
(ALPHA) Sets starting page for the query. | |
(ALPHA) Sets number of documents to return per page. Default size: 50 | |
(ALPHA) Sets sorting for the query. |
Method details
IPublisherDocumentsQueryV2.query()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Starts the query.
query(): Promise<IPublisherDocumentsQueryResultV2>;
Returns
Promise<IPublisherDocumentsQueryResultV2>
promise of first page of the results
IPublisherDocumentsQueryV2.withFilter()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Sets filter for the query.
withFilter(filter: IFilterBaseOptions): IPublisherDocumentsQueryV2;
Parameters
Parameter | Type | Description |
|---|---|---|
filter | filter to apply |
Returns
Remarks
Documents can be neither hidden nor certified: asking for hidden or certified documents returns none, and asking for visible or uncertified ones does not narrow the result.
IPublisherDocumentsQueryV2.withOrigin()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Sets origin for the query.
withOrigin(origin: ObjectOrigin | (string & {})): IPublisherDocumentsQueryV2;
Parameters
Parameter | Type | Description |
|---|---|---|
origin | ObjectOrigin | (string & {}) | origin to apply |
Returns
IPublisherDocumentsQueryV2.withPage()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Sets starting page for the query.
withPage(page: number): IPublisherDocumentsQueryV2;
Parameters
Parameter | Type | Description |
|---|---|---|
page | number | zero indexed, must be non-negative |
Returns
IPublisherDocumentsQueryV2.withSize()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Sets number of documents to return per page. Default size: 50
withSize(size: number): IPublisherDocumentsQueryV2;
Parameters
Parameter | Type | Description |
|---|---|---|
size | number | desired max number of documents per page must be a positive number |
Returns
IPublisherDocumentsQueryV2.withSorting()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Sets sorting for the query.
withSorting(sort: string[]): IPublisherDocumentsQueryV2;
Parameters
Parameter | Type | Description |
|---|---|---|
sort | string[] | sorting criteria in the format: property,(asc|desc) |
Returns