diff --git a/clients/GitHubEnterpriseCloud/README.md b/clients/GitHubEnterpriseCloud/README.md index 3797da0d552..ba97c2ca5f6 100644 --- a/clients/GitHubEnterpriseCloud/README.md +++ b/clients/GitHubEnterpriseCloud/README.md @@ -15346,6 +15346,8 @@ $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts', [ 'tool_guid' => , 'ref' => 'generated', 'pr' => 2, + 'before' => 'generated', + 'after' => 'generated', 'state' => 'generated', 'severity' => 'generated', 'page' => 1, @@ -15363,6 +15365,8 @@ $client->operations()->codeScanning()->listAlertsForRepo( owner: 'generat tool_guid: , ref: 'generated', pr: 2, + before: 'generated', + after: 'generated', state: 'generated', severity: 'generated', page: 1, @@ -15388,6 +15392,8 @@ $client->call('LIST /repos/{owner}/{repo}/code-scanning/alerts', [ 'tool_guid' => , 'ref' => 'generated', 'pr' => 2, + 'before' => 'generated', + 'after' => 'generated', 'state' => 'generated', 'severity' => 'generated', 'page' => 1, @@ -15405,6 +15411,8 @@ $client->operations()->codeScanning()->listAlertsForRepoListing( owner: ' tool_guid: , ref: 'generated', pr: 2, + before: 'generated', + after: 'generated', state: 'generated', severity: 'generated', page: 1, diff --git a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state index 262c76771a5..15a099e0f0e 100644 --- a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state +++ b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "3d6ad7276957d3dd8952df409fac0650", + "specHash": "a1c9c39b2a222079693be062d009b766", "generatedFiles": { "files": [ { @@ -716,7 +716,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/RepositoryRuleset.php", - "hash": "28419c17cb31b085d47e62c44133e918" + "hash": "9e413e0e854327f3517bde3aa29795c9" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/GroupMapping.php", @@ -2936,7 +2936,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/RepositoryRuleset\/Links.php", - "hash": "00a724e16efce43f4eeeba6f680185f7" + "hash": "9e438d3bf54c0fd04d246ebc72a8ee2e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/RepositoryRuleset\/Links\/Self_.php", @@ -5908,7 +5908,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/CodeScanning.php", - "hash": "8ab2e0da8b21cf7ad476944cdaf1cba0" + "hash": "5bd7f50139239b2fb729c1cda44b09f9" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", @@ -5980,7 +5980,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "b0b431a98a12675610f1f1dc6949bbae" + "hash": "0ed92bd9217d9ede7070631e143e0027" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Reactions.php", @@ -12096,7 +12096,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/RepositoryRuleset\/Links\/Html.php", - "hash": "c8cc481a1bd2e41504db3c7862233891" + "hash": "3484e73bc98cc0e4afa159dc05b30caf" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet4C203984\/Tiet86D11BF8\/Tiet9FC2225A\/Tiet026CAEC5.php", @@ -12264,15 +12264,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetCreated.php", - "hash": "d862c64ef9fef439dd2496e2c2eb8dc8" + "hash": "9323217f463b7a605664b234b3dc5d70" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetDeleted.php", - "hash": "b065631cec0693ca587416f7eff9f92d" + "hash": "3940872ee173c98cd361b3d323001218" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetEdited.php", - "hash": "c5ba6c4820a19ce21fd3c075f8224d02" + "hash": "e006c6380f859843f8921a3898998091" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/SecurityAdvisories\/CreateRepositoryAdvisoryCveRequest\/Response\/ApplicationJson\/Accepted.php", @@ -16536,7 +16536,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetOrgRulesets.php", - "hash": "74a543706ece80469496b24e8f95af38" + "hash": "870b372768026aa5d2f973dc8bfbe439" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetOrgRulesetsTest.php", @@ -16548,7 +16548,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetOrgRulesetsListing.php", - "hash": "d752495e4ef36119d5706f2bc95d1509" + "hash": "f592a2ce5299c6a50c7b4265a4aa74a9" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetOrgRulesetsListingTest.php", @@ -19116,27 +19116,27 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/ListAlertsForRepo.php", - "hash": "fb4d0aa194b31834145007e8a1bb0f62" + "hash": "1123760031c73e62c4c1c2bc5dcac573" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/ListAlertsForRepo.php", - "hash": "b0816b9c4f69f8f42d37d0aa718c6581" + "hash": "6bc7097eeb524a80573bf1c1f1582a32" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/ListAlertsForRepoTest.php", - "hash": "6906381a4d67a1672c04f27e740e8558" + "hash": "1a95c0c20d1e647f60626e59cfbe472d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/ListAlertsForRepoListing.php", - "hash": "b7b492f4a4dd375ef76c7a19d2fd2a57" + "hash": "3e8aa13755d439f6deb6e1124161c227" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/ListAlertsForRepoListing.php", - "hash": "a39078a295c90d143cff7efcbe036f63" + "hash": "f5b4fe2eb7554ce0487cba41fe37c7ac" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/ListAlertsForRepoListingTest.php", - "hash": "fbb5acc77865200cd2bf0acc0b8520a7" + "hash": "2dde9cefea2b7ee2d7b50b51e8921b7d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/GetAlert.php", @@ -22532,7 +22532,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetRepoRulesets.php", - "hash": "89f03bda37028294883ee5896d9a8355" + "hash": "44a41354659bff88696a840b7eb7e3fd" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetRepoRulesetsTest.php", @@ -22544,7 +22544,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetRepoRulesetsListing.php", - "hash": "46eec8393b15165c41395318082b1056" + "hash": "22671e08e58f4443b2fbbdd7c9e697ae" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetRepoRulesetsListingTest.php", @@ -26088,7 +26088,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Repos.php", - "hash": "8640078db9651f7aa01b565d4c57671a" + "hash": "0ccb2c1616faec4ff2db943f15df615e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Users.php", @@ -26140,7 +26140,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeScanning.php", - "hash": "1a217cbad0dde4a52769c672ceeefb9e" + "hash": "70869d48b619e128fd45a730ce0dfd33" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Dependabot.php", @@ -26400,7 +26400,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Repos.php", - "hash": "e0e5c7d34689989da7c3d7566916e5b4" + "hash": "cbd5354784413a34b58d3dcad984c30a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Activity.php", @@ -26420,7 +26420,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/CodeScanning.php", - "hash": "0343765d7e90ed953c494bcf4d492343" + "hash": "16e335c2ccb7dccbae9e6fda27a7e3e0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/SecretScanning.php", @@ -26636,15 +26636,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Four.php", - "hash": "5bd0031a3b2f9afae4c837b0244f74dc" + "hash": "84baabab6ef8bb8c8b3c3f087fdfd342" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "d2310762aafa9b401ca1fa40ea24d8bf" + "hash": "cb7d826c43fe180e6b9f6268536b74bc" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "77cf4e9f2070d524bd40e99d7a32ad14" + "hash": "455074bbf433d0f28b1e73fca433014d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", @@ -26736,11 +26736,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Four.php", - "hash": "9dabdc8620df1aefb28d11c639a05a65" + "hash": "603ef2017db782aa7bb02ff55436588f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php", - "hash": "fcd8e2a8f837d56c56a00a017d923e62" + "hash": "dc880ef38a537e30963c81bc90d8075f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Two.php", @@ -26748,7 +26748,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "2cc43ed3de040350a0aad4f187e57e9e" + "hash": "ea2d03f977fbb5d3d72bfc2cca64f5f0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", @@ -29820,11 +29820,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "1685ffac718c21aa115cb0b39c27c094" + "hash": "507cc7f9abaeddb5a7cc1def47a2a144" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "61a263e8f319b58062089a83140af8f7" + "hash": "0e5913aa4710ee8f84b4a059a76f6d92" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/ListAlertsForRepo.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/ListAlertsForRepo.php index 27fb762a3fd..c63b0e67c0e 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/ListAlertsForRepo.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/ListAlertsForRepo.php @@ -38,6 +38,10 @@ final class ListAlertsForRepo private string $ref; /**The number of the pull request for the results you want to list. **/ private int $pr; + /**A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ + private string $before; + /**A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ + private string $after; /**If specified, only code scanning alerts with this state will be returned. **/ private string $state; /**If specified, only code scanning alerts with this severity will be returned. **/ @@ -51,7 +55,7 @@ final class ListAlertsForRepo /**The property by which to sort the results. **/ private string $sort; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts $hydrator, string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $state, string $severity, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts $hydrator, string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $before, string $after, string $state, string $severity, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created') { $this->owner = $owner; $this->repo = $repo; @@ -59,6 +63,8 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali $this->toolGuid = $toolGuid; $this->ref = $ref; $this->pr = $pr; + $this->before = $before; + $this->after = $after; $this->state = $state; $this->severity = $severity; $this->page = $page; @@ -69,7 +75,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{owner}', '{repo}', '{tool_name}', '{tool_guid}', '{ref}', '{pr}', '{state}', '{severity}', '{page}', '{per_page}', '{direction}', '{sort}'], [$this->owner, $this->repo, $this->toolName, $this->toolGuid, $this->ref, $this->pr, $this->state, $this->severity, $this->page, $this->perPage, $this->direction, $this->sort], '/repos/{owner}/{repo}/code-scanning/alerts' . '?tool_name={tool_name}&tool_guid={tool_guid}&ref={ref}&pr={pr}&state={state}&severity={severity}&page={page}&per_page={per_page}&direction={direction}&sort={sort}')); + return new Request('GET', str_replace(['{owner}', '{repo}', '{tool_name}', '{tool_guid}', '{ref}', '{pr}', '{before}', '{after}', '{state}', '{severity}', '{page}', '{per_page}', '{direction}', '{sort}'], [$this->owner, $this->repo, $this->toolName, $this->toolGuid, $this->ref, $this->pr, $this->before, $this->after, $this->state, $this->severity, $this->page, $this->perPage, $this->direction, $this->sort], '/repos/{owner}/{repo}/code-scanning/alerts' . '?tool_name={tool_name}&tool_guid={tool_guid}&ref={ref}&pr={pr}&before={before}&after={after}&state={state}&severity={severity}&page={page}&per_page={per_page}&direction={direction}&sort={sort}')); } /** @return Observable|WithoutBody */ diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/ListAlertsForRepoListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/ListAlertsForRepoListing.php index 89f9cb26f57..fbd612f2d7b 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/ListAlertsForRepoListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/ListAlertsForRepoListing.php @@ -38,6 +38,10 @@ final class ListAlertsForRepoListing private string $ref; /**The number of the pull request for the results you want to list. **/ private int $pr; + /**A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ + private string $before; + /**A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ + private string $after; /**If specified, only code scanning alerts with this state will be returned. **/ private string $state; /**If specified, only code scanning alerts with this severity will be returned. **/ @@ -51,7 +55,7 @@ final class ListAlertsForRepoListing /**The property by which to sort the results. **/ private string $sort; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts $hydrator, string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $state, string $severity, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts $hydrator, string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $before, string $after, string $state, string $severity, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created') { $this->owner = $owner; $this->repo = $repo; @@ -59,6 +63,8 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali $this->toolGuid = $toolGuid; $this->ref = $ref; $this->pr = $pr; + $this->before = $before; + $this->after = $after; $this->state = $state; $this->severity = $severity; $this->page = $page; @@ -69,7 +75,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{owner}', '{repo}', '{tool_name}', '{tool_guid}', '{ref}', '{pr}', '{state}', '{severity}', '{page}', '{per_page}', '{direction}', '{sort}'], [$this->owner, $this->repo, $this->toolName, $this->toolGuid, $this->ref, $this->pr, $this->state, $this->severity, $this->page, $this->perPage, $this->direction, $this->sort], '/repos/{owner}/{repo}/code-scanning/alerts' . '?tool_name={tool_name}&tool_guid={tool_guid}&ref={ref}&pr={pr}&state={state}&severity={severity}&page={page}&per_page={per_page}&direction={direction}&sort={sort}')); + return new Request('GET', str_replace(['{owner}', '{repo}', '{tool_name}', '{tool_guid}', '{ref}', '{pr}', '{before}', '{after}', '{state}', '{severity}', '{page}', '{per_page}', '{direction}', '{sort}'], [$this->owner, $this->repo, $this->toolName, $this->toolGuid, $this->ref, $this->pr, $this->before, $this->after, $this->state, $this->severity, $this->page, $this->perPage, $this->direction, $this->sort], '/repos/{owner}/{repo}/code-scanning/alerts' . '?tool_name={tool_name}&tool_guid={tool_guid}&ref={ref}&pr={pr}&before={before}&after={after}&state={state}&severity={severity}&page={page}&per_page={per_page}&direction={direction}&sort={sort}')); } /** @return Observable|WithoutBody */ diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/ListAlertsForRepo.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/ListAlertsForRepo.php index 819020a60c2..87f6014022e 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/ListAlertsForRepo.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/ListAlertsForRepo.php @@ -25,10 +25,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable|WithoutBody */ - public function call(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $state, string $severity, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created'): iterable|WithoutBody + /** @return iterable|WithoutBody */ + public function call(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $before, string $after, string $state, string $severity, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created'): iterable|WithoutBody { - $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeScanning\ListAlertsForRepo($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $toolName, $toolGuid, $ref, $pr, $state, $severity, $page, $perPage, $direction, $sort); + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeScanning\ListAlertsForRepo($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $toolName, $toolGuid, $ref, $pr, $before, $after, $state, $severity, $page, $perPage, $direction, $sort); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable|WithoutBody { return $operation->createResponse($response); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/ListAlertsForRepoListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/ListAlertsForRepoListing.php index cfe9e5df40c..c57414bde5d 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/ListAlertsForRepoListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/ListAlertsForRepoListing.php @@ -25,10 +25,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable|WithoutBody */ - public function call(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $state, string $severity, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created'): iterable|WithoutBody + /** @return iterable|WithoutBody */ + public function call(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $before, string $after, string $state, string $severity, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created'): iterable|WithoutBody { - $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeScanning\ListAlertsForRepoListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $toolName, $toolGuid, $ref, $pr, $state, $severity, $page, $perPage, $direction, $sort); + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeScanning\ListAlertsForRepoListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $toolName, $toolGuid, $ref, $pr, $before, $after, $state, $severity, $page, $perPage, $direction, $sort); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable|WithoutBody { return $operation->createResponse($response); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetOrgRulesets.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetOrgRulesets.php index d6dcf6e4930..35853e807ae 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetOrgRulesets.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetOrgRulesets.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $targets, int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\GetOrgRulesets($this->responseSchemaValidator, $this->hydrator, $org, $targets, $perPage, $page); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetOrgRulesetsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetOrgRulesetsListing.php index 253b19246dc..07dfd8e96df 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetOrgRulesetsListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetOrgRulesetsListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $targets, int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\GetOrgRulesetsListing($this->responseSchemaValidator, $this->hydrator, $org, $targets, $perPage, $page); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoRulesets.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoRulesets.php index 6edb0465e7d..6e203e88e62 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoRulesets.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoRulesets.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $owner, string $repo, string $targets, int $perPage = 30, int $page = 1, bool $includesParents = true): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\GetRepoRulesets($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $targets, $perPage, $page, $includesParents); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoRulesetsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoRulesetsListing.php index a8c393df012..3bf58f92496 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoRulesetsListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoRulesetsListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $owner, string $repo, string $targets, int $perPage = 30, int $page = 1, bool $includesParents = true): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\GetRepoRulesetsListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $targets, $perPage, $page, $includesParents); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeScanning.php index bcf0c7ac678..97bc3d40a5f 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeScanning.php @@ -171,7 +171,7 @@ public function listAlertsForOrg(array $params): iterable return $operator->call($arguments['org'], $arguments['tool_name'], $arguments['tool_guid'], $arguments['before'], $arguments['after'], $arguments['state'], $arguments['severity'], $arguments['page'], $arguments['per_page'], $arguments['direction'], $arguments['sort']); } - /** @return Observable|WithoutBody */ + /** @return iterable|WithoutBody */ public function listAlertsForRepo(array $params): iterable|WithoutBody { $arguments = []; @@ -211,6 +211,18 @@ public function listAlertsForRepo(array $params): iterable|WithoutBody $arguments['pr'] = $params['pr']; unset($params['pr']); + if (array_key_exists('before', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: before'); + } + + $arguments['before'] = $params['before']; + unset($params['before']); + if (array_key_exists('after', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: after'); + } + + $arguments['after'] = $params['after']; + unset($params['after']); if (array_key_exists('state', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: state'); } @@ -249,7 +261,7 @@ public function listAlertsForRepo(array $params): iterable|WithoutBody unset($params['sort']); $operator = new Internal\Operator\CodeScanning\ListAlertsForRepo($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts()); - return $operator->call($arguments['owner'], $arguments['repo'], $arguments['tool_name'], $arguments['tool_guid'], $arguments['ref'], $arguments['pr'], $arguments['state'], $arguments['severity'], $arguments['page'], $arguments['per_page'], $arguments['direction'], $arguments['sort']); + return $operator->call($arguments['owner'], $arguments['repo'], $arguments['tool_name'], $arguments['tool_guid'], $arguments['ref'], $arguments['pr'], $arguments['before'], $arguments['after'], $arguments['state'], $arguments['severity'], $arguments['page'], $arguments['per_page'], $arguments['direction'], $arguments['sort']); } /** @return Observable */ diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php index 7185a643e96..9868f7d6c94 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php @@ -55,7 +55,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|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|iterable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|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): HookDelivery|ActionsEnterprisePermissions|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersForEnterprise\Response\ApplicationJson\Ok|iterable|WithoutBody|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|ActionsOrganizationPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|CopilotOrganizationDetails|OrganizationCustomRepositoryRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|ExternalGroup|OrgHook|OrgMembership|Migration|OrganizationRole|RepositoryRuleset|GroupMapping|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|CodeSecurityConfigurationForRepository|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Import|Installation|InteractionLimitResponse|One|Language|LicenseContent|Page|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|CodespacesUserPublicKey|CodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|EmptyObject { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Four.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Four.php index b0d9af018b7..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 |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|iterable|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/Repos.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php index d4083262210..3a2b448c8c0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php @@ -210,7 +210,7 @@ public function listForOrg(array $params): iterable return $operator->call($arguments['org'], $arguments['type'], $arguments['direction'], $arguments['sort'], $arguments['per_page'], $arguments['page']); } - /** @return iterable */ + /** @return Observable */ public function getOrgRulesets(array $params): iterable { $arguments = []; @@ -1074,7 +1074,7 @@ public function listReleases(array $params): iterable return $operator->call($arguments['owner'], $arguments['repo'], $arguments['per_page'], $arguments['page']); } - /** @return iterable */ + /** @return Observable */ public function getRepoRulesets(array $params): iterable { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php index cdf09c07168..0933a0e28cf 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php @@ -83,7 +83,7 @@ public function __construct(private Routers $routers) { } - /** @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|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|iterable|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|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|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/CodeScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/CodeScanning.php index da59a3747c9..3a3f5edcf22 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/CodeScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/CodeScanning.php @@ -177,7 +177,7 @@ public function listAlertsForOrgListing(array $params): iterable } while (count($items) > 0); } - /** @return Observable|WithoutBody */ + /** @return iterable|WithoutBody */ public function listAlertsForRepoListing(array $params): iterable|WithoutBody { $arguments = []; @@ -217,6 +217,18 @@ public function listAlertsForRepoListing(array $params): iterable|WithoutBody $arguments['pr'] = $params['pr']; unset($params['pr']); + if (array_key_exists('before', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: before'); + } + + $arguments['before'] = $params['before']; + unset($params['before']); + if (array_key_exists('after', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: after'); + } + + $arguments['after'] = $params['after']; + unset($params['after']); if (array_key_exists('state', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: state'); } @@ -256,7 +268,7 @@ public function listAlertsForRepoListing(array $params): iterable|WithoutBody $arguments['page'] = 1; do { $operator = new Internal\Operator\CodeScanning\ListAlertsForRepoListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts()); - $items = [...$operator->call($arguments['owner'], $arguments['repo'], $arguments['tool_name'], $arguments['tool_guid'], $arguments['ref'], $arguments['pr'], $arguments['state'], $arguments['severity'], $arguments['page'], $arguments['per_page'], $arguments['direction'], $arguments['sort'])]; + $items = [...$operator->call($arguments['owner'], $arguments['repo'], $arguments['tool_name'], $arguments['tool_guid'], $arguments['ref'], $arguments['pr'], $arguments['before'], $arguments['after'], $arguments['state'], $arguments['severity'], $arguments['page'], $arguments['per_page'], $arguments['direction'], $arguments['sort'])]; yield from $items; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php index 21680520d54..386aefc3d36 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php @@ -16,7 +16,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Schema\BasicError|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 */ public function call(string $call, array $params, array $pathChunks): iterable|BasicError|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Four.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Four.php index acbdfb0bb6c..a3a50dea675 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Four.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Four.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return 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 */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Repos.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Repos.php index 608f38a3466..2a62021189f 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Repos.php @@ -169,7 +169,7 @@ public function listForOrgListing(array $params): iterable } while (count($items) > 0); } - /** @return iterable */ + /** @return Observable */ public function getOrgRulesetsListing(array $params): iterable { $arguments = []; @@ -841,7 +841,7 @@ public function listReleasesListing(array $params): iterable } while (count($items) > 0); } - /** @return iterable */ + /** @return Observable */ public function getRepoRulesetsListing(array $params): iterable { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php index c6e21800e2d..e057c618b5d 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|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|WithoutBody|Observable|Observable|Observable|Observable|Observable|iterable|WithoutBody|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/Operation/CodeScanning.php b/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php index 34b426bac9c..e9663501ebe 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php @@ -49,16 +49,16 @@ public function listAlertsForOrgListing(string $org, string $toolName, string|nu return $this->operators->codeScanning👷ListAlertsForOrgListing()->call($org, $toolName, $toolGuid, $before, $after, $state, $severity, $page, $perPage, $direction, $sort); } - /** @return Observable|WithoutBody */ - public function listAlertsForRepo(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $state, string $severity, int $page, int $perPage, string $direction, string $sort): iterable|WithoutBody + /** @return iterable|WithoutBody */ + public function listAlertsForRepo(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $before, string $after, string $state, string $severity, int $page, int $perPage, string $direction, string $sort): iterable|WithoutBody { - return $this->operators->codeScanning👷ListAlertsForRepo()->call($owner, $repo, $toolName, $toolGuid, $ref, $pr, $state, $severity, $page, $perPage, $direction, $sort); + return $this->operators->codeScanning👷ListAlertsForRepo()->call($owner, $repo, $toolName, $toolGuid, $ref, $pr, $before, $after, $state, $severity, $page, $perPage, $direction, $sort); } - /** @return Observable|WithoutBody */ - public function listAlertsForRepoListing(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $state, string $severity, int $page, int $perPage, string $direction, string $sort): iterable|WithoutBody + /** @return iterable|WithoutBody */ + public function listAlertsForRepoListing(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $before, string $after, string $state, string $severity, int $page, int $perPage, string $direction, string $sort): iterable|WithoutBody { - return $this->operators->codeScanning👷ListAlertsForRepoListing()->call($owner, $repo, $toolName, $toolGuid, $ref, $pr, $state, $severity, $page, $perPage, $direction, $sort); + return $this->operators->codeScanning👷ListAlertsForRepoListing()->call($owner, $repo, $toolName, $toolGuid, $ref, $pr, $before, $after, $state, $severity, $page, $perPage, $direction, $sort); } /** @return */ diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Repos.php b/clients/GitHubEnterpriseCloud/src/Operation/Repos.php index bfd46718a64..f310437b3bc 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Repos.php @@ -89,13 +89,13 @@ public function createInOrg(string $org, array $params): FullRepository return $this->operators->repos👷CreateInOrg()->call($org, $params); } - /** @return iterable */ + /** @return Observable */ public function getOrgRulesets(string $org, string $targets, int $perPage, int $page): iterable { return $this->operators->repos👷GetOrgRulesets()->call($org, $targets, $perPage, $page); } - /** @return iterable */ + /** @return Observable */ public function getOrgRulesetsListing(string $org, string $targets, int $perPage, int $page): iterable { return $this->operators->repos👷GetOrgRulesetsListing()->call($org, $targets, $perPage, $page); @@ -1175,13 +1175,13 @@ public function getBranchRulesListing(string $owner, string $repo, string $branc return $this->operators->repos👷GetBranchRulesListing()->call($owner, $repo, $branch, $perPage, $page); } - /** @return iterable */ + /** @return Observable */ public function getRepoRulesets(string $owner, string $repo, string $targets, int $perPage, int $page, bool $includesParents): iterable { return $this->operators->repos👷GetRepoRulesets()->call($owner, $repo, $targets, $perPage, $page, $includesParents); } - /** @return iterable */ + /** @return Observable */ public function getRepoRulesetsListing(string $owner, string $repo, string $targets, int $perPage, int $page, bool $includesParents): iterable { return $this->operators->repos👷GetRepoRulesetsListing()->call($owner, $repo, $targets, $perPage, $page, $includesParents); diff --git a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php index 6bf7784e6bd..aaed11b65ac 100644 --- a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php @@ -1672,11 +1672,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/rulesets') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'LIST /orgs/{org}/rulesets') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'POST /orgs/{org}/rulesets') { @@ -2616,11 +2616,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts') { - return $this->typeResolver->resolve('Observable|WithoutBody'); + return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); } if ($call === 'LIST /repos/{owner}/{repo}/code-scanning/alerts') { - return $this->typeResolver->resolve('Observable|WithoutBody'); + return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); } if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}') { @@ -3860,11 +3860,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/rulesets') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'LIST /repos/{owner}/{repo}/rulesets') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'POST /repos/{owner}/{repo}/rulesets') { diff --git a/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset.php b/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset.php index ece14ba6b1f..b37d7b9136e 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset.php @@ -125,7 +125,10 @@ } }, "html": { - "type": "object", + "type": [ + "object", + "null" + ], "properties": { "href": { "type": "string", diff --git a/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset/Links.php b/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset/Links.php index 9cb98676732..8d7f5bd3e7a 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset/Links.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset/Links.php @@ -21,7 +21,10 @@ } }, "html": { - "type": "object", + "type": [ + "object", + "null" + ], "properties": { "href": { "type": "string", diff --git a/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset/Links/Html.php b/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset/Links/Html.php index d378acc1ad1..203091190a0 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset/Links/Html.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset/Links/Html.php @@ -7,7 +7,10 @@ final readonly class Html { public const SCHEMA_JSON = '{ - "type": "object", + "type": [ + "object", + "null" + ], "properties": { "href": { "type": "string", diff --git a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetCreated.php b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetCreated.php index 21af1fe2f1f..19a1212a175 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetCreated.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetCreated.php @@ -1830,7 +1830,10 @@ } }, "html": { - "type": "object", + "type": [ + "object", + "null" + ], "properties": { "href": { "type": "string", diff --git a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetDeleted.php b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetDeleted.php index 897176719d5..3734737c8b8 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetDeleted.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetDeleted.php @@ -1830,7 +1830,10 @@ } }, "html": { - "type": "object", + "type": [ + "object", + "null" + ], "properties": { "href": { "type": "string", diff --git a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetEdited.php b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetEdited.php index f5acf3ad0d6..39f8cd5afcc 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetEdited.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetEdited.php @@ -1830,7 +1830,10 @@ } }, "html": { - "type": "object", + "type": [ + "object", + "null" + ], "properties": { "href": { "type": "string", diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/ListAlertsForRepoListingTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/ListAlertsForRepoListingTest.php index c2558b82cc7..4b73d099adf 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/ListAlertsForRepoListingTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/ListAlertsForRepoListingTest.php @@ -31,7 +31,7 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\CodeScanning\ListAlertsForRepoListing::OPERATION_MATCH, (static function (array $data): array { $data['owner'] = 'generated'; @@ -40,6 +40,8 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $data['tool_guid'] = null; $data['ref'] = 'generated'; $data['pr'] = 2; + $data['before'] = 'generated'; + $data['after'] = 'generated'; $data['state'] = 'generated'; $data['severity'] = 'generated'; $data['page'] = 1; @@ -63,9 +65,9 @@ public function operations_httpCode_403_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->codeScanning()->listAlertsForRepoListing('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 1, 8, 'generated', 'generated'); + $result = $client->operations()->codeScanning()->listAlertsForRepoListing('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 'generated', 'generated', 1, 8, 'generated', 'generated'); foreach ($result as $item) { } } @@ -80,7 +82,7 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\CodeScanning\ListAlertsForRepoListing::OPERATION_MATCH, (static function (array $data): array { $data['owner'] = 'generated'; @@ -89,6 +91,8 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $data['tool_guid'] = null; $data['ref'] = 'generated'; $data['pr'] = 2; + $data['before'] = 'generated'; + $data['after'] = 'generated'; $data['state'] = 'generated'; $data['severity'] = 'generated'; $data['page'] = 1; @@ -112,9 +116,9 @@ public function operations_httpCode_404_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->codeScanning()->listAlertsForRepoListing('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 1, 8, 'generated', 'generated'); + $result = $client->operations()->codeScanning()->listAlertsForRepoListing('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 'generated', 'generated', 1, 8, 'generated', 'generated'); foreach ($result as $item) { } } @@ -129,7 +133,7 @@ public function call_httpCode_503_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\CodeScanning\ListAlertsForRepoListing::OPERATION_MATCH, (static function (array $data): array { $data['owner'] = 'generated'; @@ -138,6 +142,8 @@ public function call_httpCode_503_responseContentType_application_json_zero(): v $data['tool_guid'] = null; $data['ref'] = 'generated'; $data['pr'] = 2; + $data['before'] = 'generated'; + $data['after'] = 'generated'; $data['state'] = 'generated'; $data['severity'] = 'generated'; $data['page'] = 1; @@ -161,9 +167,9 @@ public function operations_httpCode_503_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->codeScanning()->listAlertsForRepoListing('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 1, 8, 'generated', 'generated'); + $result = $client->operations()->codeScanning()->listAlertsForRepoListing('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 'generated', 'generated', 1, 8, 'generated', 'generated'); foreach ($result as $item) { } } @@ -177,7 +183,7 @@ public function call_httpCode_304_empty(): void $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\CodeScanning\ListAlertsForRepoListing::OPERATION_MATCH, (static function (array $data): array { $data['owner'] = 'generated'; @@ -186,6 +192,8 @@ public function call_httpCode_304_empty(): void $data['tool_guid'] = null; $data['ref'] = 'generated'; $data['pr'] = 2; + $data['before'] = 'generated'; + $data['after'] = 'generated'; $data['state'] = 'generated'; $data['severity'] = 'generated'; $data['page'] = 1; @@ -208,9 +216,9 @@ public function operations_httpCode_304_empty(): void $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->codeScanning()->listAlertsForRepoListing('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 1, 8, 'generated', 'generated'); + $result = $client->operations()->codeScanning()->listAlertsForRepoListing('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 'generated', 'generated', 1, 8, 'generated', 'generated'); self::assertArrayHasKey('code', $result); self::assertSame(304, $result['code']); foreach ($result as $item) { diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/ListAlertsForRepoTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/ListAlertsForRepoTest.php index db728e48ce2..e1758fb6913 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/ListAlertsForRepoTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/ListAlertsForRepoTest.php @@ -31,7 +31,7 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\CodeScanning\ListAlertsForRepo::OPERATION_MATCH, (static function (array $data): array { $data['owner'] = 'generated'; @@ -40,6 +40,8 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $data['tool_guid'] = null; $data['ref'] = 'generated'; $data['pr'] = 2; + $data['before'] = 'generated'; + $data['after'] = 'generated'; $data['state'] = 'generated'; $data['severity'] = 'generated'; $data['page'] = 1; @@ -61,9 +63,9 @@ public function operations_httpCode_403_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->codeScanning()->listAlertsForRepo('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 1, 8, 'generated', 'generated'); + $result = $client->operations()->codeScanning()->listAlertsForRepo('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 'generated', 'generated', 1, 8, 'generated', 'generated'); } /** @test */ @@ -76,7 +78,7 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\CodeScanning\ListAlertsForRepo::OPERATION_MATCH, (static function (array $data): array { $data['owner'] = 'generated'; @@ -85,6 +87,8 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $data['tool_guid'] = null; $data['ref'] = 'generated'; $data['pr'] = 2; + $data['before'] = 'generated'; + $data['after'] = 'generated'; $data['state'] = 'generated'; $data['severity'] = 'generated'; $data['page'] = 1; @@ -106,9 +110,9 @@ public function operations_httpCode_404_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->codeScanning()->listAlertsForRepo('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 1, 8, 'generated', 'generated'); + $result = $client->operations()->codeScanning()->listAlertsForRepo('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 'generated', 'generated', 1, 8, 'generated', 'generated'); } /** @test */ @@ -121,7 +125,7 @@ public function call_httpCode_503_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\CodeScanning\ListAlertsForRepo::OPERATION_MATCH, (static function (array $data): array { $data['owner'] = 'generated'; @@ -130,6 +134,8 @@ public function call_httpCode_503_responseContentType_application_json_zero(): v $data['tool_guid'] = null; $data['ref'] = 'generated'; $data['pr'] = 2; + $data['before'] = 'generated'; + $data['after'] = 'generated'; $data['state'] = 'generated'; $data['severity'] = 'generated'; $data['page'] = 1; @@ -151,9 +157,9 @@ public function operations_httpCode_503_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->codeScanning()->listAlertsForRepo('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 1, 8, 'generated', 'generated'); + $result = $client->operations()->codeScanning()->listAlertsForRepo('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 'generated', 'generated', 1, 8, 'generated', 'generated'); } /** @test */ @@ -165,7 +171,7 @@ public function call_httpCode_304_empty(): void $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\CodeScanning\ListAlertsForRepo::OPERATION_MATCH, (static function (array $data): array { $data['owner'] = 'generated'; @@ -174,6 +180,8 @@ public function call_httpCode_304_empty(): void $data['tool_guid'] = null; $data['ref'] = 'generated'; $data['pr'] = 2; + $data['before'] = 'generated'; + $data['after'] = 'generated'; $data['state'] = 'generated'; $data['severity'] = 'generated'; $data['page'] = 1; @@ -194,9 +202,9 @@ public function operations_httpCode_304_empty(): void $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/repos/generated/generated/code-scanning/alerts?tool_name=generated&tool_guid=&ref=generated&pr=2&before=generated&after=generated&state=generated&severity=generated&page=1&per_page=8&direction=generated&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->codeScanning()->listAlertsForRepo('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 1, 8, 'generated', 'generated'); + $result = $client->operations()->codeScanning()->listAlertsForRepo('generated', 'generated', 'generated', null, 'generated', 2, 'generated', 'generated', 'generated', 'generated', 1, 8, 'generated', 'generated'); self::assertArrayHasKey('code', $result); self::assertSame(304, $result['code']); } diff --git a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php index 329b637e60e..503dee6a009 100644 --- a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php @@ -424,8 +424,8 @@ function authHeader(): string assertType('Observable', $client->call('LIST /orgs/{org}/repos')); assertType('', $client->call('POST /orgs/{org}/repos')); assertType('Observable', $client->call('GET /orgs/{org}/repository-fine-grained-permissions')); -assertType('iterable', $client->call('GET /orgs/{org}/rulesets')); -assertType('iterable', $client->call('LIST /orgs/{org}/rulesets')); +assertType('Observable', $client->call('GET /orgs/{org}/rulesets')); +assertType('Observable', $client->call('LIST /orgs/{org}/rulesets')); assertType('', $client->call('POST /orgs/{org}/rulesets')); assertType('Observable', $client->call('GET /orgs/{org}/rulesets/rule-suites')); assertType('Observable', $client->call('LIST /orgs/{org}/rulesets/rule-suites')); @@ -660,8 +660,8 @@ function authHeader(): string assertType('', $client->call('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}')); assertType('', $client->call('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs')); assertType('', $client->call('POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest')); -assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts')); -assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/code-scanning/alerts')); +assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts')); +assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('LIST /repos/{owner}/{repo}/code-scanning/alerts')); assertType('', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}')); assertType('', $client->call('PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances')); @@ -971,8 +971,8 @@ function authHeader(): string assertType('', $client->call('DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/rules/branches/{branch}')); assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/rules/branches/{branch}')); -assertType('iterable', $client->call('GET /repos/{owner}/{repo}/rulesets')); -assertType('iterable', $client->call('LIST /repos/{owner}/{repo}/rulesets')); +assertType('Observable', $client->call('GET /repos/{owner}/{repo}/rulesets')); +assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/rulesets')); assertType('', $client->call('POST /repos/{owner}/{repo}/rulesets')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/rulesets/rule-suites')); assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/rulesets/rule-suites')); diff --git a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml index f9a561e1caf..085b4dffb95 100644 --- a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml +++ b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml @@ -26903,6 +26903,8 @@ paths: - "$ref": "#/components/parameters/git-ref" - "$ref": "#/components/parameters/pr-alias" - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" - name: sort description: The property by which to sort the results. in: query @@ -82376,7 +82378,9 @@ components: type: string description: The URL of the ruleset html: - type: object + type: + - object + - 'null' properties: href: type: string