codecraftai-restclient-github-public 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccai/restclient/github/public/__init__.py +0 -0
- ccai/restclient/github/public/generation/githubrestclientgenerator.py +56 -0
- ccai/restclient/github/public/generation/specs/api-hints.json +172 -0
- ccai/restclient/github/public/generation/specs/api-public.json +306020 -0
- ccai/restclient/github/public/generation/specs/pagination-hints.json +31 -0
- ccai/restclient/github/public/githubpublicrestclient.py +262 -0
- ccai/restclient/github/public/githubrestclientbase.py +120 -0
- ccai/restclient/github/public/groups/__init__.py +0 -0
- ccai/restclient/github/public/groups/actions.py +8042 -0
- ccai/restclient/github/public/groups/activity.py +1488 -0
- ccai/restclient/github/public/groups/apiinsights.py +478 -0
- ccai/restclient/github/public/groups/apps.py +1662 -0
- ccai/restclient/github/public/groups/billing.py +401 -0
- ccai/restclient/github/public/groups/campaigns.py +262 -0
- ccai/restclient/github/public/groups/checks.py +632 -0
- ccai/restclient/github/public/groups/classroom.py +276 -0
- ccai/restclient/github/public/groups/codescanning.py +1203 -0
- ccai/restclient/github/public/groups/codesecurity.py +997 -0
- ccai/restclient/github/public/groups/codesofconduct.py +92 -0
- ccai/restclient/github/public/groups/codespaces.py +2271 -0
- ccai/restclient/github/public/groups/copilot.py +517 -0
- ccai/restclient/github/public/groups/credentials.py +62 -0
- ccai/restclient/github/public/groups/dependabot.py +1155 -0
- ccai/restclient/github/public/groups/dependencygraph.py +152 -0
- ccai/restclient/github/public/groups/emojis.py +51 -0
- ccai/restclient/github/public/groups/gists.py +909 -0
- ccai/restclient/github/public/groups/git.py +734 -0
- ccai/restclient/github/public/groups/gitignore.py +96 -0
- ccai/restclient/github/public/groups/hostedcompute.py +290 -0
- ccai/restclient/github/public/groups/interactions.py +389 -0
- ccai/restclient/github/public/groups/issues.py +2460 -0
- ccai/restclient/github/public/groups/licenses.py +153 -0
- ccai/restclient/github/public/groups/markdown.py +88 -0
- ccai/restclient/github/public/groups/meta.py +213 -0
- ccai/restclient/github/public/groups/migrations.py +1079 -0
- ccai/restclient/github/public/groups/oidc.py +102 -0
- ccai/restclient/github/public/groups/orgs.py +3958 -0
- ccai/restclient/github/public/groups/packages.py +1316 -0
- ccai/restclient/github/public/groups/privateregistries.py +294 -0
- ccai/restclient/github/public/groups/projectsclassic.py +1154 -0
- ccai/restclient/github/public/groups/pulls.py +1469 -0
- ccai/restclient/github/public/groups/ratelimit.py +68 -0
- ccai/restclient/github/public/groups/reactions.py +1247 -0
- ccai/restclient/github/public/groups/repos.py +9741 -0
- ccai/restclient/github/public/groups/search.py +417 -0
- ccai/restclient/github/public/groups/secretscanning.py +568 -0
- ccai/restclient/github/public/groups/securityadvisories.py +541 -0
- ccai/restclient/github/public/groups/teams.py +2985 -0
- ccai/restclient/github/public/groups/users.py +2054 -0
- ccai/restclient/github/public/py.typed +0 -0
- ccai/restclient/github/public/schemas/__init__.py +0 -0
- ccai/restclient/github/public/schemas/actions.py +418 -0
- ccai/restclient/github/public/schemas/activity.py +95 -0
- ccai/restclient/github/public/schemas/actor.py +20 -0
- ccai/restclient/github/public/schemas/addedtoprojectissueevent.py +24 -0
- ccai/restclient/github/public/schemas/apps.py +151 -0
- ccai/restclient/github/public/schemas/assignedissueevent.py +25 -0
- ccai/restclient/github/public/schemas/authenticationtoken.py +20 -0
- ccai/restclient/github/public/schemas/automerge.py +16 -0
- ccai/restclient/github/public/schemas/basicerror.py +16 -0
- ccai/restclient/github/public/schemas/billing.py +27 -0
- ccai/restclient/github/public/schemas/billingusagereport.py +12 -0
- ccai/restclient/github/public/schemas/billingusagereportuser.py +12 -0
- ccai/restclient/github/public/schemas/campaigns.py +27 -0
- ccai/restclient/github/public/schemas/checkrunwithsimplechecksuite.py +31 -0
- ccai/restclient/github/public/schemas/checks.py +80 -0
- ccai/restclient/github/public/schemas/classroom.py +109 -0
- ccai/restclient/github/public/schemas/codeofconductsimple.py +18 -0
- ccai/restclient/github/public/schemas/codescanning.py +197 -0
- ccai/restclient/github/public/schemas/codescanningalertlocation.py +17 -0
- ccai/restclient/github/public/schemas/codescanningalertrule.py +20 -0
- ccai/restclient/github/public/schemas/codescanningalertrulesummary.py +20 -0
- ccai/restclient/github/public/schemas/codescanninganalysistool.py +14 -0
- ccai/restclient/github/public/schemas/codescanningautofixcommitsresponse.py +11 -0
- ccai/restclient/github/public/schemas/codescanningdefaultsetupupdateresponse.py +15 -0
- ccai/restclient/github/public/schemas/codescanningsarifsreceipt.py +11 -0
- ccai/restclient/github/public/schemas/codescanningvariantanalysisrepository.py +20 -0
- ccai/restclient/github/public/schemas/codescanningvariantanalysisskippedrepogroup.py +13 -0
- ccai/restclient/github/public/schemas/codesecurity.py +73 -0
- ccai/restclient/github/public/schemas/codesofconduct.py +19 -0
- ccai/restclient/github/public/schemas/codespaces.py +130 -0
- ccai/restclient/github/public/schemas/codespacewithfullrepository.py +45 -0
- ccai/restclient/github/public/schemas/commit.py +25 -0
- ccai/restclient/github/public/schemas/contenttree.py +27 -0
- ccai/restclient/github/public/schemas/convertednotetoissueissueevent.py +24 -0
- ccai/restclient/github/public/schemas/copilot.py +50 -0
- ccai/restclient/github/public/schemas/copilotdotcomchat.py +16 -0
- ccai/restclient/github/public/schemas/copilotdotcompullrequests.py +16 -0
- ccai/restclient/github/public/schemas/copilotidechat.py +16 -0
- ccai/restclient/github/public/schemas/copilotidecodecompletions.py +17 -0
- ccai/restclient/github/public/schemas/copilotorganizationseatbreakdown.py +18 -0
- ccai/restclient/github/public/schemas/cvssseverities.py +13 -0
- ccai/restclient/github/public/schemas/demilestonedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/dependabot.py +87 -0
- ccai/restclient/github/public/schemas/dependabotalertpackage.py +14 -0
- ccai/restclient/github/public/schemas/dependabotalertsecurityadvisory.py +29 -0
- ccai/restclient/github/public/schemas/dependabotalertsecurityvulnerability.py +18 -0
- ccai/restclient/github/public/schemas/dependency.py +16 -0
- ccai/restclient/github/public/schemas/dependencygraph.py +29 -0
- ccai/restclient/github/public/schemas/deploymentsimple.py +28 -0
- ccai/restclient/github/public/schemas/discussion.py +37 -0
- ccai/restclient/github/public/schemas/enterprise.py +24 -0
- ccai/restclient/github/public/schemas/enterpriseteam.py +27 -0
- ccai/restclient/github/public/schemas/enterprisewebhooks.py +26 -0
- ccai/restclient/github/public/schemas/gisthistory.py +19 -0
- ccai/restclient/github/public/schemas/gists.py +88 -0
- ccai/restclient/github/public/schemas/git.py +71 -0
- ccai/restclient/github/public/schemas/gitignore.py +14 -0
- ccai/restclient/github/public/schemas/hookdelivery.py +29 -0
- ccai/restclient/github/public/schemas/hookdeliveryitem.py +26 -0
- ccai/restclient/github/public/schemas/hookresponse.py +14 -0
- ccai/restclient/github/public/schemas/hostedcompute.py +30 -0
- ccai/restclient/github/public/schemas/installation.py +35 -0
- ccai/restclient/github/public/schemas/installationtoken.py +22 -0
- ccai/restclient/github/public/schemas/interactions.py +23 -0
- ccai/restclient/github/public/schemas/issuedependenciessummary.py +13 -0
- ccai/restclient/github/public/schemas/issueeventdismissedreview.py +15 -0
- ccai/restclient/github/public/schemas/issueeventlabel.py +16 -0
- ccai/restclient/github/public/schemas/issueeventmilestone.py +13 -0
- ccai/restclient/github/public/schemas/issueeventprojectcard.py +18 -0
- ccai/restclient/github/public/schemas/issueeventrename.py +14 -0
- ccai/restclient/github/public/schemas/issuefieldvalue.py +19 -0
- ccai/restclient/github/public/schemas/issues.py +135 -0
- ccai/restclient/github/public/schemas/labeledissueevent.py +24 -0
- ccai/restclient/github/public/schemas/licenses.py +58 -0
- ccai/restclient/github/public/schemas/link.py +13 -0
- ccai/restclient/github/public/schemas/linkwithtype.py +14 -0
- ccai/restclient/github/public/schemas/lockedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/manifest.py +15 -0
- ccai/restclient/github/public/schemas/marketplaceaccount.py +18 -0
- ccai/restclient/github/public/schemas/mergegroup.py +17 -0
- ccai/restclient/github/public/schemas/meta.py +67 -0
- ccai/restclient/github/public/schemas/migrations.py +84 -0
- ccai/restclient/github/public/schemas/milestonedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/minimalrepository.py +102 -0
- ccai/restclient/github/public/schemas/movedcolumninprojectissueevent.py +24 -0
- ccai/restclient/github/public/schemas/nullableactionshostedrunnerpoolimage.py +16 -0
- ccai/restclient/github/public/schemas/nullablecodeofconductsimple.py +18 -0
- ccai/restclient/github/public/schemas/nullablecodespacemachine.py +21 -0
- ccai/restclient/github/public/schemas/nullablecollaborator.py +37 -0
- ccai/restclient/github/public/schemas/nullablecommunityhealthfile.py +11 -0
- ccai/restclient/github/public/schemas/nullablegituser.py +15 -0
- ccai/restclient/github/public/schemas/nullableintegration.py +28 -0
- ccai/restclient/github/public/schemas/nullableissue.py +52 -0
- ccai/restclient/github/public/schemas/nullablelicensesimple.py +20 -0
- ccai/restclient/github/public/schemas/nullablemilestone.py +30 -0
- ccai/restclient/github/public/schemas/nullableminimalrepository.py +102 -0
- ccai/restclient/github/public/schemas/nullableorganizationsimple.py +26 -0
- ccai/restclient/github/public/schemas/nullableprojectsv2statusupdate.py +24 -0
- ccai/restclient/github/public/schemas/nullablerepository.py +110 -0
- ccai/restclient/github/public/schemas/nullablerepositorywebhooks.py +115 -0
- ccai/restclient/github/public/schemas/nullablescopedinstallation.py +18 -0
- ccai/restclient/github/public/schemas/nullablesimplecommit.py +20 -0
- ccai/restclient/github/public/schemas/nullablesimplerepository.py +60 -0
- ccai/restclient/github/public/schemas/nullablesimpleuser.py +36 -0
- ccai/restclient/github/public/schemas/nullableteamsimple.py +27 -0
- ccai/restclient/github/public/schemas/oidc.py +15 -0
- ccai/restclient/github/public/schemas/organizationinvitation.py +26 -0
- ccai/restclient/github/public/schemas/organizationsimplewebhooks.py +27 -0
- ccai/restclient/github/public/schemas/orgprivateregistryconfigurationwithselectedrepositories.py +21 -0
- ccai/restclient/github/public/schemas/orgs.py +332 -0
- ccai/restclient/github/public/schemas/packages.py +42 -0
- ccai/restclient/github/public/schemas/pagebuildstatus.py +14 -0
- ccai/restclient/github/public/schemas/pageshttpscertificate.py +15 -0
- ccai/restclient/github/public/schemas/pagessourcehash.py +11 -0
- ccai/restclient/github/public/schemas/personalaccesstokenrequest.py +28 -0
- ccai/restclient/github/public/schemas/privateregistries.py +20 -0
- ccai/restclient/github/public/schemas/projectsclassic.py +70 -0
- ccai/restclient/github/public/schemas/projectsv2.py +31 -0
- ccai/restclient/github/public/schemas/projectsv2item.py +23 -0
- ccai/restclient/github/public/schemas/projectsv2iterationsetting.py +20 -0
- ccai/restclient/github/public/schemas/projectsv2singleselectoption.py +18 -0
- ccai/restclient/github/public/schemas/projectsv2statusupdate.py +24 -0
- ccai/restclient/github/public/schemas/protectedbranchrequiredstatuscheck.py +20 -0
- ccai/restclient/github/public/schemas/publicip.py +15 -0
- ccai/restclient/github/public/schemas/pullrequestminimal.py +16 -0
- ccai/restclient/github/public/schemas/pullrequestsimple.py +50 -0
- ccai/restclient/github/public/schemas/pulls.py +185 -0
- ccai/restclient/github/public/schemas/ratelimit.py +23 -0
- ccai/restclient/github/public/schemas/reactions.py +17 -0
- ccai/restclient/github/public/schemas/referencedworkflow.py +15 -0
- ccai/restclient/github/public/schemas/removedfromprojectissueevent.py +24 -0
- ccai/restclient/github/public/schemas/renamedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/repos.py +952 -0
- ccai/restclient/github/public/schemas/repository.py +110 -0
- ccai/restclient/github/public/schemas/repositoryadvisorycredit.py +15 -0
- ccai/restclient/github/public/schemas/repositoryadvisoryvulnerability.py +18 -0
- ccai/restclient/github/public/schemas/repositoryrulebranchnamepattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecodescanning.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecommitauthoremailpattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecommitmessagepattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecommitteremailpattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecreation.py +13 -0
- ccai/restclient/github/public/schemas/repositoryruledeletion.py +13 -0
- ccai/restclient/github/public/schemas/repositoryrulefileextensionrestriction.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulefilepathrestriction.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulemaxfilepathlength.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulemaxfilesize.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulemergequeue.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulenonfastforward.py +13 -0
- ccai/restclient/github/public/schemas/repositoryruleparamscodescanningtool.py +15 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsrequiredreviewerconfiguration.py +17 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsrestrictedcommits.py +14 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsreviewer.py +14 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsstatuscheckconfiguration.py +14 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsworkflowfilereference.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulepullrequest.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulerequireddeployments.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulerequiredlinearhistory.py +13 -0
- ccai/restclient/github/public/schemas/repositoryrulerequiredsignatures.py +13 -0
- ccai/restclient/github/public/schemas/repositoryrulerequiredstatuschecks.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulerulesetinfo.py +15 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositoryidtarget.py +15 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorynametarget.py +15 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorypropertyspec.py +17 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorypropertytarget.py +15 -0
- ccai/restclient/github/public/schemas/repositoryruletagnamepattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryruleupdate.py +16 -0
- ccai/restclient/github/public/schemas/repositoryruleviolationerror.py +18 -0
- ccai/restclient/github/public/schemas/repositoryruleworkflows.py +16 -0
- ccai/restclient/github/public/schemas/repositorywebhooks.py +115 -0
- ccai/restclient/github/public/schemas/reviewdismissedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/reviewrequestedissueevent.py +26 -0
- ccai/restclient/github/public/schemas/reviewrequestremovedissueevent.py +26 -0
- ccai/restclient/github/public/schemas/rulesetversion.py +17 -0
- ccai/restclient/github/public/schemas/runnerlabel.py +15 -0
- ccai/restclient/github/public/schemas/scimerror.py +20 -0
- ccai/restclient/github/public/schemas/search.py +263 -0
- ccai/restclient/github/public/schemas/secretscanning.py +96 -0
- ccai/restclient/github/public/schemas/secretscanningalertwebhook.py +33 -0
- ccai/restclient/github/public/schemas/secretscanninglocationcommit.py +21 -0
- ccai/restclient/github/public/schemas/secretscanninglocationdiscussionbody.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationdiscussioncomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationdiscussiontitle.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationissuebody.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationissuecomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationissuetitle.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestbody.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestcomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestreview.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestreviewcomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequesttitle.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationwikicommit.py +21 -0
- ccai/restclient/github/public/schemas/secretscanningpatternoverride.py +23 -0
- ccai/restclient/github/public/schemas/secretscanningscan.py +18 -0
- ccai/restclient/github/public/schemas/securityadvisories.py +106 -0
- ccai/restclient/github/public/schemas/securityadvisoryepss.py +14 -0
- ccai/restclient/github/public/schemas/securityandanalysis.py +18 -0
- ccai/restclient/github/public/schemas/shortblob.py +14 -0
- ccai/restclient/github/public/schemas/simplechecksuite.py +28 -0
- ccai/restclient/github/public/schemas/simpleclassroomorganization.py +20 -0
- ccai/restclient/github/public/schemas/simpleclassroomrepository.py +18 -0
- ccai/restclient/github/public/schemas/simpleclassroomuser.py +16 -0
- ccai/restclient/github/public/schemas/simplecommit.py +20 -0
- ccai/restclient/github/public/schemas/simplecommitstatus.py +22 -0
- ccai/restclient/github/public/schemas/simpleinstallation.py +16 -0
- ccai/restclient/github/public/schemas/simplerepository.py +60 -0
- ccai/restclient/github/public/schemas/statechangeissueevent.py +24 -0
- ccai/restclient/github/public/schemas/subissuessummary.py +12 -0
- ccai/restclient/github/public/schemas/teamorganization.py +63 -0
- ccai/restclient/github/public/schemas/teams.py +202 -0
- ccai/restclient/github/public/schemas/timelineassignedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/timelinecommentevent.py +30 -0
- ccai/restclient/github/public/schemas/timelinecommitcommentedevent.py +18 -0
- ccai/restclient/github/public/schemas/timelinecommittedevent.py +25 -0
- ccai/restclient/github/public/schemas/timelinecrossreferencedevent.py +19 -0
- ccai/restclient/github/public/schemas/timelinelinecommentedevent.py +17 -0
- ccai/restclient/github/public/schemas/timelinereviewedevent.py +29 -0
- ccai/restclient/github/public/schemas/timelineunassignedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/traffic.py +12 -0
- ccai/restclient/github/public/schemas/unassignedissueevent.py +25 -0
- ccai/restclient/github/public/schemas/unlabeledissueevent.py +24 -0
- ccai/restclient/github/public/schemas/users.py +183 -0
- ccai/restclient/github/public/schemas/validationerror.py +17 -0
- ccai/restclient/github/public/schemas/validationerrorsimple.py +17 -0
- ccai/restclient/github/public/schemas/verification.py +16 -0
- ccai/restclient/github/public/schemas/vulnerability.py +18 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionconfigurationdisabled.py +15 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionconfigurationenabled.py +15 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionrulecreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionruledeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionruleedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookcheckruncompleted.py +15 -0
- ccai/restclient/github/public/schemas/webhookcheckruncompletedformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookcheckruncreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookcheckruncreatedformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrequestedaction.py +18 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrequestedactionformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrerequested.py +15 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrerequestedformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookchecksuitecompleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookchecksuiterequested.py +18 -0
- ccai/restclient/github/public/schemas/webhookchecksuitererequested.py +18 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertappearedinbranch.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertclosedbyuser.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertcreated.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertfixed.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertreopened.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertreopenedbyuser.py +20 -0
- ccai/restclient/github/public/schemas/webhookcommitcommentcreated.py +18 -0
- ccai/restclient/github/public/schemas/webhookcreate.py +21 -0
- ccai/restclient/github/public/schemas/webhookcustompropertycreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookcustompropertydeleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookcustompropertypromotedtoenterprise.py +15 -0
- ccai/restclient/github/public/schemas/webhookcustompropertyupdated.py +15 -0
- ccai/restclient/github/public/schemas/webhookcustompropertyvaluesupdated.py +19 -0
- ccai/restclient/github/public/schemas/webhookdelete.py +17 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertautodismissed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertautoreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertdismissed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertfixed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertreintroduced.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookdeploykeycreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookdeploykeydeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookdeploymentcreated.py +20 -0
- ccai/restclient/github/public/schemas/webhookdeploymentprotectionrulerequested.py +21 -0
- ccai/restclient/github/public/schemas/webhookdeploymentreviewapproved.py +24 -0
- ccai/restclient/github/public/schemas/webhookdeploymentreviewrejected.py +24 -0
- ccai/restclient/github/public/schemas/webhookdeploymentreviewrequested.py +23 -0
- ccai/restclient/github/public/schemas/webhookdeploymentstatuscreated.py +22 -0
- ccai/restclient/github/public/schemas/webhookdiscussionanswered.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncategorychanged.py +19 -0
- ccai/restclient/github/public/schemas/webhookdiscussionclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncommentcreated.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncommentdeleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncommentedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussiondeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookdiscussionlabeled.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussionlocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionpinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussiontransferred.py +19 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunanswered.py +15 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunlabeled.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunlocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunpinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookfork.py +18 -0
- ccai/restclient/github/public/schemas/webhookgithubappauthorizationrevoked.py +11 -0
- ccai/restclient/github/public/schemas/webhookgollum.py +17 -0
- ccai/restclient/github/public/schemas/webhookinstallationcreated.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationdeleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationnewpermissionsaccepted.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationrepositoriesadded.py +21 -0
- ccai/restclient/github/public/schemas/webhookinstallationrepositoriesremoved.py +21 -0
- ccai/restclient/github/public/schemas/webhookinstallationsuspend.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationtargetrenamed.py +20 -0
- ccai/restclient/github/public/schemas/webhookinstallationunsuspend.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuecommentcreated.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuecommentdeleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuecommentedited.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockedbyadded.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockedbyremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockingadded.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockingremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuesassigned.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookissuesdeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuesdemilestoned.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuesedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookissueslabeled.py +19 -0
- ccai/restclient/github/public/schemas/webhookissueslocked.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuesmilestoned.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuesopened.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuespinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookissuesreopened.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuestransferred.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuestyped.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesunassigned.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesunlabeled.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesunlocked.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuesunpinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookissuesuntyped.py +17 -0
- ccai/restclient/github/public/schemas/webhooklabelcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooklabeldeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhooklabeledited.py +19 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasecancelled.py +18 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasechanged.py +20 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasependingchange.py +20 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasependingchangecancelled.py +20 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasepurchased.py +18 -0
- ccai/restclient/github/public/schemas/webhookmemberadded.py +19 -0
- ccai/restclient/github/public/schemas/webhookmemberedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookmemberremoved.py +16 -0
- ccai/restclient/github/public/schemas/webhookmembershipadded.py +20 -0
- ccai/restclient/github/public/schemas/webhookmembershipremoved.py +20 -0
- ccai/restclient/github/public/schemas/webhookmergegroupchecksrequested.py +15 -0
- ccai/restclient/github/public/schemas/webhookmergegroupdestroyed.py +16 -0
- ccai/restclient/github/public/schemas/webhookmetadeleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookmilestoneclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookmilestonecreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookmilestonedeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookmilestoneedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookmilestoneopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationdeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationmemberadded.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationmemberinvited.py +19 -0
- ccai/restclient/github/public/schemas/webhookorganizationmemberremoved.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationrenamed.py +19 -0
- ccai/restclient/github/public/schemas/webhookorgblockblocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookorgblockunblocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookpackagepublished.py +18 -0
- ccai/restclient/github/public/schemas/webhookpackageupdated.py +18 -0
- ccai/restclient/github/public/schemas/webhookpagebuild.py +18 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestapproved.py +15 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestcancelled.py +15 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestcreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestdenied.py +15 -0
- ccai/restclient/github/public/schemas/webhookping.py +17 -0
- ccai/restclient/github/public/schemas/webhookpingformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookprojectcardconverted.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectcardcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcarddeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookprojectcardedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectcardmoved.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumncreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumndeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumnedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumnmoved.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectdeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemarchived.py +15 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemconverted.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemcreated.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemdeleted.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemedited.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemreordered.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemrestored.py +15 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectclosed.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectcreated.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectdeleted.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectedited.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectreopened.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2statusupdatecreated.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2statusupdatedeleted.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2statusupdateedited.py +17 -0
- ccai/restclient/github/public/schemas/webhookpublic.py +14 -0
- ccai/restclient/github/public/schemas/webhookpullrequestassigned.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestautomergedisabled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestautomergeenabled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestclosed.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestconvertedtodraft.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestdemilestoned.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestdequeued.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestenqueued.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestlabeled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestlocked.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestmilestoned.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestopened.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreadyforreview.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreopened.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentcreated.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentdeleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewdismissed.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewsubmitted.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewthreadresolved.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewthreadunresolved.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestsynchronize.py +21 -0
- ccai/restclient/github/public/schemas/webhookpullrequestunassigned.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestunlabeled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestunlocked.py +19 -0
- ccai/restclient/github/public/schemas/webhookpush.py +27 -0
- ccai/restclient/github/public/schemas/webhookregistrypackagepublished.py +18 -0
- ccai/restclient/github/public/schemas/webhookregistrypackageupdated.py +18 -0
- ccai/restclient/github/public/schemas/webhookreleasecreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleasedeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleaseedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookreleaseprereleased.py +18 -0
- ccai/restclient/github/public/schemas/webhookreleasepublished.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleasereleased.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleaseunpublished.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryadvisorypublished.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryadvisoryreported.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryarchived.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorycreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorydeleted.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorydispatchsample.py +19 -0
- ccai/restclient/github/public/schemas/webhookrepositoryedited.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryimport.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositoryprivatized.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorypublicized.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrenamed.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrulesetcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrulesetdeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrulesetedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookrepositorytransferred.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryunarchived.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertcreate.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertdismiss.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertreopen.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertresolve.py +18 -0
- ccai/restclient/github/public/schemas/webhookrubygemsmetadata.py +21 -0
- ccai/restclient/github/public/schemas/webhooksalert.py +31 -0
- ccai/restclient/github/public/schemas/webhooksanswer.py +24 -0
- ccai/restclient/github/public/schemas/webhooksapprover.py +28 -0
- ccai/restclient/github/public/schemas/webhookschanges.py +15 -0
- ccai/restclient/github/public/schemas/webhookschanges8.py +12 -0
- ccai/restclient/github/public/schemas/webhookscomment.py +24 -0
- ccai/restclient/github/public/schemas/webhooksdeploykey.py +24 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertlocationcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertlocationcreatedformencoded.py +10 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertpubliclyleaked.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertresolved.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertvalidated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningscancompleted.py +24 -0
- ccai/restclient/github/public/schemas/webhooksecurityadvisorypublished.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecurityadvisoryupdated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecurityadvisorywithdrawn.py +18 -0
- ccai/restclient/github/public/schemas/webhooksecurityandanalysis.py +17 -0
- ccai/restclient/github/public/schemas/webhooksissue.py +48 -0
- ccai/restclient/github/public/schemas/webhooksissue2.py +48 -0
- ccai/restclient/github/public/schemas/webhooksissuecomment.py +26 -0
- ccai/restclient/github/public/schemas/webhookslabel.py +18 -0
- ccai/restclient/github/public/schemas/webhooksmarketplacepurchase.py +18 -0
- ccai/restclient/github/public/schemas/webhooksmembership.py +21 -0
- ccai/restclient/github/public/schemas/webhooksmilestone.py +30 -0
- ccai/restclient/github/public/schemas/webhooksmilestone3.py +30 -0
- ccai/restclient/github/public/schemas/webhooksponsorshipcancelled.py +16 -0
- ccai/restclient/github/public/schemas/webhooksponsorshipcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksponsorshipedited.py +19 -0
- ccai/restclient/github/public/schemas/webhooksponsorshippendingcancellation.py +17 -0
- ccai/restclient/github/public/schemas/webhooksponsorshippendingtierchange.py +18 -0
- ccai/restclient/github/public/schemas/webhooksponsorshiptierchanged.py +17 -0
- ccai/restclient/github/public/schemas/webhookspreviousmarketplacepurchase.py +18 -0
- ccai/restclient/github/public/schemas/webhooksproject.py +24 -0
- ccai/restclient/github/public/schemas/webhooksprojectcard.py +24 -0
- ccai/restclient/github/public/schemas/webhooksprojectchanges.py +12 -0
- ccai/restclient/github/public/schemas/webhooksprojectcolumn.py +20 -0
- ccai/restclient/github/public/schemas/webhookspullrequest5.py +59 -0
- ccai/restclient/github/public/schemas/webhooksrelease.py +36 -0
- ccai/restclient/github/public/schemas/webhooksrelease1.py +36 -0
- ccai/restclient/github/public/schemas/webhooksreview.py +26 -0
- ccai/restclient/github/public/schemas/webhooksreviewcomment.py +41 -0
- ccai/restclient/github/public/schemas/webhooksrule.py +42 -0
- ccai/restclient/github/public/schemas/webhookssecurityadvisory.py +27 -0
- ccai/restclient/github/public/schemas/webhookssponsorship.py +18 -0
- ccai/restclient/github/public/schemas/webhookstarcreated.py +18 -0
- ccai/restclient/github/public/schemas/webhookstardeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookstatus.py +28 -0
- ccai/restclient/github/public/schemas/webhooksteam.py +28 -0
- ccai/restclient/github/public/schemas/webhooksteam1.py +28 -0
- ccai/restclient/github/public/schemas/webhooksubissuesparentissueadded.py +19 -0
- ccai/restclient/github/public/schemas/webhooksubissuesparentissueremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhooksubissuessubissueadded.py +19 -0
- ccai/restclient/github/public/schemas/webhooksubissuessubissueremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhooksuser.py +33 -0
- ccai/restclient/github/public/schemas/webhooksusermannequin.py +33 -0
- ccai/restclient/github/public/schemas/webhooksworkflow.py +19 -0
- ccai/restclient/github/public/schemas/webhooksworkflowjobrun.py +19 -0
- ccai/restclient/github/public/schemas/webhookteamadd.py +15 -0
- ccai/restclient/github/public/schemas/webhookteamaddedtorepository.py +18 -0
- ccai/restclient/github/public/schemas/webhookteamcreated.py +18 -0
- ccai/restclient/github/public/schemas/webhookteamdeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookteamedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookteamremovedfromrepository.py +18 -0
- ccai/restclient/github/public/schemas/webhookwatchstarted.py +15 -0
- ccai/restclient/github/public/schemas/webhookworkflowdispatch.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobcompleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobinprogress.py +17 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobqueued.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobwaiting.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowruncompleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowruninprogress.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowrunrequested.py +19 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/METADATA +87 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/RECORD +579 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/WHEEL +4 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/licenses/LICENSE.md +204 -0
|
@@ -0,0 +1,997 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from ccai.restclient.base.aspectsrest import AspectsRest
|
|
6
|
+
from ccai.restclient.base.pagedlist import PagedList
|
|
7
|
+
from ccai.restclient.base.restapigroup import RestApiGroup
|
|
8
|
+
from ccai.restclient.github.public.schemas.codesecurity import CodeSecurityConfiguration
|
|
9
|
+
from ccai.restclient.github.public.schemas.codesecurity import CodeSecurityConfigurationForRepository
|
|
10
|
+
from ccai.restclient.github.public.schemas.codesecurity import CodeSecurityConfigurationRepositories
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CodeSecurityApiGroup(RestApiGroup):
|
|
14
|
+
"""
|
|
15
|
+
Endpoints to manage Code security using the REST API.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def attach_configuration(self, org: str, configuration_id: int, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
19
|
+
"""
|
|
20
|
+
Attach a configuration to repositories
|
|
21
|
+
|
|
22
|
+
Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration.
|
|
23
|
+
|
|
24
|
+
If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled.
|
|
25
|
+
|
|
26
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
27
|
+
|
|
28
|
+
OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.
|
|
29
|
+
"""
|
|
30
|
+
client = self.client
|
|
31
|
+
if aspects is None:
|
|
32
|
+
aspects = client.aspects
|
|
33
|
+
|
|
34
|
+
header_params = client.headers
|
|
35
|
+
if headers is not None:
|
|
36
|
+
header_params = headers
|
|
37
|
+
|
|
38
|
+
leaf_template = "/orgs/{org}/code-security/configurations/{configuration_id}/attach"
|
|
39
|
+
path_params = {
|
|
40
|
+
'org': org,
|
|
41
|
+
'configuration_id': configuration_id,
|
|
42
|
+
}
|
|
43
|
+
call_leaf = leaf_template.format(**path_params)
|
|
44
|
+
|
|
45
|
+
query_params = None
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
if exp_status is None:
|
|
49
|
+
exp_status = [202]
|
|
50
|
+
|
|
51
|
+
resp = client.perform_call(
|
|
52
|
+
leaf=call_leaf,
|
|
53
|
+
method="POST",
|
|
54
|
+
params=query_params if query_params else None,
|
|
55
|
+
body=body,
|
|
56
|
+
exp_status=exp_status,
|
|
57
|
+
headers=header_params if header_params else None,
|
|
58
|
+
context_msg=None,
|
|
59
|
+
aspects=aspects,
|
|
60
|
+
)
|
|
61
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
62
|
+
rtnval = None
|
|
63
|
+
else:
|
|
64
|
+
rtnval = resp.json()
|
|
65
|
+
return rtnval
|
|
66
|
+
|
|
67
|
+
def attach_enterprise_configuration(self, enterprise: str, configuration_id: int, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
68
|
+
"""
|
|
69
|
+
Attach an enterprise configuration to repositories
|
|
70
|
+
|
|
71
|
+
Attaches an enterprise code security configuration to repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration.
|
|
72
|
+
|
|
73
|
+
If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled.
|
|
74
|
+
|
|
75
|
+
The authenticated user must be an administrator for the enterprise to use this endpoint.
|
|
76
|
+
|
|
77
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
|
|
78
|
+
"""
|
|
79
|
+
client = self.client
|
|
80
|
+
if aspects is None:
|
|
81
|
+
aspects = client.aspects
|
|
82
|
+
|
|
83
|
+
header_params = client.headers
|
|
84
|
+
if headers is not None:
|
|
85
|
+
header_params = headers
|
|
86
|
+
|
|
87
|
+
leaf_template = "/enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach"
|
|
88
|
+
path_params = {
|
|
89
|
+
'enterprise': enterprise,
|
|
90
|
+
'configuration_id': configuration_id,
|
|
91
|
+
}
|
|
92
|
+
call_leaf = leaf_template.format(**path_params)
|
|
93
|
+
|
|
94
|
+
query_params = None
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
if exp_status is None:
|
|
98
|
+
exp_status = [202]
|
|
99
|
+
|
|
100
|
+
resp = client.perform_call(
|
|
101
|
+
leaf=call_leaf,
|
|
102
|
+
method="POST",
|
|
103
|
+
params=query_params if query_params else None,
|
|
104
|
+
body=body,
|
|
105
|
+
exp_status=exp_status,
|
|
106
|
+
headers=header_params if header_params else None,
|
|
107
|
+
context_msg=None,
|
|
108
|
+
aspects=aspects,
|
|
109
|
+
)
|
|
110
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
111
|
+
rtnval = None
|
|
112
|
+
else:
|
|
113
|
+
rtnval = resp.json()
|
|
114
|
+
return rtnval
|
|
115
|
+
|
|
116
|
+
def create_configuration(self, org: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
117
|
+
"""
|
|
118
|
+
Create a code security configuration
|
|
119
|
+
|
|
120
|
+
Creates a code security configuration in an organization.
|
|
121
|
+
|
|
122
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
123
|
+
|
|
124
|
+
OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.
|
|
125
|
+
"""
|
|
126
|
+
client = self.client
|
|
127
|
+
if aspects is None:
|
|
128
|
+
aspects = client.aspects
|
|
129
|
+
|
|
130
|
+
header_params = client.headers
|
|
131
|
+
if headers is not None:
|
|
132
|
+
header_params = headers
|
|
133
|
+
|
|
134
|
+
leaf_template = "/orgs/{org}/code-security/configurations"
|
|
135
|
+
path_params = {
|
|
136
|
+
'org': org,
|
|
137
|
+
}
|
|
138
|
+
call_leaf = leaf_template.format(**path_params)
|
|
139
|
+
|
|
140
|
+
query_params = None
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
if exp_status is None:
|
|
144
|
+
exp_status = [201]
|
|
145
|
+
|
|
146
|
+
resp = client.perform_call(
|
|
147
|
+
leaf=call_leaf,
|
|
148
|
+
method="POST",
|
|
149
|
+
params=query_params if query_params else None,
|
|
150
|
+
body=body,
|
|
151
|
+
exp_status=exp_status,
|
|
152
|
+
headers=header_params if header_params else None,
|
|
153
|
+
context_msg=None,
|
|
154
|
+
aspects=aspects,
|
|
155
|
+
)
|
|
156
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
157
|
+
rtnval = None
|
|
158
|
+
else:
|
|
159
|
+
rtnval = resp.json()
|
|
160
|
+
return rtnval
|
|
161
|
+
|
|
162
|
+
def create_configuration_for_enterprise(self, enterprise: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
163
|
+
"""
|
|
164
|
+
Create a code security configuration for an enterprise
|
|
165
|
+
|
|
166
|
+
Creates a code security configuration in an enterprise.
|
|
167
|
+
|
|
168
|
+
The authenticated user must be an administrator of the enterprise in order to use this endpoint.
|
|
169
|
+
|
|
170
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
|
|
171
|
+
"""
|
|
172
|
+
client = self.client
|
|
173
|
+
if aspects is None:
|
|
174
|
+
aspects = client.aspects
|
|
175
|
+
|
|
176
|
+
header_params = client.headers
|
|
177
|
+
if headers is not None:
|
|
178
|
+
header_params = headers
|
|
179
|
+
|
|
180
|
+
leaf_template = "/enterprises/{enterprise}/code-security/configurations"
|
|
181
|
+
path_params = {
|
|
182
|
+
'enterprise': enterprise,
|
|
183
|
+
}
|
|
184
|
+
call_leaf = leaf_template.format(**path_params)
|
|
185
|
+
|
|
186
|
+
query_params = None
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
if exp_status is None:
|
|
190
|
+
exp_status = [201]
|
|
191
|
+
|
|
192
|
+
resp = client.perform_call(
|
|
193
|
+
leaf=call_leaf,
|
|
194
|
+
method="POST",
|
|
195
|
+
params=query_params if query_params else None,
|
|
196
|
+
body=body,
|
|
197
|
+
exp_status=exp_status,
|
|
198
|
+
headers=header_params if header_params else None,
|
|
199
|
+
context_msg=None,
|
|
200
|
+
aspects=aspects,
|
|
201
|
+
)
|
|
202
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
203
|
+
rtnval = None
|
|
204
|
+
else:
|
|
205
|
+
rtnval = resp.json()
|
|
206
|
+
return rtnval
|
|
207
|
+
|
|
208
|
+
def delete_configuration(self, org: str, configuration_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
209
|
+
"""
|
|
210
|
+
Delete a code security configuration
|
|
211
|
+
|
|
212
|
+
Deletes the desired code security configuration from an organization.
|
|
213
|
+
Repositories attached to the configuration will retain their settings but will no longer be associated with
|
|
214
|
+
the configuration.
|
|
215
|
+
|
|
216
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
217
|
+
|
|
218
|
+
OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.
|
|
219
|
+
"""
|
|
220
|
+
client = self.client
|
|
221
|
+
if aspects is None:
|
|
222
|
+
aspects = client.aspects
|
|
223
|
+
|
|
224
|
+
header_params = client.headers
|
|
225
|
+
if headers is not None:
|
|
226
|
+
header_params = headers
|
|
227
|
+
|
|
228
|
+
leaf_template = "/orgs/{org}/code-security/configurations/{configuration_id}"
|
|
229
|
+
path_params = {
|
|
230
|
+
'org': org,
|
|
231
|
+
'configuration_id': configuration_id,
|
|
232
|
+
}
|
|
233
|
+
call_leaf = leaf_template.format(**path_params)
|
|
234
|
+
|
|
235
|
+
query_params = None
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
if exp_status is None:
|
|
239
|
+
exp_status = [204]
|
|
240
|
+
|
|
241
|
+
resp = client.perform_call(
|
|
242
|
+
leaf=call_leaf,
|
|
243
|
+
method="DELETE",
|
|
244
|
+
params=query_params if query_params else None,
|
|
245
|
+
body=None,
|
|
246
|
+
exp_status=exp_status,
|
|
247
|
+
headers=header_params if header_params else None,
|
|
248
|
+
context_msg=None,
|
|
249
|
+
aspects=aspects,
|
|
250
|
+
)
|
|
251
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
252
|
+
rtnval = None
|
|
253
|
+
else:
|
|
254
|
+
rtnval = resp.json()
|
|
255
|
+
return rtnval
|
|
256
|
+
|
|
257
|
+
def delete_configuration_for_enterprise(self, enterprise: str, configuration_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
258
|
+
"""
|
|
259
|
+
Delete a code security configuration for an enterprise
|
|
260
|
+
|
|
261
|
+
Deletes a code security configuration from an enterprise.
|
|
262
|
+
Repositories attached to the configuration will retain their settings but will no longer be associated with
|
|
263
|
+
the configuration.
|
|
264
|
+
|
|
265
|
+
The authenticated user must be an administrator for the enterprise to use this endpoint.
|
|
266
|
+
|
|
267
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
|
|
268
|
+
"""
|
|
269
|
+
client = self.client
|
|
270
|
+
if aspects is None:
|
|
271
|
+
aspects = client.aspects
|
|
272
|
+
|
|
273
|
+
header_params = client.headers
|
|
274
|
+
if headers is not None:
|
|
275
|
+
header_params = headers
|
|
276
|
+
|
|
277
|
+
leaf_template = "/enterprises/{enterprise}/code-security/configurations/{configuration_id}"
|
|
278
|
+
path_params = {
|
|
279
|
+
'enterprise': enterprise,
|
|
280
|
+
'configuration_id': configuration_id,
|
|
281
|
+
}
|
|
282
|
+
call_leaf = leaf_template.format(**path_params)
|
|
283
|
+
|
|
284
|
+
query_params = None
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
if exp_status is None:
|
|
288
|
+
exp_status = [204]
|
|
289
|
+
|
|
290
|
+
resp = client.perform_call(
|
|
291
|
+
leaf=call_leaf,
|
|
292
|
+
method="DELETE",
|
|
293
|
+
params=query_params if query_params else None,
|
|
294
|
+
body=None,
|
|
295
|
+
exp_status=exp_status,
|
|
296
|
+
headers=header_params if header_params else None,
|
|
297
|
+
context_msg=None,
|
|
298
|
+
aspects=aspects,
|
|
299
|
+
)
|
|
300
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
301
|
+
rtnval = None
|
|
302
|
+
else:
|
|
303
|
+
rtnval = resp.json()
|
|
304
|
+
return rtnval
|
|
305
|
+
|
|
306
|
+
def detach_configuration(self, org: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
307
|
+
"""
|
|
308
|
+
Detach configurations from repositories
|
|
309
|
+
|
|
310
|
+
Detach code security configuration(s) from a set of repositories.
|
|
311
|
+
Repositories will retain their settings but will no longer be associated with the configuration.
|
|
312
|
+
|
|
313
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
314
|
+
|
|
315
|
+
OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.
|
|
316
|
+
"""
|
|
317
|
+
client = self.client
|
|
318
|
+
if aspects is None:
|
|
319
|
+
aspects = client.aspects
|
|
320
|
+
|
|
321
|
+
header_params = client.headers
|
|
322
|
+
if headers is not None:
|
|
323
|
+
header_params = headers
|
|
324
|
+
|
|
325
|
+
leaf_template = "/orgs/{org}/code-security/configurations/detach"
|
|
326
|
+
path_params = {
|
|
327
|
+
'org': org,
|
|
328
|
+
}
|
|
329
|
+
call_leaf = leaf_template.format(**path_params)
|
|
330
|
+
|
|
331
|
+
query_params = None
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
if exp_status is None:
|
|
335
|
+
exp_status = [204]
|
|
336
|
+
|
|
337
|
+
resp = client.perform_call(
|
|
338
|
+
leaf=call_leaf,
|
|
339
|
+
method="DELETE",
|
|
340
|
+
params=query_params if query_params else None,
|
|
341
|
+
body=body,
|
|
342
|
+
exp_status=exp_status,
|
|
343
|
+
headers=header_params if header_params else None,
|
|
344
|
+
context_msg=None,
|
|
345
|
+
aspects=aspects,
|
|
346
|
+
)
|
|
347
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
348
|
+
rtnval = None
|
|
349
|
+
else:
|
|
350
|
+
rtnval = resp.json()
|
|
351
|
+
return rtnval
|
|
352
|
+
|
|
353
|
+
def get_configuration(self, org: str, configuration_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeSecurityConfiguration:
|
|
354
|
+
"""
|
|
355
|
+
Get a code security configuration
|
|
356
|
+
|
|
357
|
+
Gets a code security configuration available in an organization.
|
|
358
|
+
|
|
359
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
360
|
+
|
|
361
|
+
OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.
|
|
362
|
+
"""
|
|
363
|
+
client = self.client
|
|
364
|
+
if aspects is None:
|
|
365
|
+
aspects = client.aspects
|
|
366
|
+
|
|
367
|
+
header_params = client.headers
|
|
368
|
+
if headers is not None:
|
|
369
|
+
header_params = headers
|
|
370
|
+
|
|
371
|
+
leaf_template = "/orgs/{org}/code-security/configurations/{configuration_id}"
|
|
372
|
+
path_params = {
|
|
373
|
+
'org': org,
|
|
374
|
+
'configuration_id': configuration_id,
|
|
375
|
+
}
|
|
376
|
+
call_leaf = leaf_template.format(**path_params)
|
|
377
|
+
|
|
378
|
+
query_params = None
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
if exp_status is None:
|
|
382
|
+
exp_status = [200]
|
|
383
|
+
|
|
384
|
+
resp = client.perform_call(
|
|
385
|
+
leaf=call_leaf,
|
|
386
|
+
method="GET",
|
|
387
|
+
params=query_params if query_params else None,
|
|
388
|
+
body=None,
|
|
389
|
+
exp_status=exp_status,
|
|
390
|
+
headers=header_params if header_params else None,
|
|
391
|
+
context_msg=None,
|
|
392
|
+
aspects=aspects,
|
|
393
|
+
)
|
|
394
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
395
|
+
rtnobj = None
|
|
396
|
+
else:
|
|
397
|
+
raw_data = resp.json()
|
|
398
|
+
rtnobj = CodeSecurityConfiguration.from_dict(raw_data)
|
|
399
|
+
return rtnobj
|
|
400
|
+
|
|
401
|
+
def get_configuration_for_repository(self, owner: str, repo: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeSecurityConfigurationForRepository:
|
|
402
|
+
"""
|
|
403
|
+
Get the code security configuration associated with a repository
|
|
404
|
+
|
|
405
|
+
Get the code security configuration that manages a repository's code security settings.
|
|
406
|
+
|
|
407
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
408
|
+
|
|
409
|
+
OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
|
|
410
|
+
"""
|
|
411
|
+
client = self.client
|
|
412
|
+
if aspects is None:
|
|
413
|
+
aspects = client.aspects
|
|
414
|
+
|
|
415
|
+
header_params = client.headers
|
|
416
|
+
if headers is not None:
|
|
417
|
+
header_params = headers
|
|
418
|
+
|
|
419
|
+
leaf_template = "/repos/{owner}/{repo}/code-security-configuration"
|
|
420
|
+
path_params = {
|
|
421
|
+
'owner': owner,
|
|
422
|
+
'repo': repo,
|
|
423
|
+
}
|
|
424
|
+
call_leaf = leaf_template.format(**path_params)
|
|
425
|
+
|
|
426
|
+
query_params = None
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
if exp_status is None:
|
|
430
|
+
exp_status = [200, 204]
|
|
431
|
+
|
|
432
|
+
resp = client.perform_call(
|
|
433
|
+
leaf=call_leaf,
|
|
434
|
+
method="GET",
|
|
435
|
+
params=query_params if query_params else None,
|
|
436
|
+
body=None,
|
|
437
|
+
exp_status=exp_status,
|
|
438
|
+
headers=header_params if header_params else None,
|
|
439
|
+
context_msg=None,
|
|
440
|
+
aspects=aspects,
|
|
441
|
+
)
|
|
442
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
443
|
+
rtnobj = None
|
|
444
|
+
else:
|
|
445
|
+
raw_data = resp.json()
|
|
446
|
+
rtnobj = CodeSecurityConfigurationForRepository.from_dict(raw_data)
|
|
447
|
+
return rtnobj
|
|
448
|
+
|
|
449
|
+
def get_default_configurations(self, org: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> List[Dict[str, Any]]:
|
|
450
|
+
"""
|
|
451
|
+
Get default code security configurations
|
|
452
|
+
|
|
453
|
+
Lists the default code security configurations for an organization.
|
|
454
|
+
|
|
455
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
456
|
+
|
|
457
|
+
OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.
|
|
458
|
+
"""
|
|
459
|
+
client = self.client
|
|
460
|
+
if aspects is None:
|
|
461
|
+
aspects = client.aspects
|
|
462
|
+
|
|
463
|
+
header_params = client.headers
|
|
464
|
+
if headers is not None:
|
|
465
|
+
header_params = headers
|
|
466
|
+
|
|
467
|
+
leaf_template = "/orgs/{org}/code-security/configurations/defaults"
|
|
468
|
+
path_params = {
|
|
469
|
+
'org': org,
|
|
470
|
+
}
|
|
471
|
+
call_leaf = leaf_template.format(**path_params)
|
|
472
|
+
|
|
473
|
+
query_params = None
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
if exp_status is None:
|
|
477
|
+
exp_status = [200]
|
|
478
|
+
|
|
479
|
+
resp = client.perform_call(
|
|
480
|
+
leaf=call_leaf,
|
|
481
|
+
method="GET",
|
|
482
|
+
params=query_params if query_params else None,
|
|
483
|
+
body=None,
|
|
484
|
+
exp_status=exp_status,
|
|
485
|
+
headers=header_params if header_params else None,
|
|
486
|
+
context_msg=None,
|
|
487
|
+
aspects=aspects,
|
|
488
|
+
)
|
|
489
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
490
|
+
rtnobj = None
|
|
491
|
+
else:
|
|
492
|
+
raw_data = resp.json()
|
|
493
|
+
rtnobj = List[Dict[str, Any]].from_dict(raw_data)
|
|
494
|
+
return rtnobj
|
|
495
|
+
|
|
496
|
+
def get_default_configurations_for_enterprise(self, enterprise: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> List[Dict[str, Any]]:
|
|
497
|
+
"""
|
|
498
|
+
Get default code security configurations for an enterprise
|
|
499
|
+
|
|
500
|
+
Lists the default code security configurations for an enterprise.
|
|
501
|
+
|
|
502
|
+
The authenticated user must be an administrator of the enterprise in order to use this endpoint.
|
|
503
|
+
|
|
504
|
+
OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint.
|
|
505
|
+
"""
|
|
506
|
+
client = self.client
|
|
507
|
+
if aspects is None:
|
|
508
|
+
aspects = client.aspects
|
|
509
|
+
|
|
510
|
+
header_params = client.headers
|
|
511
|
+
if headers is not None:
|
|
512
|
+
header_params = headers
|
|
513
|
+
|
|
514
|
+
leaf_template = "/enterprises/{enterprise}/code-security/configurations/defaults"
|
|
515
|
+
path_params = {
|
|
516
|
+
'enterprise': enterprise,
|
|
517
|
+
}
|
|
518
|
+
call_leaf = leaf_template.format(**path_params)
|
|
519
|
+
|
|
520
|
+
query_params = None
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
if exp_status is None:
|
|
524
|
+
exp_status = [200]
|
|
525
|
+
|
|
526
|
+
resp = client.perform_call(
|
|
527
|
+
leaf=call_leaf,
|
|
528
|
+
method="GET",
|
|
529
|
+
params=query_params if query_params else None,
|
|
530
|
+
body=None,
|
|
531
|
+
exp_status=exp_status,
|
|
532
|
+
headers=header_params if header_params else None,
|
|
533
|
+
context_msg=None,
|
|
534
|
+
aspects=aspects,
|
|
535
|
+
)
|
|
536
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
537
|
+
rtnobj = None
|
|
538
|
+
else:
|
|
539
|
+
raw_data = resp.json()
|
|
540
|
+
rtnobj = List[Dict[str, Any]].from_dict(raw_data)
|
|
541
|
+
return rtnobj
|
|
542
|
+
|
|
543
|
+
def get_single_configuration_for_enterprise(self, enterprise: str, configuration_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeSecurityConfiguration:
|
|
544
|
+
"""
|
|
545
|
+
Retrieve a code security configuration of an enterprise
|
|
546
|
+
|
|
547
|
+
Gets a code security configuration available in an enterprise.
|
|
548
|
+
|
|
549
|
+
The authenticated user must be an administrator of the enterprise in order to use this endpoint.
|
|
550
|
+
|
|
551
|
+
OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint.
|
|
552
|
+
"""
|
|
553
|
+
client = self.client
|
|
554
|
+
if aspects is None:
|
|
555
|
+
aspects = client.aspects
|
|
556
|
+
|
|
557
|
+
header_params = client.headers
|
|
558
|
+
if headers is not None:
|
|
559
|
+
header_params = headers
|
|
560
|
+
|
|
561
|
+
leaf_template = "/enterprises/{enterprise}/code-security/configurations/{configuration_id}"
|
|
562
|
+
path_params = {
|
|
563
|
+
'enterprise': enterprise,
|
|
564
|
+
'configuration_id': configuration_id,
|
|
565
|
+
}
|
|
566
|
+
call_leaf = leaf_template.format(**path_params)
|
|
567
|
+
|
|
568
|
+
query_params = None
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
if exp_status is None:
|
|
572
|
+
exp_status = [200]
|
|
573
|
+
|
|
574
|
+
resp = client.perform_call(
|
|
575
|
+
leaf=call_leaf,
|
|
576
|
+
method="GET",
|
|
577
|
+
params=query_params if query_params else None,
|
|
578
|
+
body=None,
|
|
579
|
+
exp_status=exp_status,
|
|
580
|
+
headers=header_params if header_params else None,
|
|
581
|
+
context_msg=None,
|
|
582
|
+
aspects=aspects,
|
|
583
|
+
)
|
|
584
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
585
|
+
rtnobj = None
|
|
586
|
+
else:
|
|
587
|
+
raw_data = resp.json()
|
|
588
|
+
rtnobj = CodeSecurityConfiguration.from_dict(raw_data)
|
|
589
|
+
return rtnobj
|
|
590
|
+
|
|
591
|
+
def list_configurations_for_enterprise(self, enterprise: str, *, per_page: Optional[int] = 30, before: Optional[str] = None, after: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[CodeSecurityConfiguration]:
|
|
592
|
+
"""
|
|
593
|
+
Get code security configurations for an enterprise
|
|
594
|
+
|
|
595
|
+
Lists all code security configurations available in an enterprise.
|
|
596
|
+
|
|
597
|
+
The authenticated user must be an administrator of the enterprise in order to use this endpoint.
|
|
598
|
+
|
|
599
|
+
OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint.
|
|
600
|
+
"""
|
|
601
|
+
client = self.client
|
|
602
|
+
if aspects is None:
|
|
603
|
+
aspects = client.aspects
|
|
604
|
+
|
|
605
|
+
header_params = client.headers
|
|
606
|
+
if headers is not None:
|
|
607
|
+
header_params = headers
|
|
608
|
+
|
|
609
|
+
leaf_template = "/enterprises/{enterprise}/code-security/configurations"
|
|
610
|
+
path_params = {
|
|
611
|
+
'enterprise': enterprise,
|
|
612
|
+
}
|
|
613
|
+
call_leaf = leaf_template.format(**path_params)
|
|
614
|
+
|
|
615
|
+
query_params = {}
|
|
616
|
+
if per_page is not None:
|
|
617
|
+
query_params['per_page'] = per_page
|
|
618
|
+
if before is not None:
|
|
619
|
+
query_params['before'] = before
|
|
620
|
+
if after is not None:
|
|
621
|
+
query_params['after'] = after
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
if exp_status is None:
|
|
625
|
+
exp_status = [200]
|
|
626
|
+
|
|
627
|
+
resp = client.perform_call(
|
|
628
|
+
leaf=call_leaf,
|
|
629
|
+
method="GET",
|
|
630
|
+
params=query_params if query_params else None,
|
|
631
|
+
body=None,
|
|
632
|
+
exp_status=exp_status,
|
|
633
|
+
headers=header_params if header_params else None,
|
|
634
|
+
context_msg=None,
|
|
635
|
+
aspects=aspects,
|
|
636
|
+
)
|
|
637
|
+
raw_data = resp.json()
|
|
638
|
+
items = [self._parse_item(item, CodeSecurityConfiguration) for item in raw_data]
|
|
639
|
+
rtnval = PagedList[CodeSecurityConfiguration](items, dict(resp.headers), raw_data)
|
|
640
|
+
return rtnval
|
|
641
|
+
|
|
642
|
+
def list_configurations_for_org(self, org: str, *, target_type: Optional[str] = "all", per_page: Optional[int] = 30, before: Optional[str] = None, after: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[CodeSecurityConfiguration]:
|
|
643
|
+
"""
|
|
644
|
+
Get code security configurations for an organization
|
|
645
|
+
|
|
646
|
+
Lists all code security configurations available in an organization.
|
|
647
|
+
|
|
648
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
649
|
+
|
|
650
|
+
OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.
|
|
651
|
+
"""
|
|
652
|
+
client = self.client
|
|
653
|
+
if aspects is None:
|
|
654
|
+
aspects = client.aspects
|
|
655
|
+
|
|
656
|
+
header_params = client.headers
|
|
657
|
+
if headers is not None:
|
|
658
|
+
header_params = headers
|
|
659
|
+
|
|
660
|
+
leaf_template = "/orgs/{org}/code-security/configurations"
|
|
661
|
+
path_params = {
|
|
662
|
+
'org': org,
|
|
663
|
+
}
|
|
664
|
+
call_leaf = leaf_template.format(**path_params)
|
|
665
|
+
|
|
666
|
+
query_params = {}
|
|
667
|
+
if target_type is not None:
|
|
668
|
+
query_params['target_type'] = target_type
|
|
669
|
+
if per_page is not None:
|
|
670
|
+
query_params['per_page'] = per_page
|
|
671
|
+
if before is not None:
|
|
672
|
+
query_params['before'] = before
|
|
673
|
+
if after is not None:
|
|
674
|
+
query_params['after'] = after
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
if exp_status is None:
|
|
678
|
+
exp_status = [200]
|
|
679
|
+
|
|
680
|
+
resp = client.perform_call(
|
|
681
|
+
leaf=call_leaf,
|
|
682
|
+
method="GET",
|
|
683
|
+
params=query_params if query_params else None,
|
|
684
|
+
body=None,
|
|
685
|
+
exp_status=exp_status,
|
|
686
|
+
headers=header_params if header_params else None,
|
|
687
|
+
context_msg=None,
|
|
688
|
+
aspects=aspects,
|
|
689
|
+
)
|
|
690
|
+
raw_data = resp.json()
|
|
691
|
+
items = [self._parse_item(item, CodeSecurityConfiguration) for item in raw_data]
|
|
692
|
+
rtnval = PagedList[CodeSecurityConfiguration](items, dict(resp.headers), raw_data)
|
|
693
|
+
return rtnval
|
|
694
|
+
|
|
695
|
+
def list_repositories_for_configuration(self, org: str, configuration_id: int, *, per_page: Optional[int] = 30, before: Optional[str] = None, after: Optional[str] = None, status: Optional[str] = "all", exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[CodeSecurityConfigurationRepositories]:
|
|
696
|
+
"""
|
|
697
|
+
Get repositories associated with a code security configuration
|
|
698
|
+
|
|
699
|
+
Lists the repositories associated with a code security configuration in an organization.
|
|
700
|
+
|
|
701
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
702
|
+
|
|
703
|
+
OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.
|
|
704
|
+
"""
|
|
705
|
+
client = self.client
|
|
706
|
+
if aspects is None:
|
|
707
|
+
aspects = client.aspects
|
|
708
|
+
|
|
709
|
+
header_params = client.headers
|
|
710
|
+
if headers is not None:
|
|
711
|
+
header_params = headers
|
|
712
|
+
|
|
713
|
+
leaf_template = "/orgs/{org}/code-security/configurations/{configuration_id}/repositories"
|
|
714
|
+
path_params = {
|
|
715
|
+
'org': org,
|
|
716
|
+
'configuration_id': configuration_id,
|
|
717
|
+
}
|
|
718
|
+
call_leaf = leaf_template.format(**path_params)
|
|
719
|
+
|
|
720
|
+
query_params = {}
|
|
721
|
+
if per_page is not None:
|
|
722
|
+
query_params['per_page'] = per_page
|
|
723
|
+
if before is not None:
|
|
724
|
+
query_params['before'] = before
|
|
725
|
+
if after is not None:
|
|
726
|
+
query_params['after'] = after
|
|
727
|
+
if status is not None:
|
|
728
|
+
query_params['status'] = status
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
if exp_status is None:
|
|
732
|
+
exp_status = [200]
|
|
733
|
+
|
|
734
|
+
resp = client.perform_call(
|
|
735
|
+
leaf=call_leaf,
|
|
736
|
+
method="GET",
|
|
737
|
+
params=query_params if query_params else None,
|
|
738
|
+
body=None,
|
|
739
|
+
exp_status=exp_status,
|
|
740
|
+
headers=header_params if header_params else None,
|
|
741
|
+
context_msg=None,
|
|
742
|
+
aspects=aspects,
|
|
743
|
+
)
|
|
744
|
+
raw_data = resp.json()
|
|
745
|
+
items = [self._parse_item(item, CodeSecurityConfigurationRepositories) for item in raw_data]
|
|
746
|
+
rtnval = PagedList[CodeSecurityConfigurationRepositories](items, dict(resp.headers), raw_data)
|
|
747
|
+
return rtnval
|
|
748
|
+
|
|
749
|
+
def list_repositories_for_enterprise_configuration(self, enterprise: str, configuration_id: int, *, per_page: Optional[int] = 30, before: Optional[str] = None, after: Optional[str] = None, status: Optional[str] = "all", exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[CodeSecurityConfigurationRepositories]:
|
|
750
|
+
"""
|
|
751
|
+
Get repositories associated with an enterprise code security configuration
|
|
752
|
+
|
|
753
|
+
Lists the repositories associated with an enterprise code security configuration in an organization.
|
|
754
|
+
|
|
755
|
+
The authenticated user must be an administrator of the enterprise in order to use this endpoint.
|
|
756
|
+
|
|
757
|
+
OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint.
|
|
758
|
+
"""
|
|
759
|
+
client = self.client
|
|
760
|
+
if aspects is None:
|
|
761
|
+
aspects = client.aspects
|
|
762
|
+
|
|
763
|
+
header_params = client.headers
|
|
764
|
+
if headers is not None:
|
|
765
|
+
header_params = headers
|
|
766
|
+
|
|
767
|
+
leaf_template = "/enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories"
|
|
768
|
+
path_params = {
|
|
769
|
+
'enterprise': enterprise,
|
|
770
|
+
'configuration_id': configuration_id,
|
|
771
|
+
}
|
|
772
|
+
call_leaf = leaf_template.format(**path_params)
|
|
773
|
+
|
|
774
|
+
query_params = {}
|
|
775
|
+
if per_page is not None:
|
|
776
|
+
query_params['per_page'] = per_page
|
|
777
|
+
if before is not None:
|
|
778
|
+
query_params['before'] = before
|
|
779
|
+
if after is not None:
|
|
780
|
+
query_params['after'] = after
|
|
781
|
+
if status is not None:
|
|
782
|
+
query_params['status'] = status
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
if exp_status is None:
|
|
786
|
+
exp_status = [200]
|
|
787
|
+
|
|
788
|
+
resp = client.perform_call(
|
|
789
|
+
leaf=call_leaf,
|
|
790
|
+
method="GET",
|
|
791
|
+
params=query_params if query_params else None,
|
|
792
|
+
body=None,
|
|
793
|
+
exp_status=exp_status,
|
|
794
|
+
headers=header_params if header_params else None,
|
|
795
|
+
context_msg=None,
|
|
796
|
+
aspects=aspects,
|
|
797
|
+
)
|
|
798
|
+
raw_data = resp.json()
|
|
799
|
+
items = [self._parse_item(item, CodeSecurityConfigurationRepositories) for item in raw_data]
|
|
800
|
+
rtnval = PagedList[CodeSecurityConfigurationRepositories](items, dict(resp.headers), raw_data)
|
|
801
|
+
return rtnval
|
|
802
|
+
|
|
803
|
+
def set_configuration_as_default(self, org: str, configuration_id: int, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
804
|
+
"""
|
|
805
|
+
Set a code security configuration as a default for an organization
|
|
806
|
+
|
|
807
|
+
Sets a code security configuration as a default to be applied to new repositories in your organization.
|
|
808
|
+
|
|
809
|
+
This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created.
|
|
810
|
+
|
|
811
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
812
|
+
|
|
813
|
+
OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.
|
|
814
|
+
"""
|
|
815
|
+
client = self.client
|
|
816
|
+
if aspects is None:
|
|
817
|
+
aspects = client.aspects
|
|
818
|
+
|
|
819
|
+
header_params = client.headers
|
|
820
|
+
if headers is not None:
|
|
821
|
+
header_params = headers
|
|
822
|
+
|
|
823
|
+
leaf_template = "/orgs/{org}/code-security/configurations/{configuration_id}/defaults"
|
|
824
|
+
path_params = {
|
|
825
|
+
'org': org,
|
|
826
|
+
'configuration_id': configuration_id,
|
|
827
|
+
}
|
|
828
|
+
call_leaf = leaf_template.format(**path_params)
|
|
829
|
+
|
|
830
|
+
query_params = None
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
if exp_status is None:
|
|
834
|
+
exp_status = [200]
|
|
835
|
+
|
|
836
|
+
resp = client.perform_call(
|
|
837
|
+
leaf=call_leaf,
|
|
838
|
+
method="PUT",
|
|
839
|
+
params=query_params if query_params else None,
|
|
840
|
+
body=body,
|
|
841
|
+
exp_status=exp_status,
|
|
842
|
+
headers=header_params if header_params else None,
|
|
843
|
+
context_msg=None,
|
|
844
|
+
aspects=aspects,
|
|
845
|
+
)
|
|
846
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
847
|
+
rtnval = None
|
|
848
|
+
else:
|
|
849
|
+
raw_data = resp.json()
|
|
850
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
851
|
+
return rtnval
|
|
852
|
+
|
|
853
|
+
def set_configuration_as_default_for_enterprise(self, enterprise: str, configuration_id: int, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
854
|
+
"""
|
|
855
|
+
Set a code security configuration as a default for an enterprise
|
|
856
|
+
|
|
857
|
+
Sets a code security configuration as a default to be applied to new repositories in your enterprise.
|
|
858
|
+
|
|
859
|
+
This configuration will be applied by default to the matching repository type when created, but only for organizations within the enterprise that do not already have a default code security configuration set.
|
|
860
|
+
|
|
861
|
+
The authenticated user must be an administrator for the enterprise to use this endpoint.
|
|
862
|
+
|
|
863
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
|
|
864
|
+
"""
|
|
865
|
+
client = self.client
|
|
866
|
+
if aspects is None:
|
|
867
|
+
aspects = client.aspects
|
|
868
|
+
|
|
869
|
+
header_params = client.headers
|
|
870
|
+
if headers is not None:
|
|
871
|
+
header_params = headers
|
|
872
|
+
|
|
873
|
+
leaf_template = "/enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults"
|
|
874
|
+
path_params = {
|
|
875
|
+
'enterprise': enterprise,
|
|
876
|
+
'configuration_id': configuration_id,
|
|
877
|
+
}
|
|
878
|
+
call_leaf = leaf_template.format(**path_params)
|
|
879
|
+
|
|
880
|
+
query_params = None
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
if exp_status is None:
|
|
884
|
+
exp_status = [200]
|
|
885
|
+
|
|
886
|
+
resp = client.perform_call(
|
|
887
|
+
leaf=call_leaf,
|
|
888
|
+
method="PUT",
|
|
889
|
+
params=query_params if query_params else None,
|
|
890
|
+
body=body,
|
|
891
|
+
exp_status=exp_status,
|
|
892
|
+
headers=header_params if header_params else None,
|
|
893
|
+
context_msg=None,
|
|
894
|
+
aspects=aspects,
|
|
895
|
+
)
|
|
896
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
897
|
+
rtnval = None
|
|
898
|
+
else:
|
|
899
|
+
raw_data = resp.json()
|
|
900
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
901
|
+
return rtnval
|
|
902
|
+
|
|
903
|
+
def update_configuration(self, org: str, configuration_id: int, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeSecurityConfiguration:
|
|
904
|
+
"""
|
|
905
|
+
Update a code security configuration
|
|
906
|
+
|
|
907
|
+
Updates a code security configuration in an organization.
|
|
908
|
+
|
|
909
|
+
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
|
|
910
|
+
|
|
911
|
+
OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.
|
|
912
|
+
"""
|
|
913
|
+
client = self.client
|
|
914
|
+
if aspects is None:
|
|
915
|
+
aspects = client.aspects
|
|
916
|
+
|
|
917
|
+
header_params = client.headers
|
|
918
|
+
if headers is not None:
|
|
919
|
+
header_params = headers
|
|
920
|
+
|
|
921
|
+
leaf_template = "/orgs/{org}/code-security/configurations/{configuration_id}"
|
|
922
|
+
path_params = {
|
|
923
|
+
'org': org,
|
|
924
|
+
'configuration_id': configuration_id,
|
|
925
|
+
}
|
|
926
|
+
call_leaf = leaf_template.format(**path_params)
|
|
927
|
+
|
|
928
|
+
query_params = None
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
if exp_status is None:
|
|
932
|
+
exp_status = [200, 204]
|
|
933
|
+
|
|
934
|
+
resp = client.perform_call(
|
|
935
|
+
leaf=call_leaf,
|
|
936
|
+
method="PATCH",
|
|
937
|
+
params=query_params if query_params else None,
|
|
938
|
+
body=body,
|
|
939
|
+
exp_status=exp_status,
|
|
940
|
+
headers=header_params if header_params else None,
|
|
941
|
+
context_msg=None,
|
|
942
|
+
aspects=aspects,
|
|
943
|
+
)
|
|
944
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
945
|
+
rtnobj = None
|
|
946
|
+
else:
|
|
947
|
+
raw_data = resp.json()
|
|
948
|
+
rtnobj = CodeSecurityConfiguration.from_dict(raw_data)
|
|
949
|
+
return rtnobj
|
|
950
|
+
|
|
951
|
+
def update_enterprise_configuration(self, enterprise: str, configuration_id: int, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeSecurityConfiguration:
|
|
952
|
+
"""
|
|
953
|
+
Update a custom code security configuration for an enterprise
|
|
954
|
+
|
|
955
|
+
Updates a code security configuration in an enterprise.
|
|
956
|
+
|
|
957
|
+
The authenticated user must be an administrator of the enterprise in order to use this endpoint.
|
|
958
|
+
|
|
959
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
|
|
960
|
+
"""
|
|
961
|
+
client = self.client
|
|
962
|
+
if aspects is None:
|
|
963
|
+
aspects = client.aspects
|
|
964
|
+
|
|
965
|
+
header_params = client.headers
|
|
966
|
+
if headers is not None:
|
|
967
|
+
header_params = headers
|
|
968
|
+
|
|
969
|
+
leaf_template = "/enterprises/{enterprise}/code-security/configurations/{configuration_id}"
|
|
970
|
+
path_params = {
|
|
971
|
+
'enterprise': enterprise,
|
|
972
|
+
'configuration_id': configuration_id,
|
|
973
|
+
}
|
|
974
|
+
call_leaf = leaf_template.format(**path_params)
|
|
975
|
+
|
|
976
|
+
query_params = None
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
if exp_status is None:
|
|
980
|
+
exp_status = [200]
|
|
981
|
+
|
|
982
|
+
resp = client.perform_call(
|
|
983
|
+
leaf=call_leaf,
|
|
984
|
+
method="PATCH",
|
|
985
|
+
params=query_params if query_params else None,
|
|
986
|
+
body=body,
|
|
987
|
+
exp_status=exp_status,
|
|
988
|
+
headers=header_params if header_params else None,
|
|
989
|
+
context_msg=None,
|
|
990
|
+
aspects=aspects,
|
|
991
|
+
)
|
|
992
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
993
|
+
rtnobj = None
|
|
994
|
+
else:
|
|
995
|
+
raw_data = resp.json()
|
|
996
|
+
rtnobj = CodeSecurityConfiguration.from_dict(raw_data)
|
|
997
|
+
return rtnobj
|