From 7b8b2917085c2d545ff5c97790282d98c3c1626c Mon Sep 17 00:00:00 2001 From: "convoy-sdk-bot[bot]" <307218117+convoy-sdk-bot[bot]@users.noreply.github.com> Date: Mon, 30 Nov 2026 10:41:40 +0000 Subject: [PATCH] feat: regenerate API client from OpenAPI spec --- src/Client/Api/DeliveryAttemptsApi.php | 48 +- src/Client/Api/EventDeliveriesApi.php | 130 ++++- src/Client/Api/EventsApi.php | 162 +++++-- .../Model/GetDeliveryAttempts200Response.php | 6 +- ...etDeliveryAttempts200ResponseAllOfData.php | 450 ++++++++++++++++++ ...iveryAttempts200ResponseAllOfDataOneOf.php | 450 ++++++++++++++++++ src/Client/Model/ModelsUpdateSource.php | 34 ++ 7 files changed, 1219 insertions(+), 61 deletions(-) create mode 100644 src/Client/Model/GetDeliveryAttempts200ResponseAllOfData.php create mode 100644 src/Client/Model/GetDeliveryAttempts200ResponseAllOfDataOneOf.php diff --git a/src/Client/Api/DeliveryAttemptsApi.php b/src/Client/Api/DeliveryAttemptsApi.php index e5f8ada..c4bc933 100644 --- a/src/Client/Api/DeliveryAttemptsApi.php +++ b/src/Client/Api/DeliveryAttemptsApi.php @@ -490,15 +490,17 @@ public function getDeliveryAttemptRequest($project_id, $event_delivery_id, $deli * * @param string $project_id Project ID (required) * @param string $event_delivery_id event delivery id (required) + * @param bool|null $paginated Return a page of ten attempts and next_cursor (optional) + * @param string|null $before Exclusive attempt cursor from next_cursor; requires paginated=true (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDeliveryAttempts'] to see the possible values for this operation * * @throws \Convoy\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Convoy\Client\Model\GetDeliveryAttempts200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response */ - public function getDeliveryAttempts($project_id, $event_delivery_id, string $contentType = self::contentTypes['getDeliveryAttempts'][0]) + public function getDeliveryAttempts($project_id, $event_delivery_id, $paginated = null, $before = null, string $contentType = self::contentTypes['getDeliveryAttempts'][0]) { - list($response) = $this->getDeliveryAttemptsWithHttpInfo($project_id, $event_delivery_id, $contentType); + list($response) = $this->getDeliveryAttemptsWithHttpInfo($project_id, $event_delivery_id, $paginated, $before, $contentType); return $response; } @@ -509,15 +511,17 @@ public function getDeliveryAttempts($project_id, $event_delivery_id, string $con * * @param string $project_id Project ID (required) * @param string $event_delivery_id event delivery id (required) + * @param bool|null $paginated Return a page of ten attempts and next_cursor (optional) + * @param string|null $before Exclusive attempt cursor from next_cursor; requires paginated=true (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDeliveryAttempts'] to see the possible values for this operation * * @throws \Convoy\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Convoy\Client\Model\GetDeliveryAttempts200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getDeliveryAttemptsWithHttpInfo($project_id, $event_delivery_id, string $contentType = self::contentTypes['getDeliveryAttempts'][0]) + public function getDeliveryAttemptsWithHttpInfo($project_id, $event_delivery_id, $paginated = null, $before = null, string $contentType = self::contentTypes['getDeliveryAttempts'][0]) { - $request = $this->getDeliveryAttemptsRequest($project_id, $event_delivery_id, $contentType); + $request = $this->getDeliveryAttemptsRequest($project_id, $event_delivery_id, $paginated, $before, $contentType); try { $options = $this->createHttpClientOption(); @@ -637,14 +641,16 @@ public function getDeliveryAttemptsWithHttpInfo($project_id, $event_delivery_id, * * @param string $project_id Project ID (required) * @param string $event_delivery_id event delivery id (required) + * @param bool|null $paginated Return a page of ten attempts and next_cursor (optional) + * @param string|null $before Exclusive attempt cursor from next_cursor; requires paginated=true (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDeliveryAttempts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDeliveryAttemptsAsync($project_id, $event_delivery_id, string $contentType = self::contentTypes['getDeliveryAttempts'][0]) + public function getDeliveryAttemptsAsync($project_id, $event_delivery_id, $paginated = null, $before = null, string $contentType = self::contentTypes['getDeliveryAttempts'][0]) { - return $this->getDeliveryAttemptsAsyncWithHttpInfo($project_id, $event_delivery_id, $contentType) + return $this->getDeliveryAttemptsAsyncWithHttpInfo($project_id, $event_delivery_id, $paginated, $before, $contentType) ->then( function ($response) { return $response[0]; @@ -659,15 +665,17 @@ function ($response) { * * @param string $project_id Project ID (required) * @param string $event_delivery_id event delivery id (required) + * @param bool|null $paginated Return a page of ten attempts and next_cursor (optional) + * @param string|null $before Exclusive attempt cursor from next_cursor; requires paginated=true (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDeliveryAttempts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDeliveryAttemptsAsyncWithHttpInfo($project_id, $event_delivery_id, string $contentType = self::contentTypes['getDeliveryAttempts'][0]) + public function getDeliveryAttemptsAsyncWithHttpInfo($project_id, $event_delivery_id, $paginated = null, $before = null, string $contentType = self::contentTypes['getDeliveryAttempts'][0]) { $returnType = '\Convoy\Client\Model\GetDeliveryAttempts200Response'; - $request = $this->getDeliveryAttemptsRequest($project_id, $event_delivery_id, $contentType); + $request = $this->getDeliveryAttemptsRequest($project_id, $event_delivery_id, $paginated, $before, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -710,12 +718,14 @@ function ($exception) { * * @param string $project_id Project ID (required) * @param string $event_delivery_id event delivery id (required) + * @param bool|null $paginated Return a page of ten attempts and next_cursor (optional) + * @param string|null $before Exclusive attempt cursor from next_cursor; requires paginated=true (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDeliveryAttempts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getDeliveryAttemptsRequest($project_id, $event_delivery_id, string $contentType = self::contentTypes['getDeliveryAttempts'][0]) + public function getDeliveryAttemptsRequest($project_id, $event_delivery_id, $paginated = null, $before = null, string $contentType = self::contentTypes['getDeliveryAttempts'][0]) { // verify the required parameter 'project_id' is set @@ -733,6 +743,8 @@ public function getDeliveryAttemptsRequest($project_id, $event_delivery_id, stri } + + $resourcePath = '/v1/projects/{projectID}/eventdeliveries/{eventDeliveryID}/deliveryattempts'; $formParams = []; $queryParams = []; @@ -740,6 +752,24 @@ public function getDeliveryAttemptsRequest($project_id, $event_delivery_id, stri $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $paginated, + 'paginated', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $before, + 'before', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params diff --git a/src/Client/Api/EventDeliveriesApi.php b/src/Client/Api/EventDeliveriesApi.php index 960b1c8..63a35b8 100644 --- a/src/Client/Api/EventDeliveriesApi.php +++ b/src/Client/Api/EventDeliveriesApi.php @@ -150,11 +150,14 @@ public function getConfig() * @param string|null $event_id Event ID to filter by (optional) * @param string|null $event_type EventType to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. Matches deliveries of events ingested with it. Not combinable with idempotencyKey. (optional) + * @param int|null $min_trials Only return deliveries with at least this many attempts; 2 or more means retried. Requires idempotencyValue, eventId, or endpointId. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches delivery id, event id, event type prefix, and endpoint name. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) + * @param string[]|null $source_id Limits idempotencyValue matching to these source IDs. (optional) * @param string|null $start_date The start date (optional) * @param string[]|null $status A list of event delivery statuses to filter by (optional) * @param string|null $subscription_id SubscriptionID to filter by (optional) @@ -164,9 +167,9 @@ public function getConfig() * @throws \InvalidArgumentException * @return \Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response */ - public function batchRetryEventDelivery($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['batchRetryEventDelivery'][0]) + public function batchRetryEventDelivery($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $idempotency_value = null, $min_trials = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['batchRetryEventDelivery'][0]) { - list($response) = $this->batchRetryEventDeliveryWithHttpInfo($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $start_date, $status, $subscription_id, $contentType); + list($response) = $this->batchRetryEventDeliveryWithHttpInfo($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $idempotency_value, $min_trials, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $status, $subscription_id, $contentType); return $response; } @@ -182,11 +185,14 @@ public function batchRetryEventDelivery($project_id, $direction = null, $end_dat * @param string|null $event_id Event ID to filter by (optional) * @param string|null $event_type EventType to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. Matches deliveries of events ingested with it. Not combinable with idempotencyKey. (optional) + * @param int|null $min_trials Only return deliveries with at least this many attempts; 2 or more means retried. Requires idempotencyValue, eventId, or endpointId. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches delivery id, event id, event type prefix, and endpoint name. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) + * @param string[]|null $source_id Limits idempotencyValue matching to these source IDs. (optional) * @param string|null $start_date The start date (optional) * @param string[]|null $status A list of event delivery statuses to filter by (optional) * @param string|null $subscription_id SubscriptionID to filter by (optional) @@ -196,9 +202,9 @@ public function batchRetryEventDelivery($project_id, $direction = null, $end_dat * @throws \InvalidArgumentException * @return array of \Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response, HTTP status code, HTTP response headers (array of strings) */ - public function batchRetryEventDeliveryWithHttpInfo($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['batchRetryEventDelivery'][0]) + public function batchRetryEventDeliveryWithHttpInfo($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $idempotency_value = null, $min_trials = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['batchRetryEventDelivery'][0]) { - $request = $this->batchRetryEventDeliveryRequest($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $start_date, $status, $subscription_id, $contentType); + $request = $this->batchRetryEventDeliveryRequest($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $idempotency_value, $min_trials, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $status, $subscription_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -323,11 +329,14 @@ public function batchRetryEventDeliveryWithHttpInfo($project_id, $direction = nu * @param string|null $event_id Event ID to filter by (optional) * @param string|null $event_type EventType to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. Matches deliveries of events ingested with it. Not combinable with idempotencyKey. (optional) + * @param int|null $min_trials Only return deliveries with at least this many attempts; 2 or more means retried. Requires idempotencyValue, eventId, or endpointId. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches delivery id, event id, event type prefix, and endpoint name. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) + * @param string[]|null $source_id Limits idempotencyValue matching to these source IDs. (optional) * @param string|null $start_date The start date (optional) * @param string[]|null $status A list of event delivery statuses to filter by (optional) * @param string|null $subscription_id SubscriptionID to filter by (optional) @@ -336,9 +345,9 @@ public function batchRetryEventDeliveryWithHttpInfo($project_id, $direction = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function batchRetryEventDeliveryAsync($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['batchRetryEventDelivery'][0]) + public function batchRetryEventDeliveryAsync($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $idempotency_value = null, $min_trials = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['batchRetryEventDelivery'][0]) { - return $this->batchRetryEventDeliveryAsyncWithHttpInfo($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $start_date, $status, $subscription_id, $contentType) + return $this->batchRetryEventDeliveryAsyncWithHttpInfo($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $idempotency_value, $min_trials, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $status, $subscription_id, $contentType) ->then( function ($response) { return $response[0]; @@ -358,11 +367,14 @@ function ($response) { * @param string|null $event_id Event ID to filter by (optional) * @param string|null $event_type EventType to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. Matches deliveries of events ingested with it. Not combinable with idempotencyKey. (optional) + * @param int|null $min_trials Only return deliveries with at least this many attempts; 2 or more means retried. Requires idempotencyValue, eventId, or endpointId. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches delivery id, event id, event type prefix, and endpoint name. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) + * @param string[]|null $source_id Limits idempotencyValue matching to these source IDs. (optional) * @param string|null $start_date The start date (optional) * @param string[]|null $status A list of event delivery statuses to filter by (optional) * @param string|null $subscription_id SubscriptionID to filter by (optional) @@ -371,10 +383,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function batchRetryEventDeliveryAsyncWithHttpInfo($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['batchRetryEventDelivery'][0]) + public function batchRetryEventDeliveryAsyncWithHttpInfo($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $idempotency_value = null, $min_trials = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['batchRetryEventDelivery'][0]) { $returnType = '\Convoy\Client\Model\GetProjects400Response'; - $request = $this->batchRetryEventDeliveryRequest($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $start_date, $status, $subscription_id, $contentType); + $request = $this->batchRetryEventDeliveryRequest($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $idempotency_value, $min_trials, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $status, $subscription_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -422,11 +434,14 @@ function ($exception) { * @param string|null $event_id Event ID to filter by (optional) * @param string|null $event_type EventType to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. Matches deliveries of events ingested with it. Not combinable with idempotencyKey. (optional) + * @param int|null $min_trials Only return deliveries with at least this many attempts; 2 or more means retried. Requires idempotencyValue, eventId, or endpointId. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches delivery id, event id, event type prefix, and endpoint name. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) + * @param string[]|null $source_id Limits idempotencyValue matching to these source IDs. (optional) * @param string|null $start_date The start date (optional) * @param string[]|null $status A list of event delivery statuses to filter by (optional) * @param string|null $subscription_id SubscriptionID to filter by (optional) @@ -435,7 +450,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function batchRetryEventDeliveryRequest($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['batchRetryEventDelivery'][0]) + public function batchRetryEventDeliveryRequest($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $idempotency_value = null, $min_trials = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['batchRetryEventDelivery'][0]) { // verify the required parameter 'project_id' is set @@ -460,6 +475,9 @@ public function batchRetryEventDeliveryRequest($project_id, $direction = null, $ + + + $resourcePath = '/v1/projects/{projectID}/eventdeliveries/batchretry'; $formParams = []; $queryParams = []; @@ -506,7 +524,7 @@ public function batchRetryEventDeliveryRequest($project_id, $direction = null, $ // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $event_type, - 'event_type', // param base name + 'eventType', // param base name 'string', // openApiType 'form', // style true, // explode @@ -522,6 +540,24 @@ public function batchRetryEventDeliveryRequest($project_id, $direction = null, $ false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $idempotency_value, + 'idempotencyValue', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $min_trials, + 'minTrials', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $next_page_cursor, 'next_page_cursor', // param base name @@ -567,6 +603,15 @@ public function batchRetryEventDeliveryRequest($project_id, $direction = null, $ false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $source_id, + 'sourceId', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $start_date, 'startDate', // param base name @@ -1007,11 +1052,14 @@ public function forceResendEventDeliveriesRequest($project_id, $models_ids, stri * @param string|null $event_id Event ID to filter by (optional) * @param string|null $event_type EventType to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. Matches deliveries of events ingested with it. Not combinable with idempotencyKey. (optional) + * @param int|null $min_trials Only return deliveries with at least this many attempts; 2 or more means retried. Requires idempotencyValue, eventId, or endpointId. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches delivery id, event id, event type prefix, and endpoint name. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) + * @param string[]|null $source_id Limits idempotencyValue matching to these source IDs. (optional) * @param string|null $start_date The start date (optional) * @param string[]|null $status A list of event delivery statuses to filter by (optional) * @param string|null $subscription_id SubscriptionID to filter by (optional) @@ -1021,9 +1069,9 @@ public function forceResendEventDeliveriesRequest($project_id, $models_ids, stri * @throws \InvalidArgumentException * @return \Convoy\Client\Model\GetEventDeliveriesPaged200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response */ - public function getEventDeliveriesPaged($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['getEventDeliveriesPaged'][0]) + public function getEventDeliveriesPaged($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $idempotency_value = null, $min_trials = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['getEventDeliveriesPaged'][0]) { - list($response) = $this->getEventDeliveriesPagedWithHttpInfo($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $start_date, $status, $subscription_id, $contentType); + list($response) = $this->getEventDeliveriesPagedWithHttpInfo($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $idempotency_value, $min_trials, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $status, $subscription_id, $contentType); return $response; } @@ -1039,11 +1087,14 @@ public function getEventDeliveriesPaged($project_id, $direction = null, $end_dat * @param string|null $event_id Event ID to filter by (optional) * @param string|null $event_type EventType to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. Matches deliveries of events ingested with it. Not combinable with idempotencyKey. (optional) + * @param int|null $min_trials Only return deliveries with at least this many attempts; 2 or more means retried. Requires idempotencyValue, eventId, or endpointId. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches delivery id, event id, event type prefix, and endpoint name. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) + * @param string[]|null $source_id Limits idempotencyValue matching to these source IDs. (optional) * @param string|null $start_date The start date (optional) * @param string[]|null $status A list of event delivery statuses to filter by (optional) * @param string|null $subscription_id SubscriptionID to filter by (optional) @@ -1053,9 +1104,9 @@ public function getEventDeliveriesPaged($project_id, $direction = null, $end_dat * @throws \InvalidArgumentException * @return array of \Convoy\Client\Model\GetEventDeliveriesPaged200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getEventDeliveriesPagedWithHttpInfo($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['getEventDeliveriesPaged'][0]) + public function getEventDeliveriesPagedWithHttpInfo($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $idempotency_value = null, $min_trials = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['getEventDeliveriesPaged'][0]) { - $request = $this->getEventDeliveriesPagedRequest($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $start_date, $status, $subscription_id, $contentType); + $request = $this->getEventDeliveriesPagedRequest($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $idempotency_value, $min_trials, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $status, $subscription_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1194,11 +1245,14 @@ public function getEventDeliveriesPagedWithHttpInfo($project_id, $direction = nu * @param string|null $event_id Event ID to filter by (optional) * @param string|null $event_type EventType to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. Matches deliveries of events ingested with it. Not combinable with idempotencyKey. (optional) + * @param int|null $min_trials Only return deliveries with at least this many attempts; 2 or more means retried. Requires idempotencyValue, eventId, or endpointId. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches delivery id, event id, event type prefix, and endpoint name. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) + * @param string[]|null $source_id Limits idempotencyValue matching to these source IDs. (optional) * @param string|null $start_date The start date (optional) * @param string[]|null $status A list of event delivery statuses to filter by (optional) * @param string|null $subscription_id SubscriptionID to filter by (optional) @@ -1207,9 +1261,9 @@ public function getEventDeliveriesPagedWithHttpInfo($project_id, $direction = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventDeliveriesPagedAsync($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['getEventDeliveriesPaged'][0]) + public function getEventDeliveriesPagedAsync($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $idempotency_value = null, $min_trials = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['getEventDeliveriesPaged'][0]) { - return $this->getEventDeliveriesPagedAsyncWithHttpInfo($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $start_date, $status, $subscription_id, $contentType) + return $this->getEventDeliveriesPagedAsyncWithHttpInfo($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $idempotency_value, $min_trials, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $status, $subscription_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1229,11 +1283,14 @@ function ($response) { * @param string|null $event_id Event ID to filter by (optional) * @param string|null $event_type EventType to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. Matches deliveries of events ingested with it. Not combinable with idempotencyKey. (optional) + * @param int|null $min_trials Only return deliveries with at least this many attempts; 2 or more means retried. Requires idempotencyValue, eventId, or endpointId. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches delivery id, event id, event type prefix, and endpoint name. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) + * @param string[]|null $source_id Limits idempotencyValue matching to these source IDs. (optional) * @param string|null $start_date The start date (optional) * @param string[]|null $status A list of event delivery statuses to filter by (optional) * @param string|null $subscription_id SubscriptionID to filter by (optional) @@ -1242,10 +1299,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventDeliveriesPagedAsyncWithHttpInfo($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['getEventDeliveriesPaged'][0]) + public function getEventDeliveriesPagedAsyncWithHttpInfo($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $idempotency_value = null, $min_trials = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['getEventDeliveriesPaged'][0]) { $returnType = '\Convoy\Client\Model\GetEventDeliveriesPaged200Response'; - $request = $this->getEventDeliveriesPagedRequest($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $start_date, $status, $subscription_id, $contentType); + $request = $this->getEventDeliveriesPagedRequest($project_id, $direction, $end_date, $endpoint_id, $event_id, $event_type, $idempotency_key, $idempotency_value, $min_trials, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $status, $subscription_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1293,11 +1350,14 @@ function ($exception) { * @param string|null $event_id Event ID to filter by (optional) * @param string|null $event_type EventType to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. Matches deliveries of events ingested with it. Not combinable with idempotencyKey. (optional) + * @param int|null $min_trials Only return deliveries with at least this many attempts; 2 or more means retried. Requires idempotencyValue, eventId, or endpointId. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches delivery id, event id, event type prefix, and endpoint name. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) + * @param string[]|null $source_id Limits idempotencyValue matching to these source IDs. (optional) * @param string|null $start_date The start date (optional) * @param string[]|null $status A list of event delivery statuses to filter by (optional) * @param string|null $subscription_id SubscriptionID to filter by (optional) @@ -1306,7 +1366,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEventDeliveriesPagedRequest($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['getEventDeliveriesPaged'][0]) + public function getEventDeliveriesPagedRequest($project_id, $direction = null, $end_date = null, $endpoint_id = null, $event_id = null, $event_type = null, $idempotency_key = null, $idempotency_value = null, $min_trials = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, $status = null, $subscription_id = null, string $contentType = self::contentTypes['getEventDeliveriesPaged'][0]) { // verify the required parameter 'project_id' is set @@ -1331,6 +1391,9 @@ public function getEventDeliveriesPagedRequest($project_id, $direction = null, $ + + + $resourcePath = '/v1/projects/{projectID}/eventdeliveries'; $formParams = []; $queryParams = []; @@ -1377,7 +1440,7 @@ public function getEventDeliveriesPagedRequest($project_id, $direction = null, $ // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $event_type, - 'event_type', // param base name + 'eventType', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1393,6 +1456,24 @@ public function getEventDeliveriesPagedRequest($project_id, $direction = null, $ false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $idempotency_value, + 'idempotencyValue', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $min_trials, + 'minTrials', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $next_page_cursor, 'next_page_cursor', // param base name @@ -1438,6 +1519,15 @@ public function getEventDeliveriesPagedRequest($project_id, $direction = null, $ false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $source_id, + 'sourceId', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $start_date, 'startDate', // param base name diff --git a/src/Client/Api/EventsApi.php b/src/Client/Api/EventsApi.php index 00883c1..8631b4d 100644 --- a/src/Client/Api/EventsApi.php +++ b/src/Client/Api/EventsApi.php @@ -161,10 +161,12 @@ public function getConfig() * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -172,11 +174,11 @@ public function getConfig() * * @throws \Convoy\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \Convoy\Client\Model\BatchReplayEvents200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response + * @return \Convoy\Client\Model\BatchReplayEvents200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response */ - public function batchReplayEvents($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['batchReplayEvents'][0]) + public function batchReplayEvents($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['batchReplayEvents'][0]) { - list($response) = $this->batchReplayEventsWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType); + list($response) = $this->batchReplayEventsWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType); return $response; } @@ -191,10 +193,12 @@ public function batchReplayEvents($project_id, $body = null, $direction = null, * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -202,11 +206,11 @@ public function batchReplayEvents($project_id, $body = null, $direction = null, * * @throws \Convoy\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \Convoy\Client\Model\BatchReplayEvents200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response, HTTP status code, HTTP response headers (array of strings) + * @return array of \Convoy\Client\Model\BatchReplayEvents200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response, HTTP status code, HTTP response headers (array of strings) */ - public function batchReplayEventsWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['batchReplayEvents'][0]) + public function batchReplayEventsWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['batchReplayEvents'][0]) { - $request = $this->batchReplayEventsRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType); + $request = $this->batchReplayEventsRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType); try { $options = $this->createHttpClientOption(); @@ -256,6 +260,12 @@ public function batchReplayEventsWithHttpInfo($project_id, $body = null, $direct $request, $response, ); + case 409: + return $this->handleResponseWithDataType( + '\Convoy\Client\Model\GetProjects400Response', + $request, + $response, + ); } @@ -312,6 +322,14 @@ public function batchReplayEventsWithHttpInfo($project_id, $body = null, $direct ); $e->setResponseObject($data); throw $e; + case 409: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Convoy\Client\Model\GetProjects400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -330,10 +348,12 @@ public function batchReplayEventsWithHttpInfo($project_id, $body = null, $direct * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -342,9 +362,9 @@ public function batchReplayEventsWithHttpInfo($project_id, $body = null, $direct * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function batchReplayEventsAsync($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['batchReplayEvents'][0]) + public function batchReplayEventsAsync($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['batchReplayEvents'][0]) { - return $this->batchReplayEventsAsyncWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType) + return $this->batchReplayEventsAsyncWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType) ->then( function ($response) { return $response[0]; @@ -363,10 +383,12 @@ function ($response) { * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -375,10 +397,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function batchReplayEventsAsyncWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['batchReplayEvents'][0]) + public function batchReplayEventsAsyncWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['batchReplayEvents'][0]) { $returnType = '\Convoy\Client\Model\BatchReplayEvents200Response'; - $request = $this->batchReplayEventsRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType); + $request = $this->batchReplayEventsRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -425,10 +447,12 @@ function ($exception) { * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -437,7 +461,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function batchReplayEventsRequest($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['batchReplayEvents'][0]) + public function batchReplayEventsRequest($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['batchReplayEvents'][0]) { // verify the required parameter 'project_id' is set @@ -460,6 +484,8 @@ public function batchReplayEventsRequest($project_id, $body = null, $direction = + + $resourcePath = '/v1/projects/{projectID}/events/batchreplay'; $formParams = []; $queryParams = []; @@ -513,6 +539,15 @@ public function batchReplayEventsRequest($project_id, $body = null, $direction = false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $idempotency_value, + 'idempotencyValue', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $next_page_cursor, 'next_page_cursor', // param base name @@ -549,6 +584,15 @@ public function batchReplayEventsRequest($project_id, $body = null, $direction = false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query_mode, + 'queryMode', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sort, 'sort', // param base name @@ -655,10 +699,12 @@ public function batchReplayEventsRequest($project_id, $body = null, $direction = * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -668,9 +714,9 @@ public function batchReplayEventsRequest($project_id, $body = null, $direction = * @throws \InvalidArgumentException * @return \Convoy\Client\Model\CountAffectedEvents200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response */ - public function countAffectedEvents($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['countAffectedEvents'][0]) + public function countAffectedEvents($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['countAffectedEvents'][0]) { - list($response) = $this->countAffectedEventsWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType); + list($response) = $this->countAffectedEventsWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType); return $response; } @@ -685,10 +731,12 @@ public function countAffectedEvents($project_id, $body = null, $direction = null * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -698,9 +746,9 @@ public function countAffectedEvents($project_id, $body = null, $direction = null * @throws \InvalidArgumentException * @return array of \Convoy\Client\Model\CountAffectedEvents200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response, HTTP status code, HTTP response headers (array of strings) */ - public function countAffectedEventsWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['countAffectedEvents'][0]) + public function countAffectedEventsWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['countAffectedEvents'][0]) { - $request = $this->countAffectedEventsRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType); + $request = $this->countAffectedEventsRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType); try { $options = $this->createHttpClientOption(); @@ -824,10 +872,12 @@ public function countAffectedEventsWithHttpInfo($project_id, $body = null, $dire * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -836,9 +886,9 @@ public function countAffectedEventsWithHttpInfo($project_id, $body = null, $dire * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function countAffectedEventsAsync($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['countAffectedEvents'][0]) + public function countAffectedEventsAsync($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['countAffectedEvents'][0]) { - return $this->countAffectedEventsAsyncWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType) + return $this->countAffectedEventsAsyncWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType) ->then( function ($response) { return $response[0]; @@ -857,10 +907,12 @@ function ($response) { * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -869,10 +921,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function countAffectedEventsAsyncWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['countAffectedEvents'][0]) + public function countAffectedEventsAsyncWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['countAffectedEvents'][0]) { $returnType = '\Convoy\Client\Model\CountAffectedEvents200Response'; - $request = $this->countAffectedEventsRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType); + $request = $this->countAffectedEventsRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -919,10 +971,12 @@ function ($exception) { * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -931,7 +985,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function countAffectedEventsRequest($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['countAffectedEvents'][0]) + public function countAffectedEventsRequest($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['countAffectedEvents'][0]) { // verify the required parameter 'project_id' is set @@ -954,6 +1008,8 @@ public function countAffectedEventsRequest($project_id, $body = null, $direction + + $resourcePath = '/v1/projects/{projectID}/events/countbatchreplayevents'; $formParams = []; $queryParams = []; @@ -1007,6 +1063,15 @@ public function countAffectedEventsRequest($project_id, $body = null, $direction false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $idempotency_value, + 'idempotencyValue', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $next_page_cursor, 'next_page_cursor', // param base name @@ -1043,6 +1108,15 @@ public function countAffectedEventsRequest($project_id, $body = null, $direction false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query_mode, + 'queryMode', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sort, 'sort', // param base name @@ -2815,10 +2889,12 @@ public function getEndpointEventRequest($project_id, $event_id, string $contentT * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -2828,9 +2904,9 @@ public function getEndpointEventRequest($project_id, $event_id, string $contentT * @throws \InvalidArgumentException * @return \Convoy\Client\Model\GetEventsPaged200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response */ - public function getEventsPaged($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['getEventsPaged'][0]) + public function getEventsPaged($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['getEventsPaged'][0]) { - list($response) = $this->getEventsPagedWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType); + list($response) = $this->getEventsPagedWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType); return $response; } @@ -2845,10 +2921,12 @@ public function getEventsPaged($project_id, $body = null, $direction = null, $en * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -2858,9 +2936,9 @@ public function getEventsPaged($project_id, $body = null, $direction = null, $en * @throws \InvalidArgumentException * @return array of \Convoy\Client\Model\GetEventsPaged200Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getEventsPagedWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['getEventsPaged'][0]) + public function getEventsPagedWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['getEventsPaged'][0]) { - $request = $this->getEventsPagedRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType); + $request = $this->getEventsPagedRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType); try { $options = $this->createHttpClientOption(); @@ -3012,10 +3090,12 @@ public function getEventsPagedWithHttpInfo($project_id, $body = null, $direction * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -3024,9 +3104,9 @@ public function getEventsPagedWithHttpInfo($project_id, $body = null, $direction * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventsPagedAsync($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['getEventsPaged'][0]) + public function getEventsPagedAsync($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['getEventsPaged'][0]) { - return $this->getEventsPagedAsyncWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType) + return $this->getEventsPagedAsyncWithHttpInfo($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType) ->then( function ($response) { return $response[0]; @@ -3045,10 +3125,12 @@ function ($response) { * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -3057,10 +3139,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventsPagedAsyncWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['getEventsPaged'][0]) + public function getEventsPagedAsyncWithHttpInfo($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['getEventsPaged'][0]) { $returnType = '\Convoy\Client\Model\GetEventsPaged200Response'; - $request = $this->getEventsPagedRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $next_page_cursor, $per_page, $prev_page_cursor, $query, $sort, $source_id, $start_date, $contentType); + $request = $this->getEventsPagedRequest($project_id, $body, $direction, $end_date, $endpoint_id, $idempotency_key, $idempotency_value, $next_page_cursor, $per_page, $prev_page_cursor, $query, $query_mode, $sort, $source_id, $start_date, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3107,10 +3189,12 @@ function ($exception) { * @param string|null $end_date The end date (optional) * @param string[]|null $endpoint_id A list of endpoint ids to filter by (optional) * @param string|null $idempotency_key IdempotencyKey to filter by (optional) + * @param string|null $idempotency_value Raw value of a source's single idempotency key location, e.g. a provider delivery ID. List only; pass sourceId if several sources qualify. Not combinable with idempotencyKey. (optional) * @param string|null $next_page_cursor A pagination cursor to fetch the next page of a list (optional) * @param int|null $per_page The number of items to return per page (optional) * @param string|null $prev_page_cursor A pagination cursor to fetch the previous page of a list (optional) * @param string|null $query Matches event id prefix, idempotency key, event type, and source name. A JSON object uses payload containment, same as body. Text plus JSON ANDs both. (optional) + * @param string|null $query_mode Set to text to search metadata literally, without interpreting JSON in query. (optional) * @param string|null $sort Sort order, values are `ASC` or `DESC`, defaults to `DESC` (optional) * @param string[]|null $source_id A list of Source IDs to filter the events by. (optional) * @param string|null $start_date The start date (optional) @@ -3119,7 +3203,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEventsPagedRequest($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['getEventsPaged'][0]) + public function getEventsPagedRequest($project_id, $body = null, $direction = null, $end_date = null, $endpoint_id = null, $idempotency_key = null, $idempotency_value = null, $next_page_cursor = null, $per_page = null, $prev_page_cursor = null, $query = null, $query_mode = null, $sort = null, $source_id = null, $start_date = null, string $contentType = self::contentTypes['getEventsPaged'][0]) { // verify the required parameter 'project_id' is set @@ -3142,6 +3226,8 @@ public function getEventsPagedRequest($project_id, $body = null, $direction = nu + + $resourcePath = '/v1/projects/{projectID}/events'; $formParams = []; $queryParams = []; @@ -3195,6 +3281,15 @@ public function getEventsPagedRequest($project_id, $body = null, $direction = nu false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $idempotency_value, + 'idempotencyValue', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $next_page_cursor, 'next_page_cursor', // param base name @@ -3231,6 +3326,15 @@ public function getEventsPagedRequest($project_id, $body = null, $direction = nu false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query_mode, + 'queryMode', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sort, 'sort', // param base name diff --git a/src/Client/Model/GetDeliveryAttempts200Response.php b/src/Client/Model/GetDeliveryAttempts200Response.php index 3a1412f..2fce165 100644 --- a/src/Client/Model/GetDeliveryAttempts200Response.php +++ b/src/Client/Model/GetDeliveryAttempts200Response.php @@ -60,7 +60,7 @@ class GetDeliveryAttempts200Response implements ModelInterface, ArrayAccess, \Js protected static $openAPITypes = [ 'message' => 'string', 'status' => 'bool', - 'data' => '\Convoy\Client\Model\DatastoreDeliveryAttempt[]' + 'data' => '\Convoy\Client\Model\GetDeliveryAttempts200ResponseAllOfData' ]; /** @@ -361,7 +361,7 @@ public function setStatus($status) /** * Gets data * - * @return \Convoy\Client\Model\DatastoreDeliveryAttempt[]|null + * @return \Convoy\Client\Model\GetDeliveryAttempts200ResponseAllOfData|null */ public function getData() { @@ -371,7 +371,7 @@ public function getData() /** * Sets data * - * @param \Convoy\Client\Model\DatastoreDeliveryAttempt[]|null $data data + * @param \Convoy\Client\Model\GetDeliveryAttempts200ResponseAllOfData|null $data data * * @return self */ diff --git a/src/Client/Model/GetDeliveryAttempts200ResponseAllOfData.php b/src/Client/Model/GetDeliveryAttempts200ResponseAllOfData.php new file mode 100644 index 0000000..1ecf2b0 --- /dev/null +++ b/src/Client/Model/GetDeliveryAttempts200ResponseAllOfData.php @@ -0,0 +1,450 @@ + + */ +class GetDeliveryAttempts200ResponseAllOfData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'GetDeliveryAttempts_200_response_allOf_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'content' => '\Convoy\Client\Model\DatastoreDeliveryAttempt[]', + 'next_cursor' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'content' => null, + 'next_cursor' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'content' => false, + 'next_cursor' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'content' => 'content', + 'next_cursor' => 'next_cursor' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'content' => 'setContent', + 'next_cursor' => 'setNextCursor' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'content' => 'getContent', + 'next_cursor' => 'getNextCursor' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('next_cursor', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + if ($this->container['next_cursor'] === null) { + $invalidProperties[] = "'next_cursor' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets content + * + * @return \Convoy\Client\Model\DatastoreDeliveryAttempt[] + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \Convoy\Client\Model\DatastoreDeliveryAttempt[] $content content + * + * @return self + */ + public function setContent($content) + { + if (is_null($content)) { + throw new \InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets next_cursor + * + * @return string + */ + public function getNextCursor() + { + return $this->container['next_cursor']; + } + + /** + * Sets next_cursor + * + * @param string $next_cursor Pass as before to fetch older attempts. Empty on the last page. + * + * @return self + */ + public function setNextCursor($next_cursor) + { + if (is_null($next_cursor)) { + throw new \InvalidArgumentException('non-nullable next_cursor cannot be null'); + } + $this->container['next_cursor'] = $next_cursor; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Client/Model/GetDeliveryAttempts200ResponseAllOfDataOneOf.php b/src/Client/Model/GetDeliveryAttempts200ResponseAllOfDataOneOf.php new file mode 100644 index 0000000..234b6b0 --- /dev/null +++ b/src/Client/Model/GetDeliveryAttempts200ResponseAllOfDataOneOf.php @@ -0,0 +1,450 @@ + + */ +class GetDeliveryAttempts200ResponseAllOfDataOneOf implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'GetDeliveryAttempts_200_response_allOf_data_oneOf'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'content' => '\Convoy\Client\Model\DatastoreDeliveryAttempt[]', + 'next_cursor' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'content' => null, + 'next_cursor' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'content' => false, + 'next_cursor' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'content' => 'content', + 'next_cursor' => 'next_cursor' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'content' => 'setContent', + 'next_cursor' => 'setNextCursor' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'content' => 'getContent', + 'next_cursor' => 'getNextCursor' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('next_cursor', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + if ($this->container['next_cursor'] === null) { + $invalidProperties[] = "'next_cursor' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets content + * + * @return \Convoy\Client\Model\DatastoreDeliveryAttempt[] + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \Convoy\Client\Model\DatastoreDeliveryAttempt[] $content content + * + * @return self + */ + public function setContent($content) + { + if (is_null($content)) { + throw new \InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets next_cursor + * + * @return string + */ + public function getNextCursor() + { + return $this->container['next_cursor']; + } + + /** + * Sets next_cursor + * + * @param string $next_cursor Pass as before to fetch older attempts. Empty on the last page. + * + * @return self + */ + public function setNextCursor($next_cursor) + { + if (is_null($next_cursor)) { + throw new \InvalidArgumentException('non-nullable next_cursor cannot be null'); + } + $this->container['next_cursor'] = $next_cursor; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Client/Model/ModelsUpdateSource.php b/src/Client/Model/ModelsUpdateSource.php index 4eede76..0f1f844 100644 --- a/src/Client/Model/ModelsUpdateSource.php +++ b/src/Client/Model/ModelsUpdateSource.php @@ -66,6 +66,7 @@ class ModelsUpdateSource implements ModelInterface, ArrayAccess, \JsonSerializab 'idempotency_keys' => 'string[]', 'is_disabled' => 'bool', 'name' => 'string', + 'provider' => '\Convoy\Client\Model\DatastoreSourceProvider', 'pub_sub' => '\Convoy\Client\Model\ModelsPubSubConfig', 'type' => '\Convoy\Client\Model\DatastoreSourceType', 'verifier' => '\Convoy\Client\Model\ModelsVerifierConfig' @@ -87,6 +88,7 @@ class ModelsUpdateSource implements ModelInterface, ArrayAccess, \JsonSerializab 'idempotency_keys' => null, 'is_disabled' => null, 'name' => null, + 'provider' => null, 'pub_sub' => null, 'type' => null, 'verifier' => null @@ -106,6 +108,7 @@ class ModelsUpdateSource implements ModelInterface, ArrayAccess, \JsonSerializab 'idempotency_keys' => false, 'is_disabled' => false, 'name' => false, + 'provider' => false, 'pub_sub' => false, 'type' => false, 'verifier' => false @@ -205,6 +208,7 @@ public function isNullableSetToNull(string $property): bool 'idempotency_keys' => 'idempotency_keys', 'is_disabled' => 'is_disabled', 'name' => 'name', + 'provider' => 'provider', 'pub_sub' => 'pub_sub', 'type' => 'type', 'verifier' => 'verifier' @@ -224,6 +228,7 @@ public function isNullableSetToNull(string $property): bool 'idempotency_keys' => 'setIdempotencyKeys', 'is_disabled' => 'setIsDisabled', 'name' => 'setName', + 'provider' => 'setProvider', 'pub_sub' => 'setPubSub', 'type' => 'setType', 'verifier' => 'setVerifier' @@ -243,6 +248,7 @@ public function isNullableSetToNull(string $property): bool 'idempotency_keys' => 'getIdempotencyKeys', 'is_disabled' => 'getIsDisabled', 'name' => 'getName', + 'provider' => 'getProvider', 'pub_sub' => 'getPubSub', 'type' => 'getType', 'verifier' => 'getVerifier' @@ -313,6 +319,7 @@ public function __construct(?array $data = null) $this->setIfExists('idempotency_keys', $data ?? [], null); $this->setIfExists('is_disabled', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('provider', $data ?? [], null); $this->setIfExists('pub_sub', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('verifier', $data ?? [], null); @@ -576,6 +583,33 @@ public function setName($name) return $this; } + /** + * Gets provider + * + * @return \Convoy\Client\Model\DatastoreSourceProvider|null + */ + public function getProvider() + { + return $this->container['provider']; + } + + /** + * Sets provider + * + * @param \Convoy\Client\Model\DatastoreSourceProvider|null $provider Use this to specify one of our predefined source types. + * + * @return self + */ + public function setProvider($provider) + { + if (is_null($provider)) { + throw new \InvalidArgumentException('non-nullable provider cannot be null'); + } + $this->container['provider'] = $provider; + + return $this; + } + /** * Gets pub_sub *