Skip to content

Commit

Permalink
chore: generated code for commit c2e9fb5. [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
  • Loading branch information
algolia-bot and shortcuts committed Nov 9, 2023
1 parent c2e9fb5 commit 5f885fb
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 34 deletions.
50 changes: 46 additions & 4 deletions clients/algoliasearch-client-go/algolia/ingestion/api_ingestion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@ export type GetEventsProps = {
* The order of the returned list.
*/
order?: OrderKeys;
/**
* The start date (in RFC3339 format) of the events fetching window. Defaults to \'now\'-3 hours if omitted.
*/
startDate?: string;
/**
* The end date (in RFC3339 format) of the events fetching window. Defaults to \'now\' days if omitted.
*/
endDate?: string;
};

/**
Expand Down Expand Up @@ -286,11 +294,11 @@ export type GetRunsProps = {
*/
order?: OrderKeys;
/**
* The start date (in RFC3339 format) of the runs fetching window. Defaults to \'now\'-7 days if omitted. The timespan between `startDate` and `endDate` must be smaller than 7 days.
* The start date (in RFC3339 format) of the runs fetching window. Defaults to \'now\'-7 days if omitted.
*/
startDate?: string;
/**
* The end date (in RFC3339 format) of the runs fetching window. Defaults to \'now\' days if omitted. The timespan between `startDate` and `endDate` must be smaller than 7 days.
* The end date (in RFC3339 format) of the runs fetching window. Defaults to \'now\' days if omitted.
*/
endDate?: string;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -945,10 +945,22 @@ export function createIngestionClient({
* @param getEvents.type - Filter the type of the events.
* @param getEvents.sort - The key by which the list should be sorted.
* @param getEvents.order - The order of the returned list.
* @param getEvents.startDate - The start date (in RFC3339 format) of the events fetching window. Defaults to \'now\'-3 hours if omitted.
* @param getEvents.endDate - The end date (in RFC3339 format) of the events fetching window. Defaults to \'now\' days if omitted.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getEvents(
{ runID, itemsPerPage, page, status, type, sort, order }: GetEventsProps,
{
runID,
itemsPerPage,
page,
status,
type,
sort,
order,
startDate,
endDate,
}: GetEventsProps,
requestOptions?: RequestOptions
): Promise<ListEventsResponse> {
if (!runID) {
Expand Down Expand Up @@ -988,6 +1000,14 @@ export function createIngestionClient({
queryParameters.order = order.toString();
}

if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}

if (endDate !== undefined) {
queryParameters.endDate = endDate.toString();
}

const request: Request = {
method: 'GET',
path: requestPath,
Expand Down Expand Up @@ -1042,8 +1062,8 @@ export function createIngestionClient({
* @param getRuns.taskID - Filter by taskID.
* @param getRuns.sort - The key by which the list should be sorted.
* @param getRuns.order - The order of the returned list.
* @param getRuns.startDate - The start date (in RFC3339 format) of the runs fetching window. Defaults to \'now\'-7 days if omitted. The timespan between `startDate` and `endDate` must be smaller than 7 days.
* @param getRuns.endDate - The end date (in RFC3339 format) of the runs fetching window. Defaults to \'now\' days if omitted. The timespan between `startDate` and `endDate` must be smaller than 7 days.
* @param getRuns.startDate - The start date (in RFC3339 format) of the runs fetching window. Defaults to \'now\'-7 days if omitted.
* @param getRuns.endDate - The end date (in RFC3339 format) of the runs fetching window. Defaults to \'now\' days if omitted.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getRuns(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,11 @@ public class IngestionClient(
* @param type Filter the type of the events.
* @param sort The key by which the list should be sorted.
* @param order The order of the returned list.
* @param startDate The start date (in RFC3339 format) of the events fetching window. Defaults to 'now'-3 hours if omitted.
* @param endDate The end date (in RFC3339 format) of the events fetching window. Defaults to 'now' days if omitted.
* @param requestOptions additional request configuration.
*/
public suspend fun getEvents(runID: String, itemsPerPage: Int? = null, page: Int? = null, status: List<EventStatus>? = null, type: List<EventType>? = null, sort: EventSortKeys? = null, order: OrderKeys? = null, requestOptions: RequestOptions? = null): ListEventsResponse {
public suspend fun getEvents(runID: String, itemsPerPage: Int? = null, page: Int? = null, status: List<EventStatus>? = null, type: List<EventType>? = null, sort: EventSortKeys? = null, order: OrderKeys? = null, startDate: String? = null, endDate: String? = null, requestOptions: RequestOptions? = null): ListEventsResponse {
require(runID.isNotBlank()) { "Parameter `runID` is required when calling `getEvents`." }
val requestConfig = RequestConfig(
method = RequestMethod.GET,
Expand All @@ -410,6 +412,8 @@ public class IngestionClient(
type?.let { put("type", it.joinToString(",")) }
sort?.let { put("sort", it) }
order?.let { put("order", it) }
startDate?.let { put("startDate", it) }
endDate?.let { put("endDate", it) }
},
)
return requester.execute(
Expand Down Expand Up @@ -445,8 +449,8 @@ public class IngestionClient(
* @param taskID Filter by taskID.
* @param sort The key by which the list should be sorted.
* @param order The order of the returned list.
* @param startDate The start date (in RFC3339 format) of the runs fetching window. Defaults to 'now'-7 days if omitted. The timespan between `startDate` and `endDate` must be smaller than 7 days.
* @param endDate The end date (in RFC3339 format) of the runs fetching window. Defaults to 'now' days if omitted. The timespan between `startDate` and `endDate` must be smaller than 7 days.
* @param startDate The start date (in RFC3339 format) of the runs fetching window. Defaults to 'now'-7 days if omitted.
* @param endDate The end date (in RFC3339 format) of the runs fetching window. Defaults to 'now' days if omitted.
* @param requestOptions additional request configuration.
*/
public suspend fun getRuns(itemsPerPage: Int? = null, page: Int? = null, status: List<RunStatus>? = null, taskID: String? = null, sort: RunSortKeys? = null, order: OrderKeys? = null, startDate: String? = null, endDate: String? = null, requestOptions: RequestOptions? = null): RunListResponse {
Expand Down
50 changes: 28 additions & 22 deletions specs/bundled/ingestion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,26 +254,6 @@ components:
required: false
schema:
$ref: '#/components/schemas/runSortKeys'
startDate:
name: startDate
in: query
description: >
The start date (in RFC3339 format) of the runs fetching window.
Defaults to 'now'-7 days if omitted. The timespan between `startDate`
and `endDate` must be smaller than 7 days.
schema:
type: string
endDate:
name: endDate
in: query
description: >
The end date (in RFC3339 format) of the runs fetching window.
Defaults to 'now' days if omitted. The timespan between `startDate` and
`endDate` must be smaller than 7 days.
schema:
type: string
pathRunID:
name: runID
in: path
Expand Down Expand Up @@ -2530,8 +2510,20 @@ paths:
- $ref: '#/components/parameters/taskID'
- $ref: '#/components/parameters/runSort'
- $ref: '#/components/parameters/order'
- $ref: '#/components/parameters/startDate'
- $ref: '#/components/parameters/endDate'
- name: startDate
in: query
description: >-
The start date (in RFC3339 format) of the runs fetching window.
Defaults to 'now'-7 days if omitted.
schema:
type: string
- name: endDate
in: query
description: >-
The end date (in RFC3339 format) of the runs fetching window.
Defaults to 'now' days if omitted.
schema:
type: string
responses:
'200':
description: OK
Expand Down Expand Up @@ -2576,6 +2568,20 @@ paths:
- $ref: '#/components/parameters/eventType'
- $ref: '#/components/parameters/eventSort'
- $ref: '#/components/parameters/order'
- name: startDate
in: query
description: >-
The start date (in RFC3339 format) of the events fetching window.
Defaults to 'now'-3 hours if omitted.
schema:
type: string
- name: endDate
in: query
description: >-
The end date (in RFC3339 format) of the events fetching window.
Defaults to 'now' days if omitted.
schema:
type: string
responses:
'200':
description: OK
Expand Down

0 comments on commit 5f885fb

Please sign in to comment.