diff --git a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state index 2b752c9cff0..163acafe1f3 100644 --- a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state +++ b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "ce89601d3b185e31dcb10fd63f1ad656", + "specHash": "5f54bfdb58787ab413cf25bfacf31354", "generatedFiles": { "files": [ { @@ -5868,7 +5868,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Apps.php", - "hash": "4ffb8ea2884c7d5fbfeab66355913ed2" + "hash": "77fd3427bad81c4c2adb8ec49eca9838" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/CodesOfConduct.php", @@ -5892,7 +5892,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/CodeScanning.php", - "hash": "667fe9d8c4b7b40722509a897ac0fb5c" + "hash": "729c5f94c55f343c08d943ea6d6dc2a6" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", @@ -5932,7 +5932,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "4737e293639b877041daeaee0e660cd3" + "hash": "7172da03a92678d25c1e11dcedaa20f1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Oidc.php", @@ -5964,7 +5964,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "1858204b8fcdaba31c696b7c6333c2ba" + "hash": "89aad1c132a5bfa42cb54db968c42316" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Reactions.php", @@ -6004,7 +6004,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Users.php", - "hash": "d92e58dd4dcf5b29b49945b28dd23bc7" + "hash": "8505746dd6bc80a1da4d4273e39e758d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operations.php", @@ -12572,7 +12572,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Apps\/ListWebhookDeliveries.php", - "hash": "a2b3e3d867d54b99f5d37143f1040dc8" + "hash": "f5771af167fe85fce53702d3849f16ef" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Apps\/ListWebhookDeliveriesTest.php", @@ -15572,7 +15572,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/ListWebhookDeliveries.php", - "hash": "9f6b38e6b42459138cb94d6d8db46865" + "hash": "8d3b20e2e0c67013e8db89651a490d07" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListWebhookDeliveriesTest.php", @@ -20512,7 +20512,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/ListWebhookDeliveries.php", - "hash": "9eb10b7acf396b85df8641fcac09735a" + "hash": "e2a8185e6200602487c880f8db0a4557" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/ListWebhookDeliveriesTest.php", @@ -24284,15 +24284,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Users\/Follow.php", - "hash": "e088d175e35287ddea80bbb932d940da" + "hash": "3bc11c7a9f2876aa0b24fdd3c168ced0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Users\/Follow.php", - "hash": "c57e9b9f75af8449bdb29d7fc74d1264" + "hash": "4316a51ffb5d53cd7df4ade2b70c1641" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Users\/FollowTest.php", - "hash": "caacb5ec923a82b716097fa837deee73" + "hash": "94ab75314cd16bb13bf705678e63d426" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Users\/Unfollow.php", @@ -25972,7 +25972,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Apps.php", - "hash": "8d5b72ca55374eca390180c3031918c3" + "hash": "ac90bf09bce4324a3081888a4df69196" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodesOfConduct.php", @@ -26000,7 +26000,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Orgs.php", - "hash": "851beb40d09f72302b4bb26f062d7f87" + "hash": "9656e4aaa0d1bfbe8b84a9b8987c3709" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/RateLimit.php", @@ -26008,7 +26008,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Repos.php", - "hash": "eec1a9804aee791b10d6ea6f25052e81" + "hash": "6c2d74312543836723d44a94fec8737a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Users.php", @@ -26528,7 +26528,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Users.php", - "hash": "c55c7fb2722f90e1bdd887e2a76985ba" + "hash": "f504855ecc60d249bd64e85f1f3b2e13" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Stream\/Migrations.php", @@ -26556,7 +26556,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Four.php", - "hash": "9f3aa3b070ebb53c1c534d4a8cd25769" + "hash": "84baabab6ef8bb8c8b3c3f087fdfd342" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", @@ -26564,15 +26564,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "b7ffe38e65c23ef94f748ed6e31a4cd9" + "hash": "0d399c08389b5a4ea5021a61a72dc039" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", - "hash": "7550a2180d43643520ac0e0c94b0a039" + "hash": "a599137abdcba30f7e73a7b74e31d2ea" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php", - "hash": "da93f0500511efc6f5047a395e43d0c4" + "hash": "1cf5790594bbb4d1413a9716c0f7dd0a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Nine.php", @@ -26668,15 +26668,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "34998afc94ac197e983ec923f86bfc84" + "hash": "fe00f124d0b03577835808f3c34eb6fd" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", - "hash": "17ab580da9720832051801428c83eb01" + "hash": "5ab86acbf8be965692b1d15336be32bd" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Eight.php", - "hash": "09a1392d402c7611e126132ee60570a2" + "hash": "2625e16d352263fdefc1eb05b50c3686" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Ten.php", @@ -26736,7 +26736,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Four.php", - "hash": "c9b2729091d172e535d12b3c8b4ca8d5" + "hash": "3463e01e94f27c8d94c4004f86d110bb" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Two.php", @@ -28728,7 +28728,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/User\/Following\/Username.php", - "hash": "ece8bdbd15bf56ab2d0cb788ec1352cc" + "hash": "81ff09876f1a384a08ca87c5924602b1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/User\/GpgKeys.php", @@ -29740,11 +29740,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "0c522704e18163e77dc4125f0277c7bf" + "hash": "9f74745a46a5bfdc49be45130468c99b" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "3d479e81daf857f37fe1db81e2d2ce2f" + "hash": "9ed4951d6a7ef353c3886b8c631792ff" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -33008,7 +33008,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetRouteStatsByActor.php", - "hash": "ba14c183059338bd948f1207886971ab" + "hash": "1db11c959b55a60444d87c54ab8c33d9" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetRouteStatsByActorTest.php", @@ -33020,7 +33020,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetRouteStatsByActorListing.php", - "hash": "614efa2552f4c5103f802b0375e691b6" + "hash": "0cef8157e0350bff1462bf33d55e333e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetRouteStatsByActorListingTest.php", @@ -33032,7 +33032,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetSubjectStats.php", - "hash": "e2997b2a7bd08da4584c1b9bd69f420b" + "hash": "c58727da9bed7e040dc4b0588a55a33f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetSubjectStatsTest.php", @@ -33044,7 +33044,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetSubjectStatsListing.php", - "hash": "c0f14e612dfe3076a27722463a8487ae" + "hash": "1d0e78e7617f2d02a749b4195d99539f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetSubjectStatsListingTest.php", @@ -33056,7 +33056,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetSummaryStats.php", - "hash": "68c361c4c934da75a926d2503d6b795e" + "hash": "f43c10528b0b1fe439f71c284908aa53" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetSummaryStatsTest.php", @@ -33068,7 +33068,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetSummaryStatsByUser.php", - "hash": "ec4a689b020e8e4c0e8c4aea2ff2ae8d" + "hash": "5a8f57c5adbe96e7600078234e4e9c3b" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetSummaryStatsByUserTest.php", @@ -33080,7 +33080,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetSummaryStatsByActor.php", - "hash": "db4d7a5b71171650b1250ccbe52622bf" + "hash": "5391651213f7bdc2ae847ab1f37f0c0e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetSummaryStatsByActorTest.php", @@ -33092,7 +33092,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetTimeStats.php", - "hash": "eaa08bfa10f44cea4f1a0f0ea4d7b4ec" + "hash": "9f2ff344f86cd893e686ec3c8243883a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetTimeStatsTest.php", @@ -33104,7 +33104,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetTimeStatsByUser.php", - "hash": "cf986fa1f3b729dd43e5ad60593f0035" + "hash": "f541db60f35b9918e472cfc0b0912e28" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetTimeStatsByUserTest.php", @@ -33116,7 +33116,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetTimeStatsByActor.php", - "hash": "ef85b82563b5cde169ec91eecaf3002b" + "hash": "b3a0f1106d0fe479feb141d8ce7c3911" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetTimeStatsByActorTest.php", @@ -33128,7 +33128,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetUserStats.php", - "hash": "274cd1a9afc4bb3467066f188137d4c4" + "hash": "52b1cccad043e5101763c980ad243a01" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetUserStatsTest.php", @@ -33140,7 +33140,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetUserStatsListing.php", - "hash": "2e2f6f8025cba438518abf407237b2da" + "hash": "dfed900d1deb57161f444b5196db4ad5" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetUserStatsListingTest.php", @@ -33168,15 +33168,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/ApiInsights.php", - "hash": "986b06c66242c060569555e1c11f99e1" + "hash": "da81b79d93d10cb2ed1fc975db8e2b19" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/ApiInsights.php", - "hash": "5e9bbd105a49b172c97f5e62f0615dd2" + "hash": "9518f902601ad41e505351ac8bf3f077" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/ApiInsights.php", - "hash": "1d45cb9237e4867197a9536e0479d90f" + "hash": "58d77b9a9227372d7aec3f26aacb87b9" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Insights\/Api\/SummaryStats.php", diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/User/Following/Username.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/User/Following/Username.php index 078b455488f..7d213ecfa5c 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/User/Following/Username.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/User/Following/Username.php @@ -5,6 +5,7 @@ namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Hydrator\Operation\User\Following; use ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\ValidationError; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; @@ -39,6 +40,7 @@ public function hydrateObject(string $className, array $payload): object { return match ($className) { 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ValidationError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ValidationError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } @@ -106,6 +108,58 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S } } + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ValidationError(array $payload): ValidationError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $missingFields[] = 'message'; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'documentation_url'; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['errors'] ?? null; + + if ($value === null) { + $properties['errors'] = null; + goto after_errors; + } + + $properties['errors'] = $value; + + after_errors: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\ValidationError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ValidationError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ValidationError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\ValidationError', $exception, stack: $this->hydrationStack); + } + } + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { @@ -138,6 +192,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ValidationError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ValidationError($object), default => throw new LogicException("No serialization defined for $className"), }; } catch (Throwable $exception) { @@ -240,6 +295,35 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ValidationError(mixed $object): mixed + { + assert($object instanceof ValidationError); + $result = []; + + $message = $object->message; + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $errors = $object->errors; + + if ($errors === null) { + goto after_errors; + } + + static $errorsSerializer0; + + if ($errorsSerializer0 === null) { + $errorsSerializer0 = new SerializeArrayItems(...[]); + } + + $errors = $errorsSerializer0->serialize($errors, $this); + after_errors: $result['errors'] = $errors; + + return $result; + } + /** * @param class-string $className * @param iterable $payloads; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Users/Follow.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Users/Follow.php index 75f612e88bc..db117a48cf4 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Users/Follow.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Users/Follow.php @@ -67,6 +67,14 @@ public function createResponse(ResponseInterface $response): WithoutBody $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); throw new ErrorSchemas\BasicError(401, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Validation failed, or the endpoint has been spammed. + **/ + + case 422: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ValidationError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\ValidationError(422, $this->hydrator->hydrateObject(Schema\ValidationError::class, $body)); } break; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetRouteStatsByActor.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetRouteStatsByActor.php index ca7bde6ac31..88cee403144 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetRouteStatsByActor.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetRouteStatsByActor.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetRouteStatsByActor($this->responseSchemaValidator, $this->hydrator, $org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetRouteStatsByActorListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetRouteStatsByActorListing.php index 13f86fe6012..bbd53b7eda4 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetRouteStatsByActorListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetRouteStatsByActorListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetRouteStatsByActorListing($this->responseSchemaValidator, $this->hydrator, $org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSubjectStats.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSubjectStats.php index 9d8c25a61f5..07746fcebe6 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSubjectStats.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSubjectStats.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetSubjectStats($this->responseSchemaValidator, $this->hydrator, $org, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSubjectStatsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSubjectStatsListing.php index db05a350710..dbb16817d6a 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSubjectStatsListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSubjectStatsListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetSubjectStatsListing($this->responseSchemaValidator, $this->hydrator, $org, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStats.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStats.php index 139ead17d2a..8dd6bd28ed0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStats.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStats.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $org, string $minTimestamp, string $maxTimestamp): ApiInsightsSummaryStats { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetSummaryStats($this->responseSchemaValidator, $this->hydrator, $org, $minTimestamp, $maxTimestamp); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStatsByActor.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStatsByActor.php index 5f8d2cfbf59..76910624436 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStatsByActor.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStatsByActor.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $org, string $minTimestamp, string $maxTimestamp, string $actorType, int $actorId): ApiInsightsSummaryStats { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetSummaryStatsByActor($this->responseSchemaValidator, $this->hydrator, $org, $minTimestamp, $maxTimestamp, $actorType, $actorId); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStatsByUser.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStatsByUser.php index 9d03d7674e1..8cb2029bec3 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStatsByUser.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetSummaryStatsByUser.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $org, string $userId, string $minTimestamp, string $maxTimestamp): ApiInsightsSummaryStats { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetSummaryStatsByUser($this->responseSchemaValidator, $this->hydrator, $org, $userId, $minTimestamp, $maxTimestamp); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStats.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStats.php index ae32d5522ea..f890af24471 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStats.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStats.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $minTimestamp, string $maxTimestamp, string $timestampIncrement): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetTimeStats($this->responseSchemaValidator, $this->hydrator, $org, $minTimestamp, $maxTimestamp, $timestampIncrement); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStatsByActor.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStatsByActor.php index 19f89132929..f528c52c128 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStatsByActor.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStatsByActor.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, string $timestampIncrement): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetTimeStatsByActor($this->responseSchemaValidator, $this->hydrator, $org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $timestampIncrement); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStatsByUser.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStatsByUser.php index 56b25db850d..0ac642d668f 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStatsByUser.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetTimeStatsByUser.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $userId, string $minTimestamp, string $maxTimestamp, string $timestampIncrement): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetTimeStatsByUser($this->responseSchemaValidator, $this->hydrator, $org, $userId, $minTimestamp, $maxTimestamp, $timestampIncrement); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetUserStats.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetUserStats.php index c1f4817ada3..c2c307cf6c8 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetUserStats.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetUserStats.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetUserStats($this->responseSchemaValidator, $this->hydrator, $org, $userId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetUserStatsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetUserStatsListing.php index 44fffeace61..88129f5ef96 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetUserStatsListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/ApiInsights/GetUserStatsListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\ApiInsights\GetUserStatsListing($this->responseSchemaValidator, $this->hydrator, $org, $userId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Apps/ListWebhookDeliveries.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Apps/ListWebhookDeliveries.php index beb8e629cbd..6500bcddae1 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Apps/ListWebhookDeliveries.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Apps/ListWebhookDeliveries.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $cursor, int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Apps\ListWebhookDeliveries($this->responseSchemaValidator, $this->hydrator, $cursor, $perPage); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListWebhookDeliveries.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListWebhookDeliveries.php index 84167112239..0449d5b4713 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListWebhookDeliveries.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListWebhookDeliveries.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, int $hookId, string $cursor, int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListWebhookDeliveries($this->responseSchemaValidator, $this->hydrator, $org, $hookId, $cursor, $perPage); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListWebhookDeliveries.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListWebhookDeliveries.php index 54ce496ef6b..bec315f7e82 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListWebhookDeliveries.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListWebhookDeliveries.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $owner, string $repo, int $hookId, string $cursor, int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\ListWebhookDeliveries($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $hookId, $cursor, $perPage); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Users/Follow.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Users/Follow.php index 09071a9baa7..b855032c24c 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Users/Follow.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Users/Follow.php @@ -24,7 +24,6 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ public function call(string $username): WithoutBody { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Users\Follow($this->responseSchemaValidator, $this->hydrator, $username); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/ApiInsights.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/ApiInsights.php index 3aced49d9e6..0a4281ec04a 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/ApiInsights.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/ApiInsights.php @@ -20,7 +20,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return iterable */ + /** @return Observable */ public function getSubjectStats(array $params): iterable { $arguments = []; @@ -71,6 +71,7 @@ public function getSubjectStats(array $params): iterable return $operator->call($arguments['org'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['page'], $arguments['per_page'], $arguments['direction']); } + /** @return */ public function getSummaryStats(array $params): ApiInsightsSummaryStats { $arguments = []; @@ -97,7 +98,7 @@ public function getSummaryStats(array $params): ApiInsightsSummaryStats return $operator->call($arguments['org'], $arguments['min_timestamp'], $arguments['max_timestamp']); } - /** @return iterable */ + /** @return Observable */ public function getTimeStats(array $params): iterable { $arguments = []; @@ -130,7 +131,7 @@ public function getTimeStats(array $params): iterable return $operator->call($arguments['org'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['timestamp_increment']); } - /** @return iterable */ + /** @return Observable */ public function getUserStats(array $params): iterable { $arguments = []; @@ -187,7 +188,7 @@ public function getUserStats(array $params): iterable return $operator->call($arguments['org'], $arguments['user_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['page'], $arguments['per_page'], $arguments['direction']); } - /** @return iterable */ + /** @return Observable */ public function getRouteStatsByActor(array $params): iterable { $arguments = []; @@ -250,6 +251,7 @@ public function getRouteStatsByActor(array $params): iterable return $operator->call($arguments['org'], $arguments['actor_type'], $arguments['actor_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['page'], $arguments['per_page'], $arguments['direction']); } + /** @return */ public function getSummaryStatsByUser(array $params): ApiInsightsSummaryStats { $arguments = []; @@ -282,6 +284,7 @@ public function getSummaryStatsByUser(array $params): ApiInsightsSummaryStats return $operator->call($arguments['org'], $arguments['user_id'], $arguments['min_timestamp'], $arguments['max_timestamp']); } + /** @return */ public function getSummaryStatsByActor(array $params): ApiInsightsSummaryStats { $arguments = []; @@ -320,7 +323,7 @@ public function getSummaryStatsByActor(array $params): ApiInsightsSummaryStats return $operator->call($arguments['org'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['actor_type'], $arguments['actor_id']); } - /** @return iterable */ + /** @return Observable */ public function getTimeStatsByUser(array $params): iterable { $arguments = []; @@ -359,7 +362,7 @@ public function getTimeStatsByUser(array $params): iterable return $operator->call($arguments['org'], $arguments['user_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['timestamp_increment']); } - /** @return iterable */ + /** @return Observable */ public function getTimeStatsByActor(array $params): iterable { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Apps.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Apps.php index aa7ffa0273a..b1a71c72af7 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Apps.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Apps.php @@ -197,7 +197,7 @@ public function getWebhookConfigForApp(array $params): WebhookConfig return $operator->call(); } - /** @return iterable */ + /** @return Observable */ public function listWebhookDeliveries(array $params): iterable { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Eight.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Eight.php index f93f242eca8..34672c75023 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Eight.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Eight.php @@ -36,7 +36,7 @@ public function __construct(private Routers $routers) { } - /** @return iterable|Schema\ApiInsightsSummaryStats|iterable||Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody */ + /** @return Observable||Observable|Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody */ public function call(string $call, array $params, array $pathChunks): iterable|ApiInsightsSummaryStats|PackageVersion|TeamRepository|WithoutBody|OidcCustomSubRepo|Ok|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|WorkflowRunUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|WorkflowUsage|ProtectedBranchAdminEnforced|ProtectedBranchPullRequestReview|StatusCheckPolicy|BranchRestrictionPolicy|CodeScanningCodeqlDatabase|CodeScanningVariantAnalysis|DeploymentStatus|DeploymentBranchPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|DeploymentProtectionRule|ActionsPublicKey|ActionsSecret|ActionsVariable|HookDelivery|PullRequestReview { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Four.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Four.php index a386bcaa238..6af99b588d0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Four.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Four.php @@ -38,7 +38,7 @@ public function __construct(private Routers $routers) { } - /** @return |iterable|Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): WebhookConfig|iterable|Installation|AnnouncementBanner|EnterpriseSecurityAnalysisSettings|string|WithoutBody|GistSimple|GitignoreTemplate|MarketplacePurchase|Thread|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|Json|ExternalGroups|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|InteractionLimitResponse|One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|ProjectColumn|FullRepository|BasicError|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|Codespace|GpgKey|Key|Migration|SshSigningKey|Hovercard|StarredRepository|Repository { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php index b61ff624e57..dddfcf71624 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php @@ -1005,7 +1005,7 @@ public function getWebhookConfigForOrg(array $params): WebhookConfig return $operator->call($arguments['org'], $arguments['hook_id']); } - /** @return iterable */ + /** @return Observable */ public function listWebhookDeliveries(array $params): iterable { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php index 0d4db75af93..80aafc507f6 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php @@ -2529,7 +2529,7 @@ public function getWebhookConfigForRepo(array $params): WebhookConfig return $operator->call($arguments['owner'], $arguments['repo'], $arguments['hook_id']); } - /** @return iterable */ + /** @return Observable */ public function listWebhookDeliveries(array $params): iterable { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php index afb21e00e17..a294695d441 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php @@ -67,7 +67,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|iterable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): Json|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|iterable|OidcCustomSub|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|WithoutBody|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|HookDelivery|TeamDiscussion|TeamMembership|TeamProject|GroupMapping|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|CodeScanningAlert|CodeScanningAnalysis|CodeScanningSarifsStatus|CodespacesPublicKey|RepoCodespacesSecret|RepositoryCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|CombinedCommitStatus|BasicError|DependabotAlert|DependabotPublicKey|DependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|Blob|GitCommit|GitRef|GitTag|GitTree|WebhookConfig|IssueComment|IssueEvent|PageBuild|PagesDeploymentStatus|PullRequestReviewComment|PullRequestReviewRequest|ReleaseAsset|Release|RuleSuite|SecretScanningAlert|GroupResponse|UserResponse|ScimUser|TeamDiscussionComment|PackageVersion { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php index 1fd35f65c6f..9b5b11ed46e 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php @@ -84,7 +84,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|WithoutBody|iterable|iterable|Schema\ApiInsightsSummaryStats|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): ActionsCacheUsageOrgEnterprise|Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsEnterprise|iterable|Runner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|ActionsBillingUsage|AdvancedSecurityActiveCommitters|GetAllCostCenters|PackagesBillingUsage|CombinedBillingUsage|BillingUsageReport|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|RunnerGroupsOrg|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|WithoutBody|CodeSecurityConfiguration|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|Json|CopilotSeatDetails|Package|CustomProperty|RuleSuite|ExternalGroups|ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|ScimEnterpriseGroupList|ScimEnterpriseUserList|ScimUserList|TeamRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/ApiInsights.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/ApiInsights.php index a19d6c95c99..382751217ed 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/ApiInsights.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/ApiInsights.php @@ -20,7 +20,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return iterable */ + /** @return Observable */ public function getUserStatsListing(array $params): iterable { $arguments = []; @@ -83,7 +83,7 @@ public function getUserStatsListing(array $params): iterable } while (count($items) > 0); } - /** @return iterable */ + /** @return Observable */ public function getSubjectStatsListing(array $params): iterable { $arguments = []; @@ -140,7 +140,7 @@ public function getSubjectStatsListing(array $params): iterable } while (count($items) > 0); } - /** @return iterable */ + /** @return Observable */ public function getRouteStatsByActorListing(array $params): iterable { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Eight.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Eight.php index a6fb0352968..fad5f8f6d99 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Eight.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Eight.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return iterable|Observable|Observable|Observable|Observable|WithoutBody */ + /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Seven.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Seven.php index def20cf3fb9..5a14dca5b32 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Seven.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Seven.php @@ -14,7 +14,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|BasicError { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php index c2ba86024a1..be9aeeda656 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|iterable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Four.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Four.php index 49f6c92d561..d8b5db26249 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Four.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Four.php @@ -15,6 +15,7 @@ public function __construct(private Routers $routers) { } + /** @return |\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody */ public function call(string $call, array $params, array $pathChunks): WithoutBody|InteractionLimitResponse { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Users.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Users.php index 6f089a40376..31d5f4da3d3 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Users.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Users.php @@ -34,7 +34,6 @@ public function block(array $params): WithoutBody return $operator->call($arguments['username']); } - /** @return */ public function follow(array $params): WithoutBody { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Operation/ApiInsights.php b/clients/GitHubEnterpriseCloud/src/Operation/ApiInsights.php index 82d5992a0c1..7f8736afea4 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/ApiInsights.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/ApiInsights.php @@ -14,70 +14,73 @@ public function __construct(private Internal\Operators $operators) { } - /** @return iterable */ + /** @return Observable */ public function getRouteStatsByActor(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable { return $this->operators->apiInsights👷GetRouteStatsByActor()->call($org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); } - /** @return iterable */ + /** @return Observable */ public function getRouteStatsByActorListing(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable { return $this->operators->apiInsights👷GetRouteStatsByActorListing()->call($org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); } - /** @return iterable */ + /** @return Observable */ public function getSubjectStats(string $org, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable { return $this->operators->apiInsights👷GetSubjectStats()->call($org, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); } - /** @return iterable */ + /** @return Observable */ public function getSubjectStatsListing(string $org, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable { return $this->operators->apiInsights👷GetSubjectStatsListing()->call($org, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); } + /** @return */ public function getSummaryStats(string $org, string $minTimestamp, string $maxTimestamp): ApiInsightsSummaryStats { return $this->operators->apiInsights👷GetSummaryStats()->call($org, $minTimestamp, $maxTimestamp); } + /** @return */ public function getSummaryStatsByUser(string $org, string $userId, string $minTimestamp, string $maxTimestamp): ApiInsightsSummaryStats { return $this->operators->apiInsights👷GetSummaryStatsByUser()->call($org, $userId, $minTimestamp, $maxTimestamp); } + /** @return */ public function getSummaryStatsByActor(string $org, string $minTimestamp, string $maxTimestamp, string $actorType, int $actorId): ApiInsightsSummaryStats { return $this->operators->apiInsights👷GetSummaryStatsByActor()->call($org, $minTimestamp, $maxTimestamp, $actorType, $actorId); } - /** @return iterable */ + /** @return Observable */ public function getTimeStats(string $org, string $minTimestamp, string $maxTimestamp, string $timestampIncrement): iterable { return $this->operators->apiInsights👷GetTimeStats()->call($org, $minTimestamp, $maxTimestamp, $timestampIncrement); } - /** @return iterable */ + /** @return Observable */ public function getTimeStatsByUser(string $org, string $userId, string $minTimestamp, string $maxTimestamp, string $timestampIncrement): iterable { return $this->operators->apiInsights👷GetTimeStatsByUser()->call($org, $userId, $minTimestamp, $maxTimestamp, $timestampIncrement); } - /** @return iterable */ + /** @return Observable */ public function getTimeStatsByActor(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, string $timestampIncrement): iterable { return $this->operators->apiInsights👷GetTimeStatsByActor()->call($org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $timestampIncrement); } - /** @return iterable */ + /** @return Observable */ public function getUserStats(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable { return $this->operators->apiInsights👷GetUserStats()->call($org, $userId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); } - /** @return iterable */ + /** @return Observable */ public function getUserStatsListing(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable { return $this->operators->apiInsights👷GetUserStatsListing()->call($org, $userId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Apps.php b/clients/GitHubEnterpriseCloud/src/Operation/Apps.php index eb92ca0ee94..8647b035648 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Apps.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Apps.php @@ -48,7 +48,7 @@ public function updateWebhookConfigForApp(array $params): WebhookConfig return $this->operators->apps👷UpdateWebhookConfigForApp()->call($params); } - /** @return iterable */ + /** @return Observable */ public function listWebhookDeliveries(string $cursor, int $perPage): iterable { return $this->operators->apps👷ListWebhookDeliveries()->call($cursor, $perPage); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php b/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php index 7fabbc5838b..2eb0f9241f3 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php @@ -235,7 +235,7 @@ public function updateWebhookConfigForOrg(string $org, int $hookId, array $param return $this->operators->orgs👷UpdateWebhookConfigForOrg()->call($org, $hookId, $params); } - /** @return iterable */ + /** @return Observable */ public function listWebhookDeliveries(string $org, int $hookId, string $cursor, int $perPage): iterable { return $this->operators->orgs👷ListWebhookDeliveries()->call($org, $hookId, $cursor, $perPage); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Repos.php b/clients/GitHubEnterpriseCloud/src/Operation/Repos.php index ef5574e9801..dee0001eb5c 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Repos.php @@ -839,7 +839,7 @@ public function updateWebhookConfigForRepo(string $owner, string $repo, int $hoo return $this->operators->repos👷UpdateWebhookConfigForRepo()->call($owner, $repo, $hookId, $params); } - /** @return iterable */ + /** @return Observable */ public function listWebhookDeliveries(string $owner, string $repo, int $hookId, string $cursor, int $perPage): iterable { return $this->operators->repos👷ListWebhookDeliveries()->call($owner, $repo, $hookId, $cursor, $perPage); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Users.php b/clients/GitHubEnterpriseCloud/src/Operation/Users.php index 6c46692af5c..49cfa7277c0 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Users.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Users.php @@ -124,7 +124,6 @@ public function checkPersonIsFollowedByAuthenticated(string $username): WithoutB return $this->operators->users👷CheckPersonIsFollowedByAuthenticated()->call($username); } - /** @return */ public function follow(string $username): WithoutBody { return $this->operators->users👷Follow()->call($username); diff --git a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php index 8b60195616d..393b21a58a2 100644 --- a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php @@ -72,7 +72,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /app/hook/deliveries') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /app/hook/deliveries/{delivery_id}') { @@ -1296,7 +1296,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/hooks/{hook_id}/deliveries') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}') { @@ -1312,51 +1312,51 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'LIST /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /orgs/{org}/insights/api/subject-stats') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'LIST /orgs/{org}/insights/api/subject-stats') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /orgs/{org}/insights/api/summary-stats') { - return $this->typeResolver->resolve('Schema\\ApiInsightsSummaryStats'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /orgs/{org}/insights/api/summary-stats/users/{user_id}') { - return $this->typeResolver->resolve('Schema\\ApiInsightsSummaryStats'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}') { - return $this->typeResolver->resolve('Schema\\ApiInsightsSummaryStats'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /orgs/{org}/insights/api/time-stats') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /orgs/{org}/insights/api/time-stats/users/{user_id}') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /orgs/{org}/insights/api/user-stats/{user_id}') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'LIST /orgs/{org}/insights/api/user-stats/{user_id}') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /orgs/{org}/installation') { @@ -3260,7 +3260,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}') { @@ -4608,7 +4608,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'PUT /user/following/{username}') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); } if ($call === 'DELETE /user/following/{username}') { diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Users/FollowTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Users/FollowTest.php index fedfcaa3531..7e681b99cef 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Users/FollowTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Users/FollowTest.php @@ -123,6 +123,40 @@ public function operations_httpCode_401_responseContentType_application_json_zer $result = $client->operations()->users()->follow('generated'); } + /** @test */ + public function call_httpCode_422_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\ValidationError::class); + $response = new Response(422, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ValidationError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PUT', '/user/following/generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Users\Follow::OPERATION_MATCH, (static function (array $data): array { + $data['username'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_422_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\ValidationError::class); + $response = new Response(422, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ValidationError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PUT', '/user/following/generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->users()->follow('generated'); + } + /** @test */ public function call_httpCode_204_empty(): void { diff --git a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php index f127bce2272..a35139addf1 100644 --- a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php @@ -24,7 +24,7 @@ function authHeader(): string assertType('', $client->call('POST /app-manifests/{code}/conversions')); assertType('', $client->call('GET /app/hook/config')); assertType('', $client->call('PATCH /app/hook/config')); -assertType('iterable', $client->call('GET /app/hook/deliveries')); +assertType('Observable', $client->call('GET /app/hook/deliveries')); assertType('', $client->call('GET /app/hook/deliveries/{delivery_id}')); assertType('', $client->call('POST /app/hook/deliveries/{delivery_id}/attempts')); assertType('Observable|WithoutBody', $client->call('GET /app/installation-requests')); @@ -330,22 +330,22 @@ function authHeader(): string assertType('', $client->call('PATCH /orgs/{org}/hooks/{hook_id}')); assertType('', $client->call('GET /orgs/{org}/hooks/{hook_id}/config')); assertType('', $client->call('PATCH /orgs/{org}/hooks/{hook_id}/config')); -assertType('iterable', $client->call('GET /orgs/{org}/hooks/{hook_id}/deliveries')); +assertType('Observable', $client->call('GET /orgs/{org}/hooks/{hook_id}/deliveries')); assertType('', $client->call('GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}')); assertType('', $client->call('POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts')); assertType('', $client->call('POST /orgs/{org}/hooks/{hook_id}/pings')); -assertType('iterable', $client->call('GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}')); -assertType('iterable', $client->call('LIST /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}')); -assertType('iterable', $client->call('GET /orgs/{org}/insights/api/subject-stats')); -assertType('iterable', $client->call('LIST /orgs/{org}/insights/api/subject-stats')); -assertType('Schema\\ApiInsightsSummaryStats', $client->call('GET /orgs/{org}/insights/api/summary-stats')); -assertType('Schema\\ApiInsightsSummaryStats', $client->call('GET /orgs/{org}/insights/api/summary-stats/users/{user_id}')); -assertType('Schema\\ApiInsightsSummaryStats', $client->call('GET /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}')); -assertType('iterable', $client->call('GET /orgs/{org}/insights/api/time-stats')); -assertType('iterable', $client->call('GET /orgs/{org}/insights/api/time-stats/users/{user_id}')); -assertType('iterable', $client->call('GET /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}')); -assertType('iterable', $client->call('GET /orgs/{org}/insights/api/user-stats/{user_id}')); -assertType('iterable', $client->call('LIST /orgs/{org}/insights/api/user-stats/{user_id}')); +assertType('Observable', $client->call('GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}')); +assertType('Observable', $client->call('LIST /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}')); +assertType('Observable', $client->call('GET /orgs/{org}/insights/api/subject-stats')); +assertType('Observable', $client->call('LIST /orgs/{org}/insights/api/subject-stats')); +assertType('', $client->call('GET /orgs/{org}/insights/api/summary-stats')); +assertType('', $client->call('GET /orgs/{org}/insights/api/summary-stats/users/{user_id}')); +assertType('', $client->call('GET /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}')); +assertType('Observable', $client->call('GET /orgs/{org}/insights/api/time-stats')); +assertType('Observable', $client->call('GET /orgs/{org}/insights/api/time-stats/users/{user_id}')); +assertType('Observable', $client->call('GET /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}')); +assertType('Observable', $client->call('GET /orgs/{org}/insights/api/user-stats/{user_id}')); +assertType('Observable', $client->call('LIST /orgs/{org}/insights/api/user-stats/{user_id}')); assertType('', $client->call('GET /orgs/{org}/installation')); assertType('', $client->call('GET /orgs/{org}/installations')); assertType('', $client->call('GET /orgs/{org}/interaction-limits')); @@ -821,7 +821,7 @@ function authHeader(): string assertType('', $client->call('PATCH /repos/{owner}/{repo}/hooks/{hook_id}')); assertType('', $client->call('GET /repos/{owner}/{repo}/hooks/{hook_id}/config')); assertType('', $client->call('PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config')); -assertType('iterable', $client->call('GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries')); +assertType('Observable', $client->call('GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries')); assertType('', $client->call('GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}')); assertType('', $client->call('POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts')); assertType('', $client->call('POST /repos/{owner}/{repo}/hooks/{hook_id}/pings')); @@ -1158,7 +1158,7 @@ function authHeader(): string assertType('Observable|WithoutBody', $client->call('GET /user/following')); assertType('Observable|WithoutBody', $client->call('LIST /user/following')); assertType('', $client->call('GET /user/following/{username}')); -assertType('', $client->call('PUT /user/following/{username}')); +assertType('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('PUT /user/following/{username}')); assertType('', $client->call('DELETE /user/following/{username}')); assertType('Observable|WithoutBody', $client->call('GET /user/gpg_keys')); assertType('Observable|WithoutBody', $client->call('LIST /user/gpg_keys')); diff --git a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml index e563900682f..c59c4794045 100644 --- a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml +++ b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml @@ -49628,6 +49628,8 @@ paths: "$ref": "#/components/responses/forbidden" '401': "$ref": "#/components/responses/requires_authentication" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: false