diff --git a/clients/GitHub/README.md b/clients/GitHub/README.md index 92fc3fb829a..59f78fe0335 100644 --- a/clients/GitHub/README.md +++ b/clients/GitHub/README.md @@ -7782,6 +7782,66 @@ $client->operations()->billing()->getSharedStorageBillingOrg( org: 'gener You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/billing/billing#get-shared-storage-billing-for-an-organization). +### copilot/usage-metrics-for-team + +Get a summary of Copilot usage for a team + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/team/{team_slug}/copilot/usage', [ + 'org' => 'generated', + 'team_slug' => 'generated', + 'since' => 'generated', + 'until' => 'generated', + 'page' => 1, + 'per_page' => 8, +]); +``` + +Operations method: +```php +$client->operations()->copilot()->usageMetricsForTeam( org: 'generated', + team_slug: 'generated', + since: 'generated', + until: 'generated', + page: 1, + per_page: 8, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-a-team). + + +### copilot/usage-metrics-for-team + +Get a summary of Copilot usage for a team + +Using the `call` method: +```php +$client->call('LIST /orgs/{org}/team/{team_slug}/copilot/usage', [ + 'org' => 'generated', + 'team_slug' => 'generated', + 'since' => 'generated', + 'until' => 'generated', + 'page' => 1, + 'per_page' => 8, +]); +``` + +Operations method: +```php +$client->operations()->copilot()->usageMetricsForTeamListing( org: 'generated', + team_slug: 'generated', + since: 'generated', + until: 'generated', + page: 1, + per_page: 8, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-a-team). + + ### teams/list List teams @@ -21359,6 +21419,28 @@ $client->operations()->secretScanning()->listLocationsForAlertListing( ow You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/secret-scanning/secret-scanning#list-locations-for-a-secret-scanning-alert). +### secret-scanning/create-push-protection-bypass + +Create a push protection bypass + +Using the `call` method: +```php +$client->call('POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses', [ + 'owner' => 'generated', + 'repo' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->secretScanning()->createPushProtectionBypass( owner: 'generated', + repo: 'generated', +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/secret-scanning/secret-scanning#create-a-push-protection-bypass). + + ### security-advisories/list-repository-advisories List repository security advisories diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index c7264e978a1..a87dca3d989 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "49b27bf070e71e6e97e24f657713d508", + "specHash": "9bdf0d87b61dcb75ec907d0344bd6b72", "generatedFiles": { "files": [ { @@ -5516,11 +5516,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/ClientInterface.php", - "hash": "5ecd8f7dae3c9dc7c6ff07eca1552470" + "hash": "1a882d40e5df294a84232cf1c0a8cf6c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Client.php", - "hash": "65d2596dd07160059ecefb8b316d05cd" + "hash": "4b221e8e24b28376c980c2b8a70fb3ff" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/OperationsInterface.php", @@ -5548,7 +5548,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", - "hash": "2d27cb2b8d9ac1f2272c2a9d0c5e29f8" + "hash": "f114687e739de37769f5334e2f1bd277" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Activity.php", @@ -5576,7 +5576,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "c695d5fa74fcde6b19cda5d1ddeb9cdc" + "hash": "710b9747ba78bb723d65536a1d3dc7fa" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Actions.php", @@ -11716,7 +11716,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Copilot.php", - "hash": "9206c58c493880b78c7635014f0bfd79" + "hash": "cb796cb3c8dedced1437b8741f1d3582" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CheckAutomatedSecurityFixes.php", @@ -24460,7 +24460,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Orgs.php", - "hash": "1256b670070c657cdeb23640900c56a2" + "hash": "ae85c920b7d188e3e44da70cdfc21879" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/RateLimit.php", @@ -24524,7 +24524,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Copilot.php", - "hash": "f012aa355b654d0e2f69e39aac157b60" + "hash": "e471358b6eb2e6fc141acf8b52e4b07a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Pulls.php", @@ -24668,7 +24668,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Orgs.php", - "hash": "279091946a956396eddbdeb7d0046b5d" + "hash": "7f65bb8c90961a8a355115922fcc134c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Teams.php", @@ -24880,7 +24880,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Orgs.php", - "hash": "d9fa1cd41ee4ef5dc9e80b71f39c5771" + "hash": "b7064f19fd6b2132fea4c2076dc726d0" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Codespaces.php", @@ -24960,15 +24960,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "d99d9cc5cb5c29690e0b91c96416f739" + "hash": "1e258cc0812b881efb6028cb4020f0bd" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "d6791bf4eef961bd113ec842aa9b509a" + "hash": "343c2b760b84ced96a51118cca0661bb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", - "hash": "7b3ace4276160bd45f54a517e04aaa29" + "hash": "3b7a66c6a655fb64e4ae24f70323f067" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php", @@ -24988,7 +24988,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Six.php", - "hash": "b03a97269cbe604379e36eb3a1af21cd" + "hash": "f7104fd901185125d1fb51001dc29c48" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Five.php", @@ -25028,7 +25028,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Five.php", - "hash": "d53283196df1b4f9b023c74043374bf8" + "hash": "4e2a79ee54c9cfff68962e58c2a4d8f9" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Six.php", @@ -25072,7 +25072,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", - "hash": "64f9913225cd6f7fb8ad53af54273c48" + "hash": "2efb8769e33162cb2929c0c68d22bd42" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Eight.php", @@ -25136,7 +25136,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Six.php", - "hash": "2d193ba8e2a36a3ea0fe0a7e952dd209" + "hash": "005f520b7747dbc03aca2290b99d7037" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Eight.php", @@ -25164,11 +25164,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Routers.php", - "hash": "f98fef4178bc1cb79f6b89386de8e0ea" + "hash": "6b62a7fa70f4d0b6d7c4ffa38c3fe73e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operators.php", - "hash": "622af053a71a71b62a3ba4651ff536db" + "hash": "eb0ae2c37dbe7249a9062eea07f9f6c5" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Root.php", @@ -27160,7 +27160,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "ab092ae2227ed736d11434cf17d36773" + "hash": "d0683888d59485b0f5aa79aa0ef2627a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -27540,11 +27540,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/GetAllCustomProperties.php", - "hash": "ba0abeca262e4069974a9924a8daee4d" + "hash": "de1096c5b3655eb8c6166d1ba4896207" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/GetAllCustomProperties.php", - "hash": "d9c9fbfb12bf6904f926d74e63fefac4" + "hash": "6f8b811d5950c34eac3092e1515a2188" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/GetAllCustomPropertiesTest.php", @@ -27552,11 +27552,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/CreateOrUpdateCustomProperties.php", - "hash": "e6e18453e9533efd6f5d6e38c4674def" + "hash": "8964881d8e97e88a9e720cd44a09bda0" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/CreateOrUpdateCustomProperties.php", - "hash": "ba799c69ecf5ec41444551b53dd82b99" + "hash": "3757dbb6130bc6ce0edc8e52c8842d48" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/CreateOrUpdateCustomPropertiesTest.php", @@ -27564,27 +27564,27 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/GetCustomProperty.php", - "hash": "0b602495520e063b817e6600cd108943" + "hash": "895732084941c7c8b5b4fdd8f03c29f4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/GetCustomProperty.php", - "hash": "e3ade8077207096e4d1305b3ba5088ae" + "hash": "8dc202d2f5dfc5935acd69ac1bbdb0dd" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/GetCustomPropertyTest.php", - "hash": "07d9e5bf272b62f65f6cb1b594bb9377" + "hash": "ea10bb56f407179c5ffa17f8c9c5cc58" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/CreateOrUpdateCustomProperty.php", - "hash": "567d5a47c3a1db6bfb4686bbc0f66f1f" + "hash": "1a8ee9ce06c5ceb5d78a40cf65760cc3" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/CreateOrUpdateCustomProperty.php", - "hash": "ef23ab53ca332ad151b9baad3cf8d4b2" + "hash": "e503ca6aa384e7f5366d52af6a340c75" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/CreateOrUpdateCustomPropertyTest.php", - "hash": "144e2a9d3457ff8e864fbdf823e9918a" + "hash": "0e4024b2712575425cb135e139dc4c77" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/RemoveCustomProperty.php", @@ -27646,10 +27646,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetCustomPropertiesValuesTest.php", "hash": "c7a4cf41968522117acbd11cf06b3c6e" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrgCustomProperty.php", - "hash": "65a33ee5e648a5ba6e1d05efeb490ae0" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CustomPropertyValue.php", "hash": "bf8cdb4d1d0c7fe163731b7702fce63e" @@ -27660,7 +27656,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Orgs\/CreateOrUpdateCustomProperties\/Request\/ApplicationJson.php", - "hash": "7e4c0e350553bd7fa97e17c254300089" + "hash": "fcb295de0733f13a315c82975d0ff0c2" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Orgs\/CreateOrUpdateCustomProperty\/Request\/ApplicationJson.php", @@ -27676,7 +27672,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Properties\/Schema\/CustomPropertyName.php", - "hash": "ccfe72340b3dbbc149134e15f22f6650" + "hash": "a015b30dab1c1694160d90b6ea732e41" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Properties\/Values.php", @@ -27688,7 +27684,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCustomPropertyCreated.php", - "hash": "6fc3bd972e4fc5571d60e8403da16f3b" + "hash": "59e323cb010c07a95e24a19e3e4edfd1" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCustomPropertyDeleted.php", @@ -27696,7 +27692,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCustomPropertyUpdated.php", - "hash": "73f2f0678b7993ef20c9b69e780620b3" + "hash": "5f1a4d94100674359b625774a648444e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCustomPropertyValuesUpdated.php", @@ -27780,11 +27776,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "f55c989a25ec9f9dc06cfcc1e8504b34" + "hash": "c26213746093e37179dd6eb878be92a4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "6f4877898093b3039793e27526c72f5d" + "hash": "46ad7833447da218f14c0e26bf09473a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -28104,7 +28100,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/CustomProperty.php", - "hash": "af76c979df78cec830197ae02510b2ee" + "hash": "dedadeb79ebff9b3c226a146779abf77" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/CustomPropertyValues.php", @@ -28824,7 +28820,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Copilot.php", - "hash": "b4881d91a00c49c81b0860e3655eaf9e" + "hash": "93e4cb1c35f60ccd0a5d00e77013e6ba" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Copilot\/Usage.php", @@ -29740,11 +29736,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfiguration.php", - "hash": "3079c2fbeb9341d5128ad0d86124c8a5" + "hash": "2929d09f16a601a5e6f975ba05b59593" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityDefaultConfigurations.php", - "hash": "80a90378337a30e5cb817beb5bb56f4f" + "hash": "c0f711c94f6e2ee9fa37caaf94926b16" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfigurationRepositories.php", @@ -29776,11 +29772,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/CreateConfiguration\/Request\/ApplicationJson.php", - "hash": "fd8d76c221bd60f35aa2c0463d6bd4ff" + "hash": "6a73bd5ff2999e5fabd297689772695b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/UpdateConfiguration\/Request\/ApplicationJson.php", - "hash": "9ad36af795ed45286288a52e398d1ce0" + "hash": "3e6bd2e263559ef3e41ee383f8456b0b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/AttachConfiguration\/Request\/ApplicationJson.php", @@ -29792,7 +29788,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/CodeSecurity\/SetConfigurationAsDefault\/Response\/ApplicationJson\/Ok.php", - "hash": "e9b8b4a9300ca7d9535d546f1a9b80f6" + "hash": "77824b8868a85c0cba42241c1794aa49" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeSecurity.php", @@ -29820,7 +29816,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations.php", - "hash": "0b53c9f45bd4aae9493fd73813bf88da" + "hash": "37855f48741a15b19345db127b0ff0ca" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/Defaults.php", @@ -29828,7 +29824,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId.php", - "hash": "870c6ee31d40d795fa4e3ee2027a4fd0" + "hash": "b7b2da6e26ce6e2cb52591f989f07aa4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Attach.php", @@ -29836,7 +29832,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Defaults.php", - "hash": "c2b302e68f2bfae240995c434f49c4c0" + "hash": "f3dfe01572cc964b30eeb0210fc2cf87" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Repositories.php", @@ -30289,6 +30285,90 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Team\/TeamSlug\/Copilot\/Usage.php", "hash": "3f202db72777733607abe67c7ebe47f0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Copilot\/UsageMetricsForTeam.php", + "hash": "113b3a54860b29bc12312d2cc4af45ce" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Copilot\/UsageMetricsForTeam.php", + "hash": "9cac6941f410e08c343ca4fb72c50cfb" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Copilot\/UsageMetricsForTeamTest.php", + "hash": "0941b1c9be05e43f7c68a610b167787a" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Copilot\/UsageMetricsForTeamListing.php", + "hash": "8330bcfe41dbe83811fe156c079af711" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Copilot\/UsageMetricsForTeamListing.php", + "hash": "7fda2b5e4890eab2fe259cd4a0b8861a" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Copilot\/UsageMetricsForTeamListingTest.php", + "hash": "a129221a550089c22fc71b36beb1beb4" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/CreatePushProtectionBypass.php", + "hash": "0fdf70664c2f874a8b95b7a28b30c57b" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/CreatePushProtectionBypass.php", + "hash": "677b7a2ae8cda1fb5394dc24e001a8d4" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/CreatePushProtectionBypassTest.php", + "hash": "99cdb83e7ff4d46f5907b1639189c089" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CustomProperty.php", + "hash": "61c40f244c85c1f01567e8d0b7d6f8b0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecretScanningPushProtectionBypassReason.php", + "hash": "60ba37bc65253a0da2e151ec44d48a22" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecretScanningPushProtectionBypassPlaceholderId.php", + "hash": "02221af955a97c8b5f627ccdbc3af6e0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecretScanningPushProtectionBypass.php", + "hash": "fb06d5d3d70edb19e72f18089727fced" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet2A7E5464\/TietF7B694FB\/Tiet81AA0AE4\/Tiet09B0FC2A.php", + "hash": "c612e662e2c433a5b491cbe8a0a65d10" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/UpdateConfiguration\/Request\/ApplicationJson\/DependencyGraphAutosubmitActionOptions.php", + "hash": "26bf08af4aeeb2e40cf67a44744705f0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfiguration\/DependencyGraphAutosubmitActionOptions.php", + "hash": "a77da1d1d4a0196158e040e731f7afe8" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/CreateConfiguration\/Request\/ApplicationJson\/DependencyGraphAutosubmitActionOptions.php", + "hash": "b075c0e48ad0a4250554d60a4919265c" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecretScanning\/CreatePushProtectionBypass\/Request\/ApplicationJson.php", + "hash": "272eca96faf81c86e4b14c8ab92da908" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/SecretScanning.php", + "hash": "cd0058ffbbaf9845de41a02f48f71c98" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Team\/TeamSlug\/Copilot\/Usage.php", + "hash": "834213a7c5461650c7f66d14b687778e" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/SecretScanning\/PushProtectionBypasses.php", + "hash": "bcebb4afe197c9215e70a2a67da83e66" } ] }, diff --git a/clients/GitHub/src/Client.php b/clients/GitHub/src/Client.php index 899f4d28a98..705d18d0559 100644 --- a/clients/GitHub/src/Client.php +++ b/clients/GitHub/src/Client.php @@ -27,7 +27,7 @@ public function __construct(AuthenticationInterface $authentication, Browser $br } // phpcs:disable - public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\OrgCustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository + public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\CustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository { [$method, $path] = explode(' ', $call); $pathChunks = explode('/', $path); diff --git a/clients/GitHub/src/ClientInterface.php b/clients/GitHub/src/ClientInterface.php index b723e8d1ba2..f94ed9737d6 100644 --- a/clients/GitHub/src/ClientInterface.php +++ b/clients/GitHub/src/ClientInterface.php @@ -7,7 +7,7 @@ interface ClientInterface { // phpcs:disable - public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\OrgCustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository; + public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\CustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository; public function operations(): OperationsInterface; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php index 0eb9b852415..7debc15bf08 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration; +use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; @@ -17,9 +18,11 @@ use LogicException; use Throwable; +use function array_pop; use function assert; use function count; use function is_a; +use function is_array; class Configurations implements ObjectMapper { @@ -41,6 +44,7 @@ public function hydrateObject(string $className, array $payload): object return match ($className) { 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($payload), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } @@ -179,6 +183,37 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code after_dependencyGraph: + $value = $payload['dependency_graph_autosubmit_action'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitAction'] = null; + goto after_dependencyGraphAutosubmitAction; + } + + $properties['dependencyGraphAutosubmitAction'] = $value; + + after_dependencyGraphAutosubmitAction: + + $value = $payload['dependency_graph_autosubmit_action_options'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitActionOptions'] = null; + goto after_dependencyGraphAutosubmitActionOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'dependencyGraphAutosubmitActionOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['dependencyGraphAutosubmitActionOptions'] = $value; + + after_dependencyGraphAutosubmitActionOptions: + $value = $payload['dependabot_alerts'] ?? null; if ($value === null) { @@ -325,6 +360,36 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(array $payload): DependencyGraphAutosubmitActionOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['labeled_runners'] ?? null; + + if ($value === null) { + $properties['labeledRunners'] = null; + goto after_labeledRunners; + } + + $properties['labeledRunners'] = $value; + + after_labeledRunners: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(DependencyGraphAutosubmitActionOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new DependencyGraphAutosubmitActionOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + } + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { @@ -358,6 +423,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($object), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), default => throw new LogicException('No serialization defined for $className'), }; } catch (Throwable $exception) { @@ -513,6 +579,23 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_dependencyGraph: $result['dependency_graph'] = $dependencyGraph; + $dependencyGraphAutosubmitAction = $object->dependencyGraphAutosubmitAction; + + if ($dependencyGraphAutosubmitAction === null) { + goto after_dependencyGraphAutosubmitAction; + } + + after_dependencyGraphAutosubmitAction: $result['dependency_graph_autosubmit_action'] = $dependencyGraphAutosubmitAction; + + $dependencyGraphAutosubmitActionOptions = $object->dependencyGraphAutosubmitActionOptions; + + if ($dependencyGraphAutosubmitActionOptions === null) { + goto after_dependencyGraphAutosubmitActionOptions; + } + + $dependencyGraphAutosubmitActionOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($dependencyGraphAutosubmitActionOptions); + after_dependencyGraphAutosubmitActionOptions: $result['dependency_graph_autosubmit_action_options'] = $dependencyGraphAutosubmitActionOptions; + $dependabotAlerts = $object->dependabotAlerts; if ($dependabotAlerts === null) { @@ -612,6 +695,22 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(mixed $object): mixed + { + assert($object instanceof DependencyGraphAutosubmitActionOptions); + $result = []; + + $labeledRunners = $object->labeledRunners; + + if ($labeledRunners === null) { + goto after_labeledRunners; + } + + after_labeledRunners: $result['labeled_runners'] = $labeledRunners; + + return $result; + } + /** * @param class-string $className * @param iterable $payloads; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php index 878117c347b..a0fc0c6823d 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration; +use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions; use ApiClients\Client\GitHub\Schema\ScimError; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; @@ -18,9 +19,11 @@ use LogicException; use Throwable; +use function array_pop; use function assert; use function count; use function is_a; +use function is_array; class ConfigurationId implements ObjectMapper { @@ -41,6 +44,7 @@ public function hydrateObject(string $className, array $payload): object { return match ($className) { 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($payload), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), 'ApiClients\Client\GitHub\Schema\ScimError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ScimError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), @@ -118,6 +122,37 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code after_dependencyGraph: + $value = $payload['dependency_graph_autosubmit_action'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitAction'] = null; + goto after_dependencyGraphAutosubmitAction; + } + + $properties['dependencyGraphAutosubmitAction'] = $value; + + after_dependencyGraphAutosubmitAction: + + $value = $payload['dependency_graph_autosubmit_action_options'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitActionOptions'] = null; + goto after_dependencyGraphAutosubmitActionOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'dependencyGraphAutosubmitActionOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['dependencyGraphAutosubmitActionOptions'] = $value; + + after_dependencyGraphAutosubmitActionOptions: + $value = $payload['dependabot_alerts'] ?? null; if ($value === null) { @@ -264,6 +299,36 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(array $payload): DependencyGraphAutosubmitActionOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['labeled_runners'] ?? null; + + if ($value === null) { + $properties['labeledRunners'] = null; + goto after_labeledRunners; + } + + $properties['labeledRunners'] = $value; + + after_labeledRunners: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(DependencyGraphAutosubmitActionOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new DependencyGraphAutosubmitActionOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError { $properties = []; @@ -444,6 +509,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($object), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), 'ApiClients\Client\GitHub\Schema\ScimError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ScimError($object), default => throw new LogicException('No serialization defined for $className'), @@ -561,6 +627,23 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_dependencyGraph: $result['dependency_graph'] = $dependencyGraph; + $dependencyGraphAutosubmitAction = $object->dependencyGraphAutosubmitAction; + + if ($dependencyGraphAutosubmitAction === null) { + goto after_dependencyGraphAutosubmitAction; + } + + after_dependencyGraphAutosubmitAction: $result['dependency_graph_autosubmit_action'] = $dependencyGraphAutosubmitAction; + + $dependencyGraphAutosubmitActionOptions = $object->dependencyGraphAutosubmitActionOptions; + + if ($dependencyGraphAutosubmitActionOptions === null) { + goto after_dependencyGraphAutosubmitActionOptions; + } + + $dependencyGraphAutosubmitActionOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($dependencyGraphAutosubmitActionOptions); + after_dependencyGraphAutosubmitActionOptions: $result['dependency_graph_autosubmit_action_options'] = $dependencyGraphAutosubmitActionOptions; + $dependabotAlerts = $object->dependabotAlerts; if ($dependabotAlerts === null) { @@ -660,6 +743,22 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(mixed $object): mixed + { + assert($object instanceof DependencyGraphAutosubmitActionOptions); + $result = []; + + $labeledRunners = $object->labeledRunners; + + if ($labeledRunners === null) { + goto after_labeledRunners; + } + + after_labeledRunners: $result['labeled_runners'] = $labeledRunners; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(mixed $object): mixed { assert($object instanceof BasicError); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php index f5bd03381c8..f0216f87e21 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration; +use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions; use ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; @@ -44,6 +45,7 @@ public function hydrateObject(string $className, array $payload): object return match ($className) { 'ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($payload), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; @@ -170,6 +172,37 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code after_dependencyGraph: + $value = $payload['dependency_graph_autosubmit_action'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitAction'] = null; + goto after_dependencyGraphAutosubmitAction; + } + + $properties['dependencyGraphAutosubmitAction'] = $value; + + after_dependencyGraphAutosubmitAction: + + $value = $payload['dependency_graph_autosubmit_action_options'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitActionOptions'] = null; + goto after_dependencyGraphAutosubmitActionOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'dependencyGraphAutosubmitActionOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['dependencyGraphAutosubmitActionOptions'] = $value; + + after_dependencyGraphAutosubmitActionOptions: + $value = $payload['dependabot_alerts'] ?? null; if ($value === null) { @@ -316,6 +349,36 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(array $payload): DependencyGraphAutosubmitActionOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['labeled_runners'] ?? null; + + if ($value === null) { + $properties['labeledRunners'] = null; + goto after_labeledRunners; + } + + $properties['labeledRunners'] = $value; + + after_labeledRunners: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(DependencyGraphAutosubmitActionOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new DependencyGraphAutosubmitActionOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError { $properties = []; @@ -412,6 +475,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($object), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), default => throw new LogicException('No serialization defined for $className'), }; @@ -553,6 +617,23 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_dependencyGraph: $result['dependency_graph'] = $dependencyGraph; + $dependencyGraphAutosubmitAction = $object->dependencyGraphAutosubmitAction; + + if ($dependencyGraphAutosubmitAction === null) { + goto after_dependencyGraphAutosubmitAction; + } + + after_dependencyGraphAutosubmitAction: $result['dependency_graph_autosubmit_action'] = $dependencyGraphAutosubmitAction; + + $dependencyGraphAutosubmitActionOptions = $object->dependencyGraphAutosubmitActionOptions; + + if ($dependencyGraphAutosubmitActionOptions === null) { + goto after_dependencyGraphAutosubmitActionOptions; + } + + $dependencyGraphAutosubmitActionOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($dependencyGraphAutosubmitActionOptions); + after_dependencyGraphAutosubmitActionOptions: $result['dependency_graph_autosubmit_action_options'] = $dependencyGraphAutosubmitActionOptions; + $dependabotAlerts = $object->dependabotAlerts; if ($dependabotAlerts === null) { @@ -652,6 +733,22 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(mixed $object): mixed + { + assert($object instanceof DependencyGraphAutosubmitActionOptions); + $result = []; + + $labeledRunners = $object->labeledRunners; + + if ($labeledRunners === null) { + goto after_labeledRunners; + } + + after_labeledRunners: $result['labeled_runners'] = $labeledRunners; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(mixed $object): mixed { assert($object instanceof BasicError); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Properties/Schema/CustomPropertyName.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Properties/Schema/CustomPropertyName.php index 2f5f1a3e2dc..bac9e9a1465 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Properties/Schema/CustomPropertyName.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Properties/Schema/CustomPropertyName.php @@ -5,7 +5,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Orgs\Org\Properties\Schema; use ApiClients\Client\GitHub\Schema\BasicError; -use ApiClients\Client\GitHub\Schema\OrgCustomProperty; +use ApiClients\Client\GitHub\Schema\CustomProperty; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; @@ -39,13 +39,13 @@ public function __construct() public function hydrateObject(string $className, array $payload): object { return match ($className) { - 'ApiClients\Client\GitHub\Schema\OrgCustomProperty' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty($payload), + 'ApiClients\Client\GitHub\Schema\CustomProperty' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty(array $payload): OrgCustomProperty + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty(array $payload): CustomProperty { $properties = []; $missingFields = []; @@ -61,6 +61,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgC after_propertyName: + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + $value = $payload['value_type'] ?? null; if ($value === null) { @@ -127,17 +138,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgC after_valuesEditableBy: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\OrgCustomProperty', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CustomProperty', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(OrgCustomProperty::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(CustomProperty::class, $missingFields, stack: $this->hydrationStack); } try { - return new OrgCustomProperty(...$properties); + return new CustomProperty(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\OrgCustomProperty', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CustomProperty', $exception, stack: $this->hydrationStack); } } @@ -235,7 +246,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTime' => $this->serializeValueDateTime($object), 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), - 'ApiClients\Client\GitHub\Schema\OrgCustomProperty' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty($object), + 'ApiClients\Client\GitHub\Schema\CustomProperty' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), default => throw new LogicException('No serialization defined for $className'), }; @@ -299,14 +310,22 @@ private function serializeValueDateTimeInterface(mixed $value): mixed return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty(mixed $object): mixed { - assert($object instanceof OrgCustomProperty); + assert($object instanceof CustomProperty); $result = []; $propertyName = $object->propertyName; after_propertyName: $result['property_name'] = $propertyName; + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + $valueType = $object->valueType; after_valueType: $result['value_type'] = $valueType; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Team/TeamSlug/Copilot/Usage.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Team/TeamSlug/Copilot/Usage.php new file mode 100644 index 00000000000..5642d5f5b76 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Team/TeamSlug/Copilot/Usage.php @@ -0,0 +1,286 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), + default => throw new LogicException('No serialization defined for $className'), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/SecretScanning/PushProtectionBypasses.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/SecretScanning/PushProtectionBypasses.php new file mode 100644 index 00000000000..d2efce6db37 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/SecretScanning/PushProtectionBypasses.php @@ -0,0 +1,354 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecretScanningPushProtectionBypass($payload), + 'ApiClients\Client\GitHub\Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️SecretScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecretScanningPushProtectionBypass(array $payload): SecretScanningPushProtectionBypass + { + $properties = []; + $missingFields = []; + try { + $value = $payload['reason'] ?? null; + + if ($value === null) { + $properties['reason'] = null; + goto after_reason; + } + + $properties['reason'] = $value; + + after_reason: + + $value = $payload['expire_at'] ?? null; + + if ($value === null) { + $properties['expireAt'] = null; + goto after_expireAt; + } + + $properties['expireAt'] = $value; + + after_expireAt: + + $value = $payload['token_type'] ?? null; + + if ($value === null) { + $properties['tokenType'] = null; + goto after_tokenType; + } + + $properties['tokenType'] = $value; + + after_tokenType: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(SecretScanningPushProtectionBypass::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new SecretScanningPushProtectionBypass(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️SecretScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable(array $payload): ServiceUnavailable + { + $properties = []; + $missingFields = []; + try { + $value = $payload['code'] ?? null; + + if ($value === null) { + $properties['code'] = null; + goto after_code; + } + + $properties['code'] = $value; + + after_code: + + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ServiceUnavailable::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ServiceUnavailable(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecretScanningPushProtectionBypass($object), + 'ApiClients\Client\GitHub\Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️SecretScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($object), + default => throw new LogicException('No serialization defined for $className'), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecretScanningPushProtectionBypass(mixed $object): mixed + { + assert($object instanceof SecretScanningPushProtectionBypass); + $result = []; + + $reason = $object->reason; + + if ($reason === null) { + goto after_reason; + } + + after_reason: $result['reason'] = $reason; + + $expireAt = $object->expireAt; + + if ($expireAt === null) { + goto after_expireAt; + } + + after_expireAt: $result['expire_at'] = $expireAt; + + $tokenType = $object->tokenType; + + if ($tokenType === null) { + goto after_tokenType; + } + + after_tokenType: $result['token_type'] = $tokenType; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️SecretScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable(mixed $object): mixed + { + assert($object instanceof ServiceUnavailable); + $result = []; + + $code = $object->code; + + if ($code === null) { + goto after_code; + } + + after_code: $result['code'] = $code; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/CustomProperty.php b/clients/GitHub/src/Internal/Hydrator/WebHook/CustomProperty.php index 951263314b4..267f77fe3f0 100644 --- a/clients/GitHub/src/Internal/Hydrator/WebHook/CustomProperty.php +++ b/clients/GitHub/src/Internal/Hydrator/WebHook/CustomProperty.php @@ -6,7 +6,6 @@ use ApiClients\Client\GitHub\Schema\EnterpriseWebhooks; use ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks; -use ApiClients\Client\GitHub\Schema\OrgCustomProperty; use ApiClients\Client\GitHub\Schema\SimpleInstallation; use ApiClients\Client\GitHub\Schema\SimpleUserWebhooks; use ApiClients\Client\GitHub\Schema\WebhookCustomPropertyCreated; @@ -49,7 +48,7 @@ public function hydrateObject(string $className, array $payload): object { return match ($className) { 'ApiClients\Client\GitHub\Schema\WebhookCustomPropertyCreated' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyCreated($payload), - 'ApiClients\Client\GitHub\Schema\OrgCustomProperty' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty($payload), + 'ApiClients\Client\GitHub\Schema\CustomProperty' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty($payload), 'ApiClients\Client\GitHub\Schema\EnterpriseWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($payload), 'ApiClients\Client\GitHub\Schema\SimpleInstallation' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($payload), 'ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($payload), @@ -87,7 +86,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Webh if (is_array($value)) { try { $this->hydrationStack[] = 'definition'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty($value); + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty($value); } finally { array_pop($this->hydrationStack); } @@ -191,7 +190,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Webh } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty(array $payload): OrgCustomProperty + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty(array $payload): \ApiClients\Client\GitHub\Schema\CustomProperty { $properties = []; $missingFields = []; @@ -207,6 +206,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgC after_propertyName: + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + $value = $payload['value_type'] ?? null; if ($value === null) { @@ -273,17 +283,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgC after_valuesEditableBy: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\OrgCustomProperty', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CustomProperty', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(OrgCustomProperty::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\CustomProperty::class, $missingFields, stack: $this->hydrationStack); } try { - return new OrgCustomProperty(...$properties); + return new \ApiClients\Client\GitHub\Schema\CustomProperty(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\OrgCustomProperty', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CustomProperty', $exception, stack: $this->hydrationStack); } } @@ -1044,7 +1054,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Webh if (is_array($value)) { try { $this->hydrationStack[] = 'definition'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty($value); + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty($value); } finally { array_pop($this->hydrationStack); } @@ -1180,7 +1190,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\WebhookCustomPropertyCreated' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyCreated($object), - 'ApiClients\Client\GitHub\Schema\OrgCustomProperty' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty($object), + 'ApiClients\Client\GitHub\Schema\CustomProperty' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty($object), 'ApiClients\Client\GitHub\Schema\EnterpriseWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($object), 'ApiClients\Client\GitHub\Schema\SimpleInstallation' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($object), 'ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($object), @@ -1259,7 +1269,7 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_action: $result['action'] = $action; $definition = $object->definition; - $definition = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty($definition); + $definition = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty($definition); after_definition: $result['definition'] = $definition; $enterprise = $object->enterprise; @@ -1301,14 +1311,22 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty(mixed $object): mixed { - assert($object instanceof OrgCustomProperty); + assert($object instanceof \ApiClients\Client\GitHub\Schema\CustomProperty); $result = []; $propertyName = $object->propertyName; after_propertyName: $result['property_name'] = $propertyName; + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + $valueType = $object->valueType; after_valueType: $result['value_type'] = $valueType; @@ -1652,7 +1670,7 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_action: $result['action'] = $action; $definition = $object->definition; - $definition = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrgCustomProperty($definition); + $definition = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty($definition); after_definition: $result['definition'] = $definition; $enterprise = $object->enterprise; diff --git a/clients/GitHub/src/Internal/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index 05afd6284ad..d3ffb7234d3 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -202,6 +202,7 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Orgs\Org\Settings\Billing\Actions|null $operation🌀Orgs🌀Org🌀Settings🌀Billing🌀Actions = null; private Internal\Hydrator\Operation\Orgs\Org\Settings\Billing\Packages|null $operation🌀Orgs🌀Org🌀Settings🌀Billing🌀Packages = null; private Internal\Hydrator\Operation\Orgs\Org\Settings\Billing\SharedStorage|null $operation🌀Orgs🌀Org🌀Settings🌀Billing🌀SharedStorage = null; + private Internal\Hydrator\Operation\Orgs\Org\Team\TeamSlug\Copilot\Usage|null $operation🌀Orgs🌀Org🌀Team🌀TeamSlug🌀Copilot🌀Usage = null; private Internal\Hydrator\Operation\Orgs\Org\Teams|null $operation🌀Orgs🌀Org🌀Teams = null; private Internal\Hydrator\Operation\Orgs\Org\Teams\TeamSlug|null $operation🌀Orgs🌀Org🌀Teams🌀TeamSlug = null; private Internal\Hydrator\Operation\Orgs\Org\Teams\TeamSlug\Discussions|null $operation🌀Orgs🌀Org🌀Teams🌀TeamSlug🌀Discussions = null; @@ -493,6 +494,7 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\Alerts|null $operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\Alerts\AlertNumber|null $operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts🌀AlertNumber = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\Alerts\AlertNumber\Locations|null $operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts🌀AlertNumber🌀Locations = null; + private Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\PushProtectionBypasses|null $operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀PushProtectionBypasses = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\SecurityAdvisories|null $operation🌀Repos🌀Owner🌀Repo🌀SecurityAdvisories = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\SecurityAdvisories\Reports|null $operation🌀Repos🌀Owner🌀Repo🌀SecurityAdvisories🌀Reports = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\SecurityAdvisories\GhsaId|null $operation🌀Repos🌀Owner🌀Repo🌀SecurityAdvisories🌀GhsaId = null; @@ -766,7 +768,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationActionsVariable' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelectedReposForOrgVariable\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name🌀Repositories()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Attestations🌀SubjectDigest()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\DependencyGraphAutosubmitActionOptions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\CodeSecurity\\AttachConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Codespaces\\ListInOrganization\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces()->hydrateObject($className, $payload), @@ -801,7 +803,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ReviewPatGrantRequestsInBulk\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀PersonalAccessTokenRequests()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\UpdatePatAccesses\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀PersonalAccessTokens()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Project' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Projects()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\OrgCustomProperty' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Properties🌀Schema🌀CustomPropertyName()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\CustomProperty' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Properties🌀Schema🌀CustomPropertyName()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository', '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\LicenseSimple', '\\ApiClients\\Client\\GitHub\\Schema\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\CodeOfConductSimple', '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository\\CustomProperties' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Repos()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links\\Self_', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links\\Html' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\RuleSuite' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RuleSuites🌀RuleSuiteId()->hydrateObject($className, $payload), @@ -936,6 +938,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\ReleaseAsset' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Releases🌀Assets🌀AssetId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\ReleaseNotesContent' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Releases🌀GenerateNotes()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\SecretScanningAlert' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts🌀AlertNumber()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\SecretScanningPushProtectionBypass' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀PushProtectionBypasses()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryAdvisory', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryAdvisory\\Submission', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryAdvisory\\Cvss' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecurityAdvisories()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\SecurityAdvisories\\CreateRepositoryAdvisoryCveRequest\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecurityAdvisories🌀GhsaId🌀Cve()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Repos\\GetCodeFrequencyStats\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Stats🌀CodeFrequency()->hydrateObject($className, $payload), @@ -1118,7 +1121,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationActionsVariable' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelectedReposForOrgVariable\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name🌀Repositories()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Attestations🌀SubjectDigest()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\DependencyGraphAutosubmitActionOptions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\CodeSecurity\\AttachConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Codespaces\\ListInOrganization\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces()->serializeObject($object), @@ -1153,7 +1156,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ReviewPatGrantRequestsInBulk\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀PersonalAccessTokenRequests()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\UpdatePatAccesses\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀PersonalAccessTokens()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Project' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Projects()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\OrgCustomProperty' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Properties🌀Schema🌀CustomPropertyName()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\CustomProperty' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Properties🌀Schema🌀CustomPropertyName()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository', '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\LicenseSimple', '\\ApiClients\\Client\\GitHub\\Schema\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\CodeOfConductSimple', '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository\\CustomProperties' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Repos()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links\\Self_', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links\\Html' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\RuleSuite' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RuleSuites🌀RuleSuiteId()->serializeObject($object), @@ -1288,6 +1291,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\ReleaseAsset' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Releases🌀Assets🌀AssetId()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\ReleaseNotesContent' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Releases🌀GenerateNotes()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\SecretScanningAlert' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts🌀AlertNumber()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\SecretScanningPushProtectionBypass' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀PushProtectionBypasses()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryAdvisory', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryAdvisory\\Submission', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryAdvisory\\Cvss' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecurityAdvisories()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\SecurityAdvisories\\CreateRepositoryAdvisoryCveRequest\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecurityAdvisories🌀GhsaId🌀Cve()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Repos\\GetCodeFrequencyStats\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Stats🌀CodeFrequency()->serializeObject($object), @@ -3131,6 +3135,15 @@ public function getObjectMapperOperation🌀Orgs🌀Org🌀Settings🌀Billing return $this->operation🌀Orgs🌀Org🌀Settings🌀Billing🌀SharedStorage; } + public function getObjectMapperOperation🌀Orgs🌀Org🌀Team🌀TeamSlug🌀Copilot🌀Usage(): Internal\Hydrator\Operation\Orgs\Org\Team\TeamSlug\Copilot\Usage + { + if ($this->operation🌀Orgs🌀Org🌀Team🌀TeamSlug🌀Copilot🌀Usage instanceof Internal\Hydrator\Operation\Orgs\Org\Team\TeamSlug\Copilot\Usage === false) { + $this->operation🌀Orgs🌀Org🌀Team🌀TeamSlug🌀Copilot🌀Usage = new Internal\Hydrator\Operation\Orgs\Org\Team\TeamSlug\Copilot\Usage(); + } + + return $this->operation🌀Orgs🌀Org🌀Team🌀TeamSlug🌀Copilot🌀Usage; + } + public function getObjectMapperOperation🌀Orgs🌀Org🌀Teams(): Internal\Hydrator\Operation\Orgs\Org\Teams { if ($this->operation🌀Orgs🌀Org🌀Teams instanceof Internal\Hydrator\Operation\Orgs\Org\Teams === false) { @@ -5750,6 +5763,15 @@ public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecretScan return $this->operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts🌀AlertNumber🌀Locations; } + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀PushProtectionBypasses(): Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\PushProtectionBypasses + { + if ($this->operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀PushProtectionBypasses instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\PushProtectionBypasses === false) { + $this->operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀PushProtectionBypasses = new Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\PushProtectionBypasses(); + } + + return $this->operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀PushProtectionBypasses; + } + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecurityAdvisories(): Internal\Hydrator\Operation\Repos\Owner\Repo\SecurityAdvisories { if ($this->operation🌀Repos🌀Owner🌀Repo🌀SecurityAdvisories instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\SecurityAdvisories === false) { diff --git a/clients/GitHub/src/Internal/Operation/Copilot/UsageMetricsForTeam.php b/clients/GitHub/src/Internal/Operation/Copilot/UsageMetricsForTeam.php new file mode 100644 index 00000000000..0bc9ecb959c --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Copilot/UsageMetricsForTeam.php @@ -0,0 +1,121 @@ +org = $org; + $this->teamSlug = $teamSlug; + $this->since = $since; + $this->until = $until; + $this->page = $page; + $this->perPage = $perPage; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{team_slug}', '{since}', '{until}', '{page}', '{per_page}'], [$this->org, $this->teamSlug, $this->since, $this->until, $this->page, $this->perPage], '/orgs/{org}/team/{team_slug}/copilot/usage' . '?since={since}&until={until}&page={page}&per_page={per_page}')); + } + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\CopilotUsageMetrics { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CopilotUsageMetrics::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\CopilotUsageMetrics::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Requires authentication + **/ + + case 401: + $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)); + /** + * Forbidden + **/ + + case 403: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Copilot/UsageMetricsForTeamListing.php b/clients/GitHub/src/Internal/Operation/Copilot/UsageMetricsForTeamListing.php new file mode 100644 index 00000000000..21edf5b4669 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Copilot/UsageMetricsForTeamListing.php @@ -0,0 +1,121 @@ +org = $org; + $this->teamSlug = $teamSlug; + $this->since = $since; + $this->until = $until; + $this->page = $page; + $this->perPage = $perPage; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{team_slug}', '{since}', '{until}', '{page}', '{per_page}'], [$this->org, $this->teamSlug, $this->since, $this->until, $this->page, $this->perPage], '/orgs/{org}/team/{team_slug}/copilot/usage' . '?since={since}&until={until}&page={page}&per_page={per_page}')); + } + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\CopilotUsageMetrics { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CopilotUsageMetrics::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\CopilotUsageMetrics::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Requires authentication + **/ + + case 401: + $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)); + /** + * Forbidden + **/ + + case 403: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Orgs/CreateOrUpdateCustomProperties.php b/clients/GitHub/src/Internal/Operation/Orgs/CreateOrUpdateCustomProperties.php index 56420990ff7..377d5d1aaf6 100644 --- a/clients/GitHub/src/Internal/Operation/Orgs/CreateOrUpdateCustomProperties.php +++ b/clients/GitHub/src/Internal/Operation/Orgs/CreateOrUpdateCustomProperties.php @@ -41,7 +41,7 @@ public function createRequest(array $data): RequestInterface return new Request('PATCH', str_replace(['{org}'], [$this->org], '/orgs/{org}/properties/schema'), ['Content-Type' => 'application/json'], json_encode($data)); } - /** @return Observable */ + /** @return Observable */ public function createResponse(ResponseInterface $response): Observable { $code = $response->getStatusCode(); @@ -54,12 +54,12 @@ public function createResponse(ResponseInterface $response): Observable * Response **/ case 200: - return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\OrgCustomProperty { + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\CustomProperty { $error = new RuntimeException(); try { - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\OrgCustomProperty::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CustomProperty::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\OrgCustomProperty::class, $body); + return $this->hydrator->hydrateObject(Schema\CustomProperty::class, $body); } catch (Throwable $error) { goto items_application_json_two_hundred_aaaaa; } diff --git a/clients/GitHub/src/Internal/Operation/Orgs/CreateOrUpdateCustomProperty.php b/clients/GitHub/src/Internal/Operation/Orgs/CreateOrUpdateCustomProperty.php index 9630be11ac9..cf5c8a99e92 100644 --- a/clients/GitHub/src/Internal/Operation/Orgs/CreateOrUpdateCustomProperty.php +++ b/clients/GitHub/src/Internal/Operation/Orgs/CreateOrUpdateCustomProperty.php @@ -41,7 +41,7 @@ public function createRequest(array $data): RequestInterface return new Request('PUT', str_replace(['{org}', '{custom_property_name}'], [$this->org, $this->customPropertyName], '/orgs/{org}/properties/schema/{custom_property_name}'), ['Content-Type' => 'application/json'], json_encode($data)); } - public function createResponse(ResponseInterface $response): Schema\OrgCustomProperty + public function createResponse(ResponseInterface $response): Schema\CustomProperty { $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); @@ -53,9 +53,9 @@ public function createResponse(ResponseInterface $response): Schema\OrgCustomPro * Response **/ case 200: - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\OrgCustomProperty::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CustomProperty::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - return $this->hydrator->hydrateObject(Schema\OrgCustomProperty::class, $body); + return $this->hydrator->hydrateObject(Schema\CustomProperty::class, $body); /** * Forbidden **/ diff --git a/clients/GitHub/src/Internal/Operation/Orgs/GetAllCustomProperties.php b/clients/GitHub/src/Internal/Operation/Orgs/GetAllCustomProperties.php index 0e1705daab6..b34201bbcb6 100644 --- a/clients/GitHub/src/Internal/Operation/Orgs/GetAllCustomProperties.php +++ b/clients/GitHub/src/Internal/Operation/Orgs/GetAllCustomProperties.php @@ -38,7 +38,7 @@ public function createRequest(): RequestInterface return new Request('GET', str_replace(['{org}'], [$this->org], '/orgs/{org}/properties/schema')); } - /** @return Observable */ + /** @return Observable */ public function createResponse(ResponseInterface $response): Observable { $code = $response->getStatusCode(); @@ -51,12 +51,12 @@ public function createResponse(ResponseInterface $response): Observable * Response **/ case 200: - return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\OrgCustomProperty { + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\CustomProperty { $error = new RuntimeException(); try { - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\OrgCustomProperty::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CustomProperty::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\OrgCustomProperty::class, $body); + return $this->hydrator->hydrateObject(Schema\CustomProperty::class, $body); } catch (Throwable $error) { goto items_application_json_two_hundred_aaaaa; } diff --git a/clients/GitHub/src/Internal/Operation/Orgs/GetCustomProperty.php b/clients/GitHub/src/Internal/Operation/Orgs/GetCustomProperty.php index 51d4cfe3ab6..1fc67065712 100644 --- a/clients/GitHub/src/Internal/Operation/Orgs/GetCustomProperty.php +++ b/clients/GitHub/src/Internal/Operation/Orgs/GetCustomProperty.php @@ -38,7 +38,7 @@ public function createRequest(): RequestInterface return new Request('GET', str_replace(['{org}', '{custom_property_name}'], [$this->org, $this->customPropertyName], '/orgs/{org}/properties/schema/{custom_property_name}')); } - public function createResponse(ResponseInterface $response): Schema\OrgCustomProperty + public function createResponse(ResponseInterface $response): Schema\CustomProperty { $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); @@ -50,9 +50,9 @@ public function createResponse(ResponseInterface $response): Schema\OrgCustomPro * Response **/ case 200: - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\OrgCustomProperty::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CustomProperty::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - return $this->hydrator->hydrateObject(Schema\OrgCustomProperty::class, $body); + return $this->hydrator->hydrateObject(Schema\CustomProperty::class, $body); /** * Forbidden **/ diff --git a/clients/GitHub/src/Internal/Operation/SecretScanning/CreatePushProtectionBypass.php b/clients/GitHub/src/Internal/Operation/SecretScanning/CreatePushProtectionBypass.php new file mode 100644 index 00000000000..f36165046e9 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/SecretScanning/CreatePushProtectionBypass.php @@ -0,0 +1,95 @@ +owner = $owner; + $this->repo = $repo; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('POST', str_replace(['{owner}', '{repo}'], [$this->owner, $this->repo], '/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses'), ['Content-Type' => 'application/json'], json_encode($data)); + } + + public function createResponse(ResponseInterface $response): Schema\SecretScanningPushProtectionBypass|WithoutBody + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\SecretScanningPushProtectionBypass::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\SecretScanningPushProtectionBypass::class, $body); + /** + * Service unavailable + **/ + + case 503: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable(503, $this->hydrator->hydrateObject(Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class, $body)); + } + + break; + } + + switch ($code) { + /** + * User does not have enough permissions to perform this action. + **/ + case 403: + return new WithoutBody(403, []); + /** + * Placeholder ID not found, or push protection is disabled on this repository. + **/ + + case 404: + return new WithoutBody(404, []); + /** + * Bad request, input data missing or incorrect. + **/ + + case 422: + return new WithoutBody(422, []); + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operator/Copilot/UsageMetricsForTeam.php b/clients/GitHub/src/Internal/Operator/Copilot/UsageMetricsForTeam.php new file mode 100644 index 00000000000..8e136857fe6 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Copilot/UsageMetricsForTeam.php @@ -0,0 +1,41 @@ + */ + public function call(string $org, string $teamSlug, string $since, string $until, int $page = 1, int $perPage = 28): iterable + { + $operation = new \ApiClients\Client\GitHub\Internal\Operation\Copilot\UsageMetricsForTeam($this->responseSchemaValidator, $this->hydrator, $org, $teamSlug, $since, $until, $page, $perPage); + $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 { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Copilot/UsageMetricsForTeamListing.php b/clients/GitHub/src/Internal/Operator/Copilot/UsageMetricsForTeamListing.php new file mode 100644 index 00000000000..c6ee476a543 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Copilot/UsageMetricsForTeamListing.php @@ -0,0 +1,41 @@ + */ + public function call(string $org, string $teamSlug, string $since, string $until, int $page = 1, int $perPage = 28): iterable + { + $operation = new \ApiClients\Client\GitHub\Internal\Operation\Copilot\UsageMetricsForTeamListing($this->responseSchemaValidator, $this->hydrator, $org, $teamSlug, $since, $until, $page, $perPage); + $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 { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperties.php b/clients/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperties.php index b793adadf01..d6694b7bbc2 100644 --- a/clients/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperties.php +++ b/clients/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperties.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ + /** @return iterable */ public function call(string $org, array $params): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Orgs\CreateOrUpdateCustomProperties($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org); diff --git a/clients/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php b/clients/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php index 146204d4f87..99d6f4adbcf 100644 --- a/clients/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php +++ b/clients/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php @@ -5,7 +5,7 @@ namespace ApiClients\Client\GitHub\Internal\Operator\Orgs; use ApiClients\Client\GitHub\Internal; -use ApiClients\Client\GitHub\Schema\OrgCustomProperty; +use ApiClients\Client\GitHub\Schema\CustomProperty; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; use League\OpenAPIValidation\Schema\SchemaValidator; use Psr\Http\Message\ResponseInterface; @@ -24,12 +24,11 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ - public function call(string $org, string $customPropertyName, array $params): OrgCustomProperty + public function call(string $org, string $customPropertyName, array $params): CustomProperty { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Orgs\CreateOrUpdateCustomProperty($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $customPropertyName); $request = $operation->createRequest($params); - $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): OrgCustomProperty { + $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): CustomProperty { return $operation->createResponse($response); })); if ($result instanceof Observable) { diff --git a/clients/GitHub/src/Internal/Operator/Orgs/GetAllCustomProperties.php b/clients/GitHub/src/Internal/Operator/Orgs/GetAllCustomProperties.php index dc312e43f94..74cc3293ed1 100644 --- a/clients/GitHub/src/Internal/Operator/Orgs/GetAllCustomProperties.php +++ b/clients/GitHub/src/Internal/Operator/Orgs/GetAllCustomProperties.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ + /** @return iterable */ public function call(string $org): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Orgs\GetAllCustomProperties($this->responseSchemaValidator, $this->hydrator, $org); diff --git a/clients/GitHub/src/Internal/Operator/Orgs/GetCustomProperty.php b/clients/GitHub/src/Internal/Operator/Orgs/GetCustomProperty.php index 87db5273940..4378784a67d 100644 --- a/clients/GitHub/src/Internal/Operator/Orgs/GetCustomProperty.php +++ b/clients/GitHub/src/Internal/Operator/Orgs/GetCustomProperty.php @@ -5,7 +5,7 @@ namespace ApiClients\Client\GitHub\Internal\Operator\Orgs; use ApiClients\Client\GitHub\Internal; -use ApiClients\Client\GitHub\Schema\OrgCustomProperty; +use ApiClients\Client\GitHub\Schema\CustomProperty; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; use League\OpenAPIValidation\Schema\SchemaValidator; use Psr\Http\Message\ResponseInterface; @@ -24,12 +24,11 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ - public function call(string $org, string $customPropertyName): OrgCustomProperty + public function call(string $org, string $customPropertyName): CustomProperty { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Orgs\GetCustomProperty($this->responseSchemaValidator, $this->hydrator, $org, $customPropertyName); $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): OrgCustomProperty { + $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): CustomProperty { return $operation->createResponse($response); })); if ($result instanceof Observable) { diff --git a/clients/GitHub/src/Internal/Operator/SecretScanning/CreatePushProtectionBypass.php b/clients/GitHub/src/Internal/Operator/SecretScanning/CreatePushProtectionBypass.php new file mode 100644 index 00000000000..2f06c1360af --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/CreatePushProtectionBypass.php @@ -0,0 +1,41 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo); + $request = $operation->createRequest($params); + $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): SecretScanningPushProtectionBypass|WithoutBody { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operators.php b/clients/GitHub/src/Internal/Operators.php index 7e25f79a105..a13bc15ebfb 100644 --- a/clients/GitHub/src/Internal/Operators.php +++ b/clients/GitHub/src/Internal/Operators.php @@ -340,6 +340,8 @@ final class Operators private Internal\Operator\Billing\GetGithubActionsBillingOrg|null $billing👷GetGithubActionsBillingOrg = null; private Internal\Operator\Billing\GetGithubPackagesBillingOrg|null $billing👷GetGithubPackagesBillingOrg = null; private Internal\Operator\Billing\GetSharedStorageBillingOrg|null $billing👷GetSharedStorageBillingOrg = null; + private Internal\Operator\Copilot\UsageMetricsForTeam|null $copilot👷UsageMetricsForTeam = null; + private Internal\Operator\Copilot\UsageMetricsForTeamListing|null $copilot👷UsageMetricsForTeamListing = null; private Internal\Operator\Teams\List_|null $teams👷List_ = null; private Internal\Operator\Teams\ListListing|null $teams👷ListListing = null; private Internal\Operator\Teams\Create|null $teams👷Create = null; @@ -872,6 +874,7 @@ final class Operators private Internal\Operator\SecretScanning\UpdateAlert|null $secretScanning👷UpdateAlert = null; private Internal\Operator\SecretScanning\ListLocationsForAlert|null $secretScanning👷ListLocationsForAlert = null; private Internal\Operator\SecretScanning\ListLocationsForAlertListing|null $secretScanning👷ListLocationsForAlertListing = null; + private Internal\Operator\SecretScanning\CreatePushProtectionBypass|null $secretScanning👷CreatePushProtectionBypass = null; private Internal\Operator\SecurityAdvisories\ListRepositoryAdvisories|null $securityAdvisories👷ListRepositoryAdvisories = null; private Internal\Operator\SecurityAdvisories\CreateRepositoryAdvisory|null $securityAdvisories👷CreateRepositoryAdvisory = null; private Internal\Operator\SecurityAdvisories\CreatePrivateVulnerabilityReport|null $securityAdvisories👷CreatePrivateVulnerabilityReport = null; @@ -4101,6 +4104,24 @@ public function billing👷GetSharedStorageBillingOrg(): Internal\Operator\Billi return $this->billing👷GetSharedStorageBillingOrg; } + public function copilot👷UsageMetricsForTeam(): Internal\Operator\Copilot\UsageMetricsForTeam + { + if ($this->copilot👷UsageMetricsForTeam instanceof Internal\Operator\Copilot\UsageMetricsForTeam === false) { + $this->copilot👷UsageMetricsForTeam = new Internal\Operator\Copilot\UsageMetricsForTeam($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Team🌀TeamSlug🌀Copilot🌀Usage()); + } + + return $this->copilot👷UsageMetricsForTeam; + } + + public function copilot👷UsageMetricsForTeamListing(): Internal\Operator\Copilot\UsageMetricsForTeamListing + { + if ($this->copilot👷UsageMetricsForTeamListing instanceof Internal\Operator\Copilot\UsageMetricsForTeamListing === false) { + $this->copilot👷UsageMetricsForTeamListing = new Internal\Operator\Copilot\UsageMetricsForTeamListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Team🌀TeamSlug🌀Copilot🌀Usage()); + } + + return $this->copilot👷UsageMetricsForTeamListing; + } + public function teams👷List_(): Internal\Operator\Teams\List_ { if ($this->teams👷List_ instanceof Internal\Operator\Teams\List_ === false) { @@ -8889,6 +8910,15 @@ public function secretScanning👷ListLocationsForAlertListing(): Internal\Opera return $this->secretScanning👷ListLocationsForAlertListing; } + public function secretScanning👷CreatePushProtectionBypass(): Internal\Operator\SecretScanning\CreatePushProtectionBypass + { + if ($this->secretScanning👷CreatePushProtectionBypass instanceof Internal\Operator\SecretScanning\CreatePushProtectionBypass === false) { + $this->secretScanning👷CreatePushProtectionBypass = new Internal\Operator\SecretScanning\CreatePushProtectionBypass($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀PushProtectionBypasses()); + } + + return $this->secretScanning👷CreatePushProtectionBypass; + } + public function securityAdvisories👷ListRepositoryAdvisories(): Internal\Operator\SecurityAdvisories\ListRepositoryAdvisories { if ($this->securityAdvisories👷ListRepositoryAdvisories instanceof Internal\Operator\SecurityAdvisories\ListRepositoryAdvisories === false) { diff --git a/clients/GitHub/src/Internal/Router/Get/Copilot.php b/clients/GitHub/src/Internal/Router/Get/Copilot.php index a0f123b2a71..44a553bcc3d 100644 --- a/clients/GitHub/src/Internal/Router/Get/Copilot.php +++ b/clients/GitHub/src/Internal/Router/Get/Copilot.php @@ -235,4 +235,49 @@ public function usageMetricsForEnterpriseTeam(array $params): iterable return $operator->call($arguments['enterprise'], $arguments['team_slug'], $arguments['since'], $arguments['until'], $arguments['page'], $arguments['per_page']); } + + /** @return iterable */ + public function usageMetricsForTeam(array $params): iterable + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('team_slug', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: team_slug'); + } + + $arguments['team_slug'] = $params['team_slug']; + unset($params['team_slug']); + if (array_key_exists('since', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: since'); + } + + $arguments['since'] = $params['since']; + unset($params['since']); + if (array_key_exists('until', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: until'); + } + + $arguments['until'] = $params['until']; + unset($params['until']); + if (array_key_exists('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + $operator = new Internal\Operator\Copilot\UsageMetricsForTeam($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Team🌀TeamSlug🌀Copilot🌀Usage()); + + return $operator->call($arguments['org'], $arguments['team_slug'], $arguments['since'], $arguments['until'], $arguments['page'], $arguments['per_page']); + } } diff --git a/clients/GitHub/src/Internal/Router/Get/Five.php b/clients/GitHub/src/Internal/Router/Get/Five.php index 79c7c692dd1..485c932b2f7 100644 --- a/clients/GitHub/src/Internal/Router/Get/Five.php +++ b/clients/GitHub/src/Internal/Router/Get/Five.php @@ -50,7 +50,7 @@ public function __construct(private Routers $routers) { } - /** @return |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|Observable */ + /** @return |Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|iterable|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|iterable|WithoutBody|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|ActionsOrganizationPermissions|Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|OrgHook|OrgMembership|Migration|OrganizationRole|RepositoryRuleset|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Import|Installation|InteractionLimitResponse|One|Language|LicenseContent|Page|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|CodespacesUserPublicKey|CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|EmptyObject { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Orgs.php b/clients/GitHub/src/Internal/Router/Get/Orgs.php index a2f65da9254..7f63b8aa887 100644 --- a/clients/GitHub/src/Internal/Router/Get/Orgs.php +++ b/clients/GitHub/src/Internal/Router/Get/Orgs.php @@ -6,11 +6,11 @@ use ApiClients\Client\GitHub\Internal; use ApiClients\Client\GitHub\Schema; +use ApiClients\Client\GitHub\Schema\CustomProperty; use ApiClients\Client\GitHub\Schema\HookDelivery; use ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok; use ApiClients\Client\GitHub\Schema\OrganizationFull; use ApiClients\Client\GitHub\Schema\OrganizationRole; -use ApiClients\Client\GitHub\Schema\OrgCustomProperty; use ApiClients\Client\GitHub\Schema\OrgHook; use ApiClients\Client\GitHub\Schema\OrgMembership; use ApiClients\Client\GitHub\Schema\WebhookConfig; @@ -697,7 +697,7 @@ public function getOrgRole(array $params): OrganizationRole return $operator->call($arguments['org'], $arguments['role_id']); } - /** @return Observable */ + /** @return iterable */ public function getAllCustomProperties(array $params): iterable { $arguments = []; @@ -1006,8 +1006,7 @@ public function listPatGrantRepositories(array $params): iterable return $operator->call($arguments['org'], $arguments['pat_id'], $arguments['per_page'], $arguments['page']); } - /** @return */ - public function getCustomProperty(array $params): OrgCustomProperty + public function getCustomProperty(array $params): CustomProperty { $arguments = []; if (array_key_exists('org', $params) === false) { diff --git a/clients/GitHub/src/Internal/Router/Get/Seven.php b/clients/GitHub/src/Internal/Router/Get/Seven.php index b0bdb1cd8bf..d5ed43eaa43 100644 --- a/clients/GitHub/src/Internal/Router/Get/Seven.php +++ b/clients/GitHub/src/Internal/Router/Get/Seven.php @@ -63,7 +63,7 @@ public function __construct(private Routers $routers) { } - /** @return 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 */ + /** @return Observable||Observable|Observable|iterable|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): iterable|OidcCustomSub|Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|Json|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|HookDelivery|TeamDiscussion|TeamMembership|TeamProject|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|CodeScanningAlert|CodeScanningAnalysis|CodeScanningSarifsStatus|CodespacesPublicKey|RepoCodespacesSecret|RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|CombinedCommitStatus|BasicError|DependabotAlert|DependabotPublicKey|DependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\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|TeamDiscussionComment|PackageVersion { if ($pathChunks[0] === '') { @@ -167,6 +167,16 @@ public function call(string $call, array $params, array $pathChunks): iterable|O } } } + } elseif ($pathChunks[3] === 'team') { + if ($pathChunks[4] === '{team_slug}') { + if ($pathChunks[5] === 'copilot') { + if ($pathChunks[6] === 'usage') { + if ($call === 'GET /orgs/{org}/team/{team_slug}/copilot/usage') { + return $this->routers->internal🔀Router🔀Get🔀Copilot()->usageMetricsForTeam($params); + } + } + } + } } elseif ($pathChunks[3] === 'teams') { if ($pathChunks[4] === '{team_slug}') { if ($pathChunks[5] === 'discussions') { diff --git a/clients/GitHub/src/Internal/Router/Get/Six.php b/clients/GitHub/src/Internal/Router/Get/Six.php index 305629bd5e2..2f4bb1d62cc 100644 --- a/clients/GitHub/src/Internal/Router/Get/Six.php +++ b/clients/GitHub/src/Internal/Router/Get/Six.php @@ -34,6 +34,7 @@ use ApiClients\Client\GitHub\Schema\ContentSubmodule; use ApiClients\Client\GitHub\Schema\ContentSymlink; use ApiClients\Client\GitHub\Schema\CopilotSeatDetails; +use ApiClients\Client\GitHub\Schema\CustomProperty; use ApiClients\Client\GitHub\Schema\DependabotPublicKey; use ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom; use ApiClients\Client\GitHub\Schema\DeployKey; @@ -49,7 +50,6 @@ use ApiClients\Client\GitHub\Schema\OrganizationActionsSecret; use ApiClients\Client\GitHub\Schema\OrganizationActionsVariable; use ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret; -use ApiClients\Client\GitHub\Schema\OrgCustomProperty; use ApiClients\Client\GitHub\Schema\Package; use ApiClients\Client\GitHub\Schema\PackagesBillingUsage; use ApiClients\Client\GitHub\Schema\PagesHealthCheck; @@ -74,8 +74,8 @@ 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 */ - public function call(string $call, array $params, array $pathChunks): Ok|iterable|ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|WithoutBody|CodeSecurityConfiguration|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|Json|CopilotSeatDetails|Package|OrgCustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|TeamRepository|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails + /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Schema\CustomProperty|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): Ok|iterable|ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|WithoutBody|CodeSecurityConfiguration|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|Json|CopilotSeatDetails|Package|CustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|TeamRepository|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { diff --git a/clients/GitHub/src/Internal/Router/List/Copilot.php b/clients/GitHub/src/Internal/Router/List/Copilot.php index f0cec38322f..f85188935ec 100644 --- a/clients/GitHub/src/Internal/Router/List/Copilot.php +++ b/clients/GitHub/src/Internal/Router/List/Copilot.php @@ -160,4 +160,55 @@ public function usageMetricsForEnterpriseTeamListing(array $params): iterable $arguments['page']++; } while (count($items) > 0); } + + /** @return iterable */ + public function usageMetricsForTeamListing(array $params): iterable + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('team_slug', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: team_slug'); + } + + $arguments['team_slug'] = $params['team_slug']; + unset($params['team_slug']); + if (array_key_exists('since', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: since'); + } + + $arguments['since'] = $params['since']; + unset($params['since']); + if (array_key_exists('until', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: until'); + } + + $arguments['until'] = $params['until']; + unset($params['until']); + if (array_key_exists('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + $arguments['page'] = 1; + do { + $operator = new Internal\Operator\Copilot\UsageMetricsForTeamListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Team🌀TeamSlug🌀Copilot🌀Usage()); + $items = [...$operator->call($arguments['org'], $arguments['team_slug'], $arguments['since'], $arguments['until'], $arguments['page'], $arguments['per_page'])]; + + yield from $items; + + $arguments['page']++; + } while (count($items) > 0); + } } diff --git a/clients/GitHub/src/Internal/Router/List/Seven.php b/clients/GitHub/src/Internal/Router/List/Seven.php index ca8de6d779f..9c8a6babc52 100644 --- a/clients/GitHub/src/Internal/Router/List/Seven.php +++ b/clients/GitHub/src/Internal/Router/List/Seven.php @@ -14,7 +14,7 @@ public function __construct(private Routers $routers) { } - /** @return 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 */ + /** @return Observable|Observable|iterable|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] === '') { @@ -44,6 +44,16 @@ public function call(string $call, array $params, array $pathChunks): iterable|B } } } + } elseif ($pathChunks[3] === 'team') { + if ($pathChunks[4] === '{team_slug}') { + if ($pathChunks[5] === 'copilot') { + if ($pathChunks[6] === 'usage') { + if ($call === 'LIST /orgs/{org}/team/{team_slug}/copilot/usage') { + return $this->routers->internal🔀Router🔀List🔀Copilot()->usageMetricsForTeamListing($params); + } + } + } + } } } } elseif ($pathChunks[1] === 'repos') { diff --git a/clients/GitHub/src/Internal/Router/Patch/Five.php b/clients/GitHub/src/Internal/Router/Patch/Five.php index 48f64a8b832..7fc1aed800c 100644 --- a/clients/GitHub/src/Internal/Router/Patch/Five.php +++ b/clients/GitHub/src/Internal/Router/Patch/Five.php @@ -21,7 +21,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable */ + /** @return |iterable */ public function call(string $call, array $params, array $pathChunks): GistComment|OrgHook|iterable|WithoutBody|TeamFull|ProjectCard|Import|TeamDiscussion|OrgMembership { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Patch/Orgs.php b/clients/GitHub/src/Internal/Router/Patch/Orgs.php index 09ee510a16b..12a55af778f 100644 --- a/clients/GitHub/src/Internal/Router/Patch/Orgs.php +++ b/clients/GitHub/src/Internal/Router/Patch/Orgs.php @@ -60,7 +60,7 @@ public function updateWebhook(array $params): OrgHook return $operator->call($arguments['org'], $arguments['hook_id'], $params); } - /** @return Observable */ + /** @return iterable */ public function createOrUpdateCustomProperties(array $params): iterable { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Post/SecretScanning.php b/clients/GitHub/src/Internal/Router/Post/SecretScanning.php new file mode 100644 index 00000000000..5eba2d1abaf --- /dev/null +++ b/clients/GitHub/src/Internal/Router/Post/SecretScanning.php @@ -0,0 +1,42 @@ +browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀PushProtectionBypasses()); + + return $operator->call($arguments['owner'], $arguments['repo'], $params); + } +} diff --git a/clients/GitHub/src/Internal/Router/Post/Six.php b/clients/GitHub/src/Internal/Router/Post/Six.php index e84ac58b5db..b98ff15d409 100644 --- a/clients/GitHub/src/Internal/Router/Post/Six.php +++ b/clients/GitHub/src/Internal/Router/Post/Six.php @@ -19,6 +19,7 @@ use ApiClients\Client\GitHub\Schema\Reaction; use ApiClients\Client\GitHub\Schema\ReleaseNotesContent; use ApiClients\Client\GitHub\Schema\RepositoryAdvisory; +use ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass; use ApiClients\Client\GitHub\Schema\ShortBlob; use ApiClients\Client\GitHub\Schema\Status; use ApiClients\Client\GitHub\Schema\TagProtection; @@ -33,7 +34,8 @@ public function __construct(private Routers $routers) { } - public function call(string $call, array $params, array $pathChunks): Json|Created|AuthenticationToken|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|TeamDiscussion|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|EmptyObject|CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|ShortBlob|GitCommit|GitRef|GitTag|GitTree|PageBuildStatus|PageDeployment|ReleaseNotesContent|RepositoryAdvisory|Status|TagProtection|TeamDiscussionComment|Reaction + /** @return |Schema\SecretScanningPushProtectionBypass|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody */ + public function call(string $call, array $params, array $pathChunks): Json|Created|AuthenticationToken|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|TeamDiscussion|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|EmptyObject|CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|ShortBlob|GitCommit|GitRef|GitTag|GitTree|PageBuildStatus|PageDeployment|ReleaseNotesContent|SecretScanningPushProtectionBypass|RepositoryAdvisory|Status|TagProtection|TeamDiscussionComment|Reaction { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'app') { @@ -175,6 +177,12 @@ public function call(string $call, array $params, array $pathChunks): Json|Creat return $this->routers->internal🔀Router🔀Post🔀Repos()->generateReleaseNotes($params); } } + } elseif ($pathChunks[4] === 'secret-scanning') { + if ($pathChunks[5] === 'push-protection-bypasses') { + if ($call === 'POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses') { + return $this->routers->internal🔀Router🔀Post🔀SecretScanning()->createPushProtectionBypass($params); + } + } } elseif ($pathChunks[4] === 'security-advisories') { if ($pathChunks[5] === 'reports') { if ($call === 'POST /repos/{owner}/{repo}/security-advisories/reports') { diff --git a/clients/GitHub/src/Internal/Router/Put/Orgs.php b/clients/GitHub/src/Internal/Router/Put/Orgs.php index 220c83e78dc..97815d09b79 100644 --- a/clients/GitHub/src/Internal/Router/Put/Orgs.php +++ b/clients/GitHub/src/Internal/Router/Put/Orgs.php @@ -5,8 +5,8 @@ namespace ApiClients\Client\GitHub\Internal\Router\Put; use ApiClients\Client\GitHub\Internal; +use ApiClients\Client\GitHub\Schema\CustomProperty; use ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json; -use ApiClients\Client\GitHub\Schema\OrgCustomProperty; use ApiClients\Client\GitHub\Schema\OrgMembership; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; use ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody; @@ -160,8 +160,7 @@ public function assignUserToOrgRole(array $params): WithoutBody return $operator->call($arguments['org'], $arguments['username'], $arguments['role_id']); } - /** @return */ - public function createOrUpdateCustomProperty(array $params): OrgCustomProperty + public function createOrUpdateCustomProperty(array $params): CustomProperty { $arguments = []; if (array_key_exists('org', $params) === false) { diff --git a/clients/GitHub/src/Internal/Router/Put/Six.php b/clients/GitHub/src/Internal/Router/Put/Six.php index 0b6b15af585..3305f95faaf 100644 --- a/clients/GitHub/src/Internal/Router/Put/Six.php +++ b/clients/GitHub/src/Internal/Router/Put/Six.php @@ -5,10 +5,10 @@ namespace ApiClients\Client\GitHub\Internal\Router\Put; use ApiClients\Client\GitHub\Internal\Routers; +use ApiClients\Client\GitHub\Schema\CustomProperty; use ApiClients\Client\GitHub\Schema\EmptyObject; use ApiClients\Client\GitHub\Schema\Environment; use ApiClients\Client\GitHub\Schema\FileCommit; -use ApiClients\Client\GitHub\Schema\OrgCustomProperty; use ApiClients\Client\GitHub\Schema\RepositoryInvitation; use ApiClients\Client\GitHub\Schema\RepositoryRuleset; use ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody; @@ -20,7 +20,8 @@ public function __construct(private Routers $routers) { } - public function call(string $call, array $params, array $pathChunks): WithoutBody|EmptyObject|OrgCustomProperty|RepositoryInvitation|FileCommit|Environment|RepositoryRuleset + /** @return |Schema\CustomProperty */ + public function call(string $call, array $params, array $pathChunks): WithoutBody|EmptyObject|CustomProperty|RepositoryInvitation|FileCommit|Environment|RepositoryRuleset { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'orgs') { diff --git a/clients/GitHub/src/Internal/Routers.php b/clients/GitHub/src/Internal/Routers.php index a280646929b..69c3aadff1b 100644 --- a/clients/GitHub/src/Internal/Routers.php +++ b/clients/GitHub/src/Internal/Routers.php @@ -59,6 +59,7 @@ final class Routers private Internal\Router\Post\CodeScanning|null $internal🔀Router🔀Post🔀CodeScanning = null; private Internal\Router\Post\DependencyGraph|null $internal🔀Router🔀Post🔀DependencyGraph = null; private Internal\Router\Post\Git|null $internal🔀Router🔀Post🔀Git = null; + private Internal\Router\Post\SecretScanning|null $internal🔀Router🔀Post🔀SecretScanning = null; private Internal\Router\Post\SecurityAdvisories|null $internal🔀Router🔀Post🔀SecurityAdvisories = null; private Internal\Router\Post\Reactions|null $internal🔀Router🔀Post🔀Reactions = null; private Internal\Router\Post\Packages|null $internal🔀Router🔀Post🔀Packages = null; @@ -586,6 +587,15 @@ public function internal🔀Router🔀Post🔀Git(): Internal\Router\Post\Git return $this->internal🔀Router🔀Post🔀Git; } + public function internal🔀Router🔀Post🔀SecretScanning(): Internal\Router\Post\SecretScanning + { + if ($this->internal🔀Router🔀Post🔀SecretScanning instanceof Internal\Router\Post\SecretScanning === false) { + $this->internal🔀Router🔀Post🔀SecretScanning = new Internal\Router\Post\SecretScanning(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + } + + return $this->internal🔀Router🔀Post🔀SecretScanning; + } + public function internal🔀Router🔀Post🔀SecurityAdvisories(): Internal\Router\Post\SecurityAdvisories { if ($this->internal🔀Router🔀Post🔀SecurityAdvisories instanceof Internal\Router\Post\SecurityAdvisories === false) { diff --git a/clients/GitHub/src/Operation/Copilot.php b/clients/GitHub/src/Operation/Copilot.php index 050685ed146..aa5f5d03a0b 100644 --- a/clients/GitHub/src/Operation/Copilot.php +++ b/clients/GitHub/src/Operation/Copilot.php @@ -102,4 +102,16 @@ public function getCopilotSeatDetailsForUser(string $org, string $username): Cop { return $this->operators->copilot👷GetCopilotSeatDetailsForUser()->call($org, $username); } + + /** @return iterable */ + public function usageMetricsForTeam(string $org, string $teamSlug, string $since, string $until, int $page, int $perPage): iterable + { + return $this->operators->copilot👷UsageMetricsForTeam()->call($org, $teamSlug, $since, $until, $page, $perPage); + } + + /** @return iterable */ + public function usageMetricsForTeamListing(string $org, string $teamSlug, string $since, string $until, int $page, int $perPage): iterable + { + return $this->operators->copilot👷UsageMetricsForTeamListing()->call($org, $teamSlug, $since, $until, $page, $perPage); + } } diff --git a/clients/GitHub/src/Operation/Orgs.php b/clients/GitHub/src/Operation/Orgs.php index 02c168f9889..fa778e7b692 100644 --- a/clients/GitHub/src/Operation/Orgs.php +++ b/clients/GitHub/src/Operation/Orgs.php @@ -6,13 +6,13 @@ use ApiClients\Client\GitHub\Internal; use ApiClients\Client\GitHub\Schema; +use ApiClients\Client\GitHub\Schema\CustomProperty; use ApiClients\Client\GitHub\Schema\HookDelivery; use ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json; use ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok; use ApiClients\Client\GitHub\Schema\OrganizationFull; use ApiClients\Client\GitHub\Schema\OrganizationInvitation; use ApiClients\Client\GitHub\Schema\OrganizationRole; -use ApiClients\Client\GitHub\Schema\OrgCustomProperty; use ApiClients\Client\GitHub\Schema\OrgHook; use ApiClients\Client\GitHub\Schema\OrgMembership; use ApiClients\Client\GitHub\Schema\WebhookConfig; @@ -420,26 +420,24 @@ public function listPatGrantRepositoriesListing(string $org, int $patId, int $pe return $this->operators->orgs👷ListPatGrantRepositoriesListing()->call($org, $patId, $perPage, $page); } - /** @return Observable */ + /** @return iterable */ public function getAllCustomProperties(string $org): iterable { return $this->operators->orgs👷GetAllCustomProperties()->call($org); } - /** @return Observable */ + /** @return iterable */ public function createOrUpdateCustomProperties(string $org, array $params): iterable { return $this->operators->orgs👷CreateOrUpdateCustomProperties()->call($org, $params); } - /** @return */ - public function getCustomProperty(string $org, string $customPropertyName): OrgCustomProperty + public function getCustomProperty(string $org, string $customPropertyName): CustomProperty { return $this->operators->orgs👷GetCustomProperty()->call($org, $customPropertyName); } - /** @return */ - public function createOrUpdateCustomProperty(string $org, string $customPropertyName, array $params): OrgCustomProperty + public function createOrUpdateCustomProperty(string $org, string $customPropertyName, array $params): CustomProperty { return $this->operators->orgs👷CreateOrUpdateCustomProperty()->call($org, $customPropertyName, $params); } diff --git a/clients/GitHub/src/Operation/SecretScanning.php b/clients/GitHub/src/Operation/SecretScanning.php index 7b9a78bfd12..22074873606 100644 --- a/clients/GitHub/src/Operation/SecretScanning.php +++ b/clients/GitHub/src/Operation/SecretScanning.php @@ -7,6 +7,7 @@ use ApiClients\Client\GitHub\Internal; use ApiClients\Client\GitHub\Schema; use ApiClients\Client\GitHub\Schema\SecretScanningAlert; +use ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass; use ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody; final class SecretScanning @@ -68,4 +69,9 @@ public function listLocationsForAlertListing(string $owner, string $repo, int $a { return $this->operators->secretScanning👷ListLocationsForAlertListing()->call($owner, $repo, $alertNumber, $page, $perPage); } + + public function createPushProtectionBypass(string $owner, string $repo, array $params): SecretScanningPushProtectionBypass|WithoutBody + { + return $this->operators->secretScanning👷CreatePushProtectionBypass()->call($owner, $repo, $params); + } } diff --git a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index 3fa47d70472..cba657719a6 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -1224,19 +1224,19 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/properties/schema') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'PATCH /orgs/{org}/properties/schema') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /orgs/{org}/properties/schema/{custom_property_name}') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\CustomProperty'); } if ($call === 'PUT /orgs/{org}/properties/schema/{custom_property_name}') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\CustomProperty'); } if ($call === 'DELETE /orgs/{org}/properties/schema/{custom_property_name}') { @@ -1359,6 +1359,14 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve(''); } + if ($call === 'GET /orgs/{org}/team/{team_slug}/copilot/usage') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'LIST /orgs/{org}/team/{team_slug}/copilot/usage') { + return $this->typeResolver->resolve('iterable'); + } + if ($call === 'GET /orgs/{org}/teams') { return $this->typeResolver->resolve('Observable'); } @@ -3487,6 +3495,10 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve('Observable|WithoutBody'); } + if ($call === 'POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses') { + return $this->typeResolver->resolve('Schema\\SecretScanningPushProtectionBypass|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + } + if ($call === 'GET /repos/{owner}/{repo}/security-advisories') { return $this->typeResolver->resolve('Observable'); } diff --git a/clients/GitHub/src/Schema/AliasAbstract/Tiet2A7E5464/TietF7B694FB/Tiet81AA0AE4/Tiet09B0FC2A.php b/clients/GitHub/src/Schema/AliasAbstract/Tiet2A7E5464/TietF7B694FB/Tiet81AA0AE4/Tiet09B0FC2A.php new file mode 100644 index 00000000000..d60f366775b --- /dev/null +++ b/clients/GitHub/src/Schema/AliasAbstract/Tiet2A7E5464/TietF7B694FB/Tiet81AA0AE4/Tiet09B0FC2A.php @@ -0,0 +1,34 @@ + 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Copilot\UsageMetricsForTeamListing::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['team_slug'] = 'generated'; + $data['since'] = 'generated'; + $data['until'] = 'generated'; + $data['page'] = 1; + $data['per_page'] = 8; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->copilot()->usageMetricsForTeamListing('generated', 'generated', 'generated', 'generated', 1, 8); + foreach ($result as $item) { + } + } + + /** @test */ + public function call_httpCode_401_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(401, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Copilot\UsageMetricsForTeamListing::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['team_slug'] = 'generated'; + $data['since'] = 'generated'; + $data['until'] = 'generated'; + $data['page'] = 1; + $data['per_page'] = 8; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_401_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(401, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->copilot()->usageMetricsForTeamListing('generated', 'generated', 'generated', 'generated', 1, 8); + foreach ($result as $item) { + } + } + + /** @test */ + public function call_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Copilot\UsageMetricsForTeamListing::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['team_slug'] = 'generated'; + $data['since'] = 'generated'; + $data['until'] = 'generated'; + $data['page'] = 1; + $data['per_page'] = 8; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->copilot()->usageMetricsForTeamListing('generated', 'generated', 'generated', 'generated', 1, 8); + foreach ($result as $item) { + } + } + + /** @test */ + public function call_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Copilot\UsageMetricsForTeamListing::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['team_slug'] = 'generated'; + $data['since'] = 'generated'; + $data['until'] = 'generated'; + $data['page'] = 1; + $data['per_page'] = 8; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->copilot()->usageMetricsForTeamListing('generated', 'generated', 'generated', 'generated', 1, 8); + foreach ($result as $item) { + } + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Copilot/UsageMetricsForTeamTest.php b/clients/GitHub/tests/Internal/Operation/Copilot/UsageMetricsForTeamTest.php new file mode 100644 index 00000000000..c7248e298dc --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Copilot/UsageMetricsForTeamTest.php @@ -0,0 +1,179 @@ + 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Copilot\UsageMetricsForTeam::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['team_slug'] = 'generated'; + $data['since'] = 'generated'; + $data['until'] = 'generated'; + $data['page'] = 1; + $data['per_page'] = 8; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->copilot()->usageMetricsForTeam('generated', 'generated', 'generated', 'generated', 1, 8); + } + + /** @test */ + public function call_httpCode_401_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(401, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Copilot\UsageMetricsForTeam::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['team_slug'] = 'generated'; + $data['since'] = 'generated'; + $data['until'] = 'generated'; + $data['page'] = 1; + $data['per_page'] = 8; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_401_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(401, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->copilot()->usageMetricsForTeam('generated', 'generated', 'generated', 'generated', 1, 8); + } + + /** @test */ + public function call_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Copilot\UsageMetricsForTeam::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['team_slug'] = 'generated'; + $data['since'] = 'generated'; + $data['until'] = 'generated'; + $data['page'] = 1; + $data['per_page'] = 8; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->copilot()->usageMetricsForTeam('generated', 'generated', 'generated', 'generated', 1, 8); + } + + /** @test */ + public function call_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Copilot\UsageMetricsForTeam::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['team_slug'] = 'generated'; + $data['since'] = 'generated'; + $data['until'] = 'generated'; + $data['page'] = 1; + $data['per_page'] = 8; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::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('GET', '/orgs/generated/team/generated/copilot/usage?since=generated&until=generated&page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->copilot()->usageMetricsForTeam('generated', 'generated', 'generated', 'generated', 1, 8); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Orgs/CreateOrUpdateCustomPropertyTest.php b/clients/GitHub/tests/Internal/Operation/Orgs/CreateOrUpdateCustomPropertyTest.php index 46f08d41203..f4d397c9960 100644 --- a/clients/GitHub/tests/Internal/Operation/Orgs/CreateOrUpdateCustomPropertyTest.php +++ b/clients/GitHub/tests/Internal/Operation/Orgs/CreateOrUpdateCustomPropertyTest.php @@ -24,7 +24,7 @@ final class CreateOrUpdateCustomPropertyTest extends AsyncTestCase /** @test */ public function call_httpCode_200_requestContentType_application_json_responseContentType_application_json_zero(): void { - $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\OrgCustomProperty::SCHEMA_EXAMPLE_DATA, true))); + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\CustomProperty::SCHEMA_EXAMPLE_DATA, true))); $auth = $this->prophesize(AuthenticationInterface::class); $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); $browser = $this->prophesize(Browser::class); @@ -43,7 +43,7 @@ public function call_httpCode_200_requestContentType_application_json_responseCo /** @test */ public function operations_httpCode_200_requestContentType_application_json_responseContentType_application_json_zero(): void { - $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\OrgCustomProperty::SCHEMA_EXAMPLE_DATA, true))); + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\CustomProperty::SCHEMA_EXAMPLE_DATA, true))); $auth = $this->prophesize(AuthenticationInterface::class); $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); $browser = $this->prophesize(Browser::class); diff --git a/clients/GitHub/tests/Internal/Operation/Orgs/GetCustomPropertyTest.php b/clients/GitHub/tests/Internal/Operation/Orgs/GetCustomPropertyTest.php index c33499f116f..9433e105966 100644 --- a/clients/GitHub/tests/Internal/Operation/Orgs/GetCustomPropertyTest.php +++ b/clients/GitHub/tests/Internal/Operation/Orgs/GetCustomPropertyTest.php @@ -24,7 +24,7 @@ final class GetCustomPropertyTest extends AsyncTestCase /** @test */ public function call_httpCode_200_responseContentType_application_json_zero(): void { - $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\OrgCustomProperty::SCHEMA_EXAMPLE_DATA, true))); + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\CustomProperty::SCHEMA_EXAMPLE_DATA, true))); $auth = $this->prophesize(AuthenticationInterface::class); $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); $browser = $this->prophesize(Browser::class); @@ -43,7 +43,7 @@ public function call_httpCode_200_responseContentType_application_json_zero(): v /** @test */ public function operations_httpCode_200_responseContentType_application_json_zero(): void { - $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\OrgCustomProperty::SCHEMA_EXAMPLE_DATA, true))); + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\CustomProperty::SCHEMA_EXAMPLE_DATA, true))); $auth = $this->prophesize(AuthenticationInterface::class); $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); $browser = $this->prophesize(Browser::class); diff --git a/clients/GitHub/tests/Internal/Operation/SecretScanning/CreatePushProtectionBypassTest.php b/clients/GitHub/tests/Internal/Operation/SecretScanning/CreatePushProtectionBypassTest.php new file mode 100644 index 00000000000..e57b5ea7dfb --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/SecretScanning/CreatePushProtectionBypassTest.php @@ -0,0 +1,196 @@ + 'application/json'], json_encode(json_decode(Schema\SecretScanningPushProtectionBypass::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('POST', '/repos/generated/generated/secret-scanning/push-protection-bypasses', Argument::type('array'), json_encode(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\SecretScanning\CreatePushProtectionBypass::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + + return $data; + })(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_200_requestContentType_application_json_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\SecretScanningPushProtectionBypass::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('POST', '/repos/generated/generated/secret-scanning/push-protection-bypasses', Argument::type('array'), json_encode(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->secretScanning()->createPushProtectionBypass('generated', 'generated', json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_503_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class); + $response = new Response(503, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::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('POST', '/repos/generated/generated/secret-scanning/push-protection-bypasses', Argument::type('array'), json_encode(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\SecretScanning\CreatePushProtectionBypass::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + + return $data; + })(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_503_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class); + $response = new Response(503, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::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('POST', '/repos/generated/generated/secret-scanning/push-protection-bypasses', Argument::type('array'), json_encode(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->secretScanning()->createPushProtectionBypass('generated', 'generated', json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_403_requestContentType_application_json_empty(): void + { + $response = new Response(403, []); + $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('POST', '/repos/generated/generated/secret-scanning/push-protection-bypasses', Argument::type('array'), json_encode(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\SecretScanning\CreatePushProtectionBypass::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + + return $data; + })(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_403_requestContentType_application_json_empty(): void + { + $response = new Response(403, []); + $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('POST', '/repos/generated/generated/secret-scanning/push-protection-bypasses', Argument::type('array'), json_encode(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->secretScanning()->createPushProtectionBypass('generated', 'generated', json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + self::assertArrayHasKey('code', $result); + self::assertSame(403, $result['code']); + } + + /** @test */ + public function call_httpCode_404_requestContentType_application_json_empty(): void + { + $response = new Response(404, []); + $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('POST', '/repos/generated/generated/secret-scanning/push-protection-bypasses', Argument::type('array'), json_encode(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\SecretScanning\CreatePushProtectionBypass::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + + return $data; + })(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_404_requestContentType_application_json_empty(): void + { + $response = new Response(404, []); + $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('POST', '/repos/generated/generated/secret-scanning/push-protection-bypasses', Argument::type('array'), json_encode(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->secretScanning()->createPushProtectionBypass('generated', 'generated', json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + self::assertArrayHasKey('code', $result); + self::assertSame(404, $result['code']); + } + + /** @test */ + public function call_httpCode_422_requestContentType_application_json_empty(): void + { + $response = new Response(422, []); + $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('POST', '/repos/generated/generated/secret-scanning/push-protection-bypasses', Argument::type('array'), json_encode(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\SecretScanning\CreatePushProtectionBypass::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + + return $data; + })(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_422_requestContentType_application_json_empty(): void + { + $response = new Response(422, []); + $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('POST', '/repos/generated/generated/secret-scanning/push-protection-bypasses', Argument::type('array'), json_encode(json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->secretScanning()->createPushProtectionBypass('generated', 'generated', json_decode(Schema\SecretScanning\CreatePushProtectionBypass\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + self::assertArrayHasKey('code', $result); + self::assertSame(422, $result['code']); + } +} diff --git a/clients/GitHub/tests/Types/ClientCallReturnTypes.php b/clients/GitHub/tests/Types/ClientCallReturnTypes.php index 53914484335..f758898271b 100644 --- a/clients/GitHub/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHub/tests/Types/ClientCallReturnTypes.php @@ -312,10 +312,10 @@ function authHeader(): string assertType('Observable', $client->call('GET /orgs/{org}/projects')); assertType('Observable', $client->call('LIST /orgs/{org}/projects')); assertType('', $client->call('POST /orgs/{org}/projects')); -assertType('Observable', $client->call('GET /orgs/{org}/properties/schema')); -assertType('Observable', $client->call('PATCH /orgs/{org}/properties/schema')); -assertType('', $client->call('GET /orgs/{org}/properties/schema/{custom_property_name}')); -assertType('', $client->call('PUT /orgs/{org}/properties/schema/{custom_property_name}')); +assertType('iterable', $client->call('GET /orgs/{org}/properties/schema')); +assertType('iterable', $client->call('PATCH /orgs/{org}/properties/schema')); +assertType('Schema\\CustomProperty', $client->call('GET /orgs/{org}/properties/schema/{custom_property_name}')); +assertType('Schema\\CustomProperty', $client->call('PUT /orgs/{org}/properties/schema/{custom_property_name}')); assertType('', $client->call('DELETE /orgs/{org}/properties/schema/{custom_property_name}')); assertType('Observable', $client->call('GET /orgs/{org}/properties/values')); assertType('Observable', $client->call('LIST /orgs/{org}/properties/values')); @@ -346,6 +346,8 @@ function authHeader(): string assertType('', $client->call('GET /orgs/{org}/settings/billing/actions')); assertType('', $client->call('GET /orgs/{org}/settings/billing/packages')); assertType('', $client->call('GET /orgs/{org}/settings/billing/shared-storage')); +assertType('iterable', $client->call('GET /orgs/{org}/team/{team_slug}/copilot/usage')); +assertType('iterable', $client->call('LIST /orgs/{org}/team/{team_slug}/copilot/usage')); assertType('Observable', $client->call('GET /orgs/{org}/teams')); assertType('Observable', $client->call('LIST /orgs/{org}/teams')); assertType('', $client->call('POST /orgs/{org}/teams')); @@ -878,6 +880,7 @@ function authHeader(): string assertType('', $client->call('PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}')); assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations')); assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations')); +assertType('Schema\\SecretScanningPushProtectionBypass|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/security-advisories')); assertType('', $client->call('POST /repos/{owner}/{repo}/security-advisories')); assertType('', $client->call('POST /repos/{owner}/{repo}/security-advisories/reports')); diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index 29c47122ff0..65dd35fa264 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -6304,6 +6304,23 @@ paths: - disabled - not_set default: enabled + dependency_graph_autosubmit_action: + type: string + description: The enablement status of Automatic dependency submission + enum: + - enabled + - disabled + - not_set + default: disabled + dependency_graph_autosubmit_action_options: + type: object + description: Feature options for Automatic dependency submission + properties: + labeled_runners: + type: boolean + description: Whether to use runners labeled with 'dependency-submission' + or standard GitHub runners. + default: false dependabot_alerts: type: string description: The enablement status of Dependabot alerts @@ -6573,6 +6590,21 @@ paths: - enabled - disabled - not_set + dependency_graph_autosubmit_action: + type: string + description: The enablement status of Automatic dependency submission + enum: + - enabled + - disabled + - not_set + dependency_graph_autosubmit_action_options: + type: object + description: Feature options for Automatic dependency submission + properties: + labeled_runners: + type: boolean + description: Whether to use runners labeled with 'dependency-submission' + or standard GitHub runners. dependabot_alerts: type: string description: The enablement status of Dependabot alerts @@ -11736,10 +11768,10 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/org-custom-property" + "$ref": "#/components/schemas/custom-property" examples: default: - "$ref": "#/components/examples/org-custom-properties" + "$ref": "#/components/examples/custom-properties" '403': "$ref": "#/components/responses/forbidden" '404': @@ -11776,7 +11808,7 @@ paths: type: array description: The array of custom properties to create or update. items: - "$ref": "#/components/schemas/org-custom-property" + "$ref": "#/components/schemas/custom-property" minItems: 1 maxItems: 100 required: @@ -11807,10 +11839,10 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/org-custom-property" + "$ref": "#/components/schemas/custom-property" examples: default: - "$ref": "#/components/examples/org-custom-properties" + "$ref": "#/components/examples/custom-properties" '403': "$ref": "#/components/responses/forbidden" '404': @@ -11841,10 +11873,10 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/org-custom-property" + "$ref": "#/components/schemas/custom-property" examples: default: - "$ref": "#/components/examples/org-custom-property" + "$ref": "#/components/examples/custom-property" '403': "$ref": "#/components/responses/forbidden" '404': @@ -11936,10 +11968,10 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/org-custom-property" + "$ref": "#/components/schemas/custom-property" examples: default: - "$ref": "#/components/examples/org-custom-property" + "$ref": "#/components/examples/custom-property" '403': "$ref": "#/components/responses/forbidden" '404': @@ -13172,6 +13204,85 @@ paths: enabledForGitHubApps: false category: billing subcategory: billing + "/orgs/{org}/team/{team_slug}/copilot/usage": + get: + summary: Get a summary of Copilot usage for a team + description: |- + > [!NOTE] + > This endpoint is in beta and is subject to change. + + You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + See the response schema tab for detailed metrics definitions. + + The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + they must have telemetry enabled in their IDE. + + > [!NOTE] + > This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day. + + Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team. + + OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + tags: + - copilot + operationId: copilot/usage-metrics-for-team + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-a-team + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - name: since + description: Show usage metrics since this date. This is a timestamp in [ISO + 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). + Maximum value is 28 days ago. + in: query + required: false + schema: + type: string + - name: until + description: Show usage metrics until this date. This is a timestamp in [ISO + 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) + and should not preceed the `since` date if it is passed. + in: query + required: false + schema: + type: string + - "$ref": "#/components/parameters/page" + - name: per_page + description: The number of days of metrics to display per page (max 28). For + more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + in: query + schema: + type: integer + default: 28 + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/copilot-usage-metrics" + examples: + default: + "$ref": "#/components/examples/copilot-usage-metrics-org" + '500': + "$ref": "#/components/responses/internal_error" + '401': + "$ref": "#/components/responses/requires_authentication" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: copilot + subcategory: copilot-usage "/orgs/{org}/teams": get: summary: List teams @@ -37629,6 +37740,67 @@ paths: enabledForGitHubApps: true category: secret-scanning subcategory: secret-scanning + "/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses": + post: + summary: Create a push protection bypass + description: |- + Creates a bypass for a previously push protected secret. + + The authenticated user must be the original author of the committed secret. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + operationId: secret-scanning/create-push-protection-bypass + tags: + - secret-scanning + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/secret-scanning/secret-scanning#create-a-push-protection-bypass + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + reason: + "$ref": "#/components/schemas/secret-scanning-push-protection-bypass-reason" + placeholder_id: + "$ref": "#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id" + required: + - reason + - placeholder_id + examples: + default: + value: + reason: will_fix_later + placeholder_id: 2k4dM4tseyC5lPIsjl5emX9sPNk + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/secret-scanning-push-protection-bypass" + examples: + default: + "$ref": "#/components/examples/secret-scanning-push-protection-bypass" + '403': + description: User does not have enough permissions to perform this action. + '404': + description: Placeholder ID not found, or push protection is disabled on + this repository. + '422': + description: Bad request, input data missing or incorrect. + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + enabledForGitHubApps: true + githubCloudOnly: false + category: secret-scanning + subcategory: secret-scanning "/repos/{owner}/{repo}/security-advisories": get: summary: List repository security advisories @@ -71031,6 +71203,21 @@ components: - enabled - disabled - not_set + dependency_graph_autosubmit_action: + type: string + description: The enablement status of Automatic dependency submission + enum: + - enabled + - disabled + - not_set + dependency_graph_autosubmit_action_options: + type: object + description: Feature options for Automatic dependency submission + properties: + labeled_runners: + type: boolean + description: Whether to use runners labeled with 'dependency-submission' + or standard GitHub runners. dependabot_alerts: type: string description: The enablement status of Dependabot alerts @@ -72617,7 +72804,7 @@ components: - columns_url - created_at - updated_at - org-custom-property: + custom-property: title: Organization Custom Property description: Custom property defined on an organization type: object @@ -72625,6 +72812,11 @@ components: property_name: type: string description: The name of the property + url: + type: string + format: uri + description: The URL that can be used to fetch, update, or delete info about + this property via the API. value_type: type: string enum: @@ -87334,6 +87526,31 @@ components: - "$ref": "#/components/schemas/secret-scanning-location-pull-request-comment" - "$ref": "#/components/schemas/secret-scanning-location-pull-request-review" - "$ref": "#/components/schemas/secret-scanning-location-pull-request-review-comment" + secret-scanning-push-protection-bypass-reason: + description: The reason for bypassing push protection. + type: string + enum: + - false_positive + - used_in_tests + - will_fix_later + secret-scanning-push-protection-bypass-placeholder-id: + description: The ID of the push protection bypass placeholder. This value is + returned on any push protected routes. + type: string + secret-scanning-push-protection-bypass: + type: object + properties: + reason: + "$ref": "#/components/schemas/secret-scanning-push-protection-bypass-reason" + expire_at: + type: + - string + - 'null' + format: date-time + description: 'The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' + token_type: + type: string + description: The token type this bypass is for. repository-advisory-create: type: object properties: @@ -103870,7 +104087,7 @@ components: enum: - created definition: - "$ref": "#/components/schemas/org-custom-property" + "$ref": "#/components/schemas/custom-property" enterprise: "$ref": "#/components/schemas/enterprise-webhooks" installation: @@ -103918,7 +104135,7 @@ components: enum: - updated definition: - "$ref": "#/components/schemas/org-custom-property" + "$ref": "#/components/schemas/custom-property" enterprise: "$ref": "#/components/schemas/enterprise-webhooks" installation: @@ -201511,6 +201728,9 @@ components: scanning. advanced_security: enabled dependency_graph: enabled + dependency_graph_autosubmit_action: not_set + dependency_graph_autosubmit_action_options: + labeled_runners: false dependabot_alerts: enabled dependabot_security_updates: not_set code_scanning_default_setup: enabled @@ -201530,6 +201750,9 @@ components: repositories advanced_security: enabled dependency_graph: enabled + dependency_graph_autosubmit_action: enabled + dependency_graph_autosubmit_action_options: + labeled_runners: false dependabot_alerts: enabled dependabot_security_updates: enabled code_scanning_default_setup: enabled @@ -201550,6 +201773,9 @@ components: description: This is a code security configuration for octo-org advanced_security: enabled dependency_graph: enabled + dependency_graph_autosubmit_action: enabled + dependency_graph_autosubmit_action_options: + labeled_runners: false dependabot_alerts: enabled dependabot_security_updates: not_set code_scanning_default_setup: disabled @@ -201572,6 +201798,9 @@ components: description: This is a code security configuration for octo-org advanced_security: enabled dependency_graph: enabled + dependency_graph_autosubmit_action: not_set + dependency_graph_autosubmit_action_options: + labeled_runners: false dependabot_alerts: enabled dependabot_security_updates: not_set code_scanning_default_setup: enabled @@ -201593,6 +201822,9 @@ components: scanning. advanced_security: enabled dependency_graph: enabled + dependency_graph_autosubmit_action: not_set + dependency_graph_autosubmit_action_options: + labeled_runners: false dependabot_alerts: enabled dependabot_security_updates: not_set code_scanning_default_setup: enabled @@ -201613,6 +201845,9 @@ components: description: This is a code security configuration for octo-org advanced_security: enabled dependency_graph: enabled + dependency_graph_autosubmit_action: enabled + dependency_graph_autosubmit_action_options: + labeled_runners: false dependabot_alerts: enabled dependabot_security_updates: not_set code_scanning_default_setup: enabled @@ -203560,9 +203795,10 @@ components: site_admin: false created_at: '2011-04-11T20:09:31Z' updated_at: '2014-03-04T18:58:10Z' - org-custom-properties: + custom-properties: value: - property_name: environment + url: https://api.github.com/orgs/github/properties/schema/environment value_type: single_select required: true default_value: production @@ -203572,13 +203808,16 @@ components: - development values_editable_by: org_actors - property_name: service + url: https://api.github.com/orgs/github/properties/schema/service value_type: string - property_name: team + url: https://api.github.com/orgs/github/properties/schema/team value_type: string description: Team owning the repository - org-custom-property: + custom-property: value: property_name: environment + url: https://api.github.com/orgs/github/properties/schema/environment value_type: single_select required: true default_value: production @@ -216358,6 +216597,11 @@ components: - type: pull_request_review_comment details: pull_request_review_comment_url: https://api.github.com/repos/octocat/Hello-World/pulls/comments/12 + secret-scanning-push-protection-bypass: + value: + reason: will_fix_later + expire_at: '2020-11-06T18:18:30Z' + token_type: mailchimp_api_key repository-advisory: value: ghsa_id: GHSA-abcd-1234-efgh