Skip to content

Commit 1054a5c

Browse files
algolia-botmillotp
andcommitted
chore: generated code for commit b4d183f. [skip ci]
Co-authored-by: Pierre Millot <[email protected]>
1 parent b4d183f commit 1054a5c

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

clients/algoliasearch-client-javascript/packages/ingestion/model/clientMethodProps.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,14 @@ export type GetEventsProps = {
183183
* The run UUID.
184184
*/
185185
runID: string;
186+
/**
187+
* The number of items per page to return.
188+
*/
189+
itemsPerPage?: number;
190+
/**
191+
* The page number to fetch, starting at 1.
192+
*/
193+
page?: number;
186194
/**
187195
* Filter the status of the events.
188196
*/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
22

33
import type { Event } from './event';
4+
import type { Pagination } from './pagination';
45

56
export type ListEventsResponse = {
67
events: Event[];
8+
9+
pagination: Pagination;
710
};

clients/algoliasearch-client-javascript/packages/ingestion/src/ingestionClient.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,14 +795,16 @@ export function createIngestionClient({
795795
* @summary Get a list of events.
796796
* @param getEvents - The getEvents object.
797797
* @param getEvents.runID - The run UUID.
798+
* @param getEvents.itemsPerPage - The number of items per page to return.
799+
* @param getEvents.page - The page number to fetch, starting at 1.
798800
* @param getEvents.status - Filter the status of the events.
799801
* @param getEvents.type - Filter the type of the events.
800802
* @param getEvents.sort - The key by which the list should be sorted.
801803
* @param getEvents.order - The order of the returned list.
802804
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
803805
*/
804806
getEvents(
805-
{ runID, status, type, sort, order }: GetEventsProps,
807+
{ runID, itemsPerPage, page, status, type, sort, order }: GetEventsProps,
806808
requestOptions?: RequestOptions
807809
): Promise<ListEventsResponse> {
808810
if (!runID) {
@@ -818,6 +820,14 @@ export function createIngestionClient({
818820
const headers: Headers = {};
819821
const queryParameters: QueryParameters = {};
820822

823+
if (itemsPerPage !== undefined) {
824+
queryParameters.itemsPerPage = itemsPerPage.toString();
825+
}
826+
827+
if (page !== undefined) {
828+
queryParameters.page = page.toString();
829+
}
830+
821831
if (status !== undefined) {
822832
queryParameters.status = status.toString();
823833
}

specs/bundled/ingestion.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,6 +2003,8 @@ paths:
20032003
operationId: getEvents
20042004
parameters:
20052005
- $ref: '#/components/parameters/pathRunID'
2006+
- $ref: '#/components/parameters/itemsPerPage'
2007+
- $ref: '#/components/parameters/page'
20062008
- $ref: '#/components/parameters/eventStatus'
20072009
- $ref: '#/components/parameters/eventType'
20082010
- $ref: '#/components/parameters/eventSort'
@@ -2021,8 +2023,11 @@ paths:
20212023
type: array
20222024
items:
20232025
$ref: '#/components/schemas/Event'
2026+
pagination:
2027+
$ref: '#/components/schemas/Pagination'
20242028
required:
20252029
- events
2030+
- pagination
20262031
'400':
20272032
$ref: '#/components/responses/BadRequest'
20282033
/1/runs/{runID}/events/{eventID}:

0 commit comments

Comments
 (0)