diff --git a/.gitignore b/.gitignore index 185d84d8..815a55ae 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.speakeasy/temp/ .speakeasy/reports .venv/ README-PYPI.md diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0527cece..bebcaf9c 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,69 +1,84 @@ lockVersion: 2.0.0 id: b0b519b1-d1d3-43b2-82dd-b4292eadd4b0 management: - docChecksum: 6c6e24cc570ee7f26269ffaf57ab867a + docChecksum: b9f07b0f1ec026226d7121868d01d359 docVersion: 0.4.0 - speakeasyVersion: 1.462.2 - generationVersion: 2.486.1 - releaseVersion: 7.0.0-rc.2 - configChecksum: 07992011caf9f99ff590ca4c58d854c1 + speakeasyVersion: 1.539.2 + generationVersion: 2.591.1 + releaseVersion: 7.0.0-rc.3 + configChecksum: e81b4607f8e5a143eaa471df12566f64 repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-python.git repoSubDirectory: . installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-python.git published: true features: python: - acceptHeaders: 3.0.0 additionalDependencies: 1.0.0 - core: 5.7.4 + constsAndDefaults: 1.0.5 + core: 5.16.0 + deepObjectParams: 0.1.0 defaultEnabledRetries: 0.2.0 - deprecations: 3.0.1 + deprecations: 3.0.2 downloadStreams: 1.0.1 enumUnions: 0.1.0 envVarSecurityUsage: 0.3.2 - globalSecurity: 3.0.2 + getRequestBodies: 3.0.0 + globalSecurity: 3.0.3 globalSecurityCallbacks: 1.0.0 globalServerURLs: 3.1.0 globals: 3.0.0 multipartFileContentType: 1.0.0 nameOverrides: 3.0.1 - nullables: 1.0.0 - openEnums: 1.0.0 + nullables: 1.0.1 + openEnums: 1.0.1 responseFormat: 1.0.1 retries: 3.0.2 - sdkHooks: 1.0.0 + sdkHooks: 1.0.1 serverIDs: 3.0.0 uploadStreams: 1.0.0 generatedFiles: - .gitattributes - .python-version - .vscode/settings.json - - CONTRIBUTING.md - USAGE.md - docs/models/errors/error.md - docs/models/internal/globals.md - docs/models/operations/activatesubscriptionnamespacerequest.md - docs/models/operations/activatesubscriptionnamespaceresponse.md + - docs/models/operations/archivenamespacerequest.md + - docs/models/operations/archivenamespacerequestbody.md + - docs/models/operations/archivenamespaceresponse.md - docs/models/operations/checkgithubaccessrequest.md - docs/models/operations/checkgithubaccessresponse.md + - docs/models/operations/createbillingaddonsresponse.md - docs/models/operations/createfreetrialresponse.md - docs/models/operations/createorganizationresponse.md + - docs/models/operations/createpublishingtokenrequestbody.md + - docs/models/operations/createpublishingtokenresponse.md - docs/models/operations/createremotesourceresponse.md - docs/models/operations/createrequestbody.md - docs/models/operations/createresponse.md + - docs/models/operations/createschemastoreitemrequestbody.md + - docs/models/operations/createschemastoreitemresponse.md - docs/models/operations/createworkspaceresponse.md - docs/models/operations/createworkspacetokenglobals.md - docs/models/operations/createworkspacetokenrequest.md - docs/models/operations/createworkspacetokenresponse.md + - docs/models/operations/deletebillingaddonrequest.md + - docs/models/operations/deletebillingaddonresponse.md + - docs/models/operations/deletepublishingtokenrequest.md + - docs/models/operations/deletepublishingtokenresponse.md - docs/models/operations/deleteworkspacetokenglobals.md - docs/models/operations/deleteworkspacetokenrequest.md - docs/models/operations/deleteworkspacetokenresponse.md - docs/models/operations/file.md + - docs/models/operations/format_.md - docs/models/operations/generatecodesamplepreviewasyncresponse.md - docs/models/operations/generatecodesamplepreviewasyncresponsebody.md - docs/models/operations/generatecodesamplepreviewresponse.md - docs/models/operations/getaccesstokenrequest.md - docs/models/operations/getaccesstokenresponse.md + - docs/models/operations/getbillingaddonsresponse.md - docs/models/operations/getblobrequest.md - docs/models/operations/getblobresponse.md - docs/models/operations/getchangesreportsignedurlrequest.md @@ -88,8 +103,18 @@ generatedFiles: - docs/models/operations/getorganizationresponse.md - docs/models/operations/getorganizationsresponse.md - docs/models/operations/getorganizationusageresponse.md + - docs/models/operations/getpublishingtokenbyidrequest.md + - docs/models/operations/getpublishingtokenbyidresponse.md + - docs/models/operations/getpublishingtokenpublicmetadatarequest.md + - docs/models/operations/getpublishingtokenpublicmetadataresponse.md + - docs/models/operations/getpublishingtokenpublicmetadataresponsebody.md + - docs/models/operations/getpublishingtokenresponse.md + - docs/models/operations/getpublishingtokentargetbyidrequest.md + - docs/models/operations/getpublishingtokentargetbyidresponse.md - docs/models/operations/getrevisionsrequest.md - docs/models/operations/getrevisionsresponse.md + - docs/models/operations/getschemastoreitemrequestbody.md + - docs/models/operations/getschemastoreitemresponse.md - docs/models/operations/gettagsrequest.md - docs/models/operations/gettagsresponse.md - docs/models/operations/getuserresponse.md @@ -138,6 +163,7 @@ generatedFiles: - docs/models/operations/linkgithubaccessresponse.md - docs/models/operations/listremotesourcesrequest.md - docs/models/operations/listremotesourcesresponse.md + - docs/models/operations/methodpaths.md - docs/models/operations/posttagsrequest.md - docs/models/operations/posttagsresponse.md - docs/models/operations/postworkspaceeventsglobals.md @@ -154,6 +180,7 @@ generatedFiles: - docs/models/operations/setvisibilityrequest.md - docs/models/operations/setvisibilityrequestbody.md - docs/models/operations/setvisibilityresponse.md + - docs/models/operations/setworkspacefeatureflagsresponse.md - docs/models/operations/suggestitemsresponse.md - docs/models/operations/suggestopenapiregistryrequest.md - docs/models/operations/suggestopenapiregistryresponse.md @@ -162,6 +189,9 @@ generatedFiles: - docs/models/operations/suggestopenapiresponse.md - docs/models/operations/suggestrequest.md - docs/models/operations/suggestresponse.md + - docs/models/operations/updatepublishingtokenexpirationrequest.md + - docs/models/operations/updatepublishingtokenexpirationrequestbody.md + - docs/models/operations/updatepublishingtokenexpirationresponse.md - docs/models/operations/updateworkspacedetailsglobals.md - docs/models/operations/updateworkspacedetailsrequest.md - docs/models/operations/updateworkspacedetailsresponse.md @@ -181,6 +211,7 @@ generatedFiles: - docs/models/shared/annotations.md - docs/models/shared/apikeydetails.md - docs/models/shared/auth.md + - docs/models/shared/billingaddon.md - docs/models/shared/claims.md - docs/models/shared/clievent.md - docs/models/shared/codesampleschemainput.md @@ -188,6 +219,7 @@ generatedFiles: - docs/models/shared/compositespecmetadata.md - docs/models/shared/diagnostic.md - docs/models/shared/featureflag.md + - docs/models/shared/format_.md - docs/models/shared/generatebumptype.md - docs/models/shared/getnamespacesresponse.md - docs/models/shared/getrevisionsresponse.md @@ -202,6 +234,7 @@ generatedFiles: - docs/models/shared/githubsetupstateresponse.md - docs/models/shared/githubstorepublishingsecretsrequest.md - docs/models/shared/githubtriggeractionrequest.md + - docs/models/shared/httpmethod.md - docs/models/shared/interactiontype.md - docs/models/shared/level.md - docs/models/shared/license.md @@ -212,17 +245,24 @@ generatedFiles: - docs/models/shared/oassummary.md - docs/models/shared/openapidiffbumptype.md - docs/models/shared/organization.md + - docs/models/shared/organizationbillingaddonrequest.md + - docs/models/shared/organizationbillingaddonresponse.md - docs/models/shared/organizationusage.md - docs/models/shared/organizationusageresponse.md - docs/models/shared/preflightrequest.md - docs/models/shared/preflighttoken.md + - docs/models/shared/publishingtoken.md + - docs/models/shared/pullrequestmetadata.md - docs/models/shared/relationship.md - docs/models/shared/remotedocument.md - docs/models/shared/remotesource.md - docs/models/shared/remotesourcesubscriptionsettings.md - docs/models/shared/report.md - docs/models/shared/revision.md + - docs/models/shared/revisioncontentsmetadata.md + - docs/models/shared/revisioncontentsmetadatatype.md - docs/models/shared/schemafile.md + - docs/models/shared/schemastoreitem.md - docs/models/shared/secrets.md - docs/models/shared/security.md - docs/models/shared/shorturl.md @@ -233,6 +273,7 @@ generatedFiles: - docs/models/shared/suggestrequestbody.md - docs/models/shared/suggestrequestbodysuggestiontype.md - docs/models/shared/tag.md + - docs/models/shared/targetresource.md - docs/models/shared/targetsdk.md - docs/models/shared/type.md - docs/models/shared/usagesnippet.md @@ -242,6 +283,8 @@ generatedFiles: - docs/models/shared/workflowdocument.md - docs/models/shared/workspace.md - docs/models/shared/workspaceandorganization.md + - docs/models/shared/workspacefeatureflag.md + - docs/models/shared/workspacefeatureflagrequest.md - docs/models/shared/workspacefeatureflagresponse.md - docs/models/shared/workspaceinviteresponse.md - docs/models/shared/workspaces.md @@ -255,7 +298,9 @@ generatedFiles: - docs/sdks/events/README.md - docs/sdks/github/README.md - docs/sdks/organizations/README.md + - docs/sdks/publishingtokens/README.md - docs/sdks/reports/README.md + - docs/sdks/schemastore/README.md - docs/sdks/shorturls/README.md - docs/sdks/speakeasy/README.md - docs/sdks/subscriptions/README.md @@ -265,7 +310,7 @@ generatedFiles: - py.typed - pylintrc - pyproject.toml - - scripts/prepare-readme.py + - scripts/prepare_readme.py - scripts/publish.sh - src/speakeasy_client_sdk_python/__init__.py - src/speakeasy_client_sdk_python/_hooks/__init__.py @@ -279,6 +324,7 @@ generatedFiles: - src/speakeasy_client_sdk_python/events.py - src/speakeasy_client_sdk_python/github.py - src/speakeasy_client_sdk_python/httpclient.py + - src/speakeasy_client_sdk_python/models/__init__.py - src/speakeasy_client_sdk_python/models/errors/__init__.py - src/speakeasy_client_sdk_python/models/errors/error.py - src/speakeasy_client_sdk_python/models/errors/sdkerror.py @@ -286,17 +332,24 @@ generatedFiles: - src/speakeasy_client_sdk_python/models/internal/globals.py - src/speakeasy_client_sdk_python/models/operations/__init__.py - src/speakeasy_client_sdk_python/models/operations/activatesubscriptionnamespace.py + - src/speakeasy_client_sdk_python/models/operations/archivenamespace.py - src/speakeasy_client_sdk_python/models/operations/checkgithubaccess.py - src/speakeasy_client_sdk_python/models/operations/create.py + - src/speakeasy_client_sdk_python/models/operations/createbillingaddons.py - src/speakeasy_client_sdk_python/models/operations/createfreetrial.py - src/speakeasy_client_sdk_python/models/operations/createorganization.py + - src/speakeasy_client_sdk_python/models/operations/createpublishingtoken.py - src/speakeasy_client_sdk_python/models/operations/createremotesource.py + - src/speakeasy_client_sdk_python/models/operations/createschemastoreitem.py - src/speakeasy_client_sdk_python/models/operations/createworkspace.py - src/speakeasy_client_sdk_python/models/operations/createworkspacetoken.py + - src/speakeasy_client_sdk_python/models/operations/deletebillingaddon.py + - src/speakeasy_client_sdk_python/models/operations/deletepublishingtoken.py - src/speakeasy_client_sdk_python/models/operations/deleteworkspacetoken.py - src/speakeasy_client_sdk_python/models/operations/generatecodesamplepreview.py - src/speakeasy_client_sdk_python/models/operations/generatecodesamplepreviewasync.py - src/speakeasy_client_sdk_python/models/operations/getaccesstoken.py + - src/speakeasy_client_sdk_python/models/operations/getbillingaddons.py - src/speakeasy_client_sdk_python/models/operations/getblob.py - src/speakeasy_client_sdk_python/models/operations/getchangesreportsignedurl.py - src/speakeasy_client_sdk_python/models/operations/getcodesamplepreviewasync.py @@ -309,7 +362,12 @@ generatedFiles: - src/speakeasy_client_sdk_python/models/operations/getorganization.py - src/speakeasy_client_sdk_python/models/operations/getorganizations.py - src/speakeasy_client_sdk_python/models/operations/getorganizationusage.py + - src/speakeasy_client_sdk_python/models/operations/getpublishingtoken.py + - src/speakeasy_client_sdk_python/models/operations/getpublishingtokenbyid.py + - src/speakeasy_client_sdk_python/models/operations/getpublishingtokenpublicmetadata.py + - src/speakeasy_client_sdk_python/models/operations/getpublishingtokentargetbyid.py - src/speakeasy_client_sdk_python/models/operations/getrevisions.py + - src/speakeasy_client_sdk_python/models/operations/getschemastoreitem.py - src/speakeasy_client_sdk_python/models/operations/gettags.py - src/speakeasy_client_sdk_python/models/operations/getuser.py - src/speakeasy_client_sdk_python/models/operations/getworkspace.py @@ -340,10 +398,12 @@ generatedFiles: - src/speakeasy_client_sdk_python/models/operations/revokeuseraccesstoworkspace.py - src/speakeasy_client_sdk_python/models/operations/searchworkspaceevents.py - src/speakeasy_client_sdk_python/models/operations/setvisibility.py + - src/speakeasy_client_sdk_python/models/operations/setworkspacefeatureflags.py - src/speakeasy_client_sdk_python/models/operations/suggest.py - src/speakeasy_client_sdk_python/models/operations/suggestitems.py - src/speakeasy_client_sdk_python/models/operations/suggestopenapi.py - src/speakeasy_client_sdk_python/models/operations/suggestopenapiregistry.py + - src/speakeasy_client_sdk_python/models/operations/updatepublishingtokenexpiration.py - src/speakeasy_client_sdk_python/models/operations/updateworkspacedetails.py - src/speakeasy_client_sdk_python/models/operations/updateworkspacesettings.py - src/speakeasy_client_sdk_python/models/operations/uploadreport.py @@ -355,6 +415,7 @@ generatedFiles: - src/speakeasy_client_sdk_python/models/shared/addtags.py - src/speakeasy_client_sdk_python/models/shared/annotations.py - src/speakeasy_client_sdk_python/models/shared/apikeydetails.py + - src/speakeasy_client_sdk_python/models/shared/billingaddon.py - src/speakeasy_client_sdk_python/models/shared/clievent.py - src/speakeasy_client_sdk_python/models/shared/codesampleschemainput.py - src/speakeasy_client_sdk_python/models/shared/codesamplesjobstatus.py @@ -373,6 +434,7 @@ generatedFiles: - src/speakeasy_client_sdk_python/models/shared/githubsetupstateresponse.py - src/speakeasy_client_sdk_python/models/shared/githubstorepublishingsecretsrequest.py - src/speakeasy_client_sdk_python/models/shared/githubtriggeractionrequest.py + - src/speakeasy_client_sdk_python/models/shared/httpmethod.py - src/speakeasy_client_sdk_python/models/shared/interactiontype.py - src/speakeasy_client_sdk_python/models/shared/manifest.py - src/speakeasy_client_sdk_python/models/shared/namespace.py @@ -380,15 +442,20 @@ generatedFiles: - src/speakeasy_client_sdk_python/models/shared/oasoperation.py - src/speakeasy_client_sdk_python/models/shared/oassummary.py - src/speakeasy_client_sdk_python/models/shared/organization.py + - src/speakeasy_client_sdk_python/models/shared/organizationbillingaddonrequest.py + - src/speakeasy_client_sdk_python/models/shared/organizationbillingaddonresponse.py - src/speakeasy_client_sdk_python/models/shared/organizationusage.py - src/speakeasy_client_sdk_python/models/shared/organizationusageresponse.py - src/speakeasy_client_sdk_python/models/shared/preflightrequest.py - src/speakeasy_client_sdk_python/models/shared/preflighttoken.py + - src/speakeasy_client_sdk_python/models/shared/publishingtoken.py - src/speakeasy_client_sdk_python/models/shared/remotedocument.py - src/speakeasy_client_sdk_python/models/shared/remotesource.py - src/speakeasy_client_sdk_python/models/shared/remotesourcesubscriptionsettings.py - src/speakeasy_client_sdk_python/models/shared/report.py - src/speakeasy_client_sdk_python/models/shared/revision.py + - src/speakeasy_client_sdk_python/models/shared/revisioncontentsmetadata.py + - src/speakeasy_client_sdk_python/models/shared/schemastoreitem.py - src/speakeasy_client_sdk_python/models/shared/security.py - src/speakeasy_client_sdk_python/models/shared/shorturl.py - src/speakeasy_client_sdk_python/models/shared/ssometadata.py @@ -404,14 +471,18 @@ generatedFiles: - src/speakeasy_client_sdk_python/models/shared/workflowdocument.py - src/speakeasy_client_sdk_python/models/shared/workspace.py - src/speakeasy_client_sdk_python/models/shared/workspaceandorganization.py + - src/speakeasy_client_sdk_python/models/shared/workspacefeatureflag.py + - src/speakeasy_client_sdk_python/models/shared/workspacefeatureflagrequest.py - src/speakeasy_client_sdk_python/models/shared/workspacefeatureflagresponse.py - src/speakeasy_client_sdk_python/models/shared/workspaceinviteresponse.py - src/speakeasy_client_sdk_python/models/shared/workspacesettings.py - src/speakeasy_client_sdk_python/models/shared/workspaceteamresponse.py - src/speakeasy_client_sdk_python/models/shared/workspacetoken.py - src/speakeasy_client_sdk_python/organizations.py + - src/speakeasy_client_sdk_python/publishingtokens.py - src/speakeasy_client_sdk_python/py.typed - src/speakeasy_client_sdk_python/reports.py + - src/speakeasy_client_sdk_python/schemastore.py - src/speakeasy_client_sdk_python/sdk.py - src/speakeasy_client_sdk_python/sdkconfiguration.py - src/speakeasy_client_sdk_python/shorturls.py @@ -421,6 +492,7 @@ generatedFiles: - src/speakeasy_client_sdk_python/types/basemodel.py - src/speakeasy_client_sdk_python/utils/__init__.py - src/speakeasy_client_sdk_python/utils/annotations.py + - src/speakeasy_client_sdk_python/utils/datetimes.py - src/speakeasy_client_sdk_python/utils/enums.py - src/speakeasy_client_sdk_python/utils/eventstreaming.py - src/speakeasy_client_sdk_python/utils/forms.py @@ -450,6 +522,8 @@ examples: namespace_name: "" digest: "" responses: + 2XX: + application/octet-stream: "x-file: example.file" 4XX: application/json: {"message": "", "status_code": 115307} getManifest: @@ -518,6 +592,14 @@ examples: application/json: {} 4XX: application/json: {"message": "", "status_code": 820828} + archiveNamespace: + speakeasy-default-archive-namespace: + parameters: + path: + namespace_name: "" + responses: + 4XX: + application/json: {"message": "", "status_code": 334009} setVisibility: speakeasy-default-set-visibility: parameters: @@ -538,7 +620,7 @@ examples: workspace_id: "" responses: 2XX: - application/json: {"access_token": ""} + application/json: {"access_token": "", "claims": {}, "user": {}} 4XX: application/json: {"message": "", "status_code": 299050} getUser: @@ -552,45 +634,58 @@ examples: speakeasy-default-validate-api-key: responses: 2XX: - application/json: {"account_type_v2": "enterprise", "enabled_features": ["", "", ""], "org_slug": "", "telemetry_disabled": true, "workspace_created_at": "2024-02-05T22:57:49.657Z", "workspace_id": "", "workspace_slug": ""} + application/json: {"account_type_v2": "enterprise", "billing_add_ons": ["webhooks", "sdk_testing", "webhooks"], "enabled_features": ["", "", ""], "org_slug": "", "telemetry_disabled": false, "workspace_created_at": "2024-02-23T05:39:14.801Z", "workspace_id": "", "workspace_slug": ""} 4XX: - application/json: {"message": "", "status_code": 150892} + application/json: {"message": "", "status_code": 380984} generateCodeSamplePreview: - speakeasy-default-generate-code-sample-preview: + default: requestBody: - multipart/form-data: {"languages": ["", ""], "schema_file": {"": "example.file"}} + multipart/form-data: {"language": "", "schema_file": {"": "example.file"}} responses: - 4XX: - application/json: {"message": "", "status_code": 140843} + 2XX: + application/json: {"snippets": [{"code": "import { Petstore } from \"petstore-sdk\";\n\nconst petstore = new Petstore({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await petstore.pet.getById({\n id: 137396,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();", "language": "typescript", "method": "get", "operationId": "getPetById", "path": "/pet/{id}"}]} generateCodeSamplePreviewAsync: speakeasy-default-generate-code-sample-preview-async: requestBody: - multipart/form-data: {"languages": ["", ""], "schema_file": {"": "example.file"}} + multipart/form-data: {"language": "", "schema_file": {"": "example.file"}} responses: "202": - application/json: {"job_id": "", "status": "pending"} + application/json: {"job_id": "", "status": "running"} 4XX: + application/json: {"message": "", "status_code": 493180} + 5XX: application/json: {"message": "", "status_code": 282243} getCodeSamples: - speakeasy-default-get-code-samples: + "": parameters: query: - registry_url: "https://normal-making.name" + registry_url: "https://spec.speakeasy.com/my-org/my-workspace/my-source" + operation_ids: ["getPets"] + method_paths: [{"method": "get", "path": "/pets"}] + languages: ["python", "javascript"] responses: 2XX: - application/json: {"snippets": [{"code": "", "language": "", "operationId": ""}, {"code": "", "language": "", "operationId": ""}, {"code": "", "language": "", "operationId": ""}]} + application/json: {"snippets": [{"code": "", "language": "", "method": "", "operationId": "", "path": "/sbin"}, {"code": "", "language": "", "method": "", "operationId": "", "path": "/root"}]} 4XX: - application/json: {"message": "", "status_code": 458049} + application/json: {"message": "", "status_code": 521235} + default: + parameters: + query: + registry_url: "https://spec.speakeasy.com/my-org/my-workspace/my-source" + operation_ids: ["getPets"] + method_paths: [{"method": "get", "path": "/pets"}] + languages: ["python", "javascript"] + responses: + 2XX: + application/json: {"snippets": [{"code": "import { Petstore } from \"petstore-sdk\";\n\nconst petstore = new Petstore({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await petstore.pet.getById({\n id: 137396,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();", "language": "typescript", "method": "get", "operationId": "getPetById", "path": "/pet/{id}"}]} getCodeSamplePreviewAsync: - speakeasy-default-get-code-sample-preview-async: + default: parameters: path: jobID: "" responses: - "202": - application/json: {"status": "pending"} - 4XX: - application/json: {"message": "", "status_code": 44984} + 2XX: + application/json: {"snippets": [{"code": "import { Petstore } from \"petstore-sdk\";\n\nconst petstore = new Petstore({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await petstore.pet.getById({\n id: 137396,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();", "language": "typescript", "method": "get", "operationId": "getPetById", "path": "/pet/{id}"}]} checkGithubAccess: speakeasy-default-check-github-access: parameters: @@ -696,11 +791,28 @@ examples: application/json: {"account_type": "enterprise", "created_at": "2025-11-08T08:43:39.394Z", "id": "", "name": "", "slug": "", "sso_activated": true, "telemetry_disabled": true, "updated_at": "2023-04-09T14:25:29.356Z"} 4XX: application/json: {"message": "", "status_code": 792620} + createBillingAddOns: + speakeasy-default-create-billing-add-ons: + requestBody: + application/json: {"add_ons": ["custom_code_regions", "custom_code_regions", "sdk_testing"]} + responses: + "200": + application/json: {"add_ons": ["snippet_ai", "snippet_ai", "sdk_testing"]} + 5XX: + application/json: {"message": "", "status_code": 518517} createFreeTrial: speakeasy-default-create-free-trial: responses: 4XX: application/json: {"message": "", "status_code": 728627} + deleteBillingAddOn: + speakeasy-default-delete-billing-add-on: + parameters: + path: + add_on: "snippet_ai" + responses: + 5XX: + application/json: {"message": "", "status_code": 783245} getOrganization: speakeasy-default-get-organization: parameters: @@ -715,9 +827,16 @@ examples: speakeasy-default-get-organizations: responses: 2XX: - application/json: [{"account_type": "free", "created_at": "2024-10-17T22:25:06.537Z", "id": "", "name": "", "slug": "", "sso_activated": false, "telemetry_disabled": true, "updated_at": "2024-05-22T13:01:16.115Z"}] + application/json: [{"account_type": "free", "created_at": "2024-10-17T22:25:06.537Z", "id": "", "name": "", "slug": "", "sso_activated": false, "telemetry_disabled": true, "updated_at": "2024-05-22T13:01:16.115Z"}, {"account_type": "business", "created_at": "2023-03-09T16:25:53.264Z", "id": "", "name": "", "slug": "", "sso_activated": false, "telemetry_disabled": false, "updated_at": "2023-06-16T08:07:08.454Z"}] 4XX: - application/json: {"message": "", "status_code": 621425} + application/json: {"message": "", "status_code": 217828} + getBillingAddOns: + speakeasy-default-get-billing-add-ons: + responses: + "200": + application/json: {"add_ons": []} + 5XX: + application/json: {"message": "", "status_code": 697034} getOrganizationUsage: speakeasy-default-get-organization-usage: responses: @@ -725,6 +844,66 @@ examples: application/json: {"allowed_languages": [], "total_allowed_languages": 863126, "usage": [{"accessible": false, "accessible_features": [""], "gen_lock_ids": ["", "", ""], "language": "", "max_operations": 939867, "number_of_operations": 881790, "used_features": [""], "workspaces": ["", ""]}, {"accessible": true, "accessible_features": ["", "", ""], "gen_lock_ids": [""], "language": "", "max_operations": 593645, "number_of_operations": 369818, "used_features": [""], "workspaces": []}]} 4XX: application/json: {"message": "", "status_code": 804495} + createPublishingToken: + speakeasy-default-create-publishing-token: + responses: + "200": + application/json: {"created_at": "2024-06-17T07:14:55.338Z", "created_by": "", "id": "", "organization_id": "", "target_id": "", "target_resource": "document", "token": "", "token_name": "", "valid_until": "2024-11-30T17:06:07.804Z", "workspace_id": ""} + 4XX: + application/json: {"message": "", "status_code": 417458} + deletePublishingToken: + speakeasy-default-delete-publishing-token: + parameters: + path: + tokenID: "" + responses: + 4XX: + application/json: {"message": "", "status_code": 545907} + getPublishingTokenByID: + speakeasy-default-get-publishing-token-by-ID: + parameters: + path: + tokenID: "" + responses: + "200": + application/json: {"created_at": "2025-02-06T13:54:48.821Z", "created_by": "", "id": "", "organization_id": "", "target_id": "", "target_resource": "document", "token": "", "token_name": "", "valid_until": "2024-09-04T11:33:52.011Z", "workspace_id": ""} + 4XX: + application/json: {"message": "", "status_code": 544221} + getPublishingToken: + speakeasy-default-get-publishing-token: + responses: + "200": + application/json: [{"created_at": "2024-08-22T19:26:20.850Z", "created_by": "", "id": "", "organization_id": "", "target_id": "", "target_resource": "document", "token": "", "token_name": "", "valid_until": "2025-01-13T10:26:00.433Z", "workspace_id": ""}, {"created_at": "2023-07-14T18:23:27.528Z", "created_by": "", "id": "", "organization_id": "", "target_id": "", "target_resource": "document", "token": "", "token_name": "", "valid_until": "2023-09-09T18:28:08.953Z", "workspace_id": ""}, {"created_at": "2023-06-17T12:14:27.999Z", "created_by": "", "id": "", "organization_id": "", "target_id": "", "target_resource": "document", "token": "", "token_name": "", "valid_until": "2024-11-27T13:02:27.296Z", "workspace_id": ""}] + 4XX: + application/json: {"message": "", "status_code": 639387} + getPublishingTokenPublicMetadata: + speakeasy-default-get-publishing-token-public-metadata: + parameters: + path: + tokenID: "" + responses: + "200": + application/json: {} + 4XX: + application/json: {"message": "", "status_code": 25297} + getPublishingTokenTargetByID: + speakeasy-default-get-publishing-token-target-by-ID: + parameters: + path: + tokenID: "" + responses: + "200": + text/plain: "" + 4XX: + application/json: {"message": "", "status_code": 398362} + updatePublishingTokenExpiration: + speakeasy-default-update-publishing-token-expiration: + parameters: + path: + tokenID: "" + responses: + 4XX: + application/json: {"message": "", "status_code": 857478} getChangesReportSignedUrl: speakeasy-default-get-changes-report-signed-url: parameters: @@ -744,10 +923,26 @@ examples: uploadReport: speakeasy-default-upload-report: requestBody: - multipart/form-data: {"file": {"": "example.file"}} + multipart/form-data: {"data": {}, "file": {"": "example.file"}} responses: 2XX: application/json: {"url": "https://cluttered-stall.info"} + createSchemaStoreItem: + speakeasy-default-create-schema-store-item: + requestBody: + application/json: {"format": "yaml", "packageName": "", "sdkClassname": "", "spec": ""} + responses: + 2XX: + application/json: {"created_at": "2024-08-06T03:45:46.936Z", "format": "json", "id": "", "packageName": "", "sdkClassname": "", "spec": ""} + 4XX: + application/json: {"message": "", "status_code": 769739} + getSchemaStoreItem: + speakeasy-default-get-schema-store-item: + responses: + 2XX: + application/json: {"created_at": "2023-02-14T01:44:55.437Z", "format": "yaml", "id": "", "packageName": "", "sdkClassname": "", "spec": ""} + 4XX: + application/json: {"message": "", "status_code": 168509} create: speakeasy-default-create: requestBody: @@ -779,7 +974,10 @@ examples: header: x-session-id: "" requestBody: - application/json: {"diagnostics": [{"message": "", "path": ["/opt/include", "/opt/share"], "type": ""}, {"message": "", "path": [], "type": ""}], "oas_summary": {"info": {"description": "amid traffic the unfortunately underneath what father lovely out", "summary": "", "title": "", "version": ""}, "operations": [{"description": "times dull than except", "method": "", "operation_id": "", "path": "/mnt", "tags": ["", ""]}]}, "suggestion_type": "diagnostics-only"} + application/json: {"diagnostics": [{"message": "", "path": ["/opt/include", "/opt/share"], "type": ""}, {"message": "", "path": [], "type": ""}], "oas_summary": {"info": {"description": "amid traffic the unfortunately underneath what father lovely out", "license": {}, "summary": "", "title": "", "version": ""}, "operations": [{"description": "times dull than except", "method": "", "operation_id": "", "path": "/mnt", "tags": ["", ""]}]}, "suggestion_type": "diagnostics-only"} + responses: + 2XX: + application/json: "x-file: example.file" suggestItems: speakeasy-default-suggest-items: requestBody: @@ -794,6 +992,9 @@ examples: x-session-id: "" requestBody: multipart/form-data: {"schema": {"": "example.file"}} + responses: + 2XX: + application/json: "x-file: example.file" suggestOpenAPIRegistry: speakeasy-default-suggest-open-API-registry: parameters: @@ -802,6 +1003,9 @@ examples: revision_reference: "" header: x-session-id: "" + responses: + 2XX: + application/json: "x-file: example.file" createWorkspace: speakeasy-default-create-workspace: requestBody: @@ -841,9 +1045,9 @@ examples: speakeasy-default-get-workspaces: responses: 2XX: - application/json: [{"created_at": "2023-03-06T21:36:22.528Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2024-10-17T22:25:06.537Z", "verified": false}] + application/json: [{"created_at": "2023-03-06T21:36:22.528Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2024-10-17T22:25:06.537Z", "verified": false}, {"created_at": "2023-01-18T20:59:19.735Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2024-05-22T13:01:16.115Z", "verified": false}] 4XX: - application/json: {"message": "", "status_code": 16308} + application/json: {"message": "", "status_code": 61756} getWorkspace: speakeasy-default-get-workspace: parameters: @@ -914,6 +1118,15 @@ examples: responses: 4XX: application/json: {"message": "", "status_code": 243814} + setWorkspaceFeatureFlags: + speakeasy-default-set-workspace-feature-flags: + requestBody: + application/json: {"feature_flags": ["skip_schema_registry", "webhooks"]} + responses: + "200": + application/json: {} + 5XX: + application/json: {"message": "", "status_code": 264889} updateWorkspaceDetails: speakeasy-default-update-workspace-details: parameters: @@ -943,9 +1156,9 @@ examples: query: {} responses: "200": - application/json: [] + application/json: [{"created_at": "2023-11-22T11:46:52.430Z", "execution_id": "", "id": "", "interaction_type": "QUICKSTART", "local_started_at": "2023-09-25T12:14:43.566Z", "speakeasy_api_key_name": "", "speakeasy_version": "", "success": true, "workspace_id": ""}] 5XX: - application/json: {"message": "", "status_code": 296981} + application/json: {"message": "", "status_code": 858330} getWorkspaceTargets: speakeasy-default-get-workspace-targets: responses: @@ -961,9 +1174,9 @@ examples: query: {} responses: "200": - application/json: [] + application/json: [{"generate_gen_lock_id": "", "generate_target": "", "id": "", "last_event_created_at": "2023-10-08T11:47:38.510Z", "last_event_id": "", "last_event_interaction_type": "TOMBSTONE"}] 5XX: - application/json: {"message": "", "status_code": 255923} + application/json: {"message": "", "status_code": 264673} postWorkspaceEvents: speakeasy-default-post-workspace-events: parameters: @@ -985,4 +1198,5 @@ examples: application/json: [{"created_at": "2024-01-24T23:49:11.608Z", "execution_id": "", "id": "", "interaction_type": "LINT", "local_started_at": "2023-03-09T07:00:10.489Z", "speakeasy_api_key_name": "", "speakeasy_version": "", "success": true, "workspace_id": ""}] 5XX: application/json: {"message": "", "status_code": 238575} +examplesVersion: 1.0.1 generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index b2e5b8f6..41e56166 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -5,13 +5,15 @@ generation: optionalPropertyRendering: withExample fixes: nameResolutionDec2023: true + nameResolutionFeb2025: false parameterOrderingFeb2024: true requestResponseComponentNamesFeb2024: true + securityFeb2025: false auth: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false python: - version: 7.0.0-rc.2 + version: 7.0.0-rc.3 additionalDependencies: dev: {} main: {} @@ -20,6 +22,7 @@ python: clientServerStatusCodesAsErrors: true defaultErrorName: SDKError description: Speakeasy API Client SDK for Python + enableCustomCodeRegions: false enumFormat: enum fixFlags: responseRequiredSep2024: false @@ -40,5 +43,6 @@ python: outputModelSuffix: output packageName: speakeasy-client-sdk-python projectUrls: {} + pytestTimeout: 0 responseFormat: envelope templateVersion: v2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 5e339eff..def7badd 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.462.2 +speakeasyVersion: 1.539.2 sources: speakeasy-openapi: sourceNamespace: speakeasy-openapi - sourceRevisionDigest: sha256:79fa1cda10dbe045bf4d56fd367cebff8244f2cf789740c759e44ba91be16cef - sourceBlobDigest: sha256:3a6d2e7825969575182762eba53f1b78039986d5c80ff7644aa6faafd5ce4c69 + sourceRevisionDigest: sha256:b4bbbe5a81810fdb8233c4ac148a749522647ab8ecd4b0828f467e4e9a48f681 + sourceBlobDigest: sha256:fd1e159447e0c61cec2840c9d5e1a7e520cfbce2dec061b8f272454cc8cd1695 tags: - latest - - speakeasy-sdk-regen-1736136609 + - speakeasy-sdk-regen-1739752147 - 0.4.0 targets: speakeasy-client-sdk-python: source: speakeasy-openapi sourceNamespace: speakeasy-openapi - sourceRevisionDigest: sha256:79fa1cda10dbe045bf4d56fd367cebff8244f2cf789740c759e44ba91be16cef - sourceBlobDigest: sha256:3a6d2e7825969575182762eba53f1b78039986d5c80ff7644aa6faafd5ce4c69 + sourceRevisionDigest: sha256:b4bbbe5a81810fdb8233c4ac148a749522647ab8ecd4b0828f467e4e9a48f681 + sourceBlobDigest: sha256:fd1e159447e0c61cec2840c9d5e1a7e520cfbce2dec061b8f272454cc8cd1695 codeSamplesNamespace: code-samples-python-speakeasy-client-sdk-python - codeSamplesRevisionDigest: sha256:91eef570ebdc3cfb58537d237f79b7e36c765d7fdd43e0a385f0ea4ede4f8289 + codeSamplesRevisionDigest: sha256:c381a08052825dcc0491ee52c05fdbdb6221b3803d0a8e4c63a3a85433be5112 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 66dc9051..447ab600 100644 --- a/README.md +++ b/README.md @@ -1 +1,675 @@ -undefined \ No newline at end of file +undefined + +## Summary + +Speakeasy API: The Subscriptions API manages subscriptions for CLI and registry events + +For more information about the API: [The Speakeasy Platform Documentation](/docs) + + + +## Table of Contents + + * [SDK Installation](#sdk-installation) + * [IDE Support](#ide-support) + * [SDK Example Usage](#sdk-example-usage) + * [Authentication](#authentication) + * [Available Resources and Operations](#available-resources-and-operations) + * [Global Parameters](#global-parameters) + * [File uploads](#file-uploads) + * [Retries](#retries) + * [Error Handling](#error-handling) + * [Server Selection](#server-selection) + * [Custom HTTP Client](#custom-http-client) + * [Resource Management](#resource-management) + * [Debugging](#debugging) + + + + +## SDK Installation + +> [!NOTE] +> **Python version upgrade policy** +> +> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated. + +The SDK can be installed with either *pip* or *poetry* package managers. + +### PIP + +*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line. + +```bash +pip install speakeasy-client-sdk-python +``` + +### Poetry + +*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies. + +```bash +poetry add speakeasy-client-sdk-python +``` + +### Shell and script usage with `uv` + +You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so: + +```shell +uvx --from speakeasy-client-sdk-python python +``` + +It's also possible to write a standalone Python script without needing to set up a whole project like so: + +```python +#!/usr/bin/env -S uv run --script +# /// script +# requires-python = ">=3.9" +# dependencies = [ +# "speakeasy-client-sdk-python", +# ] +# /// + +from speakeasy_client_sdk_python import Speakeasy + +sdk = Speakeasy( + # SDK arguments +) + +# Rest of script here... +``` + +Once that is saved to a file, you can run it with `uv run script.py` where +`script.py` can be replaced with the actual file name. + + + +## IDE Support + +### PyCharm + +Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin. + +- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/) + + + +## SDK Example Usage + +### Example + +```python +# Synchronous Example +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.artifacts.create_remote_source() + + assert res is not None + + # Handle response + print(res) +``` + +
+ +The same SDK client can also be used to make asychronous requests by importing asyncio. +```python +# Asynchronous Example +import asyncio +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + +async def main(): + + async with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = await speakeasy.artifacts.create_remote_source_async() + + assert res is not None + + # Handle response + print(res) + +asyncio.run(main()) +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security schemes globally: + +| Name | Type | Scheme | +| ---------------------- | ------ | ----------- | +| `api_key` | apiKey | API key | +| `bearer` | http | HTTP Bearer | +| `workspace_identifier` | apiKey | API key | + +You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example: +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.artifacts.create_remote_source() + + assert res is not None + + # Handle response + print(res) + +``` + + + +## Available Resources and Operations + +
+Available methods + +### [artifacts](docs/sdks/artifacts/README.md) + +* [create_remote_source](docs/sdks/artifacts/README.md#create_remote_source) - Configure a new remote source +* [get_blob](docs/sdks/artifacts/README.md#get_blob) - Get blob for a particular digest +* [get_manifest](docs/sdks/artifacts/README.md#get_manifest) - Get manifest for a particular reference +* [get_namespaces](docs/sdks/artifacts/README.md#get_namespaces) - Each namespace contains many revisions. +* [get_revisions](docs/sdks/artifacts/README.md#get_revisions) +* [get_tags](docs/sdks/artifacts/README.md#get_tags) +* [list_remote_sources](docs/sdks/artifacts/README.md#list_remote_sources) - Get remote sources attached to a particular namespace +* [post_tags](docs/sdks/artifacts/README.md#post_tags) - Add tags to an existing revision +* [preflight](docs/sdks/artifacts/README.md#preflight) - Get access token for communicating with OCI distribution endpoints +* [set_archived](docs/sdks/artifacts/README.md#set_archived) - Set whether a namespace is archived +* [set_visibility](docs/sdks/artifacts/README.md#set_visibility) - Set visibility of a namespace with an existing metadata entry + +### [auth](docs/sdks/auth/README.md) + +* [get_access](docs/sdks/auth/README.md#get_access) - Get access allowances for a particular workspace +* [get_access_token](docs/sdks/auth/README.md#get_access_token) - Get or refresh an access token for the current workspace. +* [get_user](docs/sdks/auth/README.md#get_user) - Get information about the current user. +* [validate_api_key](docs/sdks/auth/README.md#validate_api_key) - Validate the current api key. + +### [code_samples](docs/sdks/codesamples/README.md) + +* [generate_code_sample_preview](docs/sdks/codesamples/README.md#generate_code_sample_preview) - Generate Code Sample previews from a file and configuration parameters. +* [generate_code_sample_preview_asynchronous](docs/sdks/codesamples/README.md#generate_code_sample_preview_asynchronous) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling. +* [get](docs/sdks/codesamples/README.md#get) - Retrieve usage snippets +* [get_code_sample_preview_async](docs/sdks/codesamples/README.md#get_code_sample_preview_async) - Poll for the result of an asynchronous Code Sample preview generation. + +### [events](docs/sdks/events/README.md) + +* [get_events_by_target](docs/sdks/events/README.md#get_events_by_target) - Load recent events for a particular workspace +* [get_targets](docs/sdks/events/README.md#get_targets) - Load targets for a particular workspace +* [get_targets_deprecated](docs/sdks/events/README.md#get_targets_deprecated) - Load targets for a particular workspace +* [post](docs/sdks/events/README.md#post) - Post events for a specific workspace +* [search](docs/sdks/events/README.md#search) - Search events for a particular workspace by any field + +### [github](docs/sdks/github/README.md) + +* [check_access](docs/sdks/github/README.md#check_access) +* [check_publishing_p_rs](docs/sdks/github/README.md#check_publishing_p_rs) +* [check_publishing_secrets](docs/sdks/github/README.md#check_publishing_secrets) +* [configure_code_samples](docs/sdks/github/README.md#configure_code_samples) +* [configure_mintlify_repo](docs/sdks/github/README.md#configure_mintlify_repo) +* [configure_target](docs/sdks/github/README.md#configure_target) +* [get_action](docs/sdks/github/README.md#get_action) +* [get_setup](docs/sdks/github/README.md#get_setup) +* [link_github](docs/sdks/github/README.md#link_github) +* [store_publishing_secrets](docs/sdks/github/README.md#store_publishing_secrets) +* [trigger_action](docs/sdks/github/README.md#trigger_action) + +### [organizations](docs/sdks/organizations/README.md) + +* [create](docs/sdks/organizations/README.md#create) - Create an organization +* [create_billing_add_ons](docs/sdks/organizations/README.md#create_billing_add_ons) - Create billing add ons +* [create_free_trial](docs/sdks/organizations/README.md#create_free_trial) - Create a free trial for an organization +* [delete_billing_add_on](docs/sdks/organizations/README.md#delete_billing_add_on) - Delete billing add ons +* [get](docs/sdks/organizations/README.md#get) - Get organization +* [get_all](docs/sdks/organizations/README.md#get_all) - Get organizations for a user +* [get_billing_add_ons](docs/sdks/organizations/README.md#get_billing_add_ons) - Get billing add ons +* [get_usage](docs/sdks/organizations/README.md#get_usage) - Get billing usage summary for a particular organization + +### [publishing_tokens](docs/sdks/publishingtokens/README.md) + +* [create](docs/sdks/publishingtokens/README.md#create) - Create a publishing token for a workspace +* [delete](docs/sdks/publishingtokens/README.md#delete) - Delete a specific publishing token +* [get](docs/sdks/publishingtokens/README.md#get) - Get a specific publishing token +* [list](docs/sdks/publishingtokens/README.md#list) - Get publishing tokens for a workspace +* [resolve_metadata](docs/sdks/publishingtokens/README.md#resolve_metadata) - Get metadata about the token +* [resolve_target](docs/sdks/publishingtokens/README.md#resolve_target) - Get a specific publishing token target +* [update](docs/sdks/publishingtokens/README.md#update) - Updates the validitity period of a publishing token + +### [reports](docs/sdks/reports/README.md) + +* [get_changes_report_signed_url](docs/sdks/reports/README.md#get_changes_report_signed_url) - Get the signed access url for the change reports for a particular document. +* [get_linting_report_signed_url](docs/sdks/reports/README.md#get_linting_report_signed_url) - Get the signed access url for the linting reports for a particular document. +* [upload_report](docs/sdks/reports/README.md#upload_report) - Upload a report. + +### [schema_store](docs/sdks/schemastore/README.md) + +* [create_schema_store_item](docs/sdks/schemastore/README.md#create_schema_store_item) - Create a schema in the schema store +* [get_schema_store_item](docs/sdks/schemastore/README.md#get_schema_store_item) - Get a OAS schema from the schema store + +### [short_ur_ls](docs/sdks/shorturls/README.md) + +* [create](docs/sdks/shorturls/README.md#create) - Shorten a URL. + + +### [subscriptions](docs/sdks/subscriptions/README.md) + +* [activate_subscription_namespace](docs/sdks/subscriptions/README.md#activate_subscription_namespace) - Activate an ignored namespace for a subscription +* [ignore_subscription_namespace](docs/sdks/subscriptions/README.md#ignore_subscription_namespace) - Ignored a namespace for a subscription + +### [suggest](docs/sdks/suggest/README.md) + +* [suggest](docs/sdks/suggest/README.md#suggest) - Generate suggestions for improving an OpenAPI document. +* [suggest_items](docs/sdks/suggest/README.md#suggest_items) - Generate generic suggestions for a list of items. +* [suggest_open_api](docs/sdks/suggest/README.md#suggest_open_api) - (DEPRECATED) Generate suggestions for improving an OpenAPI document. +* [suggest_open_api_registry](docs/sdks/suggest/README.md#suggest_open_api_registry) - Generate suggestions for improving an OpenAPI document stored in the registry. + +### [workspaces](docs/sdks/workspaces/README.md) + +* [create](docs/sdks/workspaces/README.md#create) - Create a workspace +* [create_token](docs/sdks/workspaces/README.md#create_token) - Create a token for a particular workspace +* [delete_token](docs/sdks/workspaces/README.md#delete_token) - Delete a token for a particular workspace +* [get](docs/sdks/workspaces/README.md#get) - Get workspace by context +* [get_all](docs/sdks/workspaces/README.md#get_all) - Get workspaces for a user +* [get_by_id](docs/sdks/workspaces/README.md#get_by_id) - Get workspace +* [get_feature_flags](docs/sdks/workspaces/README.md#get_feature_flags) - Get workspace feature flags +* [get_settings](docs/sdks/workspaces/README.md#get_settings) - Get workspace settings +* [get_team](docs/sdks/workspaces/README.md#get_team) - Get team members for a particular workspace +* [get_tokens](docs/sdks/workspaces/README.md#get_tokens) - Get tokens for a particular workspace +* [grant_access](docs/sdks/workspaces/README.md#grant_access) - Grant a user access to a particular workspace +* [revoke_access](docs/sdks/workspaces/README.md#revoke_access) - Revoke a user's access to a particular workspace +* [set_feature_flags](docs/sdks/workspaces/README.md#set_feature_flags) - Set workspace feature flags +* [update](docs/sdks/workspaces/README.md#update) - Update workspace details +* [update_settings](docs/sdks/workspaces/README.md#update_settings) - Update workspace settings + +
+ + + +## Global Parameters + +A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed. + +For example, you can set `workspace_id` to `""` at SDK initialization and then you do not have to pass the same value on calls to operations like `get_access_token`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. + + +### Available Globals + +The following global parameter is available. + +| Name | Type | Description | +| ------------ | ---- | --------------------------- | +| workspace_id | str | The workspace_id parameter. | + +### Example + +```python +from speakeasy_client_sdk_python import Speakeasy + + +with Speakeasy() as speakeasy: + + res = speakeasy.auth.get_access_token(request={ + "workspace_id": "", + }) + + assert res.access_token is not None + + # Handle response + print(res.access_token) + +``` + + + +## File uploads + +Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request. + +> [!TIP] +> +> For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files. +> + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.code_samples.generate_code_sample_preview(request={ + "language": "", + "schema_file": { + "content": open("example.file", "rb"), + "file_name": "example.file", + }, + }) + + assert res.usage_snippets is not None + + # Handle response + print(res.usage_snippets) + +``` + + + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call: +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared +from speakeasy_client_sdk_python.utils import BackoffStrategy, RetryConfig + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.artifacts.create_remote_source(, + RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) + + assert res is not None + + # Handle response + print(res) + +``` + +If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK: +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared +from speakeasy_client_sdk_python.utils import BackoffStrategy, RetryConfig + + +with Speakeasy( + retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False), + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.artifacts.create_remote_source() + + assert res is not None + + # Handle response + print(res) + +``` + + + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception. + +By default, an API error will raise a errors.SDKError exception, which has the following properties: + +| Property | Type | Description | +|-----------------|------------------|-----------------------| +| `.status_code` | *int* | The HTTP status code | +| `.message` | *str* | The error message | +| `.raw_response` | *httpx.Response* | The raw HTTP response | +| `.body` | *str* | The response content | + +When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_remote_source_async` method may raise the following exceptions: + +| Error Type | Status Code | Content Type | +| --------------- | ----------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | + +### Example + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import errors, shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + res = None + try: + + res = speakeasy.artifacts.create_remote_source() + + assert res is not None + + # Handle response + print(res) + + except errors.Error as e: + # handle e.data: errors.ErrorData + raise(e) + except errors.SDKError as e: + # handle exception + raise(e) +``` + + + +## Server Selection + +### Select Server by Name + +You can override the default server globally by passing a server name to the `server: str` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers: + +| Name | Server | Description | +| ------ | ----------------------------------- | ----------- | +| `prod` | `https://api.prod.speakeasyapi.dev` | | + +#### Example + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + server="prod", + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.artifacts.create_remote_source() + + assert res is not None + + # Handle response + print(res) + +``` + +### Override Server URL Per-Client + +The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example: +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + server_url="https://api.prod.speakeasyapi.dev", + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.artifacts.create_remote_source() + + assert res is not None + + # Handle response + print(res) + +``` + + + +## Custom HTTP Client + +The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. +Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls. +This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly. + +For example, you could specify a header for every request that this sdk makes as follows: +```python +from speakeasy_client_sdk_python import Speakeasy +import httpx + +http_client = httpx.Client(headers={"x-custom-header": "someValue"}) +s = Speakeasy(client=http_client) +``` + +or you could wrap the client with your own custom logic: +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.httpclient import AsyncHttpClient +import httpx + +class CustomClient(AsyncHttpClient): + client: AsyncHttpClient + + def __init__(self, client: AsyncHttpClient): + self.client = client + + async def send( + self, + request: httpx.Request, + *, + stream: bool = False, + auth: Union[ + httpx._types.AuthTypes, httpx._client.UseClientDefault, None + ] = httpx.USE_CLIENT_DEFAULT, + follow_redirects: Union[ + bool, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + ) -> httpx.Response: + request.headers["Client-Level-Header"] = "added by client" + + return await self.client.send( + request, stream=stream, auth=auth, follow_redirects=follow_redirects + ) + + def build_request( + self, + method: str, + url: httpx._types.URLTypes, + *, + content: Optional[httpx._types.RequestContent] = None, + data: Optional[httpx._types.RequestData] = None, + files: Optional[httpx._types.RequestFiles] = None, + json: Optional[Any] = None, + params: Optional[httpx._types.QueryParamTypes] = None, + headers: Optional[httpx._types.HeaderTypes] = None, + cookies: Optional[httpx._types.CookieTypes] = None, + timeout: Union[ + httpx._types.TimeoutTypes, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + extensions: Optional[httpx._types.RequestExtensions] = None, + ) -> httpx.Request: + return self.client.build_request( + method, + url, + content=content, + data=data, + files=files, + json=json, + params=params, + headers=headers, + cookies=cookies, + timeout=timeout, + extensions=extensions, + ) + +s = Speakeasy(async_client=CustomClient(httpx.AsyncClient())) +``` + + + +## Resource Management + +The `Speakeasy` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application. + +[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared +def main(): + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + # Rest of application here... + + +# Or when using async: +async def amain(): + + async with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + # Rest of application here... +``` + + + +## Debugging + +You can setup your SDK to emit debug logs for SDK requests and responses. + +You can pass your own logger class directly into your SDK. +```python +from speakeasy_client_sdk_python import Speakeasy +import logging + +logging.basicConfig(level=logging.DEBUG) +s = Speakeasy(debug_logger=logging.getLogger("speakeasy_client_sdk_python")) +``` + + + diff --git a/RELEASES.md b/RELEASES.md index 542f5dbb..65d33e69 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1796,4 +1796,14 @@ Based on: ### Generated - [python v7.0.0-rc.2] . ### Releases -- [PyPI v7.0.0-rc.2] https://pypi.org/project/speakeasy-client-sdk-python/7.0.0-rc.2 - . \ No newline at end of file +- [PyPI v7.0.0-rc.2] https://pypi.org/project/speakeasy-client-sdk-python/7.0.0-rc.2 - . + +## 2025-04-25 00:30:13 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.539.2 (2.591.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v7.0.0-rc.3] . +### Releases +- [PyPI v7.0.0-rc.3] https://pypi.org/project/speakeasy-client-sdk-python/7.0.0-rc.3 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 1bd0736f..6c09d317 100644 --- a/USAGE.md +++ b/USAGE.md @@ -4,6 +4,7 @@ from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -28,6 +29,7 @@ from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared async def main(): + async with Speakeasy( security=shared.Security( api_key="", diff --git a/codeSamples.yaml b/codeSamples.yaml index ef9e8a1a..54f7f23c 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -12,6 +12,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -24,6 +25,30 @@ actions: # Handle response print(res.get_namespaces_response) + - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/archive"]["post"] + update: + x-codeSamples: + - lang: python + label: archiveNamespace + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.artifacts.set_archived(request={ + "namespace_name": "", + }) + + assert res is not None + + # Handle response + print(res) - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/revisions"]["get"] update: x-codeSamples: @@ -33,6 +58,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -56,6 +82,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -79,6 +106,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -102,6 +130,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -125,6 +154,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -146,6 +176,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -169,6 +200,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -189,6 +221,7 @@ actions: source: |- from speakeasy_client_sdk_python import Speakeasy + with Speakeasy() as speakeasy: res = speakeasy.auth.get_access_token(request={ @@ -208,6 +241,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -229,6 +263,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -236,7 +271,20 @@ actions: ) as speakeasy: res = speakeasy.code_samples.get(request={ - "registry_url": "https://normal-making.name", + "registry_url": "https://spec.speakeasy.com/my-org/my-workspace/my-source", + "operation_ids": [ + "getPets", + ], + "method_paths": [ + { + "method": shared.HTTPMethod.GET, + "path": "/pets", + }, + ], + "languages": [ + "python", + "javascript", + ], }) assert res.usage_snippets is not None @@ -252,6 +300,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -259,20 +308,17 @@ actions: ) as speakeasy: res = speakeasy.code_samples.generate_code_sample_preview(request={ - "languages": [ - "", - "", - ], + "language": "", "schema_file": { "file_name": "example.file", "content": open("example.file", "rb"), }, }) - assert res.two_hundred_application_x_yaml_response_stream is not None + assert res.usage_snippets is not None # Handle response - print(res.two_hundred_application_x_yaml_response_stream) + print(res.usage_snippets) - target: $["paths"]["/v1/code_sample/preview/async"]["post"] update: x-codeSamples: @@ -282,6 +328,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -289,10 +336,7 @@ actions: ) as speakeasy: res = speakeasy.code_samples.generate_code_sample_preview_asynchronous(request={ - "languages": [ - "", - "", - ], + "language": "", "schema_file": { "file_name": "example.file", "content": open("example.file", "rb"), @@ -312,6 +356,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -322,10 +367,10 @@ actions: "job_id": "", }) - assert res.two_hundred_application_x_yaml_response_stream is not None + assert res.object is not None # Handle response - print(res.two_hundred_application_x_yaml_response_stream) + print(res.object) - target: $["paths"]["/v1/github/action"]["get"] update: x-codeSamples: @@ -335,6 +380,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -359,6 +405,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -383,6 +430,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -408,6 +456,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -436,6 +485,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -460,6 +510,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -481,6 +532,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -506,6 +558,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -529,6 +582,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -552,6 +606,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -577,6 +632,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -602,6 +658,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -628,6 +685,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -651,9 +709,10 @@ actions: - lang: python label: createOrganization source: |- - import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -667,8 +726,8 @@ actions: "slug": "", "account_type": shared.AccountType.SCALE_UP, "telemetry_disabled": False, - "created_at": dateutil.parser.isoparse("2024-04-02T12:48:32.253Z"), - "updated_at": dateutil.parser.isoparse("2023-05-28T06:20:22.766Z"), + "created_at": parse_datetime("2024-04-02T12:48:32.253Z"), + "updated_at": parse_datetime("2023-05-28T06:20:22.766Z"), "sso_activated": True, }) @@ -676,6 +735,80 @@ actions: # Handle response print(res.organization) + - target: $["paths"]["/v1/organization/add_ons"]["get"] + update: + x-codeSamples: + - lang: python + label: getBillingAddOns + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.organizations.get_billing_add_ons() + + assert res.organization_billing_add_on_response is not None + + # Handle response + print(res.organization_billing_add_on_response) + - target: $["paths"]["/v1/organization/add_ons"]["post"] + update: + x-codeSamples: + - lang: python + label: createBillingAddOns + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.organizations.create_billing_add_ons(request={ + "add_ons": [ + shared.BillingAddOn.CUSTOM_CODE_REGIONS, + shared.BillingAddOn.CUSTOM_CODE_REGIONS, + shared.BillingAddOn.SDK_TESTING, + ], + }) + + assert res.organization_billing_add_on_response is not None + + # Handle response + print(res.organization_billing_add_on_response) + - target: $["paths"]["/v1/organization/add_ons/{add_on}"]["delete"] + update: + x-codeSamples: + - lang: python + label: deleteBillingAddOn + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.organizations.delete_billing_add_on(request={ + "add_on": shared.BillingAddOn.SNIPPET_AI, + }) + + assert res is not None + + # Handle response + print(res) - target: $["paths"]["/v1/organization/free_trial"]["post"] update: x-codeSamples: @@ -685,6 +818,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -706,6 +840,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -727,6 +862,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -750,6 +886,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -762,6 +899,170 @@ actions: # Handle response print(res.organizations) + - target: $["paths"]["/v1/publishing-tokens"]["get"] + update: + x-codeSamples: + - lang: python + label: getPublishingToken + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.publishing_tokens.list() + + assert res.publishing_tokens is not None + + # Handle response + print(res.publishing_tokens) + - target: $["paths"]["/v1/publishing-tokens"]["post"] + update: + x-codeSamples: + - lang: python + label: createPublishingToken + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.publishing_tokens.create() + + assert res.publishing_token is not None + + # Handle response + print(res.publishing_token) + - target: $["paths"]["/v1/publishing-tokens/{tokenID}"]["delete"] + update: + x-codeSamples: + - lang: python + label: deletePublishingToken + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.publishing_tokens.delete(request={ + "token_id": "", + }) + + assert res is not None + + # Handle response + print(res) + - target: $["paths"]["/v1/publishing-tokens/{tokenID}"]["get"] + update: + x-codeSamples: + - lang: python + label: getPublishingTokenByID + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.publishing_tokens.get(request={ + "token_id": "", + }) + + assert res.publishing_token is not None + + # Handle response + print(res.publishing_token) + - target: $["paths"]["/v1/publishing-tokens/{tokenID}"]["put"] + update: + x-codeSamples: + - lang: python + label: updatePublishingTokenExpiration + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.publishing_tokens.update(request={ + "token_id": "", + }) + + assert res is not None + + # Handle response + print(res) + - target: $["paths"]["/v1/publishing-tokens/{tokenID}/metadata"]["get"] + update: + x-codeSamples: + - lang: python + label: getPublishingTokenPublicMetadata + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.publishing_tokens.resolve_metadata(request={ + "token_id": "", + }) + + assert res.object is not None + + # Handle response + print(res.object) + - target: $["paths"]["/v1/publishing-tokens/{tokenID}/target"]["get"] + update: + x-codeSamples: + - lang: python + label: getPublishingTokenTargetByID + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.publishing_tokens.resolve_target(request={ + "token_id": "", + }) + + assert res.res is not None + + # Handle response + print(res.res) - target: $["paths"]["/v1/reports"]["post"] update: x-codeSamples: @@ -771,6 +1072,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -798,6 +1100,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -821,6 +1124,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -835,6 +1139,55 @@ actions: # Handle response print(res.signed_access) + - target: $["paths"]["/v1/schema_store"]["get"] + update: + x-codeSamples: + - lang: python + label: getSchemaStoreItem + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.schema_store.get_schema_store_item() + + assert res.schema_store_item is not None + + # Handle response + print(res.schema_store_item) + - target: $["paths"]["/v1/schema_store"]["post"] + update: + x-codeSamples: + - lang: python + label: createSchemaStoreItem + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import operations, shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.schema_store.create_schema_store_item(request={ + "spec": "", + "package_name": "", + "sdk_classname": "", + "format_": operations.Format.YAML, + }) + + assert res.schema_store_item is not None + + # Handle response + print(res.schema_store_item) - target: $["paths"]["/v1/short_urls"]["post"] update: x-codeSamples: @@ -844,6 +1197,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -867,6 +1221,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -891,6 +1246,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -915,6 +1271,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -923,9 +1280,7 @@ actions: res = speakeasy.suggest.suggest_items(request={ "prompt": "", - "items": [ - "", - ], + "items": [], }) assert res.strings is not None @@ -941,6 +1296,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -970,6 +1326,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -995,6 +1352,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1012,28 +1370,10 @@ actions: "version": "", "license": {}, }, - "operations": [ - { - "method": "", - "path": "/rescue", - "operation_id": "", - "description": "kielbasa psst stitcher cannon devoted blindly apropos low", - "tags": [ - "", - ], - }, - ], + "operations": [], }, "suggestion_type": shared.SuggestRequestBodySuggestionType.DIAGNOSTICS_ONLY, - "diagnostics": [ - { - "message": "", - "path": [ - "/opt/share", - ], - "type": "", - }, - ], + "diagnostics": [], }, }) @@ -1050,6 +1390,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1071,6 +1412,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1089,9 +1431,10 @@ actions: - lang: python label: createWorkspace source: |- - import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -1100,12 +1443,12 @@ actions: ) as speakeasy: res = speakeasy.workspaces.create(request={ - "created_at": dateutil.parser.isoparse("2024-06-17T07:14:55.338Z"), + "created_at": parse_datetime("2024-06-17T07:14:55.338Z"), "id": "", "name": "", "organization_id": "", "slug": "", - "updated_at": dateutil.parser.isoparse("2024-11-30T17:06:07.804Z"), + "updated_at": parse_datetime("2024-11-30T17:06:07.804Z"), "verified": True, }) @@ -1122,6 +1465,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1143,6 +1487,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1155,6 +1500,33 @@ actions: # Handle response print(res.target_sdk_list) + - target: $["paths"]["/v1/workspace/feature_flags"]["post"] + update: + x-codeSamples: + - lang: python + label: setWorkspaceFeatureFlags + source: |- + from speakeasy_client_sdk_python import Speakeasy + from speakeasy_client_sdk_python.models import shared + + + with Speakeasy( + security=shared.Security( + api_key="", + ), + ) as speakeasy: + + res = speakeasy.workspaces.set_feature_flags(request={ + "feature_flags": [ + shared.WorkspaceFeatureFlag.SKIP_SCHEMA_REGISTRY, + shared.WorkspaceFeatureFlag.WEBHOOKS, + ], + }) + + assert res.workspace_feature_flag_response is not None + + # Handle response + print(res.workspace_feature_flag_response) - target: $["paths"]["/v1/workspace/{workspace_id}"]["get"] update: x-codeSamples: @@ -1164,6 +1536,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1184,9 +1557,10 @@ actions: - lang: python label: updateWorkspaceDetails source: |- - import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -1197,12 +1571,12 @@ actions: res = speakeasy.workspaces.update(request={ "workspace_id": "", "workspace": { - "created_at": dateutil.parser.isoparse("2025-07-28T19:04:48.565Z"), + "created_at": parse_datetime("2025-07-28T19:04:48.565Z"), "id": "", "name": "", "organization_id": "", "slug": "", - "updated_at": dateutil.parser.isoparse("2024-10-16T10:52:42.015Z"), + "updated_at": parse_datetime("2024-10-16T10:52:42.015Z"), "verified": True, }, }) @@ -1220,6 +1594,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1240,9 +1615,10 @@ actions: - lang: python label: postWorkspaceEvents source: |- - import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -1258,9 +1634,9 @@ actions: "execution_id": "", "workspace_id": "", "speakeasy_api_key_name": "", - "interaction_type": shared.InteractionType.QUICKSTART, - "local_started_at": dateutil.parser.isoparse("2024-09-08T05:59:33.876Z"), - "created_at": dateutil.parser.isoparse("2025-08-12T17:54:17.538Z"), + "interaction_type": shared.InteractionType.RUN, + "local_started_at": parse_datetime("2024-09-08T05:59:33.876Z"), + "created_at": parse_datetime("2025-08-12T17:54:17.538Z"), "speakeasy_version": "", "success": True, }, @@ -1280,6 +1656,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1303,6 +1680,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1327,6 +1705,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1350,6 +1729,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1370,9 +1750,10 @@ actions: - lang: python label: updateWorkspaceSettings source: |- - import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -1385,8 +1766,8 @@ actions: "workspace_settings": { "workspace_id": "", "webhook_url": "https://last-suspension.info/", - "created_at": dateutil.parser.isoparse("2024-12-28T06:46:35.807Z"), - "updated_at": dateutil.parser.isoparse("2025-02-03T10:37:56.725Z"), + "created_at": parse_datetime("2024-12-28T06:46:35.807Z"), + "updated_at": parse_datetime("2025-02-03T10:37:56.725Z"), }, }) @@ -1403,6 +1784,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1426,6 +1808,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1450,6 +1833,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1474,6 +1858,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1494,9 +1879,10 @@ actions: - lang: python label: createWorkspaceToken source: |- - import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -1512,7 +1898,7 @@ actions: "workspace_id": "", "alg": "", "key": "", - "created_at": dateutil.parser.isoparse("2023-08-16T02:33:00.784Z"), + "created_at": parse_datetime("2023-08-16T02:33:00.784Z"), }, }) @@ -1529,6 +1915,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -1553,6 +1940,7 @@ actions: from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", diff --git a/docs/models/operations/archivenamespacerequest.md b/docs/models/operations/archivenamespacerequest.md new file mode 100644 index 00000000..84d9841f --- /dev/null +++ b/docs/models/operations/archivenamespacerequest.md @@ -0,0 +1,9 @@ +# ArchiveNamespaceRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `namespace_name` | *str* | :heavy_check_mark: | N/A | +| `request_body` | [Optional[operations.ArchiveNamespaceRequestBody]](../../models/operations/archivenamespacerequestbody.md) | :heavy_minus_sign: | Archived status | \ No newline at end of file diff --git a/docs/models/operations/archivenamespacerequestbody.md b/docs/models/operations/archivenamespacerequestbody.md new file mode 100644 index 00000000..27b9949d --- /dev/null +++ b/docs/models/operations/archivenamespacerequestbody.md @@ -0,0 +1,10 @@ +# ArchiveNamespaceRequestBody + +Archived status + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `archived` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/archivenamespaceresponse.md b/docs/models/operations/archivenamespaceresponse.md new file mode 100644 index 00000000..2433d930 --- /dev/null +++ b/docs/models/operations/archivenamespaceresponse.md @@ -0,0 +1,10 @@ +# ArchiveNamespaceResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createbillingaddonsresponse.md b/docs/models/operations/createbillingaddonsresponse.md new file mode 100644 index 00000000..936387cb --- /dev/null +++ b/docs/models/operations/createbillingaddonsresponse.md @@ -0,0 +1,11 @@ +# CreateBillingAddOnsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `organization_billing_add_on_response` | [Optional[shared.OrganizationBillingAddOnResponse]](../../models/shared/organizationbillingaddonresponse.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createorganizationresponse.md b/docs/models/operations/createorganizationresponse.md index e0312d8b..be305be0 100644 --- a/docs/models/operations/createorganizationresponse.md +++ b/docs/models/operations/createorganizationresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `organization` | [Optional[shared.Organization]](../../models/shared/organization.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `organization` | [Optional[shared.Organization]](../../models/shared/organization.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createpublishingtokenrequestbody.md b/docs/models/operations/createpublishingtokenrequestbody.md new file mode 100644 index 00000000..ab90dc0b --- /dev/null +++ b/docs/models/operations/createpublishingtokenrequestbody.md @@ -0,0 +1,13 @@ +# CreatePublishingTokenRequestBody + +The publishing token to create + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `target_id` | *str* | :heavy_check_mark: | N/A | +| `target_resource` | *str* | :heavy_check_mark: | N/A | +| `token_name` | *str* | :heavy_check_mark: | N/A | +| `valid_until` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createpublishingtokenresponse.md b/docs/models/operations/createpublishingtokenresponse.md new file mode 100644 index 00000000..8124393a --- /dev/null +++ b/docs/models/operations/createpublishingtokenresponse.md @@ -0,0 +1,11 @@ +# CreatePublishingTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `publishing_token` | [Optional[shared.PublishingToken]](../../models/shared/publishingtoken.md) | :heavy_minus_sign: | OK | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createresponse.md b/docs/models/operations/createresponse.md index 7bef9855..dd37f871 100644 --- a/docs/models/operations/createresponse.md +++ b/docs/models/operations/createresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `short_url` | [Optional[shared.ShortURL]](../../models/shared/shorturl.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `short_url` | [Optional[shared.ShortURL]](../../models/shared/shorturl.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createschemastoreitemrequestbody.md b/docs/models/operations/createschemastoreitemrequestbody.md new file mode 100644 index 00000000..78fe28e0 --- /dev/null +++ b/docs/models/operations/createschemastoreitemrequestbody.md @@ -0,0 +1,11 @@ +# CreateSchemaStoreItemRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `format_` | [operations.Format](../../models/operations/format_.md) | :heavy_check_mark: | The format of the OpenAPI specification. | +| `package_name` | *str* | :heavy_check_mark: | The package name to use in code snippets / quickstart. | +| `sdk_classname` | *str* | :heavy_check_mark: | The classname of the SDK to use in code snippets / quickstart. | +| `spec` | *str* | :heavy_check_mark: | The OpenAPI specification to store. | \ No newline at end of file diff --git a/docs/models/operations/createschemastoreitemresponse.md b/docs/models/operations/createschemastoreitemresponse.md new file mode 100644 index 00000000..a01dd243 --- /dev/null +++ b/docs/models/operations/createschemastoreitemresponse.md @@ -0,0 +1,11 @@ +# CreateSchemaStoreItemResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `schema_store_item` | [Optional[shared.SchemaStoreItem]](../../models/shared/schemastoreitem.md) | :heavy_minus_sign: | OK | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createworkspacetokenrequest.md b/docs/models/operations/createworkspacetokenrequest.md index 6f26a5f3..287daab8 100644 --- a/docs/models/operations/createworkspacetokenrequest.md +++ b/docs/models/operations/createworkspacetokenrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `workspace_token` | [shared.WorkspaceToken](../../models/shared/workspacetoken.md) | :heavy_check_mark: | N/A | -| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `workspace_token` | [shared.WorkspaceToken](../../models/shared/workspacetoken.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletebillingaddonrequest.md b/docs/models/operations/deletebillingaddonrequest.md new file mode 100644 index 00000000..fe308b7f --- /dev/null +++ b/docs/models/operations/deletebillingaddonrequest.md @@ -0,0 +1,8 @@ +# DeleteBillingAddOnRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `add_on` | [shared.BillingAddOn](../../models/shared/billingaddon.md) | :heavy_check_mark: | The specific add-on to delete. | \ No newline at end of file diff --git a/docs/models/operations/deletebillingaddonresponse.md b/docs/models/operations/deletebillingaddonresponse.md new file mode 100644 index 00000000..b772354e --- /dev/null +++ b/docs/models/operations/deletebillingaddonresponse.md @@ -0,0 +1,10 @@ +# DeleteBillingAddOnResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deletepublishingtokenrequest.md b/docs/models/operations/deletepublishingtokenrequest.md new file mode 100644 index 00000000..faf06e11 --- /dev/null +++ b/docs/models/operations/deletepublishingtokenrequest.md @@ -0,0 +1,8 @@ +# DeletePublishingTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *str* | :heavy_check_mark: | Unique identifier of the publishing token. | \ No newline at end of file diff --git a/docs/models/operations/deletepublishingtokenresponse.md b/docs/models/operations/deletepublishingtokenresponse.md new file mode 100644 index 00000000..db83c8f7 --- /dev/null +++ b/docs/models/operations/deletepublishingtokenresponse.md @@ -0,0 +1,10 @@ +# DeletePublishingTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deleteworkspacetokenrequest.md b/docs/models/operations/deleteworkspacetokenrequest.md index d4fe25fa..c1c4b385 100644 --- a/docs/models/operations/deleteworkspacetokenrequest.md +++ b/docs/models/operations/deleteworkspacetokenrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `token_id` | *str* | :heavy_check_mark: | Unique identifier of the token. | -| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `token_id` | *str* | :heavy_check_mark: | Unique identifier of the token. | \ No newline at end of file diff --git a/docs/models/operations/file.md b/docs/models/operations/file.md index 730c7d29..308e7de7 100644 --- a/docs/models/operations/file.md +++ b/docs/models/operations/file.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | | `content` | *Union[bytes, IO[bytes], io.BufferedReader]* | :heavy_check_mark: | N/A | -| `file_name` | *str* | :heavy_check_mark: | N/A | -| `content_type` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `content_type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `file_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/format_.md b/docs/models/operations/format_.md new file mode 100644 index 00000000..573bab2b --- /dev/null +++ b/docs/models/operations/format_.md @@ -0,0 +1,11 @@ +# Format + +The format of the OpenAPI specification. + + +## Values + +| Name | Value | +| ------ | ------ | +| `JSON` | json | +| `YAML` | yaml | \ No newline at end of file diff --git a/docs/models/operations/generatecodesamplepreviewresponse.md b/docs/models/operations/generatecodesamplepreviewresponse.md index c379d9bb..32ee43b0 100644 --- a/docs/models/operations/generatecodesamplepreviewresponse.md +++ b/docs/models/operations/generatecodesamplepreviewresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `two_hundred_application_json_response_stream` | *Optional[httpx.Response]* | :heavy_minus_sign: | Successfully returned codeSample overlay file | -| `two_hundred_application_x_yaml_response_stream` | *Optional[httpx.Response]* | :heavy_minus_sign: | Successfully returned codeSample overlay file | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `usage_snippets` | [Optional[shared.UsageSnippets]](../../models/shared/usagesnippets.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getaccesstokenresponse.md b/docs/models/operations/getaccesstokenresponse.md index eb0d0a76..0888c472 100644 --- a/docs/models/operations/getaccesstokenresponse.md +++ b/docs/models/operations/getaccesstokenresponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `access_token` | [Optional[shared.AccessToken]](../../models/shared/accesstoken.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `access_token` | [Optional[shared.AccessToken]](../../models/shared/accesstoken.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getbillingaddonsresponse.md b/docs/models/operations/getbillingaddonsresponse.md new file mode 100644 index 00000000..0ea07a73 --- /dev/null +++ b/docs/models/operations/getbillingaddonsresponse.md @@ -0,0 +1,11 @@ +# GetBillingAddOnsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `organization_billing_add_on_response` | [Optional[shared.OrganizationBillingAddOnResponse]](../../models/shared/organizationbillingaddonresponse.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getblobresponse.md b/docs/models/operations/getblobresponse.md index a3cc0141..a16d0357 100644 --- a/docs/models/operations/getblobresponse.md +++ b/docs/models/operations/getblobresponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `blob` | *Optional[httpx.Response]* | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `blob` | *Optional[httpx.Response]* | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getcodesamplepreviewasyncresponse.md b/docs/models/operations/getcodesamplepreviewasyncresponse.md index ca5c213f..bfa688dd 100644 --- a/docs/models/operations/getcodesamplepreviewasyncresponse.md +++ b/docs/models/operations/getcodesamplepreviewasyncresponse.md @@ -8,6 +8,5 @@ | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `two_hundred_application_json_response_stream` | *Optional[httpx.Response]* | :heavy_minus_sign: | Successfully returned codeSample overlay file | -| `two_hundred_application_x_yaml_response_stream` | *Optional[httpx.Response]* | :heavy_minus_sign: | Successfully returned codeSample overlay file | -| `two_hundred_and_two_application_json_object` | [Optional[operations.GetCodeSamplePreviewAsyncResponseBody]](../../models/operations/getcodesamplepreviewasyncresponsebody.md) | :heavy_minus_sign: | Job is still in progress | \ No newline at end of file +| `usage_snippets` | [Optional[shared.UsageSnippets]](../../models/shared/usagesnippets.md) | :heavy_minus_sign: | OK | +| `object` | [Optional[operations.GetCodeSamplePreviewAsyncResponseBody]](../../models/operations/getcodesamplepreviewasyncresponsebody.md) | :heavy_minus_sign: | Job is still in progress | \ No newline at end of file diff --git a/docs/models/operations/getcodesamplesrequest.md b/docs/models/operations/getcodesamplesrequest.md index 4a5da3d6..7080ffc7 100644 --- a/docs/models/operations/getcodesamplesrequest.md +++ b/docs/models/operations/getcodesamplesrequest.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `registry_url` | *str* | :heavy_check_mark: | The registry URL from which to retrieve the snippets. E.g. https://spec.speakeasy.com/org/ws/my-source | -| `operation_ids` | List[*str*] | :heavy_minus_sign: | N/A | -| `languages` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `registry_url` | *str* | :heavy_check_mark: | The registry URL from which to retrieve the snippets. | https://spec.speakeasy.com/my-org/my-workspace/my-source | +| `operation_ids` | List[*str*] | :heavy_minus_sign: | The operation IDs to retrieve snippets for. | getPets | +| `method_paths` | List[[operations.MethodPaths](../../models/operations/methodpaths.md)] | :heavy_minus_sign: | The method paths to retrieve snippets for. | [
{
"method": "get",
"path": "/pets"
}
] | +| `languages` | List[*str*] | :heavy_minus_sign: | The languages to retrieve snippets for. | [
"python",
"javascript"
] | \ No newline at end of file diff --git a/docs/models/operations/getgithubactionrequest.md b/docs/models/operations/getgithubactionrequest.md index 69f8216a..07031afe 100644 --- a/docs/models/operations/getgithubactionrequest.md +++ b/docs/models/operations/getgithubactionrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `target_name` | *Optional[str]* | :heavy_minus_sign: | The targetName of the workflow target. | | `org` | *str* | :heavy_check_mark: | N/A | -| `repo` | *str* | :heavy_check_mark: | N/A | -| `target_name` | *Optional[str]* | :heavy_minus_sign: | The targetName of the workflow target. | \ No newline at end of file +| `repo` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getgithubactionresponse.md b/docs/models/operations/getgithubactionresponse.md index f0ecec90..7994e6e1 100644 --- a/docs/models/operations/getgithubactionresponse.md +++ b/docs/models/operations/getgithubactionresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `github_get_action_response` | [Optional[shared.GithubGetActionResponse]](../../models/shared/githubgetactionresponse.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `github_get_action_response` | [Optional[shared.GithubGetActionResponse]](../../models/shared/githubgetactionresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getgithubsetupstateresponse.md b/docs/models/operations/getgithubsetupstateresponse.md index 27b81321..7df6635a 100644 --- a/docs/models/operations/getgithubsetupstateresponse.md +++ b/docs/models/operations/getgithubsetupstateresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `github_setup_state_response` | [Optional[shared.GithubSetupStateResponse]](../../models/shared/githubsetupstateresponse.md) | :heavy_minus_sign: | github setup state response | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `github_setup_state_response` | [Optional[shared.GithubSetupStateResponse]](../../models/shared/githubsetupstateresponse.md) | :heavy_minus_sign: | github setup state response | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmanifestresponse.md b/docs/models/operations/getmanifestresponse.md index 9750a7b5..6c33a03e 100644 --- a/docs/models/operations/getmanifestresponse.md +++ b/docs/models/operations/getmanifestresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | +| `manifest` | [Optional[shared.Manifest]](../../models/shared/manifest.md) | :heavy_minus_sign: | OK | {
"config": {
"digest": "sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f",
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 1512
},
"layers": [
{
"digest": "sha256:5d20c808ce198565ff70b3ed23a991dd49afac45dece63474b27ce6ed036adc6",
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 2107098
}
],
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"schemaVersion": 2
} | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | -| `manifest` | [Optional[shared.Manifest]](../../models/shared/manifest.md) | :heavy_minus_sign: | OK | {
"config": {
"digest": "sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f",
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 1512
},
"layers": [
{
"digest": "sha256:5d20c808ce198565ff70b3ed23a991dd49afac45dece63474b27ce6ed036adc6",
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 2107098
}
],
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"schemaVersion": 2
} | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/models/operations/getnamespacesresponse.md b/docs/models/operations/getnamespacesresponse.md index 2a13d1ce..5a557ef6 100644 --- a/docs/models/operations/getnamespacesresponse.md +++ b/docs/models/operations/getnamespacesresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `get_namespaces_response` | [Optional[shared.GetNamespacesResponse]](../../models/shared/getnamespacesresponse.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `get_namespaces_response` | [Optional[shared.GetNamespacesResponse]](../../models/shared/getnamespacesresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getorganizationresponse.md b/docs/models/operations/getorganizationresponse.md index 0738b6ac..62c58c6a 100644 --- a/docs/models/operations/getorganizationresponse.md +++ b/docs/models/operations/getorganizationresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `organization` | [Optional[shared.Organization]](../../models/shared/organization.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `organization` | [Optional[shared.Organization]](../../models/shared/organization.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getorganizationsresponse.md b/docs/models/operations/getorganizationsresponse.md index f352822c..096e9201 100644 --- a/docs/models/operations/getorganizationsresponse.md +++ b/docs/models/operations/getorganizationsresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `organizations` | List[[shared.Organization](../../models/shared/organization.md)] | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `organizations` | List[[shared.Organization](../../models/shared/organization.md)] | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getorganizationusageresponse.md b/docs/models/operations/getorganizationusageresponse.md index 8c415d06..6f78537f 100644 --- a/docs/models/operations/getorganizationusageresponse.md +++ b/docs/models/operations/getorganizationusageresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `organization_usage_response` | [Optional[shared.OrganizationUsageResponse]](../../models/shared/organizationusageresponse.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `organization_usage_response` | [Optional[shared.OrganizationUsageResponse]](../../models/shared/organizationusageresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getpublishingtokenbyidrequest.md b/docs/models/operations/getpublishingtokenbyidrequest.md new file mode 100644 index 00000000..338c17a6 --- /dev/null +++ b/docs/models/operations/getpublishingtokenbyidrequest.md @@ -0,0 +1,8 @@ +# GetPublishingTokenByIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *str* | :heavy_check_mark: | Unique identifier of the publishing token. | \ No newline at end of file diff --git a/docs/models/operations/getpublishingtokenbyidresponse.md b/docs/models/operations/getpublishingtokenbyidresponse.md new file mode 100644 index 00000000..1d112c0d --- /dev/null +++ b/docs/models/operations/getpublishingtokenbyidresponse.md @@ -0,0 +1,11 @@ +# GetPublishingTokenByIDResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `publishing_token` | [Optional[shared.PublishingToken]](../../models/shared/publishingtoken.md) | :heavy_minus_sign: | OK | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getpublishingtokenpublicmetadatarequest.md b/docs/models/operations/getpublishingtokenpublicmetadatarequest.md new file mode 100644 index 00000000..90ffe576 --- /dev/null +++ b/docs/models/operations/getpublishingtokenpublicmetadatarequest.md @@ -0,0 +1,8 @@ +# GetPublishingTokenPublicMetadataRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *str* | :heavy_check_mark: | Unique identifier of the publishing token. | \ No newline at end of file diff --git a/docs/models/operations/getpublishingtokenpublicmetadataresponse.md b/docs/models/operations/getpublishingtokenpublicmetadataresponse.md new file mode 100644 index 00000000..00722e18 --- /dev/null +++ b/docs/models/operations/getpublishingtokenpublicmetadataresponse.md @@ -0,0 +1,11 @@ +# GetPublishingTokenPublicMetadataResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional[operations.GetPublishingTokenPublicMetadataResponseBody]](../../models/operations/getpublishingtokenpublicmetadataresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getpublishingtokenpublicmetadataresponsebody.md b/docs/models/operations/getpublishingtokenpublicmetadataresponsebody.md new file mode 100644 index 00000000..faef89f2 --- /dev/null +++ b/docs/models/operations/getpublishingtokenpublicmetadataresponsebody.md @@ -0,0 +1,14 @@ +# GetPublishingTokenPublicMetadataResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `target_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `target_resource` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `valid_until` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getpublishingtokenresponse.md b/docs/models/operations/getpublishingtokenresponse.md new file mode 100644 index 00000000..e2835613 --- /dev/null +++ b/docs/models/operations/getpublishingtokenresponse.md @@ -0,0 +1,11 @@ +# GetPublishingTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `classes` | List[[shared.PublishingToken](../../models/shared/publishingtoken.md)] | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getpublishingtokentargetbyidrequest.md b/docs/models/operations/getpublishingtokentargetbyidrequest.md new file mode 100644 index 00000000..871a070d --- /dev/null +++ b/docs/models/operations/getpublishingtokentargetbyidrequest.md @@ -0,0 +1,8 @@ +# GetPublishingTokenTargetByIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *str* | :heavy_check_mark: | Unique identifier of the publishing token. | \ No newline at end of file diff --git a/docs/models/operations/getpublishingtokentargetbyidresponse.md b/docs/models/operations/getpublishingtokentargetbyidresponse.md new file mode 100644 index 00000000..00a47619 --- /dev/null +++ b/docs/models/operations/getpublishingtokentargetbyidresponse.md @@ -0,0 +1,11 @@ +# GetPublishingTokenTargetByIDResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `res` | *Optional[str]* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getrevisionsresponse.md b/docs/models/operations/getrevisionsresponse.md index fc597869..c4ee0a1b 100644 --- a/docs/models/operations/getrevisionsresponse.md +++ b/docs/models/operations/getrevisionsresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `get_revisions_response` | [Optional[shared.GetRevisionsResponse]](../../models/shared/getrevisionsresponse.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `get_revisions_response` | [Optional[shared.GetRevisionsResponse]](../../models/shared/getrevisionsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getschemastoreitemrequestbody.md b/docs/models/operations/getschemastoreitemrequestbody.md new file mode 100644 index 00000000..6765ac2d --- /dev/null +++ b/docs/models/operations/getschemastoreitemrequestbody.md @@ -0,0 +1,8 @@ +# GetSchemaStoreItemRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getschemastoreitemresponse.md b/docs/models/operations/getschemastoreitemresponse.md new file mode 100644 index 00000000..4d54e11f --- /dev/null +++ b/docs/models/operations/getschemastoreitemresponse.md @@ -0,0 +1,11 @@ +# GetSchemaStoreItemResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `schema_store_item` | [Optional[shared.SchemaStoreItem]](../../models/shared/schemastoreitem.md) | :heavy_minus_sign: | OK | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/gettagsresponse.md b/docs/models/operations/gettagsresponse.md index 5bc5ce52..c9e3ddbe 100644 --- a/docs/models/operations/gettagsresponse.md +++ b/docs/models/operations/gettagsresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `get_tags_response` | [Optional[shared.GetTagsResponse]](../../models/shared/gettagsresponse.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `get_tags_response` | [Optional[shared.GetTagsResponse]](../../models/shared/gettagsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getworkspaceaccessresponse.md b/docs/models/operations/getworkspaceaccessresponse.md index d52c1937..fbdb367b 100644 --- a/docs/models/operations/getworkspaceaccessresponse.md +++ b/docs/models/operations/getworkspaceaccessresponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `access_details` | [Optional[shared.AccessDetails]](../../models/shared/accessdetails.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `access_details` | [Optional[shared.AccessDetails]](../../models/shared/accessdetails.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getworkspaceeventsbytargetrequest.md b/docs/models/operations/getworkspaceeventsbytargetrequest.md index 181de993..35d6bd6f 100644 --- a/docs/models/operations/getworkspaceeventsbytargetrequest.md +++ b/docs/models/operations/getworkspaceeventsbytargetrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `target_id` | *str* | :heavy_check_mark: | Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) | | `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `target_id` | *str* | :heavy_check_mark: | Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) | | `after_created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter to only return events created after this timestamp | \ No newline at end of file diff --git a/docs/models/operations/getworkspaceeventsbytargetresponse.md b/docs/models/operations/getworkspaceeventsbytargetresponse.md index 9160f44c..8f3f89f9 100644 --- a/docs/models/operations/getworkspaceeventsbytargetresponse.md +++ b/docs/models/operations/getworkspaceeventsbytargetresponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `cli_event_batch` | List[[shared.CliEvent](../../models/shared/clievent.md)] | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `cli_event_batch` | List[[shared.CliEvent](../../models/shared/clievent.md)] | :heavy_minus_sign: | Success | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/githubcheckpublishingprsresponse.md b/docs/models/operations/githubcheckpublishingprsresponse.md index cf41b492..aaaf3270 100644 --- a/docs/models/operations/githubcheckpublishingprsresponse.md +++ b/docs/models/operations/githubcheckpublishingprsresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `github_publishing_pr_response` | [Optional[shared.GithubPublishingPRResponse]](../../models/shared/githubpublishingprresponse.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `github_publishing_pr_response` | [Optional[shared.GithubPublishingPRResponse]](../../models/shared/githubpublishingprresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/githubcheckpublishingsecretsresponse.md b/docs/models/operations/githubcheckpublishingsecretsresponse.md index cd21da37..84817e43 100644 --- a/docs/models/operations/githubcheckpublishingsecretsresponse.md +++ b/docs/models/operations/githubcheckpublishingsecretsresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `github_missing_publishing_secrets_response` | [Optional[shared.GithubMissingPublishingSecretsResponse]](../../models/shared/githubmissingpublishingsecretsresponse.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `github_missing_publishing_secrets_response` | [Optional[shared.GithubMissingPublishingSecretsResponse]](../../models/shared/githubmissingpublishingsecretsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/githubconfigurecodesamplesresponse.md b/docs/models/operations/githubconfigurecodesamplesresponse.md index 57471256..f3b26e00 100644 --- a/docs/models/operations/githubconfigurecodesamplesresponse.md +++ b/docs/models/operations/githubconfigurecodesamplesresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `github_configure_code_samples_response` | [Optional[shared.GithubConfigureCodeSamplesResponse]](../../models/shared/githubconfigurecodesamplesresponse.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `github_configure_code_samples_response` | [Optional[shared.GithubConfigureCodeSamplesResponse]](../../models/shared/githubconfigurecodesamplesresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/grantuseraccesstoworkspacerequest.md b/docs/models/operations/grantuseraccesstoworkspacerequest.md index ab987d6d..6019a777 100644 --- a/docs/models/operations/grantuseraccesstoworkspacerequest.md +++ b/docs/models/operations/grantuseraccesstoworkspacerequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `email` | *str* | :heavy_check_mark: | Email of the user to grant access to. | -| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `email` | *str* | :heavy_check_mark: | Email of the user to grant access to. | \ No newline at end of file diff --git a/docs/models/operations/listremotesourcesresponse.md b/docs/models/operations/listremotesourcesresponse.md index edb07164..5287e46e 100644 --- a/docs/models/operations/listremotesourcesresponse.md +++ b/docs/models/operations/listremotesourcesresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `remote_source` | [Optional[shared.RemoteSource]](../../models/shared/remotesource.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `remote_source` | [Optional[shared.RemoteSource]](../../models/shared/remotesource.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/methodpaths.md b/docs/models/operations/methodpaths.md new file mode 100644 index 00000000..afea22cf --- /dev/null +++ b/docs/models/operations/methodpaths.md @@ -0,0 +1,9 @@ +# MethodPaths + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `method` | [shared.HTTPMethod](../../models/shared/httpmethod.md) | :heavy_check_mark: | N/A | +| `path` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postworkspaceeventsrequest.md b/docs/models/operations/postworkspaceeventsrequest.md index ef012d39..bf10dff2 100644 --- a/docs/models/operations/postworkspaceeventsrequest.md +++ b/docs/models/operations/postworkspaceeventsrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `request_body` | List[[shared.CliEvent](../../models/shared/clievent.md)] | :heavy_check_mark: | N/A | -| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `request_body` | List[[shared.CliEvent](../../models/shared/clievent.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/preflightresponse.md b/docs/models/operations/preflightresponse.md index 229fcee5..c183eb18 100644 --- a/docs/models/operations/preflightresponse.md +++ b/docs/models/operations/preflightresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `preflight_token` | [Optional[shared.PreflightToken]](../../models/shared/preflighttoken.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `preflight_token` | [Optional[shared.PreflightToken]](../../models/shared/preflighttoken.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/revokeuseraccesstoworkspacerequest.md b/docs/models/operations/revokeuseraccesstoworkspacerequest.md index 16c3757a..4df7a307 100644 --- a/docs/models/operations/revokeuseraccesstoworkspacerequest.md +++ b/docs/models/operations/revokeuseraccesstoworkspacerequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `user_id` | *str* | :heavy_check_mark: | Unique identifier of the user. | -| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `user_id` | *str* | :heavy_check_mark: | Unique identifier of the user. | \ No newline at end of file diff --git a/docs/models/operations/schema.md b/docs/models/operations/schema.md index 6649ba92..9738da23 100644 --- a/docs/models/operations/schema.md +++ b/docs/models/operations/schema.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | | `content` | *Union[bytes, IO[bytes], io.BufferedReader]* | :heavy_check_mark: | N/A | -| `file_name` | *str* | :heavy_check_mark: | N/A | -| `content_type` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `content_type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `file_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/searchworkspaceeventsresponse.md b/docs/models/operations/searchworkspaceeventsresponse.md index ada3fafe..2371235f 100644 --- a/docs/models/operations/searchworkspaceeventsresponse.md +++ b/docs/models/operations/searchworkspaceeventsresponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `cli_event_batch` | List[[shared.CliEvent](../../models/shared/clievent.md)] | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `cli_event_batch` | List[[shared.CliEvent](../../models/shared/clievent.md)] | :heavy_minus_sign: | Success | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/setworkspacefeatureflagsresponse.md b/docs/models/operations/setworkspacefeatureflagsresponse.md new file mode 100644 index 00000000..93b37e92 --- /dev/null +++ b/docs/models/operations/setworkspacefeatureflagsresponse.md @@ -0,0 +1,11 @@ +# SetWorkspaceFeatureFlagsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspace_feature_flag_response` | [Optional[shared.WorkspaceFeatureFlagResponse]](../../models/shared/workspacefeatureflagresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/suggestopenapiregistryresponse.md b/docs/models/operations/suggestopenapiregistryresponse.md index 1104f284..0d9ff2aa 100644 --- a/docs/models/operations/suggestopenapiregistryresponse.md +++ b/docs/models/operations/suggestopenapiregistryresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `schema_` | *Optional[httpx.Response]* | :heavy_minus_sign: | An overlay containing the suggested spec modifications. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `schema_` | *Optional[httpx.Response]* | :heavy_minus_sign: | An overlay containing the suggested spec modifications. | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/suggestopenapirequestbody.md b/docs/models/operations/suggestopenapirequestbody.md index 17d3653e..fa547a5d 100644 --- a/docs/models/operations/suggestopenapirequestbody.md +++ b/docs/models/operations/suggestopenapirequestbody.md @@ -7,5 +7,5 @@ The schema file to upload provided as a multipart/form-data file segment. | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `schema_` | [operations.Schema](../../models/operations/schema.md) | :heavy_check_mark: | N/A | -| `opts` | [Optional[shared.SuggestOptsOld]](../../models/shared/suggestoptsold.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `opts` | [Optional[shared.SuggestOptsOld]](../../models/shared/suggestoptsold.md) | :heavy_minus_sign: | N/A | +| `schema_` | [operations.Schema](../../models/operations/schema.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/suggestopenapiresponse.md b/docs/models/operations/suggestopenapiresponse.md index 56bbf47e..f557d326 100644 --- a/docs/models/operations/suggestopenapiresponse.md +++ b/docs/models/operations/suggestopenapiresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `schema_` | *Optional[httpx.Response]* | :heavy_minus_sign: | An overlay containing the suggested spec modifications. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `schema_` | *Optional[httpx.Response]* | :heavy_minus_sign: | An overlay containing the suggested spec modifications. | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/suggestresponse.md b/docs/models/operations/suggestresponse.md index 731be20c..647cb2b3 100644 --- a/docs/models/operations/suggestresponse.md +++ b/docs/models/operations/suggestresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `schema_` | *Optional[httpx.Response]* | :heavy_minus_sign: | An overlay containing the suggested spec modifications. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `schema_` | *Optional[httpx.Response]* | :heavy_minus_sign: | An overlay containing the suggested spec modifications. | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/updatepublishingtokenexpirationrequest.md b/docs/models/operations/updatepublishingtokenexpirationrequest.md new file mode 100644 index 00000000..bad3285a --- /dev/null +++ b/docs/models/operations/updatepublishingtokenexpirationrequest.md @@ -0,0 +1,9 @@ +# UpdatePublishingTokenExpirationRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `token_id` | *str* | :heavy_check_mark: | Unique identifier of the publishing token. | +| `request_body` | [Optional[operations.UpdatePublishingTokenExpirationRequestBody]](../../models/operations/updatepublishingtokenexpirationrequestbody.md) | :heavy_minus_sign: | The publishing token to update | \ No newline at end of file diff --git a/docs/models/operations/updatepublishingtokenexpirationrequestbody.md b/docs/models/operations/updatepublishingtokenexpirationrequestbody.md new file mode 100644 index 00000000..be1609c1 --- /dev/null +++ b/docs/models/operations/updatepublishingtokenexpirationrequestbody.md @@ -0,0 +1,11 @@ +# UpdatePublishingTokenExpirationRequestBody + +The publishing token to update + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `token_name` | *Optional[str]* | :heavy_minus_sign: | The new name for the publishing token. | +| `valid_until` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The new expiration date for the publishing token. | \ No newline at end of file diff --git a/docs/models/operations/updatepublishingtokenexpirationresponse.md b/docs/models/operations/updatepublishingtokenexpirationresponse.md new file mode 100644 index 00000000..d5391c4d --- /dev/null +++ b/docs/models/operations/updatepublishingtokenexpirationresponse.md @@ -0,0 +1,10 @@ +# UpdatePublishingTokenExpirationResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/updateworkspacedetailsrequest.md b/docs/models/operations/updateworkspacedetailsrequest.md index 318b9e04..43d3c56b 100644 --- a/docs/models/operations/updateworkspacedetailsrequest.md +++ b/docs/models/operations/updateworkspacedetailsrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `workspace` | [shared.Workspace](../../models/shared/workspace.md) | :heavy_check_mark: | The workspace details to update. | -| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `workspace` | [shared.Workspace](../../models/shared/workspace.md) | :heavy_check_mark: | The workspace details to update. | \ No newline at end of file diff --git a/docs/models/operations/updateworkspacesettingsrequest.md b/docs/models/operations/updateworkspacesettingsrequest.md index a43138f4..cc6fd6ad 100644 --- a/docs/models/operations/updateworkspacesettingsrequest.md +++ b/docs/models/operations/updateworkspacesettingsrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `workspace_settings` | [shared.WorkspaceSettings](../../models/shared/workspacesettings.md) | :heavy_check_mark: | The workspace settings to update. | -| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `workspace_settings` | [shared.WorkspaceSettings](../../models/shared/workspacesettings.md) | :heavy_check_mark: | The workspace settings to update. | \ No newline at end of file diff --git a/docs/models/operations/validateapikeyresponse.md b/docs/models/operations/validateapikeyresponse.md index c3406608..972a437f 100644 --- a/docs/models/operations/validateapikeyresponse.md +++ b/docs/models/operations/validateapikeyresponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `api_key_details` | [Optional[shared.APIKeyDetails]](../../models/shared/apikeydetails.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `api_key_details` | [Optional[shared.APIKeyDetails]](../../models/shared/apikeydetails.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/shared/accessdetails.md b/docs/models/shared/accessdetails.md index 415d7c8c..ac56d95f 100644 --- a/docs/models/shared/accessdetails.md +++ b/docs/models/shared/accessdetails.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | | `generation_allowed` | *bool* | :heavy_check_mark: | N/A | -| `message` | *str* | :heavy_check_mark: | N/A | -| `level` | [Optional[shared.Level]](../../models/shared/level.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `level` | [Optional[shared.Level]](../../models/shared/level.md) | :heavy_minus_sign: | N/A | +| `message` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accesstoken.md b/docs/models/shared/accesstoken.md index 21af6ae5..b3c174ae 100644 --- a/docs/models/shared/accesstoken.md +++ b/docs/models/shared/accesstoken.md @@ -9,6 +9,6 @@ An AccessToken is a token that can be used to authenticate with the Speakeasy AP | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | | `access_token` | *str* | :heavy_check_mark: | N/A | | `claims` | [shared.Claims](../../models/shared/claims.md) | :heavy_check_mark: | N/A | -| `user` | [shared.AccessTokenUser](../../models/shared/accesstokenuser.md) | :heavy_check_mark: | N/A | | `feature_flags` | List[[shared.FeatureFlag](../../models/shared/featureflag.md)] | :heavy_minus_sign: | N/A | +| `user` | [shared.AccessTokenUser](../../models/shared/accesstokenuser.md) | :heavy_check_mark: | N/A | | `workspaces` | List[[shared.Workspaces](../../models/shared/workspaces.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/apikeydetails.md b/docs/models/shared/apikeydetails.md index e3369ed1..e2998b72 100644 --- a/docs/models/shared/apikeydetails.md +++ b/docs/models/shared/apikeydetails.md @@ -6,11 +6,12 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `account_type_v2` | [shared.AccountType](../../models/shared/accounttype.md) | :heavy_check_mark: | N/A | +| `billing_add_ons` | List[[shared.BillingAddOn](../../models/shared/billingaddon.md)] | :heavy_check_mark: | N/A | | `enabled_features` | List[*str*] | :heavy_check_mark: | N/A | +| ~~`feature_flags`~~ | List[*str*] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `generation_access_unlimited` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `org_slug` | *str* | :heavy_check_mark: | N/A | | `telemetry_disabled` | *bool* | :heavy_check_mark: | N/A | | `workspace_created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Workspace creation timestamp. | | `workspace_id` | *str* | :heavy_check_mark: | N/A | -| `workspace_slug` | *str* | :heavy_check_mark: | N/A | -| ~~`feature_flags`~~ | List[*str*] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | -| `generation_access_unlimited` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `workspace_slug` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/billingaddon.md b/docs/models/shared/billingaddon.md new file mode 100644 index 00000000..da31dcf4 --- /dev/null +++ b/docs/models/shared/billingaddon.md @@ -0,0 +1,11 @@ +# BillingAddOn + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `WEBHOOKS` | webhooks | +| `SDK_TESTING` | sdk_testing | +| `CUSTOM_CODE_REGIONS` | custom_code_regions | +| `SNIPPET_AI` | snippet_ai | \ No newline at end of file diff --git a/docs/models/shared/clievent.md b/docs/models/shared/clievent.md index c75f9db3..53e6ed2c 100644 --- a/docs/models/shared/clievent.md +++ b/docs/models/shared/clievent.md @@ -5,19 +5,12 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Timestamp when the event was created in the database. | -| `execution_id` | *str* | :heavy_check_mark: | Unique identifier for each execution of the CLI. | -| `id` | *str* | :heavy_check_mark: | Unique identifier for each event. | -| `interaction_type` | [shared.InteractionType](../../models/shared/interactiontype.md) | :heavy_check_mark: | Type of interaction. | -| `local_started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Timestamp when the event started, in local time. | -| `speakeasy_api_key_name` | *str* | :heavy_check_mark: | Identifier of the Speakeasy API key. | -| `speakeasy_version` | *str* | :heavy_check_mark: | Version of the Speakeasy CLI. | -| `success` | *bool* | :heavy_check_mark: | Indicates whether the event was successful. | -| `workspace_id` | *str* | :heavy_check_mark: | Identifier of the workspace. | | `commit_head` | *Optional[str]* | :heavy_minus_sign: | Remote commit ID. | | `continuous_integration_environment` | *Optional[str]* | :heavy_minus_sign: | Name of the CI environment. | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Timestamp when the event was created in the database. | | `duration_ms` | *Optional[int]* | :heavy_minus_sign: | Duration of the event in milliseconds. | | `error` | *Optional[str]* | :heavy_minus_sign: | Error message if the event was not successful. | +| `execution_id` | *str* | :heavy_check_mark: | Unique identifier for each execution of the CLI. | | `generate_bump_type` | [Optional[shared.GenerateBumpType]](../../models/shared/generatebumptype.md) | :heavy_minus_sign: | Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) | | `generate_config_post_checksum` | *Optional[str]* | :heavy_minus_sign: | Checksum of the configuration file (post generation) | | `generate_config_post_raw` | *Optional[str]* | :heavy_minus_sign: | Rendered configuration file (post generation) | @@ -58,12 +51,15 @@ | `git_user_email` | *Optional[str]* | :heavy_minus_sign: | User email from git configuration. | | `git_user_name` | *Optional[str]* | :heavy_minus_sign: | User's name from git configuration. (not GitHub username) | | `hostname` | *Optional[str]* | :heavy_minus_sign: | Remote hostname. | +| `id` | *str* | :heavy_check_mark: | Unique identifier for each event. | +| `interaction_type` | [shared.InteractionType](../../models/shared/interactiontype.md) | :heavy_check_mark: | Type of interaction. | | `last_step` | *Optional[str]* | :heavy_minus_sign: | The last step of the event. | | `lint_report_digest` | *Optional[str]* | :heavy_minus_sign: | The checksum of the lint report. | | `lint_report_error_count` | *Optional[int]* | :heavy_minus_sign: | The number of errors in the lint report. | | `lint_report_info_count` | *Optional[int]* | :heavy_minus_sign: | The number of info messages in the lint report. | | `lint_report_warning_count` | *Optional[int]* | :heavy_minus_sign: | The number of warnings in the lint report. | | `local_completed_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Timestamp when the event completed, in local time. | +| `local_started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Timestamp when the event started, in local time. | | `management_doc_checksum` | *Optional[str]* | :heavy_minus_sign: | Checksum of the currently Rendered OpenAPI document. | | `management_doc_version` | *Optional[str]* | :heavy_minus_sign: | Version taken from info.version field of the Rendered OpenAPI document. | | `mermaid_diagram` | *Optional[str]* | :heavy_minus_sign: | Mermaid diagram | @@ -82,7 +78,12 @@ | `source_blob_digest` | *Optional[str]* | :heavy_minus_sign: | The blob digest of the source. | | `source_namespace_name` | *Optional[str]* | :heavy_minus_sign: | The namespace name of the source. | | `source_revision_digest` | *Optional[str]* | :heavy_minus_sign: | The revision digest of the source. | +| `speakeasy_api_key_name` | *str* | :heavy_check_mark: | Identifier of the Speakeasy API key. | +| `speakeasy_version` | *str* | :heavy_check_mark: | Version of the Speakeasy CLI. | +| `success` | *bool* | :heavy_check_mark: | Indicates whether the event was successful. | +| `test_report_raw` | *Optional[str]* | :heavy_minus_sign: | The raw test report xml | | `workflow_lock_post_raw` | *Optional[str]* | :heavy_minus_sign: | Workflow lock file (post execution) | | `workflow_lock_pre_raw` | *Optional[str]* | :heavy_minus_sign: | Workflow lock file (prior to execution) | | `workflow_post_raw` | *Optional[str]* | :heavy_minus_sign: | Workflow file (post execution) | -| `workflow_pre_raw` | *Optional[str]* | :heavy_minus_sign: | Workflow file (prior to execution) | \ No newline at end of file +| `workflow_pre_raw` | *Optional[str]* | :heavy_minus_sign: | Workflow file (prior to execution) | +| `workspace_id` | *str* | :heavy_check_mark: | Identifier of the workspace. | \ No newline at end of file diff --git a/docs/models/shared/codesampleschemainput.md b/docs/models/shared/codesampleschemainput.md index b17569fb..81385a9b 100644 --- a/docs/models/shared/codesampleschemainput.md +++ b/docs/models/shared/codesampleschemainput.md @@ -5,7 +5,8 @@ | Field | Type | Required | Description | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `languages` | List[*str*] | :heavy_check_mark: | A list of languages to generate code samples for | -| `schema_file` | [shared.SchemaFile](../../models/shared/schemafile.md) | :heavy_check_mark: | The OpenAPI file to be uploaded | +| `language` | *str* | :heavy_check_mark: | The language to generate code samples for | +| `operation_ids` | List[*str*] | :heavy_minus_sign: | A list of operations IDs to generate code samples for | | `package_name` | *Optional[str]* | :heavy_minus_sign: | The name of the package | +| `schema_file` | [shared.SchemaFile](../../models/shared/schemafile.md) | :heavy_check_mark: | The OpenAPI file to be uploaded | | `sdk_class_name` | *Optional[str]* | :heavy_minus_sign: | The SDK class name | \ No newline at end of file diff --git a/docs/models/shared/diagnostic.md b/docs/models/shared/diagnostic.md index 68cc1191..b4c1f25c 100644 --- a/docs/models/shared/diagnostic.md +++ b/docs/models/shared/diagnostic.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `help_message` | *Optional[str]* | :heavy_minus_sign: | Help message for how to fix the issue | | `message` | *str* | :heavy_check_mark: | Message describing the issue | | `path` | List[*str*] | :heavy_check_mark: | Schema path to the issue | -| `type` | *str* | :heavy_check_mark: | Issue type | -| `help_message` | *Optional[str]* | :heavy_minus_sign: | Help message for how to fix the issue | \ No newline at end of file +| `type` | *str* | :heavy_check_mark: | Issue type | \ No newline at end of file diff --git a/docs/models/shared/featureflag.md b/docs/models/shared/featureflag.md index 5dc0208f..632f8f2c 100644 --- a/docs/models/shared/featureflag.md +++ b/docs/models/shared/featureflag.md @@ -5,7 +5,7 @@ A feature flag is a key-value pair that can be used to enable or disable feature ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `feature_flag` | *str* | :heavy_check_mark: | N/A | -| `trial_ends_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `feature_flag` | [shared.WorkspaceFeatureFlag](../../models/shared/workspacefeatureflag.md) | :heavy_check_mark: | enum value workspace feature flag | +| `trial_ends_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/format_.md b/docs/models/shared/format_.md new file mode 100644 index 00000000..851cd0b3 --- /dev/null +++ b/docs/models/shared/format_.md @@ -0,0 +1,9 @@ +# Format + + +## Values + +| Name | Value | +| ------ | ------ | +| `JSON` | json | +| `YAML` | yaml | \ No newline at end of file diff --git a/docs/models/shared/githubconfigurecodesamplesresponse.md b/docs/models/shared/githubconfigurecodesamplesresponse.md index 9bd843c2..0277ef6c 100644 --- a/docs/models/shared/githubconfigurecodesamplesresponse.md +++ b/docs/models/shared/githubconfigurecodesamplesresponse.md @@ -8,5 +8,5 @@ A response to configure GitHub code samples | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `code_sample_overlay_registry_url` | *str* | :heavy_check_mark: | The URL of the code sample overlay registry | -| `source` | [shared.WorkflowDocument](../../models/shared/workflowdocument.md) | :heavy_check_mark: | A document referenced by a workflow | -| `gh_action_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the GitHub action that was dispatched | \ No newline at end of file +| `gh_action_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the GitHub action that was dispatched | +| `source` | [shared.WorkflowDocument](../../models/shared/workflowdocument.md) | :heavy_check_mark: | A document referenced by a workflow | \ No newline at end of file diff --git a/docs/models/shared/githubpublishingprresponse.md b/docs/models/shared/githubpublishingprresponse.md index 436eefa9..022ac721 100644 --- a/docs/models/shared/githubpublishingprresponse.md +++ b/docs/models/shared/githubpublishingprresponse.md @@ -5,7 +5,8 @@ Open generation PRs pending publishing ## Fields -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `generation_pull_request` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pending_version` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `pending_version` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `pull_request` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `pull_request_metadata` | [Optional[shared.PullRequestMetadata]](../../models/shared/pullrequestmetadata.md) | :heavy_minus_sign: | This can only be populated when the github app is installed for a repo | \ No newline at end of file diff --git a/docs/models/shared/githubtriggeractionrequest.md b/docs/models/shared/githubtriggeractionrequest.md index 302b2864..d42ee022 100644 --- a/docs/models/shared/githubtriggeractionrequest.md +++ b/docs/models/shared/githubtriggeractionrequest.md @@ -7,9 +7,9 @@ A request to trigger an action on a GitHub target | Field | Type | Required | Description | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `force` | *Optional[bool]* | :heavy_minus_sign: | Force an SDK generation | | `gen_lock_id` | *str* | :heavy_check_mark: | The generation lock ID | | `org` | *str* | :heavy_check_mark: | The GitHub organization name | | `repo_name` | *str* | :heavy_check_mark: | The GitHub repository name | -| `force` | *Optional[bool]* | :heavy_minus_sign: | Force an SDK generation | | `set_version` | *Optional[str]* | :heavy_minus_sign: | A version to override the SDK too in workflow dispatch | | `target_name` | *Optional[str]* | :heavy_minus_sign: | The target name for the action | \ No newline at end of file diff --git a/docs/models/shared/httpmethod.md b/docs/models/shared/httpmethod.md new file mode 100644 index 00000000..6106d000 --- /dev/null +++ b/docs/models/shared/httpmethod.md @@ -0,0 +1,15 @@ +# HTTPMethod + + +## Values + +| Name | Value | +| --------- | --------- | +| `GET` | get | +| `POST` | post | +| `PUT` | put | +| `PATCH` | patch | +| `DELETE` | delete | +| `HEAD` | head | +| `OPTIONS` | options | +| `TRACE` | trace | \ No newline at end of file diff --git a/docs/models/shared/interactiontype.md b/docs/models/shared/interactiontype.md index aad98c67..21b03202 100644 --- a/docs/models/shared/interactiontype.md +++ b/docs/models/shared/interactiontype.md @@ -17,4 +17,5 @@ Type of interaction. | `QUICKSTART` | QUICKSTART | | `RUN` | RUN | | `CONFIGURE` | CONFIGURE | -| `PUBLISH` | PUBLISH | \ No newline at end of file +| `PUBLISH` | PUBLISH | +| `TEST` | TEST | \ No newline at end of file diff --git a/docs/models/shared/namespace.md b/docs/models/shared/namespace.md index d3eced56..3709faad 100644 --- a/docs/models/shared/namespace.md +++ b/docs/models/shared/namespace.md @@ -5,11 +5,13 @@ A namespace contains many revisions. ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `id` | *str* | :heavy_check_mark: | {organization_slug}/{workspace_slug}/{namespace_name} | -| `name` | *str* | :heavy_check_mark: | A human-readable name for the namespace. | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `composite_spec_metadata` | [Optional[shared.CompositeSpecMetadata]](../../models/shared/compositespecmetadata.md) | :heavy_minus_sign: | N/A | -| `public` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the namespace is publicly accessible | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `archived_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `composite_spec_metadata` | [Optional[shared.CompositeSpecMetadata]](../../models/shared/compositespecmetadata.md) | :heavy_minus_sign: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `id` | *str* | :heavy_check_mark: | {organization_slug}/{workspace_slug}/{namespace_name} | +| `latest_revision_metadata` | [Optional[shared.RevisionContentsMetadata]](../../models/shared/revisioncontentsmetadata.md) | :heavy_minus_sign: | N/A | +| `name` | *str* | :heavy_check_mark: | A human-readable name for the namespace. | +| `public` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the namespace is publicly accessible | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/oasoperation.md b/docs/models/shared/oasoperation.md index a055118c..7813eddd 100644 --- a/docs/models/shared/oasoperation.md +++ b/docs/models/shared/oasoperation.md @@ -6,9 +6,9 @@ | Field | Type | Required | Description | | ---------------------- | ---------------------- | ---------------------- | ---------------------- | | `description` | *str* | :heavy_check_mark: | N/A | +| `group_override` | *Optional[str]* | :heavy_minus_sign: | N/A | | `method` | *str* | :heavy_check_mark: | N/A | +| `method_name_override` | *Optional[str]* | :heavy_minus_sign: | N/A | | `operation_id` | *str* | :heavy_check_mark: | N/A | | `path` | *str* | :heavy_check_mark: | N/A | -| `tags` | List[*str*] | :heavy_check_mark: | N/A | -| `group_override` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `method_name_override` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `tags` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/organization.md b/docs/models/shared/organization.md index 230e390e..41266486 100644 --- a/docs/models/shared/organization.md +++ b/docs/models/shared/organization.md @@ -9,12 +9,12 @@ A speakeasy organization | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `account_type` | [shared.AccountType](../../models/shared/accounttype.md) | :heavy_check_mark: | N/A | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `free_trial_expiry` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | +| `internal` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | | `slug` | *str* | :heavy_check_mark: | N/A | | `sso_activated` | *bool* | :heavy_check_mark: | N/A | +| `sso_connection_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `telemetry_disabled` | *bool* | :heavy_check_mark: | N/A | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `free_trial_expiry` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | -| `internal` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `sso_connection_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/organizationbillingaddonrequest.md b/docs/models/shared/organizationbillingaddonrequest.md new file mode 100644 index 00000000..6a6d7395 --- /dev/null +++ b/docs/models/shared/organizationbillingaddonrequest.md @@ -0,0 +1,10 @@ +# OrganizationBillingAddOnRequest + +A request to add billing add ons + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `add_ons` | List[[shared.BillingAddOn](../../models/shared/billingaddon.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/organizationbillingaddonresponse.md b/docs/models/shared/organizationbillingaddonresponse.md new file mode 100644 index 00000000..09d8e3ba --- /dev/null +++ b/docs/models/shared/organizationbillingaddonresponse.md @@ -0,0 +1,10 @@ +# OrganizationBillingAddOnResponse + +Billing add on response + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `add_ons` | List[[shared.BillingAddOn](../../models/shared/billingaddon.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/organizationusageresponse.md b/docs/models/shared/organizationusageresponse.md index 76f2db97..0b6f041b 100644 --- a/docs/models/shared/organizationusageresponse.md +++ b/docs/models/shared/organizationusageresponse.md @@ -8,6 +8,6 @@ A billing summary of organization usage | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | | `allowed_languages` | List[*str*] | :heavy_check_mark: | List of allowed languages | +| `free_trial_expiry` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Expiry date of the free trial, will be null if no trial | | `total_allowed_languages` | *int* | :heavy_check_mark: | Total number of allowed languages, -1 if unlimited | -| `usage` | List[[shared.OrganizationUsage](../../models/shared/organizationusage.md)] | :heavy_check_mark: | N/A | -| `free_trial_expiry` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Expiry date of the free trial, will be null if no trial | \ No newline at end of file +| `usage` | List[[shared.OrganizationUsage](../../models/shared/organizationusage.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/publishingtoken.md b/docs/models/shared/publishingtoken.md new file mode 100644 index 00000000..e8e19e4e --- /dev/null +++ b/docs/models/shared/publishingtoken.md @@ -0,0 +1,21 @@ +# PublishingToken + +A token used to publish to a target + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `created_by` | *str* | :heavy_check_mark: | N/A | +| `id` | *str* | :heavy_check_mark: | N/A | +| `organization_id` | *str* | :heavy_check_mark: | N/A | +| `target_id` | *str* | :heavy_check_mark: | N/A | +| `target_resource` | [shared.TargetResource](../../models/shared/targetresource.md) | :heavy_check_mark: | N/A | +| `token` | *str* | :heavy_check_mark: | N/A | +| `token_name` | *str* | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `updated_by` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `valid_until` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/pullrequestmetadata.md b/docs/models/shared/pullrequestmetadata.md new file mode 100644 index 00000000..20ca5ff0 --- /dev/null +++ b/docs/models/shared/pullrequestmetadata.md @@ -0,0 +1,18 @@ +# PullRequestMetadata + +This can only be populated when the github app is installed for a repo + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `base_branch` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `can_merge` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `description` | *Optional[str]* | :heavy_minus_sign: | truncated to first 1000 characters | +| `head_branch` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `labels` | List[*str*] | :heavy_minus_sign: | List of github labels | +| `requested_reviewers` | List[*str*] | :heavy_minus_sign: | List of github handles | +| `status` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/remotesourcesubscriptionsettings.md b/docs/models/shared/remotesourcesubscriptionsettings.md index 0ffb22ec..709852cf 100644 --- a/docs/models/shared/remotesourcesubscriptionsettings.md +++ b/docs/models/shared/remotesourcesubscriptionsettings.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ---------------------- | ---------------------- | ---------------------- | ---------------------- | | `base_spec_namespaces` | List[*str*] | :heavy_check_mark: | N/A | +| `ignored_namespaces` | List[*str*] | :heavy_minus_sign: | N/A | | `output_namespace` | *str* | :heavy_check_mark: | N/A | -| `overlay_namespaces` | List[*str*] | :heavy_check_mark: | N/A | -| `ignored_namespaces` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `overlay_namespaces` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/revision.md b/docs/models/shared/revision.md index df667ccf..1005f1ab 100644 --- a/docs/models/shared/revision.md +++ b/docs/models/shared/revision.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | -| `digest` | *str* | :heavy_check_mark: | N/A | sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f | -| `id` | *str* | :heavy_check_mark: | Format {namespace_id}/{revision_digest} | | -| `namespace_name` | *str* | :heavy_check_mark: | N/A | | -| `tags` | List[*str*] | :heavy_check_mark: | N/A | | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `contents_metadata` | [Optional[shared.RevisionContentsMetadata]](../../models/shared/revisioncontentsmetadata.md) | :heavy_minus_sign: | N/A | | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `digest` | *str* | :heavy_check_mark: | N/A | sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f | +| `id` | *str* | :heavy_check_mark: | Format {namespace_id}/{revision_digest} | | +| `namespace_name` | *str* | :heavy_check_mark: | N/A | | +| `tags` | List[*str*] | :heavy_check_mark: | N/A | | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/revisioncontentsmetadata.md b/docs/models/shared/revisioncontentsmetadata.md new file mode 100644 index 00000000..605d6cf4 --- /dev/null +++ b/docs/models/shared/revisioncontentsmetadata.md @@ -0,0 +1,20 @@ +# RevisionContentsMetadata + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `contains_code_samples` | *bool* | :heavy_check_mark: | Whether the OAS contains code samples. | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | The OAS description | +| `hash` | *str* | :heavy_check_mark: | The hash of the contents | +| `namespace` | *str* | :heavy_check_mark: | The fully qualified namespace | +| `num_overlay_actions` | *int* | :heavy_check_mark: | The number of overlay actions in the OAS. Will be 0 if the OAS is not an overlay. | +| `operation_ids` | List[*str*] | :heavy_check_mark: | The operation IDs contained in the OAS. Will be empty if the OAS is an overlay. | +| `revision_digest` | *str* | :heavy_check_mark: | The digest of the parent bundle | +| `tags` | List[*str*] | :heavy_check_mark: | The tags contained in the OAS -- NOT the OCI tags. Will be empty if the OAS is an overlay. | +| `title` | *str* | :heavy_check_mark: | The OAS title | +| `type` | [shared.RevisionContentsMetadataType](../../models/shared/revisioncontentsmetadatatype.md) | :heavy_check_mark: | N/A | +| `version` | *str* | :heavy_check_mark: | The OAS version | +| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID | \ No newline at end of file diff --git a/docs/models/shared/revisioncontentsmetadatatype.md b/docs/models/shared/revisioncontentsmetadatatype.md new file mode 100644 index 00000000..939b22fb --- /dev/null +++ b/docs/models/shared/revisioncontentsmetadatatype.md @@ -0,0 +1,9 @@ +# RevisionContentsMetadataType + + +## Values + +| Name | Value | +| ----------------- | ----------------- | +| `OPENAPI_BUNDLE` | OPENAPI_BUNDLE | +| `OPENAPI_OVERLAY` | OPENAPI_OVERLAY | \ No newline at end of file diff --git a/docs/models/shared/schemafile.md b/docs/models/shared/schemafile.md index 191f8610..84ddd4fc 100644 --- a/docs/models/shared/schemafile.md +++ b/docs/models/shared/schemafile.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | | `content` | *Union[bytes, IO[bytes], io.BufferedReader]* | :heavy_check_mark: | N/A | -| `file_name` | *str* | :heavy_check_mark: | N/A | -| `content_type` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `content_type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `file_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/schemastoreitem.md b/docs/models/shared/schemastoreitem.md new file mode 100644 index 00000000..fff9b621 --- /dev/null +++ b/docs/models/shared/schemastoreitem.md @@ -0,0 +1,13 @@ +# SchemaStoreItem + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `format_` | [shared.Format](../../models/shared/format_.md) | :heavy_check_mark: | N/A | +| `id` | *str* | :heavy_check_mark: | N/A | +| `package_name` | *str* | :heavy_check_mark: | N/A | +| `sdk_classname` | *str* | :heavy_check_mark: | N/A | +| `spec` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/suggestoptsold.md b/docs/models/shared/suggestoptsold.md index d8bfb10a..5e277ebd 100644 --- a/docs/models/shared/suggestoptsold.md +++ b/docs/models/shared/suggestoptsold.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `suggestion_type` | [shared.SuggestionType](../../models/shared/suggestiontype.md) | :heavy_check_mark: | N/A | -| `diagnostics` | List[[shared.Diagnostic](../../models/shared/diagnostic.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `diagnostics` | List[[shared.Diagnostic](../../models/shared/diagnostic.md)] | :heavy_minus_sign: | N/A | +| `suggestion_type` | [shared.SuggestionType](../../models/shared/suggestiontype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/targetresource.md b/docs/models/shared/targetresource.md new file mode 100644 index 00000000..141e2977 --- /dev/null +++ b/docs/models/shared/targetresource.md @@ -0,0 +1,8 @@ +# TargetResource + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `DOCUMENT` | document | \ No newline at end of file diff --git a/docs/models/shared/targetsdk.md b/docs/models/shared/targetsdk.md index 4cf23d17..5d98c0f2 100644 --- a/docs/models/shared/targetsdk.md +++ b/docs/models/shared/targetsdk.md @@ -5,23 +5,19 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `generate_gen_lock_id` | *str* | :heavy_check_mark: | gen.lock ID (expected to be a uuid). The same as `id`. A unique identifier for the target. | -| `generate_target` | *str* | :heavy_check_mark: | eg `typescript`, `terraform`, `python` | -| `id` | *str* | :heavy_check_mark: | Unique identifier of the target the same as `generate_gen_lock_id` | -| `last_event_created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Timestamp when the event was created in the database. | -| `last_event_id` | *str* | :heavy_check_mark: | Unique identifier of the last event for the target | -| `last_event_interaction_type` | [shared.InteractionType](../../models/shared/interactiontype.md) | :heavy_check_mark: | Type of interaction. | | `commit_head` | *Optional[str]* | :heavy_minus_sign: | Remote commit ID. | | `continuous_integration_environment` | *Optional[str]* | :heavy_minus_sign: | Name of the CI environment. | | `error` | *Optional[str]* | :heavy_minus_sign: | Error message if the last event was not successful. | | `generate_config_post_version` | *Optional[str]* | :heavy_minus_sign: | Version of the generated target (post generation) | | `generate_eligible_features` | *Optional[str]* | :heavy_minus_sign: | Eligible feature set during generation | +| `generate_gen_lock_id` | *str* | :heavy_check_mark: | gen.lock ID (expected to be a uuid). The same as `id`. A unique identifier for the target. | | `generate_gen_lock_pre_features` | *Optional[str]* | :heavy_minus_sign: | Features prior to generation | | `generate_gen_lock_pre_version` | *Optional[str]* | :heavy_minus_sign: | Artifact version for the Previous Generation | | `generate_number_of_operations_ignored` | *Optional[int]* | :heavy_minus_sign: | The number of operations ignored in generation. | | `generate_number_of_operations_used` | *Optional[int]* | :heavy_minus_sign: | The number of operations used in generation. | | `generate_number_of_terraform_resources` | *Optional[int]* | :heavy_minus_sign: | The number of terraform resources used in generation. | | `generate_published` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the target was considered published. | +| `generate_target` | *str* | :heavy_check_mark: | eg `typescript`, `terraform`, `python` | | `generate_target_name` | *Optional[str]* | :heavy_minus_sign: | The workflow name of the target. | | `generate_target_version` | *Optional[str]* | :heavy_minus_sign: | The version of the Speakeasy generator for this target eg v2 of the typescript generator. | | `gh_action_organization` | *Optional[str]* | :heavy_minus_sign: | GitHub organization of the action. | @@ -35,6 +31,10 @@ | `git_user_email` | *Optional[str]* | :heavy_minus_sign: | User email from git configuration. | | `git_user_name` | *Optional[str]* | :heavy_minus_sign: | User's name from git configuration. (not GitHub username) | | `hostname` | *Optional[str]* | :heavy_minus_sign: | Remote hostname. | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the target the same as `generate_gen_lock_id` | +| `last_event_created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Timestamp when the event was created in the database. | +| `last_event_id` | *str* | :heavy_check_mark: | Unique identifier of the last event for the target | +| `last_event_interaction_type` | [shared.InteractionType](../../models/shared/interactiontype.md) | :heavy_check_mark: | Type of interaction. | | `last_publish_created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Timestamp when the last publishing event was created. | | `last_publish_gh_action_run_link` | *Optional[str]* | :heavy_minus_sign: | Link to the GitHub action run for the last publishing event. | | `publish_package_name` | *Optional[str]* | :heavy_minus_sign: | Name of the published package. | diff --git a/docs/models/shared/usagesnippet.md b/docs/models/shared/usagesnippet.md index 0a27546a..75050fa9 100644 --- a/docs/models/shared/usagesnippet.md +++ b/docs/models/shared/usagesnippet.md @@ -7,4 +7,6 @@ | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | | `code` | *str* | :heavy_check_mark: | The code snippet | | `language` | *str* | :heavy_check_mark: | The language of the snippet | -| `operation_id` | *str* | :heavy_check_mark: | The operation ID for the snippet | \ No newline at end of file +| `method` | *Any* | :heavy_check_mark: | The HTTP method of the operation | +| `operation_id` | *str* | :heavy_check_mark: | The operation ID for the snippet | +| `path` | *str* | :heavy_check_mark: | The path of the operation | \ No newline at end of file diff --git a/docs/models/shared/user.md b/docs/models/shared/user.md index cabf4853..03ae5905 100644 --- a/docs/models/shared/user.md +++ b/docs/models/shared/user.md @@ -3,19 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `admin` | *bool* | :heavy_check_mark: | Indicates whether the user is an admin. | -| `confirmed` | *bool* | :heavy_check_mark: | Indicates whether the user has been confirmed. | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Timestamp of the user's creation. | -| `display_name` | *str* | :heavy_check_mark: | Display name of the user. | -| `email` | *str* | :heavy_check_mark: | Email address of the user. | -| `email_verified` | *bool* | :heavy_check_mark: | Indicates whether the email address has been verified. | -| `id` | *str* | :heavy_check_mark: | Unique identifier for the user. | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Timestamp of the user's last update. | -| `whitelisted` | *bool* | :heavy_check_mark: | Indicates whether the user has been whitelisted. | -| `default_workspace_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Identifier of the default workspace. | -| `github_handle` | *OptionalNullable[str]* | :heavy_minus_sign: | GitHub handle of the user. | -| `internal` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the user is internal. | -| `last_login_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Timestamp of the last login. | -| `photo_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL of the user's photo. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `admin` | *bool* | :heavy_check_mark: | Indicates whether the user is an admin. | +| `confirmed` | *bool* | :heavy_check_mark: | Indicates whether the user has been confirmed. | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Timestamp of the user's creation. | +| `default_workspace_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Identifier of the default workspace. | +| `display_name` | *str* | :heavy_check_mark: | Display name of the user. | +| `email` | *str* | :heavy_check_mark: | Email address of the user. | +| `email_verified` | *bool* | :heavy_check_mark: | Indicates whether the email address has been verified. | +| `github_handle` | *OptionalNullable[str]* | :heavy_minus_sign: | GitHub handle of the user. | +| `has_created_api_key` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the user has created an API key. Not always populated | +| `id` | *str* | :heavy_check_mark: | Unique identifier for the user. | +| `internal` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the user is internal. | +| `last_login_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Timestamp of the last login. | +| `photo_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL of the user's photo. | +| `pylon_identity_hash` | *Optional[str]* | :heavy_minus_sign: | Hash used for pylon identity verification returned on v1/user. | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Timestamp of the user's last update. | +| `whitelisted` | *bool* | :heavy_check_mark: | Indicates whether the user has been whitelisted. | \ No newline at end of file diff --git a/docs/models/shared/workflowdocument.md b/docs/models/shared/workflowdocument.md index 63821968..58058c56 100644 --- a/docs/models/shared/workflowdocument.md +++ b/docs/models/shared/workflowdocument.md @@ -7,5 +7,5 @@ A document referenced by a workflow | Field | Type | Required | Description | | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `location` | *str* | :heavy_check_mark: | N/A | -| `auth` | [Optional[shared.Auth]](../../models/shared/auth.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `auth` | [Optional[shared.Auth]](../../models/shared/auth.md) | :heavy_minus_sign: | N/A | +| `location` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspace.md b/docs/models/shared/workspace.md index e01ffd06..7b62b927 100644 --- a/docs/models/shared/workspace.md +++ b/docs/models/shared/workspace.md @@ -9,10 +9,10 @@ A speakeasy workspace | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | +| `inactive` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | | `organization_id` | *str* | :heavy_check_mark: | N/A | | `slug` | *str* | :heavy_check_mark: | N/A | +| ~~`telemetry_disabled`~~ | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use organization.telemetry_disabled instead. | | `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `verified` | *bool* | :heavy_check_mark: | N/A | -| `inactive` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| ~~`telemetry_disabled`~~ | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use organization.telemetry_disabled instead. | \ No newline at end of file +| `verified` | *bool* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspacefeatureflag.md b/docs/models/shared/workspacefeatureflag.md new file mode 100644 index 00000000..07aa4139 --- /dev/null +++ b/docs/models/shared/workspacefeatureflag.md @@ -0,0 +1,13 @@ +# WorkspaceFeatureFlag + +enum value workspace feature flag + + +## Values + +| Name | Value | +| ---------------------- | ---------------------- | +| `SCHEMA_REGISTRY` | schema_registry | +| `CHANGES_REPORT` | changes_report | +| `SKIP_SCHEMA_REGISTRY` | skip_schema_registry | +| `WEBHOOKS` | webhooks | \ No newline at end of file diff --git a/docs/models/shared/workspacefeatureflagrequest.md b/docs/models/shared/workspacefeatureflagrequest.md new file mode 100644 index 00000000..0aaee5d1 --- /dev/null +++ b/docs/models/shared/workspacefeatureflagrequest.md @@ -0,0 +1,10 @@ +# WorkspaceFeatureFlagRequest + +A request to add workspace feature flags + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `feature_flags` | List[[shared.WorkspaceFeatureFlag](../../models/shared/workspacefeatureflag.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspaceinviteresponse.md b/docs/models/shared/workspaceinviteresponse.md index d02b291d..596622e1 100644 --- a/docs/models/shared/workspaceinviteresponse.md +++ b/docs/models/shared/workspaceinviteresponse.md @@ -7,5 +7,5 @@ A response for workspace user invite | Field | Type | Required | Description | | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `relationship` | [shared.Relationship](../../models/shared/relationship.md) | :heavy_check_mark: | N/A | -| `invite_link` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `invite_link` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `relationship` | [shared.Relationship](../../models/shared/relationship.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspaceteamresponse.md b/docs/models/shared/workspaceteamresponse.md index 2cdab461..a6005c29 100644 --- a/docs/models/shared/workspaceteamresponse.md +++ b/docs/models/shared/workspaceteamresponse.md @@ -7,5 +7,5 @@ Workspace team response | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `users` | List[[shared.User](../../models/shared/user.md)] | :heavy_check_mark: | N/A | -| `sso_metadata` | [Optional[shared.SSOMetadata]](../../models/shared/ssometadata.md) | :heavy_minus_sign: | SSO metadata for a workspace | \ No newline at end of file +| `sso_metadata` | [Optional[shared.SSOMetadata]](../../models/shared/ssometadata.md) | :heavy_minus_sign: | SSO metadata for a workspace | +| `users` | List[[shared.User](../../models/shared/user.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspacetoken.md b/docs/models/shared/workspacetoken.md index 3bf1169a..0d3ca4cd 100644 --- a/docs/models/shared/workspacetoken.md +++ b/docs/models/shared/workspacetoken.md @@ -9,10 +9,12 @@ A workspace token | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `alg` | *str* | :heavy_check_mark: | N/A | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `created_by` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `created_by_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `created_by_photo_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | | `key` | *str* | :heavy_check_mark: | N/A | +| `last_used` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | -| `workspace_id` | *str* | :heavy_check_mark: | N/A | -| `created_by` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `last_used` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `workspace_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/artifacts/README.md b/docs/sdks/artifacts/README.md index b17d049a..0d8ea1ef 100644 --- a/docs/sdks/artifacts/README.md +++ b/docs/sdks/artifacts/README.md @@ -16,6 +16,7 @@ REST APIs for working with Registry artifacts * [list_remote_sources](#list_remote_sources) - Get remote sources attached to a particular namespace * [post_tags](#post_tags) - Add tags to an existing revision * [preflight](#preflight) - Get access token for communicating with OCI distribution endpoints +* [set_archived](#set_archived) - Set whether a namespace is archived * [set_visibility](#set_visibility) - Set visibility of a namespace with an existing metadata entry ## create_remote_source @@ -28,6 +29,7 @@ Configure a new remote source from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -71,6 +73,7 @@ Get blob for a particular digest from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -119,6 +122,7 @@ Get manifest for a particular reference from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -167,6 +171,7 @@ Each namespace contains many revisions. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -207,6 +212,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -250,6 +256,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -295,6 +302,7 @@ Get remote sources attached to a particular namespace from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -340,6 +348,7 @@ Add tags to an existing revision from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -385,6 +394,7 @@ Get access token for communicating with OCI distribution endpoints from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -418,6 +428,52 @@ with Speakeasy( | errors.Error | 4XX | application/json | | errors.SDKError | 5XX | \*/\* | +## set_archived + +Set whether a namespace is archived + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.artifacts.set_archived(request={ + "namespace_name": "", + }) + + assert res is not None + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `request` | [operations.ArchiveNamespaceRequest](../../models/operations/archivenamespacerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.ArchiveNamespaceResponse](../../models/operations/archivenamespaceresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | + ## set_visibility Set visibility of a namespace with an existing metadata entry @@ -428,6 +484,7 @@ Set visibility of a namespace with an existing metadata entry from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", diff --git a/docs/sdks/auth/README.md b/docs/sdks/auth/README.md index 412f0549..99bd5073 100644 --- a/docs/sdks/auth/README.md +++ b/docs/sdks/auth/README.md @@ -22,6 +22,7 @@ Checks if generation is permitted for a particular run of the CLI from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -63,6 +64,7 @@ Get or refresh an access token for the current workspace. ```python from speakeasy_client_sdk_python import Speakeasy + with Speakeasy() as speakeasy: res = speakeasy.auth.get_access_token(request={ @@ -104,6 +106,7 @@ Get information about the current user. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -146,6 +149,7 @@ Validate the current api key. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", diff --git a/docs/sdks/codesamples/README.md b/docs/sdks/codesamples/README.md index 66acddb0..ac63c8aa 100644 --- a/docs/sdks/codesamples/README.md +++ b/docs/sdks/codesamples/README.md @@ -9,7 +9,7 @@ REST APIs for retrieving Code Samples * [generate_code_sample_preview](#generate_code_sample_preview) - Generate Code Sample previews from a file and configuration parameters. * [generate_code_sample_preview_asynchronous](#generate_code_sample_preview_asynchronous) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling. -* [get](#get) - Retrieve usage snippets from document stored in the registry +* [get](#get) - Retrieve usage snippets * [get_code_sample_preview_async](#get_code_sample_preview_async) - Poll for the result of an asynchronous Code Sample preview generation. ## generate_code_sample_preview @@ -22,6 +22,7 @@ This endpoint generates Code Sample previews from a file and configuration param from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -29,20 +30,17 @@ with Speakeasy( ) as speakeasy: res = speakeasy.code_samples.generate_code_sample_preview(request={ - "languages": [ - "", - "", - ], + "language": "", "schema_file": { "content": open("example.file", "rb"), "file_name": "example.file", }, }) - assert res.two_hundred_application_json_response_stream is not None + assert res.usage_snippets is not None # Handle response - print(res.two_hundred_application_json_response_stream) + print(res.usage_snippets) ``` @@ -61,7 +59,8 @@ with Speakeasy( | Error Type | Status Code | Content Type | | ---------------- | ---------------- | ---------------- | -| errors.Error | 4XX, 5XX | application/json | +| errors.Error | 4XX | application/json | +| errors.Error | 5XX | application/json | ## generate_code_sample_preview_asynchronous @@ -73,6 +72,7 @@ This endpoint generates Code Sample previews from a file and configuration param from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -80,10 +80,7 @@ with Speakeasy( ) as speakeasy: res = speakeasy.code_samples.generate_code_sample_preview_asynchronous(request={ - "languages": [ - "", - "", - ], + "language": "", "schema_file": { "content": open("example.file", "rb"), "file_name": "example.file", @@ -112,11 +109,12 @@ with Speakeasy( | Error Type | Status Code | Content Type | | ---------------- | ---------------- | ---------------- | -| errors.Error | 4XX, 5XX | application/json | +| errors.Error | 4XX | application/json | +| errors.Error | 5XX | application/json | ## get -Retrieve usage snippets from document stored in the registry. Supports filtering by language and operation ID. +Retrieve usage snippets from an OpenAPI document stored in the registry. Supports filtering by language and operation ID. ### Example Usage @@ -124,6 +122,7 @@ Retrieve usage snippets from document stored in the registry. Supports filtering from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -131,7 +130,20 @@ with Speakeasy( ) as speakeasy: res = speakeasy.code_samples.get(request={ - "registry_url": "https://normal-making.name", + "registry_url": "https://spec.speakeasy.com/my-org/my-workspace/my-source", + "operation_ids": [ + "getPets", + ], + "method_paths": [ + { + "method": shared.HTTPMethod.GET, + "path": "/pets", + }, + ], + "languages": [ + "python", + "javascript", + ], }) assert res.usage_snippets is not None @@ -169,6 +181,7 @@ Poll for the result of an asynchronous Code Sample preview generation. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -179,10 +192,10 @@ with Speakeasy( "job_id": "", }) - assert res.two_hundred_application_json_response_stream is not None + assert res.object is not None # Handle response - print(res.two_hundred_application_json_response_stream) + print(res.object) ``` @@ -201,4 +214,5 @@ with Speakeasy( | Error Type | Status Code | Content Type | | ---------------- | ---------------- | ---------------- | -| errors.Error | 4XX, 5XX | application/json | \ No newline at end of file +| errors.Error | 4XX | application/json | +| errors.Error | 5XX | application/json | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 854feca6..92c2b446 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -23,6 +23,7 @@ Load recent events for a particular workspace from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -30,8 +31,8 @@ with Speakeasy( ) as speakeasy: res = speakeasy.events.get_events_by_target(request={ - "target_id": "", "workspace_id": "", + "target_id": "", }) assert res.cli_event_batch is not None @@ -69,6 +70,7 @@ Load targets for a particular workspace from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -112,6 +114,7 @@ Load targets for a particular workspace from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -154,9 +157,10 @@ Sends an array of events to be stored for a particular workspace. ### Example Usage ```python -import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared +from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -165,20 +169,20 @@ with Speakeasy( ) as speakeasy: res = speakeasy.events.post(request={ + "workspace_id": "", "request_body": [ { - "created_at": dateutil.parser.isoparse("2025-03-02T10:07:28.113Z"), + "created_at": parse_datetime("2025-03-02T10:07:28.113Z"), "execution_id": "", "id": "", "interaction_type": shared.InteractionType.AUTHENTICATE, - "local_started_at": dateutil.parser.isoparse("2025-08-12T17:54:17.538Z"), + "local_started_at": parse_datetime("2025-08-12T17:54:17.538Z"), "speakeasy_api_key_name": "", "speakeasy_version": "", "success": True, "workspace_id": "", }, ], - "workspace_id": "", }) assert res is not None @@ -216,6 +220,7 @@ Search events for a particular workspace by any field from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", diff --git a/docs/sdks/github/README.md b/docs/sdks/github/README.md index 814b08d6..c94b9d88 100644 --- a/docs/sdks/github/README.md +++ b/docs/sdks/github/README.md @@ -27,6 +27,7 @@ REST APIs for managing the github integration from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -71,6 +72,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -116,6 +118,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -159,6 +162,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -204,6 +208,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -252,6 +257,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -296,6 +302,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -340,6 +347,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -385,6 +393,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -426,6 +435,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -469,6 +479,7 @@ with Speakeasy( from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index f32a8515..d403ba61 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -8,9 +8,12 @@ REST APIs for managing Organizations (speakeasy L1 Tenancy construct) ### Available Operations * [create](#create) - Create an organization +* [create_billing_add_ons](#create_billing_add_ons) - Create billing add ons * [create_free_trial](#create_free_trial) - Create a free trial for an organization +* [delete_billing_add_on](#delete_billing_add_on) - Delete billing add ons * [get](#get) - Get organization * [get_all](#get_all) - Get organizations for a user +* [get_billing_add_ons](#get_billing_add_ons) - Get billing add ons * [get_usage](#get_usage) - Get billing usage summary for a particular organization ## create @@ -20,9 +23,10 @@ Creates an organization ### Example Usage ```python -import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared +from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -32,13 +36,13 @@ with Speakeasy( res = speakeasy.organizations.create(request={ "account_type": shared.AccountType.SCALE_UP, - "created_at": dateutil.parser.isoparse("2024-11-30T17:06:07.804Z"), + "created_at": parse_datetime("2024-11-30T17:06:07.804Z"), "id": "", "name": "", "slug": "", "sso_activated": True, "telemetry_disabled": True, - "updated_at": dateutil.parser.isoparse("2023-03-17T15:39:20.911Z"), + "updated_at": parse_datetime("2023-03-17T15:39:20.911Z"), }) assert res.organization is not None @@ -66,6 +70,56 @@ with Speakeasy( | errors.Error | 4XX | application/json | | errors.SDKError | 5XX | \*/\* | +## create_billing_add_ons + +Create billing add ons + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.organizations.create_billing_add_ons(request={ + "add_ons": [ + shared.BillingAddOn.CUSTOM_CODE_REGIONS, + shared.BillingAddOn.CUSTOM_CODE_REGIONS, + shared.BillingAddOn.SDK_TESTING, + ], + }) + + assert res.organization_billing_add_on_response is not None + + # Handle response + print(res.organization_billing_add_on_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `request` | [shared.OrganizationBillingAddOnRequest](../../models/shared/organizationbillingaddonrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.CreateBillingAddOnsResponse](../../models/operations/createbillingaddonsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 5XX | application/json | +| errors.SDKError | 4XX | \*/\* | + ## create_free_trial Creates a free trial for an organization @@ -76,6 +130,7 @@ Creates a free trial for an organization from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -108,6 +163,52 @@ with Speakeasy( | errors.Error | 4XX | application/json | | errors.SDKError | 5XX | \*/\* | +## delete_billing_add_on + +Delete billing add ons + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.organizations.delete_billing_add_on(request={ + "add_on": shared.BillingAddOn.SNIPPET_AI, + }) + + assert res is not None + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `request` | [operations.DeleteBillingAddOnRequest](../../models/operations/deletebillingaddonrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.DeleteBillingAddOnResponse](../../models/operations/deletebillingaddonresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 5XX | application/json | +| errors.SDKError | 4XX | \*/\* | + ## get Get information about a particular organization. @@ -118,6 +219,7 @@ Get information about a particular organization. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -163,6 +265,7 @@ Returns a list of organizations a user has access too from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -195,6 +298,49 @@ with Speakeasy( | errors.Error | 4XX | application/json | | errors.SDKError | 5XX | \*/\* | +## get_billing_add_ons + +Get billing add ons + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.organizations.get_billing_add_ons() + + assert res.organization_billing_add_on_response is not None + + # Handle response + print(res.organization_billing_add_on_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.GetBillingAddOnsResponse](../../models/operations/getbillingaddonsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 5XX | application/json | +| errors.SDKError | 4XX | \*/\* | + ## get_usage Returns a billing usage summary by target languages for a particular organization @@ -205,6 +351,7 @@ Returns a billing usage summary by target languages for a particular organizatio from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", diff --git a/docs/sdks/publishingtokens/README.md b/docs/sdks/publishingtokens/README.md new file mode 100644 index 00000000..b75b2b27 --- /dev/null +++ b/docs/sdks/publishingtokens/README.md @@ -0,0 +1,331 @@ +# PublishingTokens +(*publishing_tokens*) + +## Overview + +### Available Operations + +* [create](#create) - Create a publishing token for a workspace +* [delete](#delete) - Delete a specific publishing token +* [get](#get) - Get a specific publishing token +* [list](#list) - Get publishing tokens for a workspace +* [resolve_metadata](#resolve_metadata) - Get metadata about the token +* [resolve_target](#resolve_target) - Get a specific publishing token target +* [update](#update) - Updates the validitity period of a publishing token + +## create + +Creates a publishing token for the current workspace + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.publishing_tokens.create() + + assert res.publishing_token is not None + + # Handle response + print(res.publishing_token) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `request` | [operations.CreatePublishingTokenRequestBody](../../models/operations/createpublishingtokenrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.CreatePublishingTokenResponse](../../models/operations/createpublishingtokenresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | + +## delete + +Delete a particular publishing token. + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.publishing_tokens.delete(request={ + "token_id": "", + }) + + assert res is not None + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `request` | [operations.DeletePublishingTokenRequest](../../models/operations/deletepublishingtokenrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.DeletePublishingTokenResponse](../../models/operations/deletepublishingtokenresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | + +## get + +Get information about a particular publishing token. + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.publishing_tokens.get(request={ + "token_id": "", + }) + + assert res.publishing_token is not None + + # Handle response + print(res.publishing_token) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `request` | [operations.GetPublishingTokenByIDRequest](../../models/operations/getpublishingtokenbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.GetPublishingTokenByIDResponse](../../models/operations/getpublishingtokenbyidresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | + +## list + +Returns a publishing token for the current workspace + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.publishing_tokens.list() + + assert res.classes is not None + + # Handle response + print(res.classes) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.GetPublishingTokenResponse](../../models/operations/getpublishingtokenresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | + +## resolve_metadata + +Get information about a particular publishing token. + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.publishing_tokens.resolve_metadata(request={ + "token_id": "", + }) + + assert res.object is not None + + # Handle response + print(res.object) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPublishingTokenPublicMetadataRequest](../../models/operations/getpublishingtokenpublicmetadatarequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.GetPublishingTokenPublicMetadataResponse](../../models/operations/getpublishingtokenpublicmetadataresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | + +## resolve_target + +Get information about a particular publishing token target. + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.publishing_tokens.resolve_target(request={ + "token_id": "", + }) + + assert res.res is not None + + # Handle response + print(res.res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `request` | [operations.GetPublishingTokenTargetByIDRequest](../../models/operations/getpublishingtokentargetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.GetPublishingTokenTargetByIDResponse](../../models/operations/getpublishingtokentargetbyidresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | + +## update + +Updates the validity period of a particular publishing token. + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.publishing_tokens.update(request={ + "token_id": "", + }) + + assert res is not None + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `request` | [operations.UpdatePublishingTokenExpirationRequest](../../models/operations/updatepublishingtokenexpirationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.UpdatePublishingTokenExpirationResponse](../../models/operations/updatepublishingtokenexpirationresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/reports/README.md b/docs/sdks/reports/README.md index 88413974..b344fd9a 100644 --- a/docs/sdks/reports/README.md +++ b/docs/sdks/reports/README.md @@ -21,6 +21,7 @@ Get the signed access url for the change reports for a particular document. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -65,6 +66,7 @@ Get the signed access url for the linting reports for a particular document. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -109,6 +111,7 @@ Upload a report. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", diff --git a/docs/sdks/schemastore/README.md b/docs/sdks/schemastore/README.md new file mode 100644 index 00000000..8aac8d52 --- /dev/null +++ b/docs/sdks/schemastore/README.md @@ -0,0 +1,102 @@ +# SchemaStore +(*schema_store*) + +## Overview + +### Available Operations + +* [create_schema_store_item](#create_schema_store_item) - Create a schema in the schema store +* [get_schema_store_item](#get_schema_store_item) - Get a OAS schema from the schema store + +## create_schema_store_item + +Create a schema in the schema store + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import operations, shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.schema_store.create_schema_store_item(request={ + "format_": operations.Format.YAML, + "package_name": "", + "sdk_classname": "", + "spec": "", + }) + + assert res.schema_store_item is not None + + # Handle response + print(res.schema_store_item) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `request` | [operations.CreateSchemaStoreItemRequestBody](../../models/operations/createschemastoreitemrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.CreateSchemaStoreItemResponse](../../models/operations/createschemastoreitemresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | + +## get_schema_store_item + +Get a OAS schema from the schema store + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.schema_store.get_schema_store_item() + + assert res.schema_store_item is not None + + # Handle response + print(res.schema_store_item) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `request` | [operations.GetSchemaStoreItemRequestBody](../../models/operations/getschemastoreitemrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.GetSchemaStoreItemResponse](../../models/operations/getschemastoreitemresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 4XX | application/json | +| errors.SDKError | 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/shorturls/README.md b/docs/sdks/shorturls/README.md index fca342c7..14fede9f 100644 --- a/docs/sdks/shorturls/README.md +++ b/docs/sdks/shorturls/README.md @@ -19,6 +19,7 @@ Shorten a URL. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", diff --git a/docs/sdks/subscriptions/README.md b/docs/sdks/subscriptions/README.md index 76f1ae08..da770715 100644 --- a/docs/sdks/subscriptions/README.md +++ b/docs/sdks/subscriptions/README.md @@ -20,6 +20,7 @@ Activate an ignored namespace for a subscription from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -66,6 +67,7 @@ Ignored a namespace for a subscription from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", diff --git a/docs/sdks/suggest/README.md b/docs/sdks/suggest/README.md index 16f1ec6c..3d547272 100644 --- a/docs/sdks/suggest/README.md +++ b/docs/sdks/suggest/README.md @@ -22,6 +22,7 @@ Get suggestions from an LLM model for improving an OpenAPI document. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -42,9 +43,7 @@ with Speakeasy( }, { "message": "", - "path": [ - "/rescue", - ], + "path": [], "type": "", }, ], @@ -107,6 +106,7 @@ Generate generic suggestions for a list of items. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -114,9 +114,7 @@ with Speakeasy( ) as speakeasy: res = speakeasy.suggest.suggest_items(request={ - "items": [ - "", - ], + "items": [], "prompt": "", }) @@ -154,6 +152,7 @@ Get suggestions from an LLM model for improving an OpenAPI document. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -204,6 +203,7 @@ Get suggestions from an LLM model for improving an OpenAPI document stored in th from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index cbe539b9..1705bf00 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -19,6 +19,7 @@ REST APIs for managing Workspaces (speakeasy tenancy) * [get_tokens](#get_tokens) - Get tokens for a particular workspace * [grant_access](#grant_access) - Grant a user access to a particular workspace * [revoke_access](#revoke_access) - Revoke a user's access to a particular workspace +* [set_feature_flags](#set_feature_flags) - Set workspace feature flags * [update](#update) - Update workspace details * [update_settings](#update_settings) - Update workspace settings @@ -29,9 +30,10 @@ Creates a workspace ### Example Usage ```python -import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared +from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -40,12 +42,12 @@ with Speakeasy( ) as speakeasy: res = speakeasy.workspaces.create(request={ - "created_at": dateutil.parser.isoparse("2024-06-17T07:14:55.338Z"), + "created_at": parse_datetime("2024-06-17T07:14:55.338Z"), "id": "", "name": "", "organization_id": "", "slug": "", - "updated_at": dateutil.parser.isoparse("2024-11-30T17:06:07.804Z"), + "updated_at": parse_datetime("2024-11-30T17:06:07.804Z"), "verified": True, }) @@ -81,9 +83,10 @@ Create a token for a particular workspace ### Example Usage ```python -import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared +from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -92,15 +95,15 @@ with Speakeasy( ) as speakeasy: res = speakeasy.workspaces.create_token(request={ + "workspace_id": "", "workspace_token": { "alg": "", - "created_at": dateutil.parser.isoparse("2023-08-16T02:33:00.784Z"), + "created_at": parse_datetime("2023-08-16T02:33:00.784Z"), "id": "", "key": "", "name": "", "workspace_id": "", }, - "workspace_id": "", }) assert res is not None @@ -138,6 +141,7 @@ Delete a token for a particular workspace from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -145,8 +149,8 @@ with Speakeasy( ) as speakeasy: res = speakeasy.workspaces.delete_token(request={ - "token_id": "", "workspace_id": "", + "token_id": "", }) assert res is not None @@ -184,6 +188,7 @@ Get information about a particular workspace by context. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -226,6 +231,7 @@ Returns a list of workspaces a user has access too from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -268,6 +274,7 @@ Get information about a particular workspace. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -313,6 +320,7 @@ Get workspace feature flags from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -358,6 +366,7 @@ Get settings about a particular workspace. from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -403,6 +412,7 @@ Get team members for a particular workspace from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -448,6 +458,7 @@ Get tokens for a particular workspace from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -493,6 +504,7 @@ Grant a user access to a particular workspace from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -500,8 +512,8 @@ with Speakeasy( ) as speakeasy: res = speakeasy.workspaces.grant_access(request={ - "email": "Lucinda.Batz8@hotmail.com", "workspace_id": "", + "email": "Lucinda.Batz8@hotmail.com", }) assert res.workspace_invite_response is not None @@ -539,6 +551,7 @@ Revoke a user's access to a particular workspace from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared + with Speakeasy( security=shared.Security( api_key="", @@ -546,8 +559,8 @@ with Speakeasy( ) as speakeasy: res = speakeasy.workspaces.revoke_access(request={ - "user_id": "", "workspace_id": "", + "user_id": "", }) assert res is not None @@ -575,6 +588,55 @@ with Speakeasy( | errors.Error | 4XX | application/json | | errors.SDKError | 5XX | \*/\* | +## set_feature_flags + +Set workspace feature flags + +### Example Usage + +```python +from speakeasy_client_sdk_python import Speakeasy +from speakeasy_client_sdk_python.models import shared + + +with Speakeasy( + security=shared.Security( + api_key="", + ), +) as speakeasy: + + res = speakeasy.workspaces.set_feature_flags(request={ + "feature_flags": [ + shared.WorkspaceFeatureFlag.SKIP_SCHEMA_REGISTRY, + shared.WorkspaceFeatureFlag.WEBHOOKS, + ], + }) + + assert res.workspace_feature_flag_response is not None + + # Handle response + print(res.workspace_feature_flag_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `request` | [shared.WorkspaceFeatureFlagRequest](../../models/shared/workspacefeatureflagrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.SetWorkspaceFeatureFlagsResponse](../../models/operations/setworkspacefeatureflagsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.Error | 5XX | application/json | +| errors.SDKError | 4XX | \*/\* | + ## update Update information about a particular workspace. @@ -582,9 +644,10 @@ Update information about a particular workspace. ### Example Usage ```python -import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared +from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -593,16 +656,16 @@ with Speakeasy( ) as speakeasy: res = speakeasy.workspaces.update(request={ + "workspace_id": "", "workspace": { - "created_at": dateutil.parser.isoparse("2025-07-28T19:04:48.565Z"), + "created_at": parse_datetime("2025-07-28T19:04:48.565Z"), "id": "", "name": "", "organization_id": "", "slug": "", - "updated_at": dateutil.parser.isoparse("2024-10-16T10:52:42.015Z"), + "updated_at": parse_datetime("2024-10-16T10:52:42.015Z"), "verified": True, }, - "workspace_id": "", }) assert res is not None @@ -637,9 +700,10 @@ Update settings about a particular workspace. ### Example Usage ```python -import dateutil.parser from speakeasy_client_sdk_python import Speakeasy from speakeasy_client_sdk_python.models import shared +from speakeasy_client_sdk_python.utils import parse_datetime + with Speakeasy( security=shared.Security( @@ -648,13 +712,13 @@ with Speakeasy( ) as speakeasy: res = speakeasy.workspaces.update_settings(request={ + "workspace_id": "", "workspace_settings": { - "created_at": dateutil.parser.isoparse("2023-07-05T11:43:28.305Z"), - "updated_at": dateutil.parser.isoparse("2024-05-14T05:39:21.874Z"), + "created_at": parse_datetime("2023-07-05T11:43:28.305Z"), + "updated_at": parse_datetime("2024-05-14T05:39:21.874Z"), "webhook_url": "https://grown-pharmacopoeia.net", "workspace_id": "", }, - "workspace_id": "", }) assert res is not None diff --git a/poetry.lock b/poetry.lock index c409f2e2..1f75bda8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.2 and should not be changed by hand. [[package]] name = "annotated-types" @@ -6,20 +6,19 @@ version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] -[package.dependencies] -typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} - [[package]] name = "anyio" version = "4.4.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "anyio-4.4.0-py3-none-any.whl", hash = "sha256:c1b2d8f46a8a812513012e1107cb0e68c17159a7a594208005a57dc776e1bdc7"}, {file = "anyio-4.4.0.tar.gz", hash = "sha256:5aadc6a1bbb7cdb0bede386cac5e2940f5e2ff3aa20277e991cf028e0585ce94"}, @@ -33,7 +32,7 @@ typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\""] trio = ["trio (>=0.23)"] [[package]] @@ -42,6 +41,7 @@ version = "3.2.2" description = "An abstract syntax tree for Python with inference support." optional = false python-versions = ">=3.8.0" +groups = ["dev"] files = [ {file = "astroid-3.2.2-py3-none-any.whl", hash = "sha256:e8a0083b4bb28fcffb6207a3bfc9e5d0a68be951dd7e336d5dcf639c682388c0"}, {file = "astroid-3.2.2.tar.gz", hash = "sha256:8ead48e31b92b2e217b6c9733a21afafe479d52d6e164dd25fb1a770c7c3cf94"}, @@ -56,6 +56,7 @@ version = "2024.7.4" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"}, {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, @@ -67,6 +68,8 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] +markers = "sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -78,6 +81,7 @@ version = "0.3.8" description = "serialize all of Python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "dill-0.3.8-py3-none-any.whl", hash = "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7"}, {file = "dill-0.3.8.tar.gz", hash = "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca"}, @@ -87,26 +91,14 @@ files = [ graph = ["objgraph (>=1.7.2)"] profile = ["gprof2dot (>=2022.7.29)"] -[[package]] -name = "eval-type-backport" -version = "0.2.0" -description = "Like `typing._eval_type`, but lets older Python versions use newer typing features." -optional = false -python-versions = ">=3.8" -files = [ - {file = "eval_type_backport-0.2.0-py3-none-any.whl", hash = "sha256:ac2f73d30d40c5a30a80b8739a789d6bb5e49fdffa66d7912667e2015d9c9933"}, - {file = "eval_type_backport-0.2.0.tar.gz", hash = "sha256:68796cfbc7371ebf923f03bdf7bef415f3ec098aeced24e054b253a0e78f7b37"}, -] - -[package.extras] -tests = ["pytest"] - [[package]] name = "exceptiongroup" version = "1.2.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, @@ -121,6 +113,7 @@ version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, @@ -132,6 +125,7 @@ version = "1.0.5" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"}, {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"}, @@ -153,6 +147,7 @@ version = "0.28.1" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, @@ -165,7 +160,7 @@ httpcore = "==1.*" idna = "*" [package.extras] -brotli = ["brotli", "brotlicffi"] +brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] @@ -177,6 +172,7 @@ version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" +groups = ["main"] files = [ {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, @@ -188,6 +184,7 @@ version = "5.13.2" description = "A Python utility / library to sort Python imports." optional = false python-versions = ">=3.8.0" +groups = ["dev"] files = [ {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, @@ -196,23 +193,13 @@ files = [ [package.extras] colors = ["colorama (>=0.4.6)"] -[[package]] -name = "jsonpath-python" -version = "1.0.6" -description = "A more powerful JSONPath implementation in modern python" -optional = false -python-versions = ">=3.6" -files = [ - {file = "jsonpath-python-1.0.6.tar.gz", hash = "sha256:dd5be4a72d8a2995c3f583cf82bf3cd1a9544cfdabf2d22595b67aff07349666"}, - {file = "jsonpath_python-1.0.6-py3-none-any.whl", hash = "sha256:1e3b78df579f5efc23565293612decee04214609208a2335884b3ee3f786b575"}, -] - [[package]] name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, @@ -220,49 +207,50 @@ files = [ [[package]] name = "mypy" -version = "1.13.0" +version = "1.15.0" description = "Optional static typing for Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" +groups = ["dev"] files = [ - {file = "mypy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6607e0f1dd1fb7f0aca14d936d13fd19eba5e17e1cd2a14f808fa5f8f6d8f60a"}, - {file = "mypy-1.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8a21be69bd26fa81b1f80a61ee7ab05b076c674d9b18fb56239d72e21d9f4c80"}, - {file = "mypy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b2353a44d2179846a096e25691d54d59904559f4232519d420d64da6828a3a7"}, - {file = "mypy-1.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0730d1c6a2739d4511dc4253f8274cdd140c55c32dfb0a4cf8b7a43f40abfa6f"}, - {file = "mypy-1.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c5fc54dbb712ff5e5a0fca797e6e0aa25726c7e72c6a5850cfd2adbc1eb0a372"}, - {file = "mypy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d"}, - {file = "mypy-1.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d"}, - {file = "mypy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b"}, - {file = "mypy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73"}, - {file = "mypy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca"}, - {file = "mypy-1.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5"}, - {file = "mypy-1.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e"}, - {file = "mypy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2"}, - {file = "mypy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0"}, - {file = "mypy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2"}, - {file = "mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7"}, - {file = "mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62"}, - {file = "mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8"}, - {file = "mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7"}, - {file = "mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc"}, - {file = "mypy-1.13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:100fac22ce82925f676a734af0db922ecfea991e1d7ec0ceb1e115ebe501301a"}, - {file = "mypy-1.13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bcb0bb7f42a978bb323a7c88f1081d1b5dee77ca86f4100735a6f541299d8fb"}, - {file = "mypy-1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bde31fc887c213e223bbfc34328070996061b0833b0a4cfec53745ed61f3519b"}, - {file = "mypy-1.13.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:07de989f89786f62b937851295ed62e51774722e5444a27cecca993fc3f9cd74"}, - {file = "mypy-1.13.0-cp38-cp38-win_amd64.whl", hash = "sha256:4bde84334fbe19bad704b3f5b78c4abd35ff1026f8ba72b29de70dda0916beb6"}, - {file = "mypy-1.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0246bcb1b5de7f08f2826451abd947bf656945209b140d16ed317f65a17dc7dc"}, - {file = "mypy-1.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f5b7deae912cf8b77e990b9280f170381fdfbddf61b4ef80927edd813163732"}, - {file = "mypy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7029881ec6ffb8bc233a4fa364736789582c738217b133f1b55967115288a2bc"}, - {file = "mypy-1.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3e38b980e5681f28f033f3be86b099a247b13c491f14bb8b1e1e134d23bb599d"}, - {file = "mypy-1.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:a6789be98a2017c912ae6ccb77ea553bbaf13d27605d2ca20a76dfbced631b24"}, - {file = "mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a"}, - {file = "mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e"}, + {file = "mypy-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:979e4e1a006511dacf628e36fadfecbcc0160a8af6ca7dad2f5025529e082c13"}, + {file = "mypy-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c4bb0e1bd29f7d34efcccd71cf733580191e9a264a2202b0239da95984c5b559"}, + {file = "mypy-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be68172e9fd9ad8fb876c6389f16d1c1b5f100ffa779f77b1fb2176fcc9ab95b"}, + {file = "mypy-1.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c7be1e46525adfa0d97681432ee9fcd61a3964c2446795714699a998d193f1a3"}, + {file = "mypy-1.15.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:2e2c2e6d3593f6451b18588848e66260ff62ccca522dd231cd4dd59b0160668b"}, + {file = "mypy-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:6983aae8b2f653e098edb77f893f7b6aca69f6cffb19b2cc7443f23cce5f4828"}, + {file = "mypy-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2922d42e16d6de288022e5ca321cd0618b238cfc5570e0263e5ba0a77dbef56f"}, + {file = "mypy-1.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2ee2d57e01a7c35de00f4634ba1bbf015185b219e4dc5909e281016df43f5ee5"}, + {file = "mypy-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:973500e0774b85d9689715feeffcc980193086551110fd678ebe1f4342fb7c5e"}, + {file = "mypy-1.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a95fb17c13e29d2d5195869262f8125dfdb5c134dc8d9a9d0aecf7525b10c2c"}, + {file = "mypy-1.15.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1905f494bfd7d85a23a88c5d97840888a7bd516545fc5aaedff0267e0bb54e2f"}, + {file = "mypy-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:c9817fa23833ff189db061e6d2eff49b2f3b6ed9856b4a0a73046e41932d744f"}, + {file = "mypy-1.15.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:aea39e0583d05124836ea645f412e88a5c7d0fd77a6d694b60d9b6b2d9f184fd"}, + {file = "mypy-1.15.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2f2147ab812b75e5b5499b01ade1f4a81489a147c01585cda36019102538615f"}, + {file = "mypy-1.15.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ce436f4c6d218a070048ed6a44c0bbb10cd2cc5e272b29e7845f6a2f57ee4464"}, + {file = "mypy-1.15.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8023ff13985661b50a5928fc7a5ca15f3d1affb41e5f0a9952cb68ef090b31ee"}, + {file = "mypy-1.15.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1124a18bc11a6a62887e3e137f37f53fbae476dc36c185d549d4f837a2a6a14e"}, + {file = "mypy-1.15.0-cp312-cp312-win_amd64.whl", hash = "sha256:171a9ca9a40cd1843abeca0e405bc1940cd9b305eaeea2dda769ba096932bb22"}, + {file = "mypy-1.15.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:93faf3fdb04768d44bf28693293f3904bbb555d076b781ad2530214ee53e3445"}, + {file = "mypy-1.15.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:811aeccadfb730024c5d3e326b2fbe9249bb7413553f15499a4050f7c30e801d"}, + {file = "mypy-1.15.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:98b7b9b9aedb65fe628c62a6dc57f6d5088ef2dfca37903a7d9ee374d03acca5"}, + {file = "mypy-1.15.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c43a7682e24b4f576d93072216bf56eeff70d9140241f9edec0c104d0c515036"}, + {file = "mypy-1.15.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:baefc32840a9f00babd83251560e0ae1573e2f9d1b067719479bfb0e987c6357"}, + {file = "mypy-1.15.0-cp313-cp313-win_amd64.whl", hash = "sha256:b9378e2c00146c44793c98b8d5a61039a048e31f429fb0eb546d93f4b000bedf"}, + {file = "mypy-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e601a7fa172c2131bff456bb3ee08a88360760d0d2f8cbd7a75a65497e2df078"}, + {file = "mypy-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:712e962a6357634fef20412699a3655c610110e01cdaa6180acec7fc9f8513ba"}, + {file = "mypy-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95579473af29ab73a10bada2f9722856792a36ec5af5399b653aa28360290a5"}, + {file = "mypy-1.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8f8722560a14cde92fdb1e31597760dc35f9f5524cce17836c0d22841830fd5b"}, + {file = "mypy-1.15.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1fbb8da62dc352133d7d7ca90ed2fb0e9d42bb1a32724c287d3c76c58cbaa9c2"}, + {file = "mypy-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:d10d994b41fb3497719bbf866f227b3489048ea4bbbb5015357db306249f7980"}, + {file = "mypy-1.15.0-py3-none-any.whl", hash = "sha256:5469affef548bd1895d86d3bf10ce2b44e33d86923c29e4d675b3e323437ea3e"}, + {file = "mypy-1.15.0.tar.gz", hash = "sha256:404534629d51d3efea5c800ee7c42b72a6554d6c400e6a79eafe15d11341fd43"}, ] [package.dependencies] -mypy-extensions = ">=1.0.0" +mypy_extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=4.6.0" +typing_extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] @@ -277,6 +265,7 @@ version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, @@ -288,6 +277,7 @@ version = "4.2.2" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, @@ -300,131 +290,133 @@ type = ["mypy (>=1.8)"] [[package]] name = "pydantic" -version = "2.10.4" +version = "2.11.3" description = "Data validation using Python type hints" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" +groups = ["main"] files = [ - {file = "pydantic-2.10.4-py3-none-any.whl", hash = "sha256:597e135ea68be3a37552fb524bc7d0d66dcf93d395acd93a00682f1efcb8ee3d"}, - {file = "pydantic-2.10.4.tar.gz", hash = "sha256:82f12e9723da6de4fe2ba888b5971157b3be7ad914267dea8f05f82b28254f06"}, + {file = "pydantic-2.11.3-py3-none-any.whl", hash = "sha256:a082753436a07f9ba1289c6ffa01cd93db3548776088aa917cc43b63f68fa60f"}, + {file = "pydantic-2.11.3.tar.gz", hash = "sha256:7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.27.2" +pydantic-core = "2.33.1" typing-extensions = ">=4.12.2" +typing-inspection = ">=0.4.0" [package.extras] email = ["email-validator (>=2.0.0)"] -timezone = ["tzdata"] +timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows\""] [[package]] name = "pydantic-core" -version = "2.27.2" +version = "2.33.1" description = "Core functionality for Pydantic validation and serialization" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" +groups = ["main"] files = [ - {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, - {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"}, - {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"}, - {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"}, - {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"}, - {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"}, - {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"}, - {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"}, - {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"}, - {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"}, - {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"}, - {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"}, - {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"}, - {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"}, - {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"}, - {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"}, - {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"}, - {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"}, - {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"}, - {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"}, - {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"}, - {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"}, - {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"}, - {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"}, - {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"}, - {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"}, - {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"}, - {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"}, - {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, - {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, - {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, - {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"}, - {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"}, - {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"}, - {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"}, - {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"}, - {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"}, - {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"}, - {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"}, - {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"}, - {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"}, - {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"}, - {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"}, - {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"}, - {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, - {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, + {file = "pydantic_core-2.33.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3077cfdb6125cc8dab61b155fdd714663e401f0e6883f9632118ec12cf42df26"}, + {file = "pydantic_core-2.33.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8ffab8b2908d152e74862d276cf5017c81a2f3719f14e8e3e8d6b83fda863927"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5183e4f6a2d468787243ebcd70cf4098c247e60d73fb7d68d5bc1e1beaa0c4db"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:398a38d323f37714023be1e0285765f0a27243a8b1506b7b7de87b647b517e48"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:87d3776f0001b43acebfa86f8c64019c043b55cc5a6a2e313d728b5c95b46969"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c566dd9c5f63d22226409553531f89de0cac55397f2ab8d97d6f06cfce6d947e"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0d5f3acc81452c56895e90643a625302bd6be351e7010664151cc55b7b97f89"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d3a07fadec2a13274a8d861d3d37c61e97a816beae717efccaa4b36dfcaadcde"}, + {file = "pydantic_core-2.33.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f99aeda58dce827f76963ee87a0ebe75e648c72ff9ba1174a253f6744f518f65"}, + {file = "pydantic_core-2.33.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:902dbc832141aa0ec374f4310f1e4e7febeebc3256f00dc359a9ac3f264a45dc"}, + {file = "pydantic_core-2.33.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fe44d56aa0b00d66640aa84a3cbe80b7a3ccdc6f0b1ca71090696a6d4777c091"}, + {file = "pydantic_core-2.33.1-cp310-cp310-win32.whl", hash = "sha256:ed3eb16d51257c763539bde21e011092f127a2202692afaeaccb50db55a31383"}, + {file = "pydantic_core-2.33.1-cp310-cp310-win_amd64.whl", hash = "sha256:694ad99a7f6718c1a498dc170ca430687a39894a60327f548e02a9c7ee4b6504"}, + {file = "pydantic_core-2.33.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6e966fc3caaf9f1d96b349b0341c70c8d6573bf1bac7261f7b0ba88f96c56c24"}, + {file = "pydantic_core-2.33.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bfd0adeee563d59c598ceabddf2c92eec77abcb3f4a391b19aa7366170bd9e30"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:91815221101ad3c6b507804178a7bb5cb7b2ead9ecd600041669c8d805ebd595"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9fea9c1869bb4742d174a57b4700c6dadea951df8b06de40c2fedb4f02931c2e"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d20eb4861329bb2484c021b9d9a977566ab16d84000a57e28061151c62b349a"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fb935c5591573ae3201640579f30128ccc10739b45663f93c06796854405505"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c964fd24e6166420d18fb53996d8c9fd6eac9bf5ae3ec3d03015be4414ce497f"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:681d65e9011f7392db5aa002b7423cc442d6a673c635668c227c6c8d0e5a4f77"}, + {file = "pydantic_core-2.33.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e100c52f7355a48413e2999bfb4e139d2977a904495441b374f3d4fb4a170961"}, + {file = "pydantic_core-2.33.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:048831bd363490be79acdd3232f74a0e9951b11b2b4cc058aeb72b22fdc3abe1"}, + {file = "pydantic_core-2.33.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bdc84017d28459c00db6f918a7272a5190bec3090058334e43a76afb279eac7c"}, + {file = "pydantic_core-2.33.1-cp311-cp311-win32.whl", hash = "sha256:32cd11c5914d1179df70406427097c7dcde19fddf1418c787540f4b730289896"}, + {file = "pydantic_core-2.33.1-cp311-cp311-win_amd64.whl", hash = "sha256:2ea62419ba8c397e7da28a9170a16219d310d2cf4970dbc65c32faf20d828c83"}, + {file = "pydantic_core-2.33.1-cp311-cp311-win_arm64.whl", hash = "sha256:fc903512177361e868bc1f5b80ac8c8a6e05fcdd574a5fb5ffeac5a9982b9e89"}, + {file = "pydantic_core-2.33.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:1293d7febb995e9d3ec3ea09caf1a26214eec45b0f29f6074abb004723fc1de8"}, + {file = "pydantic_core-2.33.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:99b56acd433386c8f20be5c4000786d1e7ca0523c8eefc995d14d79c7a081498"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35a5ec3fa8c2fe6c53e1b2ccc2454398f95d5393ab398478f53e1afbbeb4d939"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b172f7b9d2f3abc0efd12e3386f7e48b576ef309544ac3a63e5e9cdd2e24585d"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9097b9f17f91eea659b9ec58148c0747ec354a42f7389b9d50701610d86f812e"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc77ec5b7e2118b152b0d886c7514a4653bcb58c6b1d760134a9fab915f777b3"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e3d15245b08fa4a84cefc6c9222e6f37c98111c8679fbd94aa145f9a0ae23d"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ef99779001d7ac2e2461d8ab55d3373fe7315caefdbecd8ced75304ae5a6fc6b"}, + {file = "pydantic_core-2.33.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:fc6bf8869e193855e8d91d91f6bf59699a5cdfaa47a404e278e776dd7f168b39"}, + {file = "pydantic_core-2.33.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:b1caa0bc2741b043db7823843e1bde8aaa58a55a58fda06083b0569f8b45693a"}, + {file = "pydantic_core-2.33.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ec259f62538e8bf364903a7d0d0239447059f9434b284f5536e8402b7dd198db"}, + {file = "pydantic_core-2.33.1-cp312-cp312-win32.whl", hash = "sha256:e14f369c98a7c15772b9da98987f58e2b509a93235582838bd0d1d8c08b68fda"}, + {file = "pydantic_core-2.33.1-cp312-cp312-win_amd64.whl", hash = "sha256:1c607801d85e2e123357b3893f82c97a42856192997b95b4d8325deb1cd0c5f4"}, + {file = "pydantic_core-2.33.1-cp312-cp312-win_arm64.whl", hash = "sha256:8d13f0276806ee722e70a1c93da19748594f19ac4299c7e41237fc791d1861ea"}, + {file = "pydantic_core-2.33.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:70af6a21237b53d1fe7b9325b20e65cbf2f0a848cf77bed492b029139701e66a"}, + {file = "pydantic_core-2.33.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:282b3fe1bbbe5ae35224a0dbd05aed9ccabccd241e8e6b60370484234b456266"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b315e596282bbb5822d0c7ee9d255595bd7506d1cb20c2911a4da0b970187d3"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1dfae24cf9921875ca0ca6a8ecb4bb2f13c855794ed0d468d6abbec6e6dcd44a"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6dd8ecfde08d8bfadaea669e83c63939af76f4cf5538a72597016edfa3fad516"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2f593494876eae852dc98c43c6f260f45abdbfeec9e4324e31a481d948214764"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:948b73114f47fd7016088e5186d13faf5e1b2fe83f5e320e371f035557fd264d"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e11f3864eb516af21b01e25fac915a82e9ddad3bb0fb9e95a246067398b435a4"}, + {file = "pydantic_core-2.33.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:549150be302428b56fdad0c23c2741dcdb5572413776826c965619a25d9c6bde"}, + {file = "pydantic_core-2.33.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:495bc156026efafd9ef2d82372bd38afce78ddd82bf28ef5276c469e57c0c83e"}, + {file = "pydantic_core-2.33.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ec79de2a8680b1a67a07490bddf9636d5c2fab609ba8c57597e855fa5fa4dacd"}, + {file = "pydantic_core-2.33.1-cp313-cp313-win32.whl", hash = "sha256:ee12a7be1742f81b8a65b36c6921022301d466b82d80315d215c4c691724986f"}, + {file = "pydantic_core-2.33.1-cp313-cp313-win_amd64.whl", hash = "sha256:ede9b407e39949d2afc46385ce6bd6e11588660c26f80576c11c958e6647bc40"}, + {file = "pydantic_core-2.33.1-cp313-cp313-win_arm64.whl", hash = "sha256:aa687a23d4b7871a00e03ca96a09cad0f28f443690d300500603bd0adba4b523"}, + {file = "pydantic_core-2.33.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:401d7b76e1000d0dd5538e6381d28febdcacb097c8d340dde7d7fc6e13e9f95d"}, + {file = "pydantic_core-2.33.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7aeb055a42d734c0255c9e489ac67e75397d59c6fbe60d155851e9782f276a9c"}, + {file = "pydantic_core-2.33.1-cp313-cp313t-win_amd64.whl", hash = "sha256:338ea9b73e6e109f15ab439e62cb3b78aa752c7fd9536794112e14bee02c8d18"}, + {file = "pydantic_core-2.33.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:5ab77f45d33d264de66e1884fca158bc920cb5e27fd0764a72f72f5756ae8bdb"}, + {file = "pydantic_core-2.33.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e7aaba1b4b03aaea7bb59e1b5856d734be011d3e6d98f5bcaa98cb30f375f2ad"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7fb66263e9ba8fea2aa85e1e5578980d127fb37d7f2e292773e7bc3a38fb0c7b"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3f2648b9262607a7fb41d782cc263b48032ff7a03a835581abbf7a3bec62bcf5"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:723c5630c4259400818b4ad096735a829074601805d07f8cafc366d95786d331"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d100e3ae783d2167782391e0c1c7a20a31f55f8015f3293647544df3f9c67824"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:177d50460bc976a0369920b6c744d927b0ecb8606fb56858ff542560251b19e5"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a3edde68d1a1f9af1273b2fe798997b33f90308fb6d44d8550c89fc6a3647cf6"}, + {file = "pydantic_core-2.33.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a62c3c3ef6a7e2c45f7853b10b5bc4ddefd6ee3cd31024754a1a5842da7d598d"}, + {file = "pydantic_core-2.33.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:c91dbb0ab683fa0cd64a6e81907c8ff41d6497c346890e26b23de7ee55353f96"}, + {file = "pydantic_core-2.33.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9f466e8bf0a62dc43e068c12166281c2eca72121dd2adc1040f3aa1e21ef8599"}, + {file = "pydantic_core-2.33.1-cp39-cp39-win32.whl", hash = "sha256:ab0277cedb698749caada82e5d099dc9fed3f906a30d4c382d1a21725777a1e5"}, + {file = "pydantic_core-2.33.1-cp39-cp39-win_amd64.whl", hash = "sha256:5773da0ee2d17136b1f1c6fbde543398d452a6ad2a7b54ea1033e2daa739b8d2"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5c834f54f8f4640fd7e4b193f80eb25a0602bba9e19b3cd2fc7ffe8199f5ae02"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:049e0de24cf23766f12cc5cc71d8abc07d4a9deb9061b334b62093dedc7cb068"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a28239037b3d6f16916a4c831a5a0eadf856bdd6d2e92c10a0da3a59eadcf3e"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d3da303ab5f378a268fa7d45f37d7d85c3ec19769f28d2cc0c61826a8de21fe"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:25626fb37b3c543818c14821afe0fd3830bc327a43953bc88db924b68c5723f1"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:3ab2d36e20fbfcce8f02d73c33a8a7362980cff717926bbae030b93ae46b56c7"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:2f9284e11c751b003fd4215ad92d325d92c9cb19ee6729ebd87e3250072cdcde"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:048c01eee07d37cbd066fc512b9d8b5ea88ceeb4e629ab94b3e56965ad655add"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5ccd429694cf26af7997595d627dd2637e7932214486f55b8a357edaac9dae8c"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3a371dc00282c4b84246509a5ddc808e61b9864aa1eae9ecc92bb1268b82db4a"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:f59295ecc75a1788af8ba92f2e8c6eeaa5a94c22fc4d151e8d9638814f85c8fc"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:08530b8ac922003033f399128505f513e30ca770527cc8bbacf75a84fcc2c74b"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bae370459da6a5466978c0eacf90690cb57ec9d533f8e63e564ef3822bfa04fe"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e3de2777e3b9f4d603112f78006f4ae0acb936e95f06da6cb1a45fbad6bdb4b5"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:3a64e81e8cba118e108d7126362ea30e021291b7805d47e4896e52c791be2761"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:52928d8c1b6bda03cc6d811e8923dffc87a2d3c8b3bfd2ce16471c7147a24850"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:1b30d92c9412beb5ac6b10a3eb7ef92ccb14e3f2a8d7732e2d739f58b3aa7544"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:f995719707e0e29f0f41a8aa3bcea6e761a36c9136104d3189eafb83f5cec5e5"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7edbc454a29fc6aeae1e1eecba4f07b63b8d76e76a748532233c4c167b4cb9ea"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:ad05b683963f69a1d5d2c2bdab1274a31221ca737dbbceaa32bcb67359453cdd"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df6a94bf9452c6da9b5d76ed229a5683d0306ccb91cca8e1eea883189780d568"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7965c13b3967909a09ecc91f21d09cfc4576bf78140b988904e94f130f188396"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3f1fdb790440a34f6ecf7679e1863b825cb5ffde858a9197f851168ed08371e5"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:5277aec8d879f8d05168fdd17ae811dd313b8ff894aeeaf7cd34ad28b4d77e33"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8ab581d3530611897d863d1a649fb0644b860286b4718db919bfd51ece41f10b"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0483847fa9ad5e3412265c1bd72aad35235512d9ce9d27d81a56d935ef489672"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:de9e06abe3cc5ec6a2d5f75bc99b0bdca4f5c719a5b34026f8c57efbdecd2ee3"}, + {file = "pydantic_core-2.33.1.tar.gz", hash = "sha256:bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df"}, ] [package.dependencies] @@ -436,6 +428,7 @@ version = "3.2.3" description = "python code static checker" optional = false python-versions = ">=3.8.0" +groups = ["dev"] files = [ {file = "pylint-3.2.3-py3-none-any.whl", hash = "sha256:b3d7d2708a3e04b4679e02d99e72329a8b7ee8afb8d04110682278781f889fa8"}, {file = "pylint-3.2.3.tar.gz", hash = "sha256:02f6c562b215582386068d52a30f520d84fdbcf2a95fc7e855b816060d048b60"}, @@ -447,7 +440,7 @@ colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ {version = ">=0.2", markers = "python_version < \"3.11\""}, {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, - {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, + {version = ">=0.3.6", markers = "python_version == \"3.11\""}, ] isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" mccabe = ">=0.6,<0.8" @@ -460,37 +453,13 @@ typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\"" spelling = ["pyenchant (>=3.2,<4.0)"] testutils = ["gitpython (>3)"] -[[package]] -name = "python-dateutil" -version = "2.9.0.post0" -description = "Extensions to the standard Python datetime module" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -files = [ - {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, - {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, -] - -[package.dependencies] -six = ">=1.5" - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] - [[package]] name = "sniffio" version = "1.3.1" description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, @@ -502,6 +471,8 @@ version = "2.0.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.11\"" files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, @@ -513,49 +484,40 @@ version = "0.12.5" description = "Style preserving TOML library" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "tomlkit-0.12.5-py3-none-any.whl", hash = "sha256:af914f5a9c59ed9d0762c7b64d3b5d5df007448eb9cd2edc8a46b1eafead172f"}, {file = "tomlkit-0.12.5.tar.gz", hash = "sha256:eef34fba39834d4d6b73c9ba7f3e4d1c417a4e56f89a7e96e090dd0d24b8fb3c"}, ] -[[package]] -name = "types-python-dateutil" -version = "2.9.0.20240316" -description = "Typing stubs for python-dateutil" -optional = false -python-versions = ">=3.8" -files = [ - {file = "types-python-dateutil-2.9.0.20240316.tar.gz", hash = "sha256:5d2f2e240b86905e40944dd787db6da9263f0deabef1076ddaed797351ec0202"}, - {file = "types_python_dateutil-2.9.0.20240316-py3-none-any.whl", hash = "sha256:6b8cb66d960771ce5ff974e9dd45e38facb81718cc1e208b10b1baccbfdbee3b"}, -] - [[package]] name = "typing-extensions" version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [[package]] -name = "typing-inspect" -version = "0.9.0" -description = "Runtime inspection utilities for typing module." +name = "typing-inspection" +version = "0.4.0" +description = "Runtime typing introspection tools" optional = false -python-versions = "*" +python-versions = ">=3.9" +groups = ["main"] files = [ - {file = "typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f"}, - {file = "typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78"}, + {file = "typing_inspection-0.4.0-py3-none-any.whl", hash = "sha256:50e72559fcd2a6367a19f7a7e610e6afcb9fac940c650290eed893d61386832f"}, + {file = "typing_inspection-0.4.0.tar.gz", hash = "sha256:9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122"}, ] [package.dependencies] -mypy-extensions = ">=0.3.0" -typing-extensions = ">=3.7.4" +typing-extensions = ">=4.12.0" [metadata] -lock-version = "2.0" -python-versions = "^3.8" -content-hash = "231d09484040ca8e2e4ea801ceedb0b672113dd483caa7cb13d217c3e92d7655" +lock-version = "2.1" +python-versions = ">=3.9" +content-hash = "6354f0f1856076ab30608ac13a9b2c92427e32d83253a3a3801e1919bb853282" diff --git a/pylintrc b/pylintrc index 50800386..e8cd3e85 100644 --- a/pylintrc +++ b/pylintrc @@ -89,7 +89,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.8 +py-version=3.9 # Discover python modules and packages in the file system subtree. recursive=no @@ -454,7 +454,11 @@ disable=raw-checker-failed, bare-except, broad-exception-caught, fixme, - relative-beyond-top-level + relative-beyond-top-level, + consider-using-with, + wildcard-import, + unused-wildcard-import, + too-many-return-statements # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option @@ -655,4 +659,4 @@ init-import=no # List of qualified module names which can have objects that can redefine # builtins. -redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io +redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a4a8a51e..3874d3ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,16 @@ -[tool.poetry] +[project] name = "speakeasy-client-sdk-python" -version = "7.0.0-rc.2" +version = "7.0.0-rc.3" description = "Speakeasy API Client SDK for Python" -authors = ["Speakeasy",] +authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" +requires-python = ">=3.9" +dependencies = [ + "httpx >=0.28.1", + "pydantic >=2.11.2", +] + +[tool.poetry] repository = "https://github.com/speakeasy-api/speakeasy-client-sdk-python.git" packages = [ { include = "speakeasy_client_sdk_python", from = "src" } @@ -16,25 +23,16 @@ include = ["py.typed", "src/speakeasy_client_sdk_python/py.typed"] [virtualenvs] in-project = true -[tool.poetry.dependencies] -python = "^3.8" -eval-type-backport = "^0.2.0" -httpx = "^0.28.1" -jsonpath-python = "^1.0.6" -pydantic = "~2.10.3" -python-dateutil = "^2.8.2" -typing-inspect = "^0.9.0" - [tool.poetry.group.dev.dependencies] -mypy = "==1.13.0" +mypy = "==1.15.0" pylint = "==3.2.3" -types-python-dateutil = "^2.9.0.20240316" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.pytest.ini_options] +asyncio_default_fixture_loop_scope = "function" pythonpath = ["src"] [tool.mypy] diff --git a/scripts/prepare-readme.py b/scripts/prepare_readme.py similarity index 84% rename from scripts/prepare-readme.py rename to scripts/prepare_readme.py index f173d652..aaddb915 100644 --- a/scripts/prepare-readme.py +++ b/scripts/prepare_readme.py @@ -4,7 +4,7 @@ import shutil try: - with open("README.md", "r") as rh: + with open("README.md", "r", encoding="utf-8") as rh: readme_contents = rh.read() GITHUB_URL = "https://github.com/speakeasy-api/speakeasy-client-sdk-python.git" GITHUB_URL = ( @@ -21,13 +21,13 @@ readme_contents, ) - with open("README-PYPI.md", "w") as wh: + with open("README-PYPI.md", "w", encoding="utf-8") as wh: wh.write(readme_contents) except Exception as e: try: print("Failed to rewrite README.md to README-PYPI.md, copying original instead") print(e) shutil.copyfile("README.md", "README-PYPI.md") - except Exception as e: + except Exception as ie: print("Failed to copy README.md to README-PYPI.md") - print(e) + print(ie) diff --git a/scripts/publish.sh b/scripts/publish.sh index ab45b1f9..f2f2cf2c 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -2,6 +2,6 @@ export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN} -poetry run python scripts/prepare-readme.py +poetry run python scripts/prepare_readme.py poetry publish --build --skip-existing diff --git a/src/speakeasy_client_sdk_python/__init__.py b/src/speakeasy_client_sdk_python/__init__.py index 5c349179..833c68cd 100644 --- a/src/speakeasy_client_sdk_python/__init__.py +++ b/src/speakeasy_client_sdk_python/__init__.py @@ -1,8 +1,17 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from ._version import __title__, __version__ +from ._version import ( + __title__, + __version__, + __openapi_doc_version__, + __gen_version__, + __user_agent__, +) from .sdk import * from .sdkconfiguration import * VERSION: str = __version__ +OPENAPI_DOC_VERSION = __openapi_doc_version__ +SPEAKEASY_GENERATOR_VERSION = __gen_version__ +USER_AGENT = __user_agent__ diff --git a/src/speakeasy_client_sdk_python/_hooks/types.py b/src/speakeasy_client_sdk_python/_hooks/types.py index 700082a3..a8a6d5f2 100644 --- a/src/speakeasy_client_sdk_python/_hooks/types.py +++ b/src/speakeasy_client_sdk_python/_hooks/types.py @@ -7,16 +7,19 @@ class HookContext: + base_url: str operation_id: str oauth2_scopes: Optional[List[str]] = None security_source: Optional[Union[Any, Callable[[], Any]]] = None def __init__( self, + base_url: str, operation_id: str, oauth2_scopes: Optional[List[str]], security_source: Optional[Union[Any, Callable[[], Any]]], ): + self.base_url = base_url self.operation_id = operation_id self.oauth2_scopes = oauth2_scopes self.security_source = security_source @@ -25,21 +28,30 @@ def __init__( class BeforeRequestContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( - hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source + hook_ctx.base_url, + hook_ctx.operation_id, + hook_ctx.oauth2_scopes, + hook_ctx.security_source, ) class AfterSuccessContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( - hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source + hook_ctx.base_url, + hook_ctx.operation_id, + hook_ctx.oauth2_scopes, + hook_ctx.security_source, ) class AfterErrorContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( - hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source + hook_ctx.base_url, + hook_ctx.operation_id, + hook_ctx.oauth2_scopes, + hook_ctx.security_source, ) diff --git a/src/speakeasy_client_sdk_python/_version.py b/src/speakeasy_client_sdk_python/_version.py index a34ba7c8..41c96c31 100644 --- a/src/speakeasy_client_sdk_python/_version.py +++ b/src/speakeasy_client_sdk_python/_version.py @@ -3,7 +3,12 @@ import importlib.metadata __title__: str = "speakeasy-client-sdk-python" -__version__: str = "7.0.0-rc.2" +__version__: str = "7.0.0-rc.3" +__openapi_doc_version__: str = "0.4.0" +__gen_version__: str = "2.591.1" +__user_agent__: str = ( + "speakeasy-sdk/python 7.0.0-rc.3 2.591.1 0.4.0 speakeasy-client-sdk-python" +) try: if __package__ is not None: diff --git a/src/speakeasy_client_sdk_python/artifacts.py b/src/speakeasy_client_sdk_python/artifacts.py index bbef8073..b2623f8a 100644 --- a/src/speakeasy_client_sdk_python/artifacts.py +++ b/src/speakeasy_client_sdk_python/artifacts.py @@ -37,6 +37,8 @@ def create_remote_source( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, Optional[shared.RemoteSource]) @@ -71,6 +73,7 @@ def create_remote_source( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="createRemoteSource", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -80,7 +83,7 @@ def create_remote_source( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.CreateRemoteSourceResponse( status_code=http_res.status_code, @@ -88,8 +91,8 @@ def create_remote_source( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -131,6 +134,8 @@ async def create_remote_source_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, Optional[shared.RemoteSource]) @@ -165,6 +170,7 @@ async def create_remote_source_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="createRemoteSource", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -174,7 +180,7 @@ async def create_remote_source_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.CreateRemoteSourceResponse( status_code=http_res.status_code, @@ -182,8 +188,8 @@ async def create_remote_source_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -223,6 +229,8 @@ def get_blob( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetBlobRequest) @@ -254,6 +262,7 @@ def get_blob( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getBlob", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -264,7 +273,7 @@ def get_blob( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/octet-stream"): return operations.GetBlobResponse( blob=http_res, @@ -274,8 +283,8 @@ def get_blob( ) if utils.match_response(http_res, "4XX", "application/json"): http_res_text = utils.stream_to_text(http_res) - data = utils.unmarshal_json(http_res_text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res_text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -315,6 +324,8 @@ async def get_blob_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetBlobRequest) @@ -346,6 +357,7 @@ async def get_blob_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getBlob", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -356,7 +368,7 @@ async def get_blob_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/octet-stream"): return operations.GetBlobResponse( blob=http_res, @@ -366,8 +378,8 @@ async def get_blob_async( ) if utils.match_response(http_res, "4XX", "application/json"): http_res_text = await utils.stream_to_text_async(http_res) - data = utils.unmarshal_json(http_res_text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res_text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -409,6 +421,8 @@ def get_manifest( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetManifestRequest) @@ -440,6 +454,7 @@ def get_manifest( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getManifest", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -449,7 +464,7 @@ def get_manifest( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response( http_res, "2XX", "application/vnd.oci.image.manifest.v1+json" ): @@ -460,8 +475,8 @@ def get_manifest( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -503,6 +518,8 @@ async def get_manifest_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetManifestRequest) @@ -534,6 +551,7 @@ async def get_manifest_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getManifest", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -543,7 +561,7 @@ async def get_manifest_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response( http_res, "2XX", "application/vnd.oci.image.manifest.v1+json" ): @@ -554,8 +572,8 @@ async def get_manifest_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -593,6 +611,8 @@ def get_namespaces( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request( method="GET", path="/v1/artifacts/namespaces", @@ -619,6 +639,7 @@ def get_namespaces( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getNamespaces", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -628,7 +649,7 @@ def get_namespaces( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetNamespacesResponse( get_namespaces_response=utils.unmarshal_json( @@ -639,8 +660,8 @@ def get_namespaces( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -678,6 +699,8 @@ async def get_namespaces_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request_async( method="GET", path="/v1/artifacts/namespaces", @@ -704,6 +727,7 @@ async def get_namespaces_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getNamespaces", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -713,7 +737,7 @@ async def get_namespaces_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetNamespacesResponse( get_namespaces_response=utils.unmarshal_json( @@ -724,8 +748,8 @@ async def get_namespaces_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -766,6 +790,8 @@ def get_revisions( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetRevisionsRequest) @@ -797,6 +823,7 @@ def get_revisions( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getRevisions", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -806,7 +833,7 @@ def get_revisions( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetRevisionsResponse( get_revisions_response=utils.unmarshal_json( @@ -817,8 +844,8 @@ def get_revisions( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -859,6 +886,8 @@ async def get_revisions_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetRevisionsRequest) @@ -890,6 +919,7 @@ async def get_revisions_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getRevisions", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -899,7 +929,7 @@ async def get_revisions_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetRevisionsResponse( get_revisions_response=utils.unmarshal_json( @@ -910,8 +940,8 @@ async def get_revisions_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -950,6 +980,8 @@ def get_tags( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetTagsRequest) @@ -981,6 +1013,7 @@ def get_tags( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getTags", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -990,7 +1023,7 @@ def get_tags( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetTagsResponse( get_tags_response=utils.unmarshal_json( @@ -1001,8 +1034,8 @@ def get_tags( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1041,6 +1074,8 @@ async def get_tags_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetTagsRequest) @@ -1072,6 +1107,7 @@ async def get_tags_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getTags", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1081,7 +1117,7 @@ async def get_tags_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetTagsResponse( get_tags_response=utils.unmarshal_json( @@ -1092,8 +1128,8 @@ async def get_tags_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1136,6 +1172,8 @@ def list_remote_sources( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.ListRemoteSourcesRequest) @@ -1167,6 +1205,7 @@ def list_remote_sources( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="listRemoteSources", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1176,7 +1215,7 @@ def list_remote_sources( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.ListRemoteSourcesResponse( remote_source=utils.unmarshal_json( @@ -1187,8 +1226,8 @@ def list_remote_sources( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1231,6 +1270,8 @@ async def list_remote_sources_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.ListRemoteSourcesRequest) @@ -1262,6 +1303,7 @@ async def list_remote_sources_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="listRemoteSources", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1271,7 +1313,7 @@ async def list_remote_sources_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.ListRemoteSourcesResponse( remote_source=utils.unmarshal_json( @@ -1282,8 +1324,8 @@ async def list_remote_sources_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1323,6 +1365,8 @@ def post_tags( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.PostTagsRequest) @@ -1357,6 +1401,7 @@ def post_tags( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="postTags", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1366,7 +1411,7 @@ def post_tags( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.PostTagsResponse( status_code=http_res.status_code, @@ -1374,8 +1419,8 @@ def post_tags( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1415,6 +1460,8 @@ async def post_tags_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.PostTagsRequest) @@ -1449,6 +1496,7 @@ async def post_tags_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="postTags", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1458,7 +1506,7 @@ async def post_tags_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.PostTagsResponse( status_code=http_res.status_code, @@ -1466,8 +1514,8 @@ async def post_tags_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1509,6 +1557,8 @@ def preflight( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, Optional[shared.PreflightRequest]) @@ -1543,6 +1593,7 @@ def preflight( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="preflight", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1552,7 +1603,7 @@ def preflight( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.PreflightResponse( preflight_token=utils.unmarshal_json( @@ -1563,8 +1614,8 @@ def preflight( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1606,6 +1657,8 @@ async def preflight_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, Optional[shared.PreflightRequest]) @@ -1640,6 +1693,7 @@ async def preflight_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="preflight", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1649,7 +1703,7 @@ async def preflight_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.PreflightResponse( preflight_token=utils.unmarshal_json( @@ -1660,8 +1714,212 @@ async def preflight_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def set_archived( + self, + *, + request: Union[ + operations.ArchiveNamespaceRequest, + operations.ArchiveNamespaceRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.ArchiveNamespaceResponse: + r"""Set whether a namespace is archived + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.ArchiveNamespaceRequest) + request = cast(operations.ArchiveNamespaceRequest, request) + + req = self._build_request( + method="POST", + path="/v1/artifacts/namespaces/{namespace_name}/archive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "json", + Optional[operations.ArchiveNamespaceRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="archiveNamespace", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "2XX", "*"): + return operations.ArchiveNamespaceResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def set_archived_async( + self, + *, + request: Union[ + operations.ArchiveNamespaceRequest, + operations.ArchiveNamespaceRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.ArchiveNamespaceResponse: + r"""Set whether a namespace is archived + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.ArchiveNamespaceRequest) + request = cast(operations.ArchiveNamespaceRequest, request) + + req = self._build_request_async( + method="POST", + path="/v1/artifacts/namespaces/{namespace_name}/archive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "json", + Optional[operations.ArchiveNamespaceRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="archiveNamespace", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "2XX", "*"): + return operations.ArchiveNamespaceResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1703,6 +1961,8 @@ def set_visibility( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.SetVisibilityRequest) @@ -1741,6 +2001,7 @@ def set_visibility( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="setVisibility", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1750,7 +2011,7 @@ def set_visibility( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.SetVisibilityResponse( status_code=http_res.status_code, @@ -1758,8 +2019,8 @@ def set_visibility( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1801,6 +2062,8 @@ async def set_visibility_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.SetVisibilityRequest) @@ -1839,6 +2102,7 @@ async def set_visibility_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="setVisibility", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1848,7 +2112,7 @@ async def set_visibility_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.SetVisibilityResponse( status_code=http_res.status_code, @@ -1856,8 +2120,8 @@ async def set_visibility_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( diff --git a/src/speakeasy_client_sdk_python/auth.py b/src/speakeasy_client_sdk_python/auth.py index ab019e6f..bb74e32a 100644 --- a/src/speakeasy_client_sdk_python/auth.py +++ b/src/speakeasy_client_sdk_python/auth.py @@ -40,6 +40,8 @@ def get_access( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceAccessRequest) @@ -75,6 +77,7 @@ def get_access( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceAccess", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -93,7 +96,12 @@ def get_access( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -137,6 +145,8 @@ async def get_access_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceAccessRequest) @@ -172,6 +182,7 @@ async def get_access_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceAccess", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -190,7 +201,12 @@ async def get_access_async( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -231,6 +247,8 @@ def get_access_token( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetAccessTokenRequest) @@ -261,14 +279,17 @@ def get_access_token( http_res = self.do_request( hook_ctx=HookContext( - operation_id="getAccessToken", oauth2_scopes=[], security_source=None + base_url=base_url or "", + operation_id="getAccessToken", + oauth2_scopes=[], + security_source=None, ), request=req, error_status_codes=["4XX", "5XX"], retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetAccessTokenResponse( access_token=utils.unmarshal_json( @@ -279,8 +300,8 @@ def get_access_token( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -322,6 +343,8 @@ async def get_access_token_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetAccessTokenRequest) @@ -352,14 +375,17 @@ async def get_access_token_async( http_res = await self.do_request_async( hook_ctx=HookContext( - operation_id="getAccessToken", oauth2_scopes=[], security_source=None + base_url=base_url or "", + operation_id="getAccessToken", + oauth2_scopes=[], + security_source=None, ), request=req, error_status_codes=["4XX", "5XX"], retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetAccessTokenResponse( access_token=utils.unmarshal_json( @@ -370,8 +396,8 @@ async def get_access_token_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -409,6 +435,8 @@ def get_user( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request( method="GET", path="/v1/user", @@ -435,6 +463,7 @@ def get_user( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getUser", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -444,7 +473,7 @@ def get_user( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetUserResponse( user=utils.unmarshal_json(http_res.text, Optional[shared.User]), @@ -453,8 +482,8 @@ def get_user( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -492,6 +521,8 @@ async def get_user_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request_async( method="GET", path="/v1/user", @@ -518,6 +549,7 @@ async def get_user_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getUser", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -527,7 +559,7 @@ async def get_user_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetUserResponse( user=utils.unmarshal_json(http_res.text, Optional[shared.User]), @@ -536,8 +568,8 @@ async def get_user_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -575,6 +607,8 @@ def validate_api_key( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request( method="GET", path="/v1/auth/validate", @@ -601,6 +635,7 @@ def validate_api_key( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="validateApiKey", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -610,7 +645,7 @@ def validate_api_key( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.ValidateAPIKeyResponse( api_key_details=utils.unmarshal_json( @@ -621,8 +656,8 @@ def validate_api_key( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -660,6 +695,8 @@ async def validate_api_key_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request_async( method="GET", path="/v1/auth/validate", @@ -686,6 +723,7 @@ async def validate_api_key_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="validateApiKey", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -695,7 +733,7 @@ async def validate_api_key_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.ValidateAPIKeyResponse( api_key_details=utils.unmarshal_json( @@ -706,8 +744,8 @@ async def validate_api_key_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( diff --git a/src/speakeasy_client_sdk_python/basesdk.py b/src/speakeasy_client_sdk_python/basesdk.py index 9c5f7d0a..12a88caa 100644 --- a/src/speakeasy_client_sdk_python/basesdk.py +++ b/src/speakeasy_client_sdk_python/basesdk.py @@ -236,6 +236,10 @@ def do(): req.headers, get_body_content(req), ) + + if client is None: + raise ValueError("client is required") + http_res = client.send(req, stream=stream) except Exception as e: _, e = self.sdk_configuration.get_hooks().after_error( @@ -308,6 +312,10 @@ async def do(): req.headers, get_body_content(req), ) + + if client is None: + raise ValueError("client is required") + http_res = await client.send(req, stream=stream) except Exception as e: _, e = self.sdk_configuration.get_hooks().after_error( diff --git a/src/speakeasy_client_sdk_python/codesamples.py b/src/speakeasy_client_sdk_python/codesamples.py index da258743..86e024ca 100644 --- a/src/speakeasy_client_sdk_python/codesamples.py +++ b/src/speakeasy_client_sdk_python/codesamples.py @@ -1,7 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from .basesdk import BaseSDK -from enum import Enum from speakeasy_client_sdk_python import utils from speakeasy_client_sdk_python._hooks import HookContext from speakeasy_client_sdk_python.models import errors, operations, shared @@ -9,16 +8,6 @@ from typing import Any, Mapping, Optional, Union, cast -class GenerateCodeSamplePreviewAcceptEnum(str, Enum): - APPLICATION_JSON = "application/json" - APPLICATION_X_YAML = "application/x-yaml" - - -class GetCodeSamplePreviewAsyncAcceptEnum(str, Enum): - APPLICATION_JSON = "application/json" - APPLICATION_X_YAML = "application/x-yaml" - - class CodeSamples(BaseSDK): r"""REST APIs for retrieving Code Samples""" @@ -31,7 +20,6 @@ def generate_code_sample_preview( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - accept_header_override: Optional[GenerateCodeSamplePreviewAcceptEnum] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenerateCodeSamplePreviewResponse: r"""Generate Code Sample previews from a file and configuration parameters. @@ -42,7 +30,6 @@ def generate_code_sample_preview( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param accept_header_override: Override the default accept header for this method :param http_headers: Additional headers to set or replace on requests. """ base_url = None @@ -52,6 +39,8 @@ def generate_code_sample_preview( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.CodeSampleSchemaInput) @@ -67,9 +56,7 @@ def generate_code_sample_preview( request_has_path_params=False, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value=accept_header_override.value - if accept_header_override is not None - else "application/json;q=1, application/x-yaml;q=0", + accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -88,35 +75,32 @@ def generate_code_sample_preview( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="generateCodeSamplePreview", oauth2_scopes=[], security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["4XX", "5XX"], - stream=True, retry_config=retry_config, ) - data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return operations.GenerateCodeSamplePreviewResponse( - two_hundred_application_json_response_stream=http_res, - status_code=http_res.status_code, - content_type=http_res.headers.get("Content-Type") or "", - raw_response=http_res, - ) - if utils.match_response(http_res, "200", "application/x-yaml"): + response_data: Any = None + if utils.match_response(http_res, "2XX", "application/json"): return operations.GenerateCodeSamplePreviewResponse( - two_hundred_application_x_yaml_response_stream=http_res, + usage_snippets=utils.unmarshal_json( + http_res.text, Optional[shared.UsageSnippets] + ), status_code=http_res.status_code, content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "application/json"): - http_res_text = utils.stream_to_text(http_res) - data = utils.unmarshal_json(http_res_text, errors.ErrorData) - raise errors.Error(data=data) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = utils.stream_to_text(http_res) @@ -136,7 +120,6 @@ async def generate_code_sample_preview_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - accept_header_override: Optional[GenerateCodeSamplePreviewAcceptEnum] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenerateCodeSamplePreviewResponse: r"""Generate Code Sample previews from a file and configuration parameters. @@ -147,7 +130,6 @@ async def generate_code_sample_preview_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param accept_header_override: Override the default accept header for this method :param http_headers: Additional headers to set or replace on requests. """ base_url = None @@ -157,6 +139,8 @@ async def generate_code_sample_preview_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.CodeSampleSchemaInput) @@ -172,9 +156,7 @@ async def generate_code_sample_preview_async( request_has_path_params=False, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value=accept_header_override.value - if accept_header_override is not None - else "application/json;q=1, application/x-yaml;q=0", + accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -193,35 +175,32 @@ async def generate_code_sample_preview_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="generateCodeSamplePreview", oauth2_scopes=[], security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["4XX", "5XX"], - stream=True, retry_config=retry_config, ) - data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return operations.GenerateCodeSamplePreviewResponse( - two_hundred_application_json_response_stream=http_res, - status_code=http_res.status_code, - content_type=http_res.headers.get("Content-Type") or "", - raw_response=http_res, - ) - if utils.match_response(http_res, "200", "application/x-yaml"): + response_data: Any = None + if utils.match_response(http_res, "2XX", "application/json"): return operations.GenerateCodeSamplePreviewResponse( - two_hundred_application_x_yaml_response_stream=http_res, + usage_snippets=utils.unmarshal_json( + http_res.text, Optional[shared.UsageSnippets] + ), status_code=http_res.status_code, content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "application/json"): - http_res_text = await utils.stream_to_text_async(http_res) - data = utils.unmarshal_json(http_res_text, errors.ErrorData) - raise errors.Error(data=data) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = await utils.stream_to_text_async(http_res) @@ -260,6 +239,8 @@ def generate_code_sample_previewhronous( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.CodeSampleSchemaInput) @@ -294,6 +275,7 @@ def generate_code_sample_previewhronous( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="generateCodeSamplePreviewAsync", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -303,7 +285,7 @@ def generate_code_sample_previewhronous( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "202", "application/json"): return operations.GenerateCodeSamplePreviewAsyncResponse( object=utils.unmarshal_json( @@ -314,9 +296,12 @@ def generate_code_sample_previewhronous( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = utils.stream_to_text(http_res) @@ -355,6 +340,8 @@ async def generate_code_sample_preview_asynchronous_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.CodeSampleSchemaInput) @@ -389,6 +376,7 @@ async def generate_code_sample_preview_asynchronous_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="generateCodeSamplePreviewAsync", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -398,7 +386,7 @@ async def generate_code_sample_preview_asynchronous_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "202", "application/json"): return operations.GenerateCodeSamplePreviewAsyncResponse( object=utils.unmarshal_json( @@ -409,9 +397,12 @@ async def generate_code_sample_preview_asynchronous_async( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = await utils.stream_to_text_async(http_res) @@ -433,9 +424,9 @@ def get( timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetCodeSamplesResponse: - r"""Retrieve usage snippets from document stored in the registry + r"""Retrieve usage snippets - Retrieve usage snippets from document stored in the registry. Supports filtering by language and operation ID. + Retrieve usage snippets from an OpenAPI document stored in the registry. Supports filtering by language and operation ID. :param request: The request object to send. :param retries: Override the default retry configuration for this method @@ -450,6 +441,8 @@ def get( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetCodeSamplesRequest) @@ -481,6 +474,7 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getCodeSamples", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -490,7 +484,7 @@ def get( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetCodeSamplesResponse( usage_snippets=utils.unmarshal_json( @@ -501,8 +495,8 @@ def get( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -529,9 +523,9 @@ async def get_async( timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetCodeSamplesResponse: - r"""Retrieve usage snippets from document stored in the registry + r"""Retrieve usage snippets - Retrieve usage snippets from document stored in the registry. Supports filtering by language and operation ID. + Retrieve usage snippets from an OpenAPI document stored in the registry. Supports filtering by language and operation ID. :param request: The request object to send. :param retries: Override the default retry configuration for this method @@ -546,6 +540,8 @@ async def get_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetCodeSamplesRequest) @@ -577,6 +573,7 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getCodeSamples", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -586,7 +583,7 @@ async def get_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetCodeSamplesResponse( usage_snippets=utils.unmarshal_json( @@ -597,8 +594,8 @@ async def get_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -624,7 +621,6 @@ def get_code_sample_preview( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - accept_header_override: Optional[GetCodeSamplePreviewAsyncAcceptEnum] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetCodeSamplePreviewAsyncResponse: r"""Poll for the result of an asynchronous Code Sample preview generation. @@ -635,7 +631,6 @@ def get_code_sample_preview( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param accept_header_override: Override the default accept header for this method :param http_headers: Additional headers to set or replace on requests. """ base_url = None @@ -645,6 +640,8 @@ def get_code_sample_preview( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -662,9 +659,7 @@ def get_code_sample_preview( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value=accept_header_override.value - if accept_header_override is not None - else "application/json;q=1, application/x-yaml;q=0", + accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, @@ -680,46 +675,42 @@ def get_code_sample_preview( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getCodeSamplePreviewAsync", oauth2_scopes=[], security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["4XX", "5XX"], - stream=True, retry_config=retry_config, ) - data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return operations.GetCodeSamplePreviewAsyncResponse( - two_hundred_application_json_response_stream=http_res, - status_code=http_res.status_code, - content_type=http_res.headers.get("Content-Type") or "", - raw_response=http_res, - ) - if utils.match_response(http_res, "200", "application/x-yaml"): + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): return operations.GetCodeSamplePreviewAsyncResponse( - two_hundred_application_x_yaml_response_stream=http_res, + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetCodeSamplePreviewAsyncResponseBody], + ), status_code=http_res.status_code, content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, "202", "application/json"): - http_response_text = utils.stream_to_text(http_res) + if utils.match_response(http_res, "2XX", "application/json"): return operations.GetCodeSamplePreviewAsyncResponse( - two_hundred_and_two_application_json_object=utils.unmarshal_json( - http_response_text, - Optional[operations.GetCodeSamplePreviewAsyncResponseBody], + usage_snippets=utils.unmarshal_json( + http_res.text, Optional[shared.UsageSnippets] ), status_code=http_res.status_code, content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "application/json"): - http_res_text = utils.stream_to_text(http_res) - data = utils.unmarshal_json(http_res_text, errors.ErrorData) - raise errors.Error(data=data) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = utils.stream_to_text(http_res) @@ -740,7 +731,6 @@ async def get_code_sample_preview_async_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - accept_header_override: Optional[GetCodeSamplePreviewAsyncAcceptEnum] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetCodeSamplePreviewAsyncResponse: r"""Poll for the result of an asynchronous Code Sample preview generation. @@ -751,7 +741,6 @@ async def get_code_sample_preview_async_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param accept_header_override: Override the default accept header for this method :param http_headers: Additional headers to set or replace on requests. """ base_url = None @@ -761,6 +750,8 @@ async def get_code_sample_preview_async_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -778,9 +769,7 @@ async def get_code_sample_preview_async_async( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value=accept_header_override.value - if accept_header_override is not None - else "application/json;q=1, application/x-yaml;q=0", + accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, @@ -796,46 +785,42 @@ async def get_code_sample_preview_async_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getCodeSamplePreviewAsync", oauth2_scopes=[], security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["4XX", "5XX"], - stream=True, retry_config=retry_config, ) - data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return operations.GetCodeSamplePreviewAsyncResponse( - two_hundred_application_json_response_stream=http_res, - status_code=http_res.status_code, - content_type=http_res.headers.get("Content-Type") or "", - raw_response=http_res, - ) - if utils.match_response(http_res, "200", "application/x-yaml"): + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): return operations.GetCodeSamplePreviewAsyncResponse( - two_hundred_application_x_yaml_response_stream=http_res, + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetCodeSamplePreviewAsyncResponseBody], + ), status_code=http_res.status_code, content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, "202", "application/json"): - http_response_text = await utils.stream_to_text_async(http_res) + if utils.match_response(http_res, "2XX", "application/json"): return operations.GetCodeSamplePreviewAsyncResponse( - two_hundred_and_two_application_json_object=utils.unmarshal_json( - http_response_text, - Optional[operations.GetCodeSamplePreviewAsyncResponseBody], + usage_snippets=utils.unmarshal_json( + http_res.text, Optional[shared.UsageSnippets] ), status_code=http_res.status_code, content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "application/json"): - http_res_text = await utils.stream_to_text_async(http_res) - data = utils.unmarshal_json(http_res_text, errors.ErrorData) - raise errors.Error(data=data) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = await utils.stream_to_text_async(http_res) diff --git a/src/speakeasy_client_sdk_python/events.py b/src/speakeasy_client_sdk_python/events.py index 91a30eaa..0cb45d02 100644 --- a/src/speakeasy_client_sdk_python/events.py +++ b/src/speakeasy_client_sdk_python/events.py @@ -38,6 +38,8 @@ def get_events_by_target( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -74,6 +76,7 @@ def get_events_by_target( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceEventsByTarget", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -83,7 +86,7 @@ def get_events_by_target( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GetWorkspaceEventsByTargetResponse( cli_event_batch=utils.unmarshal_json( @@ -99,8 +102,8 @@ def get_events_by_target( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = utils.stream_to_text(http_res) @@ -138,6 +141,8 @@ async def get_events_by_target_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -174,6 +179,7 @@ async def get_events_by_target_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceEventsByTarget", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -183,7 +189,7 @@ async def get_events_by_target_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GetWorkspaceEventsByTargetResponse( cli_event_batch=utils.unmarshal_json( @@ -199,8 +205,8 @@ async def get_events_by_target_async( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = await utils.stream_to_text_async(http_res) @@ -238,6 +244,8 @@ def get_targets( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceTargetsRequest) @@ -269,6 +277,7 @@ def get_targets( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceTargets", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -278,7 +287,7 @@ def get_targets( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GetWorkspaceTargetsResponse( target_sdk_list=utils.unmarshal_json( @@ -294,8 +303,8 @@ def get_targets( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = utils.stream_to_text(http_res) @@ -333,6 +342,8 @@ async def get_targets_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceTargetsRequest) @@ -364,6 +375,7 @@ async def get_targets_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceTargets", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -373,7 +385,7 @@ async def get_targets_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GetWorkspaceTargetsResponse( target_sdk_list=utils.unmarshal_json( @@ -389,8 +401,8 @@ async def get_targets_async( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = await utils.stream_to_text_async(http_res) @@ -428,6 +440,8 @@ def get_targets_deprecated( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -464,6 +478,7 @@ def get_targets_deprecated( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceTargetsDeprecated", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -473,7 +488,7 @@ def get_targets_deprecated( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GetWorkspaceTargetsDeprecatedResponse( target_sdk_list=utils.unmarshal_json( @@ -489,8 +504,8 @@ def get_targets_deprecated( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = utils.stream_to_text(http_res) @@ -528,6 +543,8 @@ async def get_targets_deprecated_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -564,6 +581,7 @@ async def get_targets_deprecated_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceTargetsDeprecated", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -573,7 +591,7 @@ async def get_targets_deprecated_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GetWorkspaceTargetsDeprecatedResponse( target_sdk_list=utils.unmarshal_json( @@ -589,8 +607,8 @@ async def get_targets_deprecated_async( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = await utils.stream_to_text_async(http_res) @@ -630,6 +648,8 @@ def post( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.PostWorkspaceEventsRequest) @@ -671,6 +691,7 @@ def post( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="postWorkspaceEvents", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -680,7 +701,7 @@ def post( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.PostWorkspaceEventsResponse( status_code=http_res.status_code, @@ -693,8 +714,8 @@ def post( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = utils.stream_to_text(http_res) @@ -734,6 +755,8 @@ async def post_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.PostWorkspaceEventsRequest) @@ -775,6 +798,7 @@ async def post_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="postWorkspaceEvents", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -784,7 +808,7 @@ async def post_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.PostWorkspaceEventsResponse( status_code=http_res.status_code, @@ -797,8 +821,8 @@ async def post_async( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = await utils.stream_to_text_async(http_res) @@ -836,6 +860,8 @@ def search( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.SearchWorkspaceEventsRequest) @@ -870,6 +896,7 @@ def search( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="searchWorkspaceEvents", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -879,7 +906,7 @@ def search( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.SearchWorkspaceEventsResponse( cli_event_batch=utils.unmarshal_json( @@ -895,8 +922,8 @@ def search( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = utils.stream_to_text(http_res) @@ -934,6 +961,8 @@ async def search_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.SearchWorkspaceEventsRequest) @@ -968,6 +997,7 @@ async def search_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="searchWorkspaceEvents", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -977,7 +1007,7 @@ async def search_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.SearchWorkspaceEventsResponse( cli_event_batch=utils.unmarshal_json( @@ -993,8 +1023,8 @@ async def search_async( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = await utils.stream_to_text_async(http_res) diff --git a/src/speakeasy_client_sdk_python/github.py b/src/speakeasy_client_sdk_python/github.py index 28f91113..1d53da5a 100644 --- a/src/speakeasy_client_sdk_python/github.py +++ b/src/speakeasy_client_sdk_python/github.py @@ -37,6 +37,8 @@ def check_access( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.CheckGithubAccessRequest) @@ -68,6 +70,7 @@ def check_access( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="checkGithubAccess", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -77,7 +80,7 @@ def check_access( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.CheckGithubAccessResponse( status_code=http_res.status_code, @@ -85,8 +88,8 @@ def check_access( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -128,6 +131,8 @@ async def check_access_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.CheckGithubAccessRequest) @@ -159,6 +164,7 @@ async def check_access_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="checkGithubAccess", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -168,7 +174,7 @@ async def check_access_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.CheckGithubAccessResponse( status_code=http_res.status_code, @@ -176,8 +182,8 @@ async def check_access_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -219,6 +225,8 @@ def check_publishing_p_rs( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -252,6 +260,7 @@ def check_publishing_p_rs( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubCheckPublishingPRs", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -261,7 +270,7 @@ def check_publishing_p_rs( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GithubCheckPublishingPRsResponse( github_publishing_pr_response=utils.unmarshal_json( @@ -272,8 +281,8 @@ def check_publishing_p_rs( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -315,6 +324,8 @@ async def check_publishing_p_rs_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -348,6 +359,7 @@ async def check_publishing_p_rs_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubCheckPublishingPRs", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -357,7 +369,7 @@ async def check_publishing_p_rs_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GithubCheckPublishingPRsResponse( github_publishing_pr_response=utils.unmarshal_json( @@ -368,8 +380,8 @@ async def check_publishing_p_rs_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -411,6 +423,8 @@ def check_publishing_secrets( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -444,6 +458,7 @@ def check_publishing_secrets( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubCheckPublishingSecrets", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -453,7 +468,7 @@ def check_publishing_secrets( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GithubCheckPublishingSecretsResponse( github_missing_publishing_secrets_response=utils.unmarshal_json( @@ -465,8 +480,8 @@ def check_publishing_secrets( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -508,6 +523,8 @@ async def check_publishing_secrets_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -541,6 +558,7 @@ async def check_publishing_secrets_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubCheckPublishingSecrets", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -550,7 +568,7 @@ async def check_publishing_secrets_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GithubCheckPublishingSecretsResponse( github_missing_publishing_secrets_response=utils.unmarshal_json( @@ -562,8 +580,8 @@ async def check_publishing_secrets_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -605,6 +623,8 @@ def configure_code_samples( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.GithubConfigureCodeSamplesRequest) @@ -639,6 +659,7 @@ def configure_code_samples( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubConfigureCodeSamples", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -648,7 +669,7 @@ def configure_code_samples( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GithubConfigureCodeSamplesResponse( github_configure_code_samples_response=utils.unmarshal_json( @@ -659,8 +680,8 @@ def configure_code_samples( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -702,6 +723,8 @@ async def configure_code_samples_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.GithubConfigureCodeSamplesRequest) @@ -736,6 +759,7 @@ async def configure_code_samples_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubConfigureCodeSamples", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -745,7 +769,7 @@ async def configure_code_samples_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GithubConfigureCodeSamplesResponse( github_configure_code_samples_response=utils.unmarshal_json( @@ -756,8 +780,8 @@ async def configure_code_samples_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -799,6 +823,8 @@ def configure_mintlify_repo( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -835,6 +861,7 @@ def configure_mintlify_repo( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubConfigureMintlifyRepo", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -844,7 +871,7 @@ def configure_mintlify_repo( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.GithubConfigureMintlifyRepoResponse( status_code=http_res.status_code, @@ -852,8 +879,8 @@ def configure_mintlify_repo( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -895,6 +922,8 @@ async def configure_mintlify_repo_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -931,6 +960,7 @@ async def configure_mintlify_repo_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubConfigureMintlifyRepo", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -940,7 +970,7 @@ async def configure_mintlify_repo_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.GithubConfigureMintlifyRepoResponse( status_code=http_res.status_code, @@ -948,8 +978,8 @@ async def configure_mintlify_repo_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -991,6 +1021,8 @@ def configure_target( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.GithubConfigureTargetRequest) @@ -1025,6 +1057,7 @@ def configure_target( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubConfigureTarget", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1034,7 +1067,7 @@ def configure_target( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.GithubConfigureTargetResponse( status_code=http_res.status_code, @@ -1042,8 +1075,8 @@ def configure_target( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1085,6 +1118,8 @@ async def configure_target_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.GithubConfigureTargetRequest) @@ -1119,6 +1154,7 @@ async def configure_target_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubConfigureTarget", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1128,7 +1164,7 @@ async def configure_target_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.GithubConfigureTargetResponse( status_code=http_res.status_code, @@ -1136,8 +1172,8 @@ async def configure_target_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1179,6 +1215,8 @@ def get_action( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetGitHubActionRequest) @@ -1210,6 +1248,7 @@ def get_action( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getGitHubAction", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1219,7 +1258,7 @@ def get_action( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetGitHubActionResponse( github_get_action_response=utils.unmarshal_json( @@ -1230,8 +1269,8 @@ def get_action( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1273,6 +1312,8 @@ async def get_action_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetGitHubActionRequest) @@ -1304,6 +1345,7 @@ async def get_action_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getGitHubAction", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1313,7 +1355,7 @@ async def get_action_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetGitHubActionResponse( github_get_action_response=utils.unmarshal_json( @@ -1324,8 +1366,8 @@ async def get_action_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1367,6 +1409,8 @@ def get_setup( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetGithubSetupStateRequest) @@ -1398,6 +1442,7 @@ def get_setup( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getGithubSetupState", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1407,7 +1452,7 @@ def get_setup( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetGithubSetupStateResponse( github_setup_state_response=utils.unmarshal_json( @@ -1418,8 +1463,8 @@ def get_setup( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1461,6 +1506,8 @@ async def get_setup_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetGithubSetupStateRequest) @@ -1492,6 +1539,7 @@ async def get_setup_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getGithubSetupState", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1501,7 +1549,7 @@ async def get_setup_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetGithubSetupStateResponse( github_setup_state_response=utils.unmarshal_json( @@ -1512,8 +1560,8 @@ async def get_setup_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1555,6 +1603,8 @@ def link_github( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.LinkGithubAccessRequest) @@ -1586,6 +1636,7 @@ def link_github( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="linkGithubAccess", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1595,7 +1646,7 @@ def link_github( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.LinkGithubAccessResponse( status_code=http_res.status_code, @@ -1603,8 +1654,8 @@ def link_github( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1646,6 +1697,8 @@ async def link_github_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.LinkGithubAccessRequest) @@ -1677,6 +1730,7 @@ async def link_github_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="linkGithubAccess", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1686,7 +1740,7 @@ async def link_github_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.LinkGithubAccessResponse( status_code=http_res.status_code, @@ -1694,8 +1748,8 @@ async def link_github_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1737,6 +1791,8 @@ def store_publishing_secrets( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -1777,6 +1833,7 @@ def store_publishing_secrets( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubStorePublishingSecrets", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1786,7 +1843,7 @@ def store_publishing_secrets( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.GithubStorePublishingSecretsResponse( status_code=http_res.status_code, @@ -1794,8 +1851,8 @@ def store_publishing_secrets( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1837,6 +1894,8 @@ async def store_publishing_secrets_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -1877,6 +1936,7 @@ async def store_publishing_secrets_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubStorePublishingSecrets", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1886,7 +1946,7 @@ async def store_publishing_secrets_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.GithubStorePublishingSecretsResponse( status_code=http_res.status_code, @@ -1894,8 +1954,8 @@ async def store_publishing_secrets_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1937,6 +1997,8 @@ def trigger_action( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.GithubTriggerActionRequest) @@ -1971,6 +2033,7 @@ def trigger_action( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubTriggerAction", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1980,7 +2043,7 @@ def trigger_action( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.GithubTriggerActionResponse( status_code=http_res.status_code, @@ -1988,8 +2051,8 @@ def trigger_action( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -2031,6 +2094,8 @@ async def trigger_action_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.GithubTriggerActionRequest) @@ -2065,6 +2130,7 @@ async def trigger_action_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="githubTriggerAction", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2074,7 +2140,7 @@ async def trigger_action_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.GithubTriggerActionResponse( status_code=http_res.status_code, @@ -2082,8 +2148,8 @@ async def trigger_action_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( diff --git a/src/speakeasy_client_sdk_python/httpclient.py b/src/speakeasy_client_sdk_python/httpclient.py index 167cea4e..1e426352 100644 --- a/src/speakeasy_client_sdk_python/httpclient.py +++ b/src/speakeasy_client_sdk_python/httpclient.py @@ -1,6 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" # pyright: reportReturnType = false +import asyncio +from concurrent.futures import ThreadPoolExecutor from typing_extensions import Protocol, runtime_checkable import httpx from typing import Any, Optional, Union @@ -82,3 +84,53 @@ def build_request( async def aclose(self) -> None: pass + + +class ClientOwner(Protocol): + client: Union[HttpClient, None] + async_client: Union[AsyncHttpClient, None] + + +def close_clients( + owner: ClientOwner, + sync_client: Union[HttpClient, None], + sync_client_supplied: bool, + async_client: Union[AsyncHttpClient, None], + async_client_supplied: bool, +) -> None: + """ + A finalizer function that is meant to be used with weakref.finalize to close + httpx clients used by an SDK so that underlying resources can be garbage + collected. + """ + + # Unset the client/async_client properties so there are no more references + # to them from the owning SDK instance and they can be reaped. + owner.client = None + owner.async_client = None + + if sync_client is not None and not sync_client_supplied: + try: + sync_client.close() + except Exception: + pass + + if async_client is not None and not async_client_supplied: + is_async = False + try: + asyncio.get_running_loop() + is_async = True + except RuntimeError: + pass + + try: + # If this function is called in an async loop then start another + # loop in a separate thread to close the async http client. + if is_async: + with ThreadPoolExecutor(max_workers=1) as executor: + future = executor.submit(asyncio.run, async_client.aclose()) + future.result() + else: + asyncio.run(async_client.aclose()) + except Exception: + pass diff --git a/src/speakeasy_client_sdk_python/models/__init__.py b/src/speakeasy_client_sdk_python/models/__init__.py new file mode 100644 index 00000000..cc53976c --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/__init__.py @@ -0,0 +1,4 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +# package + diff --git a/src/speakeasy_client_sdk_python/models/errors/__init__.py b/src/speakeasy_client_sdk_python/models/errors/__init__.py index ebdc9b39..e0ea76e1 100644 --- a/src/speakeasy_client_sdk_python/models/errors/__init__.py +++ b/src/speakeasy_client_sdk_python/models/errors/__init__.py @@ -3,4 +3,5 @@ from .error import Error, ErrorData from .sdkerror import SDKError + __all__ = ["Error", "ErrorData", "SDKError"] diff --git a/src/speakeasy_client_sdk_python/models/internal/__init__.py b/src/speakeasy_client_sdk_python/models/internal/__init__.py index 9e3dfb7a..d49aa0f3 100644 --- a/src/speakeasy_client_sdk_python/models/internal/__init__.py +++ b/src/speakeasy_client_sdk_python/models/internal/__init__.py @@ -2,4 +2,5 @@ from .globals import Globals, GlobalsTypedDict + __all__ = ["Globals", "GlobalsTypedDict"] diff --git a/src/speakeasy_client_sdk_python/models/operations/__init__.py b/src/speakeasy_client_sdk_python/models/operations/__init__.py index 80581f33..61d5d6d8 100644 --- a/src/speakeasy_client_sdk_python/models/operations/__init__.py +++ b/src/speakeasy_client_sdk_python/models/operations/__init__.py @@ -6,6 +6,14 @@ ActivateSubscriptionNamespaceResponse, ActivateSubscriptionNamespaceResponseTypedDict, ) +from .archivenamespace import ( + ArchiveNamespaceRequest, + ArchiveNamespaceRequestBody, + ArchiveNamespaceRequestBodyTypedDict, + ArchiveNamespaceRequestTypedDict, + ArchiveNamespaceResponse, + ArchiveNamespaceResponseTypedDict, +) from .checkgithubaccess import ( CheckGithubAccessRequest, CheckGithubAccessRequestTypedDict, @@ -18,15 +26,32 @@ CreateResponse, CreateResponseTypedDict, ) +from .createbillingaddons import ( + CreateBillingAddOnsResponse, + CreateBillingAddOnsResponseTypedDict, +) from .createfreetrial import CreateFreeTrialResponse, CreateFreeTrialResponseTypedDict from .createorganization import ( CreateOrganizationResponse, CreateOrganizationResponseTypedDict, ) +from .createpublishingtoken import ( + CreatePublishingTokenRequestBody, + CreatePublishingTokenRequestBodyTypedDict, + CreatePublishingTokenResponse, + CreatePublishingTokenResponseTypedDict, +) from .createremotesource import ( CreateRemoteSourceResponse, CreateRemoteSourceResponseTypedDict, ) +from .createschemastoreitem import ( + CreateSchemaStoreItemRequestBody, + CreateSchemaStoreItemRequestBodyTypedDict, + CreateSchemaStoreItemResponse, + CreateSchemaStoreItemResponseTypedDict, + Format, +) from .createworkspace import CreateWorkspaceResponse, CreateWorkspaceResponseTypedDict from .createworkspacetoken import ( CreateWorkspaceTokenGlobals, @@ -36,6 +61,18 @@ CreateWorkspaceTokenResponse, CreateWorkspaceTokenResponseTypedDict, ) +from .deletebillingaddon import ( + DeleteBillingAddOnRequest, + DeleteBillingAddOnRequestTypedDict, + DeleteBillingAddOnResponse, + DeleteBillingAddOnResponseTypedDict, +) +from .deletepublishingtoken import ( + DeletePublishingTokenRequest, + DeletePublishingTokenRequestTypedDict, + DeletePublishingTokenResponse, + DeletePublishingTokenResponseTypedDict, +) from .deleteworkspacetoken import ( DeleteWorkspaceTokenGlobals, DeleteWorkspaceTokenGlobalsTypedDict, @@ -60,6 +97,10 @@ GetAccessTokenResponse, GetAccessTokenResponseTypedDict, ) +from .getbillingaddons import ( + GetBillingAddOnsResponse, + GetBillingAddOnsResponseTypedDict, +) from .getblob import ( GetBlobRequest, GetBlobRequestTypedDict, @@ -87,6 +128,8 @@ GetCodeSamplesRequestTypedDict, GetCodeSamplesResponse, GetCodeSamplesResponseTypedDict, + MethodPaths, + MethodPathsTypedDict, ) from .getgithubaction import ( GetGitHubActionRequest, @@ -129,12 +172,42 @@ GetOrganizationUsageResponse, GetOrganizationUsageResponseTypedDict, ) +from .getpublishingtoken import ( + GetPublishingTokenResponse, + GetPublishingTokenResponseTypedDict, +) +from .getpublishingtokenbyid import ( + GetPublishingTokenByIDRequest, + GetPublishingTokenByIDRequestTypedDict, + GetPublishingTokenByIDResponse, + GetPublishingTokenByIDResponseTypedDict, +) +from .getpublishingtokenpublicmetadata import ( + GetPublishingTokenPublicMetadataRequest, + GetPublishingTokenPublicMetadataRequestTypedDict, + GetPublishingTokenPublicMetadataResponse, + GetPublishingTokenPublicMetadataResponseBody, + GetPublishingTokenPublicMetadataResponseBodyTypedDict, + GetPublishingTokenPublicMetadataResponseTypedDict, +) +from .getpublishingtokentargetbyid import ( + GetPublishingTokenTargetByIDRequest, + GetPublishingTokenTargetByIDRequestTypedDict, + GetPublishingTokenTargetByIDResponse, + GetPublishingTokenTargetByIDResponseTypedDict, +) from .getrevisions import ( GetRevisionsRequest, GetRevisionsRequestTypedDict, GetRevisionsResponse, GetRevisionsResponseTypedDict, ) +from .getschemastoreitem import ( + GetSchemaStoreItemRequestBody, + GetSchemaStoreItemRequestBodyTypedDict, + GetSchemaStoreItemResponse, + GetSchemaStoreItemResponseTypedDict, +) from .gettags import ( GetTagsRequest, GetTagsRequestTypedDict, @@ -312,6 +385,10 @@ SetVisibilityResponse, SetVisibilityResponseTypedDict, ) +from .setworkspacefeatureflags import ( + SetWorkspaceFeatureFlagsResponse, + SetWorkspaceFeatureFlagsResponseTypedDict, +) from .suggest import ( SuggestRequest, SuggestRequestTypedDict, @@ -335,6 +412,14 @@ SuggestOpenAPIRegistryResponse, SuggestOpenAPIRegistryResponseTypedDict, ) +from .updatepublishingtokenexpiration import ( + UpdatePublishingTokenExpirationRequest, + UpdatePublishingTokenExpirationRequestBody, + UpdatePublishingTokenExpirationRequestBodyTypedDict, + UpdatePublishingTokenExpirationRequestTypedDict, + UpdatePublishingTokenExpirationResponse, + UpdatePublishingTokenExpirationResponseTypedDict, +) from .updateworkspacedetails import ( UpdateWorkspaceDetailsGlobals, UpdateWorkspaceDetailsGlobalsTypedDict, @@ -363,25 +448,42 @@ ) from .validateapikey import ValidateAPIKeyResponse, ValidateAPIKeyResponseTypedDict + __all__ = [ "ActivateSubscriptionNamespaceRequest", "ActivateSubscriptionNamespaceRequestTypedDict", "ActivateSubscriptionNamespaceResponse", "ActivateSubscriptionNamespaceResponseTypedDict", + "ArchiveNamespaceRequest", + "ArchiveNamespaceRequestBody", + "ArchiveNamespaceRequestBodyTypedDict", + "ArchiveNamespaceRequestTypedDict", + "ArchiveNamespaceResponse", + "ArchiveNamespaceResponseTypedDict", "CheckGithubAccessRequest", "CheckGithubAccessRequestTypedDict", "CheckGithubAccessResponse", "CheckGithubAccessResponseTypedDict", + "CreateBillingAddOnsResponse", + "CreateBillingAddOnsResponseTypedDict", "CreateFreeTrialResponse", "CreateFreeTrialResponseTypedDict", "CreateOrganizationResponse", "CreateOrganizationResponseTypedDict", + "CreatePublishingTokenRequestBody", + "CreatePublishingTokenRequestBodyTypedDict", + "CreatePublishingTokenResponse", + "CreatePublishingTokenResponseTypedDict", "CreateRemoteSourceResponse", "CreateRemoteSourceResponseTypedDict", "CreateRequestBody", "CreateRequestBodyTypedDict", "CreateResponse", "CreateResponseTypedDict", + "CreateSchemaStoreItemRequestBody", + "CreateSchemaStoreItemRequestBodyTypedDict", + "CreateSchemaStoreItemResponse", + "CreateSchemaStoreItemResponseTypedDict", "CreateWorkspaceResponse", "CreateWorkspaceResponseTypedDict", "CreateWorkspaceTokenGlobals", @@ -390,6 +492,14 @@ "CreateWorkspaceTokenRequestTypedDict", "CreateWorkspaceTokenResponse", "CreateWorkspaceTokenResponseTypedDict", + "DeleteBillingAddOnRequest", + "DeleteBillingAddOnRequestTypedDict", + "DeleteBillingAddOnResponse", + "DeleteBillingAddOnResponseTypedDict", + "DeletePublishingTokenRequest", + "DeletePublishingTokenRequestTypedDict", + "DeletePublishingTokenResponse", + "DeletePublishingTokenResponseTypedDict", "DeleteWorkspaceTokenGlobals", "DeleteWorkspaceTokenGlobalsTypedDict", "DeleteWorkspaceTokenRequest", @@ -398,6 +508,7 @@ "DeleteWorkspaceTokenResponseTypedDict", "File", "FileTypedDict", + "Format", "GenerateCodeSamplePreviewAsyncResponse", "GenerateCodeSamplePreviewAsyncResponseBody", "GenerateCodeSamplePreviewAsyncResponseBodyTypedDict", @@ -408,6 +519,8 @@ "GetAccessTokenRequestTypedDict", "GetAccessTokenResponse", "GetAccessTokenResponseTypedDict", + "GetBillingAddOnsResponse", + "GetBillingAddOnsResponseTypedDict", "GetBlobRequest", "GetBlobRequestTypedDict", "GetBlobResponse", @@ -456,10 +569,30 @@ "GetOrganizationUsageResponseTypedDict", "GetOrganizationsResponse", "GetOrganizationsResponseTypedDict", + "GetPublishingTokenByIDRequest", + "GetPublishingTokenByIDRequestTypedDict", + "GetPublishingTokenByIDResponse", + "GetPublishingTokenByIDResponseTypedDict", + "GetPublishingTokenPublicMetadataRequest", + "GetPublishingTokenPublicMetadataRequestTypedDict", + "GetPublishingTokenPublicMetadataResponse", + "GetPublishingTokenPublicMetadataResponseBody", + "GetPublishingTokenPublicMetadataResponseBodyTypedDict", + "GetPublishingTokenPublicMetadataResponseTypedDict", + "GetPublishingTokenResponse", + "GetPublishingTokenResponseTypedDict", + "GetPublishingTokenTargetByIDRequest", + "GetPublishingTokenTargetByIDRequestTypedDict", + "GetPublishingTokenTargetByIDResponse", + "GetPublishingTokenTargetByIDResponseTypedDict", "GetRevisionsRequest", "GetRevisionsRequestTypedDict", "GetRevisionsResponse", "GetRevisionsResponseTypedDict", + "GetSchemaStoreItemRequestBody", + "GetSchemaStoreItemRequestBodyTypedDict", + "GetSchemaStoreItemResponse", + "GetSchemaStoreItemResponseTypedDict", "GetTagsRequest", "GetTagsRequestTypedDict", "GetTagsResponse", @@ -556,6 +689,8 @@ "ListRemoteSourcesRequestTypedDict", "ListRemoteSourcesResponse", "ListRemoteSourcesResponseTypedDict", + "MethodPaths", + "MethodPathsTypedDict", "PostTagsRequest", "PostTagsRequestTypedDict", "PostTagsResponse", @@ -588,6 +723,8 @@ "SetVisibilityRequestTypedDict", "SetVisibilityResponse", "SetVisibilityResponseTypedDict", + "SetWorkspaceFeatureFlagsResponse", + "SetWorkspaceFeatureFlagsResponseTypedDict", "SuggestItemsResponse", "SuggestItemsResponseTypedDict", "SuggestOpenAPIRegistryRequest", @@ -604,6 +741,12 @@ "SuggestRequestTypedDict", "SuggestResponse", "SuggestResponseTypedDict", + "UpdatePublishingTokenExpirationRequest", + "UpdatePublishingTokenExpirationRequestBody", + "UpdatePublishingTokenExpirationRequestBodyTypedDict", + "UpdatePublishingTokenExpirationRequestTypedDict", + "UpdatePublishingTokenExpirationResponse", + "UpdatePublishingTokenExpirationResponseTypedDict", "UpdateWorkspaceDetailsGlobals", "UpdateWorkspaceDetailsGlobalsTypedDict", "UpdateWorkspaceDetailsRequest", diff --git a/src/speakeasy_client_sdk_python/models/operations/archivenamespace.py b/src/speakeasy_client_sdk_python/models/operations/archivenamespace.py new file mode 100644 index 00000000..6e72af8b --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/archivenamespace.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from speakeasy_client_sdk_python.types import BaseModel +from speakeasy_client_sdk_python.utils import ( + FieldMetadata, + PathParamMetadata, + RequestMetadata, +) +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ArchiveNamespaceRequestBodyTypedDict(TypedDict): + r"""Archived status""" + + archived: NotRequired[bool] + + +class ArchiveNamespaceRequestBody(BaseModel): + r"""Archived status""" + + archived: Optional[bool] = True + + +class ArchiveNamespaceRequestTypedDict(TypedDict): + namespace_name: str + request_body: NotRequired[ArchiveNamespaceRequestBodyTypedDict] + r"""Archived status""" + + +class ArchiveNamespaceRequest(BaseModel): + namespace_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + request_body: Annotated[ + Optional[ArchiveNamespaceRequestBody], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = None + r"""Archived status""" + + +class ArchiveNamespaceResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class ArchiveNamespaceResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/speakeasy_client_sdk_python/models/operations/createbillingaddons.py b/src/speakeasy_client_sdk_python/models/operations/createbillingaddons.py new file mode 100644 index 00000000..f6cfd43a --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/createbillingaddons.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from speakeasy_client_sdk_python.models.shared import ( + organizationbillingaddonresponse as shared_organizationbillingaddonresponse, +) +from speakeasy_client_sdk_python.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CreateBillingAddOnsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + organization_billing_add_on_response: NotRequired[ + shared_organizationbillingaddonresponse.OrganizationBillingAddOnResponseTypedDict + ] + r"""Success""" + + +class CreateBillingAddOnsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + organization_billing_add_on_response: Optional[ + shared_organizationbillingaddonresponse.OrganizationBillingAddOnResponse + ] = None + r"""Success""" diff --git a/src/speakeasy_client_sdk_python/models/operations/createpublishingtoken.py b/src/speakeasy_client_sdk_python/models/operations/createpublishingtoken.py new file mode 100644 index 00000000..2882b9c9 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/createpublishingtoken.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +import httpx +from speakeasy_client_sdk_python.models.shared import ( + publishingtoken as shared_publishingtoken, +) +from speakeasy_client_sdk_python.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CreatePublishingTokenRequestBodyTypedDict(TypedDict): + r"""The publishing token to create""" + + target_id: str + target_resource: str + token_name: str + valid_until: datetime + + +class CreatePublishingTokenRequestBody(BaseModel): + r"""The publishing token to create""" + + target_id: str + + target_resource: str + + token_name: str + + valid_until: datetime + + +class CreatePublishingTokenResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + publishing_token: NotRequired[shared_publishingtoken.PublishingTokenTypedDict] + r"""OK""" + + +class CreatePublishingTokenResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + publishing_token: Optional[shared_publishingtoken.PublishingToken] = None + r"""OK""" diff --git a/src/speakeasy_client_sdk_python/models/operations/createschemastoreitem.py b/src/speakeasy_client_sdk_python/models/operations/createschemastoreitem.py new file mode 100644 index 00000000..2308dfb5 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/createschemastoreitem.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import httpx +import pydantic +from speakeasy_client_sdk_python.models.shared import ( + schemastoreitem as shared_schemastoreitem, +) +from speakeasy_client_sdk_python.types import BaseModel +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class Format(str, Enum): + r"""The format of the OpenAPI specification.""" + + JSON = "json" + YAML = "yaml" + + +class CreateSchemaStoreItemRequestBodyTypedDict(TypedDict): + format_: Format + r"""The format of the OpenAPI specification.""" + package_name: str + r"""The package name to use in code snippets / quickstart.""" + sdk_classname: str + r"""The classname of the SDK to use in code snippets / quickstart.""" + spec: str + r"""The OpenAPI specification to store.""" + + +class CreateSchemaStoreItemRequestBody(BaseModel): + format_: Annotated[Format, pydantic.Field(alias="format")] + r"""The format of the OpenAPI specification.""" + + package_name: Annotated[str, pydantic.Field(alias="packageName")] + r"""The package name to use in code snippets / quickstart.""" + + sdk_classname: Annotated[str, pydantic.Field(alias="sdkClassname")] + r"""The classname of the SDK to use in code snippets / quickstart.""" + + spec: str + r"""The OpenAPI specification to store.""" + + +class CreateSchemaStoreItemResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + schema_store_item: NotRequired[shared_schemastoreitem.SchemaStoreItemTypedDict] + r"""OK""" + + +class CreateSchemaStoreItemResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + schema_store_item: Optional[shared_schemastoreitem.SchemaStoreItem] = None + r"""OK""" diff --git a/src/speakeasy_client_sdk_python/models/operations/deletebillingaddon.py b/src/speakeasy_client_sdk_python/models/operations/deletebillingaddon.py new file mode 100644 index 00000000..284fea55 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/deletebillingaddon.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from pydantic.functional_validators import PlainValidator +from speakeasy_client_sdk_python.models.shared import ( + billingaddon as shared_billingaddon, +) +from speakeasy_client_sdk_python.types import BaseModel +from speakeasy_client_sdk_python.utils import ( + FieldMetadata, + PathParamMetadata, + validate_open_enum, +) +from typing_extensions import Annotated, TypedDict + + +class DeleteBillingAddOnRequestTypedDict(TypedDict): + add_on: shared_billingaddon.BillingAddOn + r"""The specific add-on to delete.""" + + +class DeleteBillingAddOnRequest(BaseModel): + add_on: Annotated[ + Annotated[ + shared_billingaddon.BillingAddOn, PlainValidator(validate_open_enum(False)) + ], + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The specific add-on to delete.""" + + +class DeleteBillingAddOnResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class DeleteBillingAddOnResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/speakeasy_client_sdk_python/models/operations/deletepublishingtoken.py b/src/speakeasy_client_sdk_python/models/operations/deletepublishingtoken.py new file mode 100644 index 00000000..13c739f4 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/deletepublishingtoken.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +import pydantic +from speakeasy_client_sdk_python.types import BaseModel +from speakeasy_client_sdk_python.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class DeletePublishingTokenRequestTypedDict(TypedDict): + token_id: str + r"""Unique identifier of the publishing token.""" + + +class DeletePublishingTokenRequest(BaseModel): + token_id: Annotated[ + str, + pydantic.Field(alias="tokenID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""Unique identifier of the publishing token.""" + + +class DeletePublishingTokenResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class DeletePublishingTokenResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/speakeasy_client_sdk_python/models/operations/generatecodesamplepreview.py b/src/speakeasy_client_sdk_python/models/operations/generatecodesamplepreview.py index 9e2079ca..a03c9b89 100644 --- a/src/speakeasy_client_sdk_python/models/operations/generatecodesamplepreview.py +++ b/src/speakeasy_client_sdk_python/models/operations/generatecodesamplepreview.py @@ -2,6 +2,9 @@ from __future__ import annotations import httpx +from speakeasy_client_sdk_python.models.shared import ( + usagesnippets as shared_usagesnippets, +) from speakeasy_client_sdk_python.types import BaseModel from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -14,10 +17,8 @@ class GenerateCodeSamplePreviewResponseTypedDict(TypedDict): r"""HTTP response status code for this operation""" raw_response: httpx.Response r"""Raw HTTP response; suitable for custom response parsing""" - two_hundred_application_json_response_stream: NotRequired[httpx.Response] - r"""Successfully returned codeSample overlay file""" - two_hundred_application_x_yaml_response_stream: NotRequired[httpx.Response] - r"""Successfully returned codeSample overlay file""" + usage_snippets: NotRequired[shared_usagesnippets.UsageSnippetsTypedDict] + r"""OK""" class GenerateCodeSamplePreviewResponse(BaseModel): @@ -30,8 +31,5 @@ class GenerateCodeSamplePreviewResponse(BaseModel): raw_response: httpx.Response r"""Raw HTTP response; suitable for custom response parsing""" - two_hundred_application_json_response_stream: Optional[httpx.Response] = None - r"""Successfully returned codeSample overlay file""" - - two_hundred_application_x_yaml_response_stream: Optional[httpx.Response] = None - r"""Successfully returned codeSample overlay file""" + usage_snippets: Optional[shared_usagesnippets.UsageSnippets] = None + r"""OK""" diff --git a/src/speakeasy_client_sdk_python/models/operations/getbillingaddons.py b/src/speakeasy_client_sdk_python/models/operations/getbillingaddons.py new file mode 100644 index 00000000..7e2a4f5f --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/getbillingaddons.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from speakeasy_client_sdk_python.models.shared import ( + organizationbillingaddonresponse as shared_organizationbillingaddonresponse, +) +from speakeasy_client_sdk_python.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class GetBillingAddOnsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + organization_billing_add_on_response: NotRequired[ + shared_organizationbillingaddonresponse.OrganizationBillingAddOnResponseTypedDict + ] + r"""Success""" + + +class GetBillingAddOnsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + organization_billing_add_on_response: Optional[ + shared_organizationbillingaddonresponse.OrganizationBillingAddOnResponse + ] = None + r"""Success""" diff --git a/src/speakeasy_client_sdk_python/models/operations/getcodesamplepreviewasync.py b/src/speakeasy_client_sdk_python/models/operations/getcodesamplepreviewasync.py index 95844f7e..cfd9bb7e 100644 --- a/src/speakeasy_client_sdk_python/models/operations/getcodesamplepreviewasync.py +++ b/src/speakeasy_client_sdk_python/models/operations/getcodesamplepreviewasync.py @@ -5,6 +5,7 @@ import pydantic from speakeasy_client_sdk_python.models.shared import ( codesamplesjobstatus as shared_codesamplesjobstatus, + usagesnippets as shared_usagesnippets, ) from speakeasy_client_sdk_python.types import BaseModel from speakeasy_client_sdk_python.utils import FieldMetadata, PathParamMetadata @@ -47,13 +48,9 @@ class GetCodeSamplePreviewAsyncResponseTypedDict(TypedDict): r"""HTTP response status code for this operation""" raw_response: httpx.Response r"""Raw HTTP response; suitable for custom response parsing""" - two_hundred_application_json_response_stream: NotRequired[httpx.Response] - r"""Successfully returned codeSample overlay file""" - two_hundred_application_x_yaml_response_stream: NotRequired[httpx.Response] - r"""Successfully returned codeSample overlay file""" - two_hundred_and_two_application_json_object: NotRequired[ - GetCodeSamplePreviewAsyncResponseBodyTypedDict - ] + usage_snippets: NotRequired[shared_usagesnippets.UsageSnippetsTypedDict] + r"""OK""" + object: NotRequired[GetCodeSamplePreviewAsyncResponseBodyTypedDict] r"""Job is still in progress""" @@ -67,13 +64,8 @@ class GetCodeSamplePreviewAsyncResponse(BaseModel): raw_response: httpx.Response r"""Raw HTTP response; suitable for custom response parsing""" - two_hundred_application_json_response_stream: Optional[httpx.Response] = None - r"""Successfully returned codeSample overlay file""" - - two_hundred_application_x_yaml_response_stream: Optional[httpx.Response] = None - r"""Successfully returned codeSample overlay file""" + usage_snippets: Optional[shared_usagesnippets.UsageSnippets] = None + r"""OK""" - two_hundred_and_two_application_json_object: Optional[ - GetCodeSamplePreviewAsyncResponseBody - ] = None + object: Optional[GetCodeSamplePreviewAsyncResponseBody] = None r"""Job is still in progress""" diff --git a/src/speakeasy_client_sdk_python/models/operations/getcodesamples.py b/src/speakeasy_client_sdk_python/models/operations/getcodesamples.py index 34e5af95..efa954e5 100644 --- a/src/speakeasy_client_sdk_python/models/operations/getcodesamples.py +++ b/src/speakeasy_client_sdk_python/models/operations/getcodesamples.py @@ -3,6 +3,7 @@ from __future__ import annotations import httpx from speakeasy_client_sdk_python.models.shared import ( + httpmethod as shared_httpmethod, usagesnippets as shared_usagesnippets, ) from speakeasy_client_sdk_python.types import BaseModel @@ -11,28 +12,51 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class MethodPathsTypedDict(TypedDict): + method: shared_httpmethod.HTTPMethod + path: str + + +class MethodPaths(BaseModel): + method: Annotated[shared_httpmethod.HTTPMethod, FieldMetadata(query=True)] + + path: Annotated[str, FieldMetadata(query=True)] + + class GetCodeSamplesRequestTypedDict(TypedDict): registry_url: str - r"""The registry URL from which to retrieve the snippets. E.g. https://spec.speakeasy.com/org/ws/my-source""" + r"""The registry URL from which to retrieve the snippets.""" operation_ids: NotRequired[List[str]] + r"""The operation IDs to retrieve snippets for.""" + method_paths: NotRequired[List[MethodPathsTypedDict]] + r"""The method paths to retrieve snippets for.""" languages: NotRequired[List[str]] + r"""The languages to retrieve snippets for.""" class GetCodeSamplesRequest(BaseModel): registry_url: Annotated[ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) ] - r"""The registry URL from which to retrieve the snippets. E.g. https://spec.speakeasy.com/org/ws/my-source""" + r"""The registry URL from which to retrieve the snippets.""" operation_ids: Annotated[ Optional[List[str]], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None + r"""The operation IDs to retrieve snippets for.""" + + method_paths: Annotated[ + Optional[List[MethodPaths]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The method paths to retrieve snippets for.""" languages: Annotated[ Optional[List[str]], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None + r"""The languages to retrieve snippets for.""" class GetCodeSamplesResponseTypedDict(TypedDict): diff --git a/src/speakeasy_client_sdk_python/models/operations/getpublishingtoken.py b/src/speakeasy_client_sdk_python/models/operations/getpublishingtoken.py new file mode 100644 index 00000000..d9786a95 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/getpublishingtoken.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from speakeasy_client_sdk_python.models.shared import ( + publishingtoken as shared_publishingtoken, +) +from speakeasy_client_sdk_python.types import BaseModel +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class GetPublishingTokenResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + classes: NotRequired[List[shared_publishingtoken.PublishingTokenTypedDict]] + r"""OK""" + + +class GetPublishingTokenResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + classes: Optional[List[shared_publishingtoken.PublishingToken]] = None + r"""OK""" diff --git a/src/speakeasy_client_sdk_python/models/operations/getpublishingtokenbyid.py b/src/speakeasy_client_sdk_python/models/operations/getpublishingtokenbyid.py new file mode 100644 index 00000000..213191eb --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/getpublishingtokenbyid.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +import pydantic +from speakeasy_client_sdk_python.models.shared import ( + publishingtoken as shared_publishingtoken, +) +from speakeasy_client_sdk_python.types import BaseModel +from speakeasy_client_sdk_python.utils import FieldMetadata, PathParamMetadata +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetPublishingTokenByIDRequestTypedDict(TypedDict): + token_id: str + r"""Unique identifier of the publishing token.""" + + +class GetPublishingTokenByIDRequest(BaseModel): + token_id: Annotated[ + str, + pydantic.Field(alias="tokenID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""Unique identifier of the publishing token.""" + + +class GetPublishingTokenByIDResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + publishing_token: NotRequired[shared_publishingtoken.PublishingTokenTypedDict] + r"""OK""" + + +class GetPublishingTokenByIDResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + publishing_token: Optional[shared_publishingtoken.PublishingToken] = None + r"""OK""" diff --git a/src/speakeasy_client_sdk_python/models/operations/getpublishingtokenpublicmetadata.py b/src/speakeasy_client_sdk_python/models/operations/getpublishingtokenpublicmetadata.py new file mode 100644 index 00000000..059ec595 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/getpublishingtokenpublicmetadata.py @@ -0,0 +1,73 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +import httpx +import pydantic +from speakeasy_client_sdk_python.types import BaseModel +from speakeasy_client_sdk_python.utils import FieldMetadata, PathParamMetadata +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetPublishingTokenPublicMetadataRequestTypedDict(TypedDict): + token_id: str + r"""Unique identifier of the publishing token.""" + + +class GetPublishingTokenPublicMetadataRequest(BaseModel): + token_id: Annotated[ + str, + pydantic.Field(alias="tokenID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""Unique identifier of the publishing token.""" + + +class GetPublishingTokenPublicMetadataResponseBodyTypedDict(TypedDict): + r"""OK""" + + organization_id: NotRequired[str] + target_id: NotRequired[str] + target_resource: NotRequired[str] + valid_until: NotRequired[datetime] + workspace_id: NotRequired[str] + + +class GetPublishingTokenPublicMetadataResponseBody(BaseModel): + r"""OK""" + + organization_id: Optional[str] = None + + target_id: Optional[str] = None + + target_resource: Optional[str] = None + + valid_until: Optional[datetime] = None + + workspace_id: Optional[str] = None + + +class GetPublishingTokenPublicMetadataResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + object: NotRequired[GetPublishingTokenPublicMetadataResponseBodyTypedDict] + r"""OK""" + + +class GetPublishingTokenPublicMetadataResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + object: Optional[GetPublishingTokenPublicMetadataResponseBody] = None + r"""OK""" diff --git a/src/speakeasy_client_sdk_python/models/operations/getpublishingtokentargetbyid.py b/src/speakeasy_client_sdk_python/models/operations/getpublishingtokentargetbyid.py new file mode 100644 index 00000000..23929e8b --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/getpublishingtokentargetbyid.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +import pydantic +from speakeasy_client_sdk_python.types import BaseModel +from speakeasy_client_sdk_python.utils import FieldMetadata, PathParamMetadata +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetPublishingTokenTargetByIDRequestTypedDict(TypedDict): + token_id: str + r"""Unique identifier of the publishing token.""" + + +class GetPublishingTokenTargetByIDRequest(BaseModel): + token_id: Annotated[ + str, + pydantic.Field(alias="tokenID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""Unique identifier of the publishing token.""" + + +class GetPublishingTokenTargetByIDResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + res: NotRequired[str] + r"""OK""" + + +class GetPublishingTokenTargetByIDResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + res: Optional[str] = None + r"""OK""" diff --git a/src/speakeasy_client_sdk_python/models/operations/getschemastoreitem.py b/src/speakeasy_client_sdk_python/models/operations/getschemastoreitem.py new file mode 100644 index 00000000..4d9d37d0 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/getschemastoreitem.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from speakeasy_client_sdk_python.models.shared import ( + schemastoreitem as shared_schemastoreitem, +) +from speakeasy_client_sdk_python.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class GetSchemaStoreItemRequestBodyTypedDict(TypedDict): + id: NotRequired[str] + + +class GetSchemaStoreItemRequestBody(BaseModel): + id: Optional[str] = None + + +class GetSchemaStoreItemResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + schema_store_item: NotRequired[shared_schemastoreitem.SchemaStoreItemTypedDict] + r"""OK""" + + +class GetSchemaStoreItemResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + schema_store_item: Optional[shared_schemastoreitem.SchemaStoreItem] = None + r"""OK""" diff --git a/src/speakeasy_client_sdk_python/models/operations/setworkspacefeatureflags.py b/src/speakeasy_client_sdk_python/models/operations/setworkspacefeatureflags.py new file mode 100644 index 00000000..d6076121 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/setworkspacefeatureflags.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +from speakeasy_client_sdk_python.models.shared import ( + workspacefeatureflagresponse as shared_workspacefeatureflagresponse, +) +from speakeasy_client_sdk_python.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class SetWorkspaceFeatureFlagsResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + workspace_feature_flag_response: NotRequired[ + shared_workspacefeatureflagresponse.WorkspaceFeatureFlagResponseTypedDict + ] + r"""Success""" + + +class SetWorkspaceFeatureFlagsResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + workspace_feature_flag_response: Optional[ + shared_workspacefeatureflagresponse.WorkspaceFeatureFlagResponse + ] = None + r"""Success""" diff --git a/src/speakeasy_client_sdk_python/models/operations/updatepublishingtokenexpiration.py b/src/speakeasy_client_sdk_python/models/operations/updatepublishingtokenexpiration.py new file mode 100644 index 00000000..420422f6 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/operations/updatepublishingtokenexpiration.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +import httpx +import pydantic +from speakeasy_client_sdk_python.types import BaseModel +from speakeasy_client_sdk_python.utils import ( + FieldMetadata, + PathParamMetadata, + RequestMetadata, +) +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class UpdatePublishingTokenExpirationRequestBodyTypedDict(TypedDict): + r"""The publishing token to update""" + + valid_until: datetime + r"""The new expiration date for the publishing token.""" + token_name: NotRequired[str] + r"""The new name for the publishing token.""" + + +class UpdatePublishingTokenExpirationRequestBody(BaseModel): + r"""The publishing token to update""" + + valid_until: datetime + r"""The new expiration date for the publishing token.""" + + token_name: Optional[str] = None + r"""The new name for the publishing token.""" + + +class UpdatePublishingTokenExpirationRequestTypedDict(TypedDict): + token_id: str + r"""Unique identifier of the publishing token.""" + request_body: NotRequired[UpdatePublishingTokenExpirationRequestBodyTypedDict] + r"""The publishing token to update""" + + +class UpdatePublishingTokenExpirationRequest(BaseModel): + token_id: Annotated[ + str, + pydantic.Field(alias="tokenID"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""Unique identifier of the publishing token.""" + + request_body: Annotated[ + Optional[UpdatePublishingTokenExpirationRequestBody], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = None + r"""The publishing token to update""" + + +class UpdatePublishingTokenExpirationResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + +class UpdatePublishingTokenExpirationResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/src/speakeasy_client_sdk_python/models/shared/__init__.py b/src/speakeasy_client_sdk_python/models/shared/__init__.py index 1c839643..dc512e85 100644 --- a/src/speakeasy_client_sdk_python/models/shared/__init__.py +++ b/src/speakeasy_client_sdk_python/models/shared/__init__.py @@ -15,6 +15,7 @@ from .addtags import AddTags, AddTagsTypedDict from .annotations import Annotations, AnnotationsTypedDict from .apikeydetails import APIKeyDetails, APIKeyDetailsTypedDict +from .billingaddon import BillingAddOn from .clievent import CliEvent, CliEventTypedDict, GenerateBumpType, OpenapiDiffBumpType from .codesampleschemainput import ( CodeSampleSchemaInput, @@ -55,6 +56,8 @@ from .githubpublishingprresponse import ( GithubPublishingPRResponse, GithubPublishingPRResponseTypedDict, + PullRequestMetadata, + PullRequestMetadataTypedDict, ) from .githubsetupstateresponse import ( Actions, @@ -72,6 +75,7 @@ GithubTriggerActionRequest, GithubTriggerActionRequestTypedDict, ) +from .httpmethod import HTTPMethod from .interactiontype import InteractionType from .manifest import Manifest, ManifestTypedDict from .namespace import ( @@ -84,6 +88,14 @@ from .oasoperation import OASOperation, OASOperationTypedDict from .oassummary import OASSummary, OASSummaryTypedDict from .organization import Organization, OrganizationTypedDict +from .organizationbillingaddonrequest import ( + OrganizationBillingAddOnRequest, + OrganizationBillingAddOnRequestTypedDict, +) +from .organizationbillingaddonresponse import ( + OrganizationBillingAddOnResponse, + OrganizationBillingAddOnResponseTypedDict, +) from .organizationusage import OrganizationUsage, OrganizationUsageTypedDict from .organizationusageresponse import ( OrganizationUsageResponse, @@ -91,6 +103,7 @@ ) from .preflightrequest import PreflightRequest, PreflightRequestTypedDict from .preflighttoken import PreflightToken, PreflightTokenTypedDict +from .publishingtoken import PublishingToken, PublishingTokenTypedDict, TargetResource from .remotedocument import RemoteDocument, RemoteDocumentTypedDict from .remotesource import RemoteSource, RemoteSourceTypedDict from .remotesourcesubscriptionsettings import ( @@ -99,6 +112,12 @@ ) from .report import Report, ReportTypedDict, Type from .revision import Revision, RevisionTypedDict +from .revisioncontentsmetadata import ( + RevisionContentsMetadata, + RevisionContentsMetadataType, + RevisionContentsMetadataTypedDict, +) +from .schemastoreitem import Format, SchemaStoreItem, SchemaStoreItemTypedDict from .security import Security, SecurityTypedDict from .shorturl import ShortURL, ShortURLTypedDict from .ssometadata import SSOMetadata, SSOMetadataTypedDict @@ -129,6 +148,11 @@ WorkspaceAndOrganization, WorkspaceAndOrganizationTypedDict, ) +from .workspacefeatureflag import WorkspaceFeatureFlag +from .workspacefeatureflagrequest import ( + WorkspaceFeatureFlagRequest, + WorkspaceFeatureFlagRequestTypedDict, +) from .workspacefeatureflagresponse import ( WorkspaceFeatureFlagResponse, WorkspaceFeatureFlagResponseTypedDict, @@ -143,6 +167,7 @@ from .workspaceteamresponse import WorkspaceTeamResponse, WorkspaceTeamResponseTypedDict from .workspacetoken import WorkspaceToken, WorkspaceTokenTypedDict + __all__ = [ "APIKeyDetails", "APIKeyDetailsTypedDict", @@ -161,6 +186,7 @@ "AnnotationsTypedDict", "Auth", "AuthTypedDict", + "BillingAddOn", "Claims", "ClaimsTypedDict", "CliEvent", @@ -174,6 +200,7 @@ "DiagnosticTypedDict", "FeatureFlag", "FeatureFlagTypedDict", + "Format", "GenerateBumpType", "GetNamespacesResponse", "GetNamespacesResponseTypedDict", @@ -201,6 +228,7 @@ "GithubStorePublishingSecretsRequestTypedDict", "GithubTriggerActionRequest", "GithubTriggerActionRequestTypedDict", + "HTTPMethod", "InteractionType", "Level", "License", @@ -217,6 +245,10 @@ "OASSummaryTypedDict", "OpenapiDiffBumpType", "Organization", + "OrganizationBillingAddOnRequest", + "OrganizationBillingAddOnRequestTypedDict", + "OrganizationBillingAddOnResponse", + "OrganizationBillingAddOnResponseTypedDict", "OrganizationTypedDict", "OrganizationUsage", "OrganizationUsageResponse", @@ -226,6 +258,10 @@ "PreflightRequestTypedDict", "PreflightToken", "PreflightTokenTypedDict", + "PublishingToken", + "PublishingTokenTypedDict", + "PullRequestMetadata", + "PullRequestMetadataTypedDict", "Relationship", "RelationshipTypedDict", "RemoteDocument", @@ -237,11 +273,16 @@ "Report", "ReportTypedDict", "Revision", + "RevisionContentsMetadata", + "RevisionContentsMetadataType", + "RevisionContentsMetadataTypedDict", "RevisionTypedDict", "SSOMetadata", "SSOMetadataTypedDict", "SchemaFile", "SchemaFileTypedDict", + "SchemaStoreItem", + "SchemaStoreItemTypedDict", "Secrets", "SecretsTypedDict", "Security", @@ -258,6 +299,7 @@ "SuggestionType", "Tag", "TagTypedDict", + "TargetResource", "TargetSDK", "TargetSDKTypedDict", "Type", @@ -274,6 +316,9 @@ "Workspace", "WorkspaceAndOrganization", "WorkspaceAndOrganizationTypedDict", + "WorkspaceFeatureFlag", + "WorkspaceFeatureFlagRequest", + "WorkspaceFeatureFlagRequestTypedDict", "WorkspaceFeatureFlagResponse", "WorkspaceFeatureFlagResponseTypedDict", "WorkspaceInviteResponse", diff --git a/src/speakeasy_client_sdk_python/models/shared/apikeydetails.py b/src/speakeasy_client_sdk_python/models/shared/apikeydetails.py index 34146f75..df12f51d 100644 --- a/src/speakeasy_client_sdk_python/models/shared/apikeydetails.py +++ b/src/speakeasy_client_sdk_python/models/shared/apikeydetails.py @@ -2,6 +2,7 @@ from __future__ import annotations from .accounttype import AccountType +from .billingaddon import BillingAddOn from datetime import datetime import pydantic from pydantic.functional_validators import PlainValidator @@ -13,6 +14,7 @@ class APIKeyDetailsTypedDict(TypedDict): account_type_v2: AccountType + billing_add_ons: List[BillingAddOn] enabled_features: List[str] org_slug: str telemetry_disabled: bool @@ -27,6 +29,10 @@ class APIKeyDetailsTypedDict(TypedDict): class APIKeyDetails(BaseModel): account_type_v2: Annotated[AccountType, PlainValidator(validate_open_enum(False))] + billing_add_ons: List[ + Annotated[BillingAddOn, PlainValidator(validate_open_enum(False))] + ] + enabled_features: List[str] org_slug: str diff --git a/src/speakeasy_client_sdk_python/models/shared/billingaddon.py b/src/speakeasy_client_sdk_python/models/shared/billingaddon.py new file mode 100644 index 00000000..cbc512fd --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/shared/billingaddon.py @@ -0,0 +1,12 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from speakeasy_client_sdk_python import utils + + +class BillingAddOn(str, Enum, metaclass=utils.OpenEnumMeta): + WEBHOOKS = "webhooks" + SDK_TESTING = "sdk_testing" + CUSTOM_CODE_REGIONS = "custom_code_regions" + SNIPPET_AI = "snippet_ai" diff --git a/src/speakeasy_client_sdk_python/models/shared/clievent.py b/src/speakeasy_client_sdk_python/models/shared/clievent.py index 4d583bcb..50ed445d 100644 --- a/src/speakeasy_client_sdk_python/models/shared/clievent.py +++ b/src/speakeasy_client_sdk_python/models/shared/clievent.py @@ -185,6 +185,8 @@ class CliEventTypedDict(TypedDict): r"""The namespace name of the source.""" source_revision_digest: NotRequired[str] r"""The revision digest of the source.""" + test_report_raw: NotRequired[str] + r"""The raw test report xml""" workflow_lock_post_raw: NotRequired[str] r"""Workflow lock file (post execution)""" workflow_lock_pre_raw: NotRequired[str] @@ -427,6 +429,9 @@ class CliEvent(BaseModel): source_revision_digest: Optional[str] = None r"""The revision digest of the source.""" + test_report_raw: Optional[str] = None + r"""The raw test report xml""" + workflow_lock_post_raw: Optional[str] = None r"""Workflow lock file (post execution)""" diff --git a/src/speakeasy_client_sdk_python/models/shared/codesampleschemainput.py b/src/speakeasy_client_sdk_python/models/shared/codesampleschemainput.py index d02ee76b..99343c45 100644 --- a/src/speakeasy_client_sdk_python/models/shared/codesampleschemainput.py +++ b/src/speakeasy_client_sdk_python/models/shared/codesampleschemainput.py @@ -34,10 +34,12 @@ class SchemaFile(BaseModel): class CodeSampleSchemaInputTypedDict(TypedDict): - languages: List[str] - r"""A list of languages to generate code samples for""" + language: str + r"""The language to generate code samples for""" schema_file: SchemaFileTypedDict r"""The OpenAPI file to be uploaded""" + operation_ids: NotRequired[List[str]] + r"""A list of operations IDs to generate code samples for""" package_name: NotRequired[str] r"""The name of the package""" sdk_class_name: NotRequired[str] @@ -45,14 +47,17 @@ class CodeSampleSchemaInputTypedDict(TypedDict): class CodeSampleSchemaInput(BaseModel): - languages: Annotated[List[str], FieldMetadata(multipart=True)] - r"""A list of languages to generate code samples for""" + language: Annotated[str, FieldMetadata(multipart=True)] + r"""The language to generate code samples for""" schema_file: Annotated[ SchemaFile, FieldMetadata(multipart=MultipartFormMetadata(file=True)) ] r"""The OpenAPI file to be uploaded""" + operation_ids: Annotated[Optional[List[str]], FieldMetadata(multipart=True)] = None + r"""A list of operations IDs to generate code samples for""" + package_name: Annotated[Optional[str], FieldMetadata(multipart=True)] = None r"""The name of the package""" diff --git a/src/speakeasy_client_sdk_python/models/shared/featureflag.py b/src/speakeasy_client_sdk_python/models/shared/featureflag.py index 3fc81057..a323c21f 100644 --- a/src/speakeasy_client_sdk_python/models/shared/featureflag.py +++ b/src/speakeasy_client_sdk_python/models/shared/featureflag.py @@ -1,8 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .workspacefeatureflag import WorkspaceFeatureFlag from datetime import datetime from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator from speakeasy_client_sdk_python.types import ( BaseModel, Nullable, @@ -10,20 +12,25 @@ UNSET, UNSET_SENTINEL, ) -from typing_extensions import NotRequired, TypedDict +from speakeasy_client_sdk_python.utils import validate_open_enum +from typing_extensions import Annotated, NotRequired, TypedDict class FeatureFlagTypedDict(TypedDict): r"""A feature flag is a key-value pair that can be used to enable or disable features.""" - feature_flag: str + feature_flag: WorkspaceFeatureFlag + r"""enum value workspace feature flag""" trial_ends_at: NotRequired[Nullable[datetime]] class FeatureFlag(BaseModel): r"""A feature flag is a key-value pair that can be used to enable or disable features.""" - feature_flag: str + feature_flag: Annotated[ + WorkspaceFeatureFlag, PlainValidator(validate_open_enum(False)) + ] + r"""enum value workspace feature flag""" trial_ends_at: OptionalNullable[datetime] = UNSET @@ -37,7 +44,7 @@ def serialize_model(self, handler): m = {} - for n, f in self.model_fields.items(): + for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) serialized.pop(k, None) diff --git a/src/speakeasy_client_sdk_python/models/shared/githubpublishingprresponse.py b/src/speakeasy_client_sdk_python/models/shared/githubpublishingprresponse.py index 562354d1..82aed2d2 100644 --- a/src/speakeasy_client_sdk_python/models/shared/githubpublishingprresponse.py +++ b/src/speakeasy_client_sdk_python/models/shared/githubpublishingprresponse.py @@ -1,21 +1,69 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from datetime import datetime from speakeasy_client_sdk_python.types import BaseModel -from typing import Optional +from typing import List, Optional from typing_extensions import NotRequired, TypedDict +class PullRequestMetadataTypedDict(TypedDict): + r"""This can only be populated when the github app is installed for a repo""" + + base_branch: NotRequired[str] + can_merge: NotRequired[bool] + created_at: NotRequired[datetime] + description: NotRequired[str] + r"""truncated to first 1000 characters""" + head_branch: NotRequired[str] + labels: NotRequired[List[str]] + r"""List of github labels""" + requested_reviewers: NotRequired[List[str]] + r"""List of github handles""" + status: NotRequired[str] + title: NotRequired[str] + + +class PullRequestMetadata(BaseModel): + r"""This can only be populated when the github app is installed for a repo""" + + base_branch: Optional[str] = None + + can_merge: Optional[bool] = None + + created_at: Optional[datetime] = None + + description: Optional[str] = None + r"""truncated to first 1000 characters""" + + head_branch: Optional[str] = None + + labels: Optional[List[str]] = None + r"""List of github labels""" + + requested_reviewers: Optional[List[str]] = None + r"""List of github handles""" + + status: Optional[str] = None + + title: Optional[str] = None + + class GithubPublishingPRResponseTypedDict(TypedDict): r"""Open generation PRs pending publishing""" - generation_pull_request: NotRequired[str] pending_version: NotRequired[str] + pull_request: NotRequired[str] + pull_request_metadata: NotRequired[PullRequestMetadataTypedDict] + r"""This can only be populated when the github app is installed for a repo""" class GithubPublishingPRResponse(BaseModel): r"""Open generation PRs pending publishing""" - generation_pull_request: Optional[str] = None - pending_version: Optional[str] = None + + pull_request: Optional[str] = None + + pull_request_metadata: Optional[PullRequestMetadata] = None + r"""This can only be populated when the github app is installed for a repo""" diff --git a/src/speakeasy_client_sdk_python/models/shared/httpmethod.py b/src/speakeasy_client_sdk_python/models/shared/httpmethod.py new file mode 100644 index 00000000..b943efaa --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/shared/httpmethod.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class HTTPMethod(str, Enum): + GET = "get" + POST = "post" + PUT = "put" + PATCH = "patch" + DELETE = "delete" + HEAD = "head" + OPTIONS = "options" + TRACE = "trace" diff --git a/src/speakeasy_client_sdk_python/models/shared/interactiontype.py b/src/speakeasy_client_sdk_python/models/shared/interactiontype.py index a321c553..43bf4623 100644 --- a/src/speakeasy_client_sdk_python/models/shared/interactiontype.py +++ b/src/speakeasy_client_sdk_python/models/shared/interactiontype.py @@ -18,3 +18,4 @@ class InteractionType(str, Enum): RUN = "RUN" CONFIGURE = "CONFIGURE" PUBLISH = "PUBLISH" + TEST = "TEST" diff --git a/src/speakeasy_client_sdk_python/models/shared/namespace.py b/src/speakeasy_client_sdk_python/models/shared/namespace.py index 3e23c5af..e2d3a9d6 100644 --- a/src/speakeasy_client_sdk_python/models/shared/namespace.py +++ b/src/speakeasy_client_sdk_python/models/shared/namespace.py @@ -5,6 +5,10 @@ RemoteSourceSubscriptionSettings, RemoteSourceSubscriptionSettingsTypedDict, ) +from .revisioncontentsmetadata import ( + RevisionContentsMetadata, + RevisionContentsMetadataTypedDict, +) from datetime import datetime from speakeasy_client_sdk_python.types import BaseModel from typing import Optional @@ -33,7 +37,9 @@ class NamespaceTypedDict(TypedDict): name: str r"""A human-readable name for the namespace.""" updated_at: datetime + archived_at: NotRequired[datetime] composite_spec_metadata: NotRequired[CompositeSpecMetadataTypedDict] + latest_revision_metadata: NotRequired[RevisionContentsMetadataTypedDict] public: NotRequired[bool] r"""Indicates whether the namespace is publicly accessible""" @@ -51,7 +57,11 @@ class Namespace(BaseModel): updated_at: datetime + archived_at: Optional[datetime] = None + composite_spec_metadata: Optional[CompositeSpecMetadata] = None + latest_revision_metadata: Optional[RevisionContentsMetadata] = None + public: Optional[bool] = None r"""Indicates whether the namespace is publicly accessible""" diff --git a/src/speakeasy_client_sdk_python/models/shared/organization.py b/src/speakeasy_client_sdk_python/models/shared/organization.py index a3913774..7e36195b 100644 --- a/src/speakeasy_client_sdk_python/models/shared/organization.py +++ b/src/speakeasy_client_sdk_python/models/shared/organization.py @@ -68,7 +68,7 @@ def serialize_model(self, handler): m = {} - for n, f in self.model_fields.items(): + for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) serialized.pop(k, None) diff --git a/src/speakeasy_client_sdk_python/models/shared/organizationbillingaddonrequest.py b/src/speakeasy_client_sdk_python/models/shared/organizationbillingaddonrequest.py new file mode 100644 index 00000000..f9dbd137 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/shared/organizationbillingaddonrequest.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .billingaddon import BillingAddOn +from pydantic.functional_validators import PlainValidator +from speakeasy_client_sdk_python.types import BaseModel +from speakeasy_client_sdk_python.utils import validate_open_enum +from typing import List +from typing_extensions import Annotated, TypedDict + + +class OrganizationBillingAddOnRequestTypedDict(TypedDict): + r"""A request to add billing add ons""" + + add_ons: List[BillingAddOn] + + +class OrganizationBillingAddOnRequest(BaseModel): + r"""A request to add billing add ons""" + + add_ons: List[Annotated[BillingAddOn, PlainValidator(validate_open_enum(False))]] diff --git a/src/speakeasy_client_sdk_python/models/shared/organizationbillingaddonresponse.py b/src/speakeasy_client_sdk_python/models/shared/organizationbillingaddonresponse.py new file mode 100644 index 00000000..48b1be92 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/shared/organizationbillingaddonresponse.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .billingaddon import BillingAddOn +from pydantic.functional_validators import PlainValidator +from speakeasy_client_sdk_python.types import BaseModel +from speakeasy_client_sdk_python.utils import validate_open_enum +from typing import List +from typing_extensions import Annotated, TypedDict + + +class OrganizationBillingAddOnResponseTypedDict(TypedDict): + r"""Billing add on response""" + + add_ons: List[BillingAddOn] + + +class OrganizationBillingAddOnResponse(BaseModel): + r"""Billing add on response""" + + add_ons: List[Annotated[BillingAddOn, PlainValidator(validate_open_enum(False))]] diff --git a/src/speakeasy_client_sdk_python/models/shared/publishingtoken.py b/src/speakeasy_client_sdk_python/models/shared/publishingtoken.py new file mode 100644 index 00000000..f3626c7c --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/shared/publishingtoken.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +from speakeasy_client_sdk_python.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class TargetResource(str, Enum): + DOCUMENT = "document" + + +class PublishingTokenTypedDict(TypedDict): + r"""A token used to publish to a target""" + + created_at: datetime + created_by: str + id: str + organization_id: str + target_id: str + target_resource: TargetResource + token: str + token_name: str + valid_until: datetime + workspace_id: str + updated_at: NotRequired[datetime] + updated_by: NotRequired[str] + + +class PublishingToken(BaseModel): + r"""A token used to publish to a target""" + + created_at: datetime + + created_by: str + + id: str + + organization_id: str + + target_id: str + + target_resource: TargetResource + + token: str + + token_name: str + + valid_until: datetime + + workspace_id: str + + updated_at: Optional[datetime] = None + + updated_by: Optional[str] = None diff --git a/src/speakeasy_client_sdk_python/models/shared/revision.py b/src/speakeasy_client_sdk_python/models/shared/revision.py index 549bdba9..bcb87746 100644 --- a/src/speakeasy_client_sdk_python/models/shared/revision.py +++ b/src/speakeasy_client_sdk_python/models/shared/revision.py @@ -1,10 +1,14 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .revisioncontentsmetadata import ( + RevisionContentsMetadata, + RevisionContentsMetadataTypedDict, +) from datetime import datetime from speakeasy_client_sdk_python.types import BaseModel -from typing import List -from typing_extensions import TypedDict +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict class RevisionTypedDict(TypedDict): @@ -15,6 +19,7 @@ class RevisionTypedDict(TypedDict): namespace_name: str tags: List[str] updated_at: datetime + contents_metadata: NotRequired[RevisionContentsMetadataTypedDict] class Revision(BaseModel): @@ -30,3 +35,5 @@ class Revision(BaseModel): tags: List[str] updated_at: datetime + + contents_metadata: Optional[RevisionContentsMetadata] = None diff --git a/src/speakeasy_client_sdk_python/models/shared/revisioncontentsmetadata.py b/src/speakeasy_client_sdk_python/models/shared/revisioncontentsmetadata.py new file mode 100644 index 00000000..3e896002 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/shared/revisioncontentsmetadata.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +from speakeasy_client_sdk_python.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class RevisionContentsMetadataType(str, Enum): + OPENAPI_BUNDLE = "OPENAPI_BUNDLE" + OPENAPI_OVERLAY = "OPENAPI_OVERLAY" + + +class RevisionContentsMetadataTypedDict(TypedDict): + contains_code_samples: bool + r"""Whether the OAS contains code samples.""" + created_at: datetime + description: str + r"""The OAS description""" + hash: str + r"""The hash of the contents""" + namespace: str + r"""The fully qualified namespace""" + num_overlay_actions: int + r"""The number of overlay actions in the OAS. Will be 0 if the OAS is not an overlay.""" + operation_ids: List[str] + r"""The operation IDs contained in the OAS. Will be empty if the OAS is an overlay.""" + revision_digest: str + r"""The digest of the parent bundle""" + tags: List[str] + r"""The tags contained in the OAS -- NOT the OCI tags. Will be empty if the OAS is an overlay.""" + title: str + r"""The OAS title""" + type: RevisionContentsMetadataType + version: str + r"""The OAS version""" + workspace_id: str + r"""The workspace ID""" + + +class RevisionContentsMetadata(BaseModel): + contains_code_samples: bool + r"""Whether the OAS contains code samples.""" + + created_at: datetime + + description: str + r"""The OAS description""" + + hash: str + r"""The hash of the contents""" + + namespace: str + r"""The fully qualified namespace""" + + num_overlay_actions: int + r"""The number of overlay actions in the OAS. Will be 0 if the OAS is not an overlay.""" + + operation_ids: List[str] + r"""The operation IDs contained in the OAS. Will be empty if the OAS is an overlay.""" + + revision_digest: str + r"""The digest of the parent bundle""" + + tags: List[str] + r"""The tags contained in the OAS -- NOT the OCI tags. Will be empty if the OAS is an overlay.""" + + title: str + r"""The OAS title""" + + type: RevisionContentsMetadataType + + version: str + r"""The OAS version""" + + workspace_id: str + r"""The workspace ID""" diff --git a/src/speakeasy_client_sdk_python/models/shared/schemastoreitem.py b/src/speakeasy_client_sdk_python/models/shared/schemastoreitem.py new file mode 100644 index 00000000..d1fa9eb3 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/shared/schemastoreitem.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +import pydantic +from speakeasy_client_sdk_python.types import BaseModel +from typing_extensions import Annotated, TypedDict + + +class Format(str, Enum): + JSON = "json" + YAML = "yaml" + + +class SchemaStoreItemTypedDict(TypedDict): + created_at: datetime + format_: Format + id: str + package_name: str + sdk_classname: str + spec: str + + +class SchemaStoreItem(BaseModel): + created_at: datetime + + format_: Annotated[Format, pydantic.Field(alias="format")] + + id: str + + package_name: Annotated[str, pydantic.Field(alias="packageName")] + + sdk_classname: Annotated[str, pydantic.Field(alias="sdkClassname")] + + spec: str diff --git a/src/speakeasy_client_sdk_python/models/shared/usagesnippet.py b/src/speakeasy_client_sdk_python/models/shared/usagesnippet.py index b7ed66ff..011ea49b 100644 --- a/src/speakeasy_client_sdk_python/models/shared/usagesnippet.py +++ b/src/speakeasy_client_sdk_python/models/shared/usagesnippet.py @@ -3,6 +3,7 @@ from __future__ import annotations import pydantic from speakeasy_client_sdk_python.types import BaseModel +from typing import Any from typing_extensions import Annotated, TypedDict @@ -11,8 +12,12 @@ class UsageSnippetTypedDict(TypedDict): r"""The code snippet""" language: str r"""The language of the snippet""" + method: Any + r"""The HTTP method of the operation""" operation_id: str r"""The operation ID for the snippet""" + path: str + r"""The path of the operation""" class UsageSnippet(BaseModel): @@ -22,5 +27,11 @@ class UsageSnippet(BaseModel): language: str r"""The language of the snippet""" + method: Any + r"""The HTTP method of the operation""" + operation_id: Annotated[str, pydantic.Field(alias="operationId")] r"""The operation ID for the snippet""" + + path: str + r"""The path of the operation""" diff --git a/src/speakeasy_client_sdk_python/models/shared/user.py b/src/speakeasy_client_sdk_python/models/shared/user.py index f250ddb5..c667907c 100644 --- a/src/speakeasy_client_sdk_python/models/shared/user.py +++ b/src/speakeasy_client_sdk_python/models/shared/user.py @@ -37,12 +37,16 @@ class UserTypedDict(TypedDict): r"""Identifier of the default workspace.""" github_handle: NotRequired[Nullable[str]] r"""GitHub handle of the user.""" + has_created_api_key: NotRequired[bool] + r"""Indicates whether the user has created an API key. Not always populated""" internal: NotRequired[bool] r"""Indicates whether the user is internal.""" last_login_at: NotRequired[Nullable[datetime]] r"""Timestamp of the last login.""" photo_url: NotRequired[Nullable[str]] r"""URL of the user's photo.""" + pylon_identity_hash: NotRequired[str] + r"""Hash used for pylon identity verification returned on v1/user.""" class User(BaseModel): @@ -79,6 +83,9 @@ class User(BaseModel): github_handle: OptionalNullable[str] = UNSET r"""GitHub handle of the user.""" + has_created_api_key: Optional[bool] = None + r"""Indicates whether the user has created an API key. Not always populated""" + internal: Optional[bool] = None r"""Indicates whether the user is internal.""" @@ -88,14 +95,19 @@ class User(BaseModel): photo_url: OptionalNullable[str] = UNSET r"""URL of the user's photo.""" + pylon_identity_hash: Optional[str] = None + r"""Hash used for pylon identity verification returned on v1/user.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ "default_workspace_id", "github_handle", + "has_created_api_key", "internal", "last_login_at", "photo_url", + "pylon_identity_hash", ] nullable_fields = [ "default_workspace_id", @@ -109,7 +121,7 @@ def serialize_model(self, handler): m = {} - for n, f in self.model_fields.items(): + for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) serialized.pop(k, None) diff --git a/src/speakeasy_client_sdk_python/models/shared/workspacefeatureflag.py b/src/speakeasy_client_sdk_python/models/shared/workspacefeatureflag.py new file mode 100644 index 00000000..f445ac9a --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/shared/workspacefeatureflag.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from speakeasy_client_sdk_python import utils + + +class WorkspaceFeatureFlag(str, Enum, metaclass=utils.OpenEnumMeta): + r"""enum value workspace feature flag""" + + SCHEMA_REGISTRY = "schema_registry" + CHANGES_REPORT = "changes_report" + SKIP_SCHEMA_REGISTRY = "skip_schema_registry" + WEBHOOKS = "webhooks" diff --git a/src/speakeasy_client_sdk_python/models/shared/workspacefeatureflagrequest.py b/src/speakeasy_client_sdk_python/models/shared/workspacefeatureflagrequest.py new file mode 100644 index 00000000..a448a2d2 --- /dev/null +++ b/src/speakeasy_client_sdk_python/models/shared/workspacefeatureflagrequest.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .workspacefeatureflag import WorkspaceFeatureFlag +from pydantic.functional_validators import PlainValidator +from speakeasy_client_sdk_python.types import BaseModel +from speakeasy_client_sdk_python.utils import validate_open_enum +from typing import List +from typing_extensions import Annotated, TypedDict + + +class WorkspaceFeatureFlagRequestTypedDict(TypedDict): + r"""A request to add workspace feature flags""" + + feature_flags: List[WorkspaceFeatureFlag] + + +class WorkspaceFeatureFlagRequest(BaseModel): + r"""A request to add workspace feature flags""" + + feature_flags: List[ + Annotated[WorkspaceFeatureFlag, PlainValidator(validate_open_enum(False))] + ] diff --git a/src/speakeasy_client_sdk_python/models/shared/workspaceinviteresponse.py b/src/speakeasy_client_sdk_python/models/shared/workspaceinviteresponse.py index f818ff00..8f71413f 100644 --- a/src/speakeasy_client_sdk_python/models/shared/workspaceinviteresponse.py +++ b/src/speakeasy_client_sdk_python/models/shared/workspaceinviteresponse.py @@ -47,7 +47,7 @@ def serialize_model(self, handler): m = {} - for n, f in self.model_fields.items(): + for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) serialized.pop(k, None) diff --git a/src/speakeasy_client_sdk_python/models/shared/workspacetoken.py b/src/speakeasy_client_sdk_python/models/shared/workspacetoken.py index 2359e28c..a40c17e5 100644 --- a/src/speakeasy_client_sdk_python/models/shared/workspacetoken.py +++ b/src/speakeasy_client_sdk_python/models/shared/workspacetoken.py @@ -23,6 +23,8 @@ class WorkspaceTokenTypedDict(TypedDict): name: str workspace_id: str created_by: NotRequired[Nullable[str]] + created_by_name: NotRequired[Nullable[str]] + created_by_photo_url: NotRequired[Nullable[str]] email: NotRequired[Nullable[str]] last_used: NotRequired[Nullable[datetime]] @@ -44,21 +46,37 @@ class WorkspaceToken(BaseModel): created_by: OptionalNullable[str] = UNSET + created_by_name: OptionalNullable[str] = UNSET + + created_by_photo_url: OptionalNullable[str] = UNSET + email: OptionalNullable[str] = UNSET last_used: OptionalNullable[datetime] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["created_by", "email", "last_used"] - nullable_fields = ["created_by", "email", "last_used"] + optional_fields = [ + "created_by", + "created_by_name", + "created_by_photo_url", + "email", + "last_used", + ] + nullable_fields = [ + "created_by", + "created_by_name", + "created_by_photo_url", + "email", + "last_used", + ] null_default_fields = [] serialized = handler(self) m = {} - for n, f in self.model_fields.items(): + for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) serialized.pop(k, None) diff --git a/src/speakeasy_client_sdk_python/organizations.py b/src/speakeasy_client_sdk_python/organizations.py index e32c4c98..dc4604ea 100644 --- a/src/speakeasy_client_sdk_python/organizations.py +++ b/src/speakeasy_client_sdk_python/organizations.py @@ -37,6 +37,8 @@ def create( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.Organization) @@ -71,6 +73,7 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="createOrganization", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -80,7 +83,7 @@ def create( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.CreateOrganizationResponse( organization=utils.unmarshal_json( @@ -91,8 +94,8 @@ def create( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -134,6 +137,8 @@ async def create_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.Organization) @@ -168,6 +173,7 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="createOrganization", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -177,7 +183,7 @@ async def create_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.CreateOrganizationResponse( organization=utils.unmarshal_json( @@ -188,8 +194,8 @@ async def create_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -205,6 +211,208 @@ async def create_async( http_res, ) + def create_billing_add_ons( + self, + *, + request: Union[ + shared.OrganizationBillingAddOnRequest, + shared.OrganizationBillingAddOnRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.CreateBillingAddOnsResponse: + r"""Create billing add ons + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, shared.OrganizationBillingAddOnRequest) + request = cast(shared.OrganizationBillingAddOnRequest, request) + + req = self._build_request( + method="POST", + path="/v1/organization/add_ons", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", shared.OrganizationBillingAddOnRequest + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="createBillingAddOns", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.CreateBillingAddOnsResponse( + organization_billing_add_on_response=utils.unmarshal_json( + http_res.text, Optional[shared.OrganizationBillingAddOnResponse] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def create_billing_add_ons_async( + self, + *, + request: Union[ + shared.OrganizationBillingAddOnRequest, + shared.OrganizationBillingAddOnRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.CreateBillingAddOnsResponse: + r"""Create billing add ons + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, shared.OrganizationBillingAddOnRequest) + request = cast(shared.OrganizationBillingAddOnRequest, request) + + req = self._build_request_async( + method="POST", + path="/v1/organization/add_ons", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", shared.OrganizationBillingAddOnRequest + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="createBillingAddOns", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.CreateBillingAddOnsResponse( + organization_billing_add_on_response=utils.unmarshal_json( + http_res.text, Optional[shared.OrganizationBillingAddOnResponse] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + def create_free_trial( self, *, @@ -229,6 +437,8 @@ def create_free_trial( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request( method="POST", path="/v1/organization/free_trial", @@ -255,6 +465,7 @@ def create_free_trial( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="createFreeTrial", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -264,7 +475,7 @@ def create_free_trial( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.CreateFreeTrialResponse( status_code=http_res.status_code, @@ -272,8 +483,8 @@ def create_free_trial( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -313,6 +524,8 @@ async def create_free_trial_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request_async( method="POST", path="/v1/organization/free_trial", @@ -339,6 +552,7 @@ async def create_free_trial_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="createFreeTrial", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -348,7 +562,7 @@ async def create_free_trial_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.CreateFreeTrialResponse( status_code=http_res.status_code, @@ -356,8 +570,8 @@ async def create_free_trial_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -373,6 +587,196 @@ async def create_free_trial_async( http_res, ) + def delete_billing_add_on( + self, + *, + request: Union[ + operations.DeleteBillingAddOnRequest, + operations.DeleteBillingAddOnRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.DeleteBillingAddOnResponse: + r"""Delete billing add ons + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.DeleteBillingAddOnRequest) + request = cast(operations.DeleteBillingAddOnRequest, request) + + req = self._build_request( + method="DELETE", + path="/v1/organization/add_ons/{add_on}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="deleteBillingAddOn", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.DeleteBillingAddOnResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def delete_billing_add_on_async( + self, + *, + request: Union[ + operations.DeleteBillingAddOnRequest, + operations.DeleteBillingAddOnRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.DeleteBillingAddOnResponse: + r"""Delete billing add ons + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.DeleteBillingAddOnRequest) + request = cast(operations.DeleteBillingAddOnRequest, request) + + req = self._build_request_async( + method="DELETE", + path="/v1/organization/add_ons/{add_on}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="deleteBillingAddOn", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.DeleteBillingAddOnResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + def get( self, *, @@ -402,6 +806,8 @@ def get( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetOrganizationRequest) @@ -433,6 +839,7 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getOrganization", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -442,7 +849,7 @@ def get( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetOrganizationResponse( organization=utils.unmarshal_json( @@ -453,8 +860,8 @@ def get( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -499,6 +906,8 @@ async def get_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetOrganizationRequest) @@ -530,6 +939,7 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getOrganization", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -539,7 +949,7 @@ async def get_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetOrganizationResponse( organization=utils.unmarshal_json( @@ -550,8 +960,8 @@ async def get_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -591,6 +1001,8 @@ def get_all( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request( method="GET", path="/v1/organizations", @@ -617,6 +1029,7 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getOrganizations", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -626,7 +1039,7 @@ def get_all( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetOrganizationsResponse( organizations=utils.unmarshal_json( @@ -637,8 +1050,8 @@ def get_all( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -678,6 +1091,8 @@ async def get_all_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request_async( method="GET", path="/v1/organizations", @@ -704,6 +1119,7 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getOrganizations", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -713,7 +1129,7 @@ async def get_all_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetOrganizationsResponse( organizations=utils.unmarshal_json( @@ -724,8 +1140,8 @@ async def get_all_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -741,6 +1157,182 @@ async def get_all_async( http_res, ) + def get_billing_add_ons( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetBillingAddOnsResponse: + r"""Get billing add ons + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/organization/add_ons", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getBillingAddOns", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetBillingAddOnsResponse( + organization_billing_add_on_response=utils.unmarshal_json( + http_res.text, Optional[shared.OrganizationBillingAddOnResponse] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def get_billing_add_ons_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetBillingAddOnsResponse: + r"""Get billing add ons + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/organization/add_ons", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getBillingAddOns", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetBillingAddOnsResponse( + organization_billing_add_on_response=utils.unmarshal_json( + http_res.text, Optional[shared.OrganizationBillingAddOnResponse] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + def get_usage( self, *, @@ -765,6 +1357,8 @@ def get_usage( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request( method="GET", path="/v1/organization/usage", @@ -791,6 +1385,7 @@ def get_usage( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getOrganizationUsage", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -800,7 +1395,7 @@ def get_usage( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetOrganizationUsageResponse( organization_usage_response=utils.unmarshal_json( @@ -811,8 +1406,8 @@ def get_usage( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -852,6 +1447,8 @@ async def get_usage_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request_async( method="GET", path="/v1/organization/usage", @@ -878,6 +1475,7 @@ async def get_usage_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getOrganizationUsage", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -887,7 +1485,7 @@ async def get_usage_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetOrganizationUsageResponse( organization_usage_response=utils.unmarshal_json( @@ -898,8 +1496,8 @@ async def get_usage_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( diff --git a/src/speakeasy_client_sdk_python/publishingtokens.py b/src/speakeasy_client_sdk_python/publishingtokens.py new file mode 100644 index 00000000..eb83b7f3 --- /dev/null +++ b/src/speakeasy_client_sdk_python/publishingtokens.py @@ -0,0 +1,1424 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from speakeasy_client_sdk_python import utils +from speakeasy_client_sdk_python._hooks import HookContext +from speakeasy_client_sdk_python.models import errors, operations, shared +from speakeasy_client_sdk_python.types import BaseModel, OptionalNullable, UNSET +from typing import Any, List, Mapping, Optional, Union, cast + + +class PublishingTokens(BaseSDK): + def create( + self, + *, + request: Optional[ + Union[ + operations.CreatePublishingTokenRequestBody, + operations.CreatePublishingTokenRequestBodyTypedDict, + ] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.CreatePublishingTokenResponse: + r"""Create a publishing token for a workspace + + Creates a publishing token for the current workspace + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, Optional[operations.CreatePublishingTokenRequestBody] + ) + request = cast(Optional[operations.CreatePublishingTokenRequestBody], request) + + req = self._build_request( + method="POST", + path="/v1/publishing-tokens", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, + False, + True, + "json", + Optional[operations.CreatePublishingTokenRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="createPublishingToken", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.CreatePublishingTokenResponse( + publishing_token=utils.unmarshal_json( + http_res.text, Optional[shared.PublishingToken] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def create_async( + self, + *, + request: Optional[ + Union[ + operations.CreatePublishingTokenRequestBody, + operations.CreatePublishingTokenRequestBodyTypedDict, + ] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.CreatePublishingTokenResponse: + r"""Create a publishing token for a workspace + + Creates a publishing token for the current workspace + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, Optional[operations.CreatePublishingTokenRequestBody] + ) + request = cast(Optional[operations.CreatePublishingTokenRequestBody], request) + + req = self._build_request_async( + method="POST", + path="/v1/publishing-tokens", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, + False, + True, + "json", + Optional[operations.CreatePublishingTokenRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="createPublishingToken", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.CreatePublishingTokenResponse( + publishing_token=utils.unmarshal_json( + http_res.text, Optional[shared.PublishingToken] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def delete( + self, + *, + request: Union[ + operations.DeletePublishingTokenRequest, + operations.DeletePublishingTokenRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.DeletePublishingTokenResponse: + r"""Delete a specific publishing token + + Delete a particular publishing token. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.DeletePublishingTokenRequest) + request = cast(operations.DeletePublishingTokenRequest, request) + + req = self._build_request( + method="DELETE", + path="/v1/publishing-tokens/{tokenID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="deletePublishingToken", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.DeletePublishingTokenResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def delete_async( + self, + *, + request: Union[ + operations.DeletePublishingTokenRequest, + operations.DeletePublishingTokenRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.DeletePublishingTokenResponse: + r"""Delete a specific publishing token + + Delete a particular publishing token. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.DeletePublishingTokenRequest) + request = cast(operations.DeletePublishingTokenRequest, request) + + req = self._build_request_async( + method="DELETE", + path="/v1/publishing-tokens/{tokenID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="deletePublishingToken", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.DeletePublishingTokenResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def get( + self, + *, + request: Union[ + operations.GetPublishingTokenByIDRequest, + operations.GetPublishingTokenByIDRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetPublishingTokenByIDResponse: + r"""Get a specific publishing token + + Get information about a particular publishing token. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetPublishingTokenByIDRequest) + request = cast(operations.GetPublishingTokenByIDRequest, request) + + req = self._build_request( + method="GET", + path="/v1/publishing-tokens/{tokenID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getPublishingTokenByID", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPublishingTokenByIDResponse( + publishing_token=utils.unmarshal_json( + http_res.text, Optional[shared.PublishingToken] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def get_async( + self, + *, + request: Union[ + operations.GetPublishingTokenByIDRequest, + operations.GetPublishingTokenByIDRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetPublishingTokenByIDResponse: + r"""Get a specific publishing token + + Get information about a particular publishing token. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.GetPublishingTokenByIDRequest) + request = cast(operations.GetPublishingTokenByIDRequest, request) + + req = self._build_request_async( + method="GET", + path="/v1/publishing-tokens/{tokenID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getPublishingTokenByID", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPublishingTokenByIDResponse( + publishing_token=utils.unmarshal_json( + http_res.text, Optional[shared.PublishingToken] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def list( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetPublishingTokenResponse: + r"""Get publishing tokens for a workspace + + Returns a publishing token for the current workspace + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/publishing-tokens", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getPublishingToken", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPublishingTokenResponse( + classes=utils.unmarshal_json( + http_res.text, Optional[List[shared.PublishingToken]] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def list_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetPublishingTokenResponse: + r"""Get publishing tokens for a workspace + + Returns a publishing token for the current workspace + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/publishing-tokens", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getPublishingToken", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPublishingTokenResponse( + classes=utils.unmarshal_json( + http_res.text, Optional[List[shared.PublishingToken]] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def resolve_metadata( + self, + *, + request: Union[ + operations.GetPublishingTokenPublicMetadataRequest, + operations.GetPublishingTokenPublicMetadataRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetPublishingTokenPublicMetadataResponse: + r"""Get metadata about the token + + Get information about a particular publishing token. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, operations.GetPublishingTokenPublicMetadataRequest + ) + request = cast(operations.GetPublishingTokenPublicMetadataRequest, request) + + req = self._build_request( + method="GET", + path="/v1/publishing-tokens/{tokenID}/metadata", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getPublishingTokenPublicMetadata", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPublishingTokenPublicMetadataResponse( + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetPublishingTokenPublicMetadataResponseBody], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def resolve_metadata_async( + self, + *, + request: Union[ + operations.GetPublishingTokenPublicMetadataRequest, + operations.GetPublishingTokenPublicMetadataRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetPublishingTokenPublicMetadataResponse: + r"""Get metadata about the token + + Get information about a particular publishing token. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, operations.GetPublishingTokenPublicMetadataRequest + ) + request = cast(operations.GetPublishingTokenPublicMetadataRequest, request) + + req = self._build_request_async( + method="GET", + path="/v1/publishing-tokens/{tokenID}/metadata", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getPublishingTokenPublicMetadata", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GetPublishingTokenPublicMetadataResponse( + object=utils.unmarshal_json( + http_res.text, + Optional[operations.GetPublishingTokenPublicMetadataResponseBody], + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def resolve_target( + self, + *, + request: Union[ + operations.GetPublishingTokenTargetByIDRequest, + operations.GetPublishingTokenTargetByIDRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetPublishingTokenTargetByIDResponse: + r"""Get a specific publishing token target + + Get information about a particular publishing token target. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, operations.GetPublishingTokenTargetByIDRequest + ) + request = cast(operations.GetPublishingTokenTargetByIDRequest, request) + + req = self._build_request( + method="GET", + path="/v1/publishing-tokens/{tokenID}/target", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="text/plain", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getPublishingTokenTargetByID", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "text/plain"): + return operations.GetPublishingTokenTargetByIDResponse( + res=http_res.text, + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def resolve_target_async( + self, + *, + request: Union[ + operations.GetPublishingTokenTargetByIDRequest, + operations.GetPublishingTokenTargetByIDRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetPublishingTokenTargetByIDResponse: + r"""Get a specific publishing token target + + Get information about a particular publishing token target. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, operations.GetPublishingTokenTargetByIDRequest + ) + request = cast(operations.GetPublishingTokenTargetByIDRequest, request) + + req = self._build_request_async( + method="GET", + path="/v1/publishing-tokens/{tokenID}/target", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="text/plain", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getPublishingTokenTargetByID", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "text/plain"): + return operations.GetPublishingTokenTargetByIDResponse( + res=http_res.text, + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def update( + self, + *, + request: Union[ + operations.UpdatePublishingTokenExpirationRequest, + operations.UpdatePublishingTokenExpirationRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.UpdatePublishingTokenExpirationResponse: + r"""Updates the validitity period of a publishing token + + Updates the validity period of a particular publishing token. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, operations.UpdatePublishingTokenExpirationRequest + ) + request = cast(operations.UpdatePublishingTokenExpirationRequest, request) + + req = self._build_request( + method="PUT", + path="/v1/publishing-tokens/{tokenID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "json", + Optional[operations.UpdatePublishingTokenExpirationRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="updatePublishingTokenExpiration", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.UpdatePublishingTokenExpirationResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def update_async( + self, + *, + request: Union[ + operations.UpdatePublishingTokenExpirationRequest, + operations.UpdatePublishingTokenExpirationRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.UpdatePublishingTokenExpirationResponse: + r"""Updates the validitity period of a publishing token + + Updates the validity period of a particular publishing token. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, operations.UpdatePublishingTokenExpirationRequest + ) + request = cast(operations.UpdatePublishingTokenExpirationRequest, request) + + req = self._build_request_async( + method="PUT", + path="/v1/publishing-tokens/{tokenID}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "json", + Optional[operations.UpdatePublishingTokenExpirationRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="updatePublishingTokenExpiration", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "*"): + return operations.UpdatePublishingTokenExpirationResponse( + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) diff --git a/src/speakeasy_client_sdk_python/reports.py b/src/speakeasy_client_sdk_python/reports.py index 3caa2e8d..8e2e373b 100644 --- a/src/speakeasy_client_sdk_python/reports.py +++ b/src/speakeasy_client_sdk_python/reports.py @@ -38,6 +38,8 @@ def get_changes_report_signed_url( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -71,6 +73,7 @@ def get_changes_report_signed_url( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getChangesReportSignedUrl", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -90,7 +93,12 @@ def get_changes_report_signed_url( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -132,6 +140,8 @@ async def get_changes_report_signed_url_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -165,6 +175,7 @@ async def get_changes_report_signed_url_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getChangesReportSignedUrl", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -184,7 +195,12 @@ async def get_changes_report_signed_url_async( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -226,6 +242,8 @@ def get_linting_report_signed_url( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -259,6 +277,7 @@ def get_linting_report_signed_url( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getLintingReportSignedUrl", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -278,7 +297,12 @@ def get_linting_report_signed_url( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -320,6 +344,8 @@ async def get_linting_report_signed_url_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -353,6 +379,7 @@ async def get_linting_report_signed_url_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getLintingReportSignedUrl", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -372,7 +399,12 @@ async def get_linting_report_signed_url_async( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -414,6 +446,8 @@ def upload_report( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.UploadReportRequestBody) @@ -448,6 +482,7 @@ def upload_report( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="uploadReport", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -466,7 +501,12 @@ def upload_report( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -508,6 +548,8 @@ async def upload_report_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.UploadReportRequestBody) @@ -542,6 +584,7 @@ async def upload_report_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="uploadReport", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -560,7 +603,12 @@ async def upload_report_async( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res diff --git a/src/speakeasy_client_sdk_python/schemastore.py b/src/speakeasy_client_sdk_python/schemastore.py new file mode 100644 index 00000000..ab5ed256 --- /dev/null +++ b/src/speakeasy_client_sdk_python/schemastore.py @@ -0,0 +1,442 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from speakeasy_client_sdk_python import utils +from speakeasy_client_sdk_python._hooks import HookContext +from speakeasy_client_sdk_python.models import errors, operations, shared +from speakeasy_client_sdk_python.types import BaseModel, OptionalNullable, UNSET +from typing import Any, Mapping, Optional, Union, cast + + +class SchemaStore(BaseSDK): + def create_schema_store_item( + self, + *, + request: Union[ + operations.CreateSchemaStoreItemRequestBody, + operations.CreateSchemaStoreItemRequestBodyTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.CreateSchemaStoreItemResponse: + r"""Create a schema in the schema store + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, operations.CreateSchemaStoreItemRequestBody + ) + request = cast(operations.CreateSchemaStoreItemRequestBody, request) + + req = self._build_request( + method="POST", + path="/v1/schema_store", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, + False, + False, + "json", + operations.CreateSchemaStoreItemRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="createSchemaStoreItem", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "2XX", "application/json"): + return operations.CreateSchemaStoreItemResponse( + schema_store_item=utils.unmarshal_json( + http_res.text, Optional[shared.SchemaStoreItem] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def create_schema_store_item_async( + self, + *, + request: Union[ + operations.CreateSchemaStoreItemRequestBody, + operations.CreateSchemaStoreItemRequestBodyTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.CreateSchemaStoreItemResponse: + r"""Create a schema in the schema store + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, operations.CreateSchemaStoreItemRequestBody + ) + request = cast(operations.CreateSchemaStoreItemRequestBody, request) + + req = self._build_request_async( + method="POST", + path="/v1/schema_store", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, + False, + False, + "json", + operations.CreateSchemaStoreItemRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="createSchemaStoreItem", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "2XX", "application/json"): + return operations.CreateSchemaStoreItemResponse( + schema_store_item=utils.unmarshal_json( + http_res.text, Optional[shared.SchemaStoreItem] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def get_schema_store_item( + self, + *, + request: Optional[ + Union[ + operations.GetSchemaStoreItemRequestBody, + operations.GetSchemaStoreItemRequestBodyTypedDict, + ] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetSchemaStoreItemResponse: + r"""Get a OAS schema from the schema store + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, Optional[operations.GetSchemaStoreItemRequestBody] + ) + request = cast(Optional[operations.GetSchemaStoreItemRequestBody], request) + + req = self._build_request( + method="GET", + path="/v1/schema_store", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, + False, + True, + "json", + Optional[operations.GetSchemaStoreItemRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getSchemaStoreItem", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "2XX", "application/json"): + return operations.GetSchemaStoreItemResponse( + schema_store_item=utils.unmarshal_json( + http_res.text, Optional[shared.SchemaStoreItem] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def get_schema_store_item_async( + self, + *, + request: Optional[ + Union[ + operations.GetSchemaStoreItemRequestBody, + operations.GetSchemaStoreItemRequestBodyTypedDict, + ] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GetSchemaStoreItemResponse: + r"""Get a OAS schema from the schema store + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, Optional[operations.GetSchemaStoreItemRequestBody] + ) + request = cast(Optional[operations.GetSchemaStoreItemRequestBody], request) + + req = self._build_request_async( + method="GET", + path="/v1/schema_store", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, + False, + True, + "json", + Optional[operations.GetSchemaStoreItemRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="getSchemaStoreItem", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "2XX", "application/json"): + return operations.GetSchemaStoreItemResponse( + schema_store_item=utils.unmarshal_json( + http_res.text, Optional[shared.SchemaStoreItem] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) diff --git a/src/speakeasy_client_sdk_python/sdk.py b/src/speakeasy_client_sdk_python/sdk.py index 608cba3a..bd105d5b 100644 --- a/src/speakeasy_client_sdk_python/sdk.py +++ b/src/speakeasy_client_sdk_python/sdk.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from .basesdk import BaseSDK -from .httpclient import AsyncHttpClient, HttpClient +from .httpclient import AsyncHttpClient, ClientOwner, HttpClient, close_clients from .sdkconfiguration import SDKConfiguration from .utils.logger import Logger, get_default_logger from .utils.retries import RetryConfig @@ -15,13 +15,16 @@ from speakeasy_client_sdk_python.github import Github from speakeasy_client_sdk_python.models import internal, shared from speakeasy_client_sdk_python.organizations import Organizations +from speakeasy_client_sdk_python.publishingtokens import PublishingTokens from speakeasy_client_sdk_python.reports import Reports +from speakeasy_client_sdk_python.schemastore import SchemaStore from speakeasy_client_sdk_python.shorturls import ShortURLs from speakeasy_client_sdk_python.subscriptions import Subscriptions from speakeasy_client_sdk_python.suggest import Suggest from speakeasy_client_sdk_python.types import OptionalNullable, UNSET from speakeasy_client_sdk_python.workspaces import Workspaces -from typing import Callable, Dict, Optional, Union +from typing import Callable, Dict, Optional, Union, cast +import weakref class Speakeasy(BaseSDK): @@ -39,8 +42,10 @@ class Speakeasy(BaseSDK): r"""REST APIs for managing the github integration""" organizations: Organizations r"""REST APIs for managing Organizations (speakeasy L1 Tenancy construct)""" + publishing_tokens: PublishingTokens reports: Reports r"""REST APIs for managing reports (lint reports, change reports, etc)""" + schema_store: SchemaStore short_ur_ls: ShortURLs r"""REST APIs for managing short URLs""" subscriptions: Subscriptions @@ -79,15 +84,19 @@ def __init__( :param retry_config: The retry configuration to use for all supported methods :param timeout_ms: Optional request timeout applied to each operation in milliseconds """ + client_supplied = True if client is None: client = httpx.Client() + client_supplied = False assert issubclass( type(client), HttpClient ), "The provided client must implement the HttpClient protocol." + async_client_supplied = True if async_client is None: async_client = httpx.AsyncClient() + async_client_supplied = False if debug_logger is None: debug_logger = get_default_logger() @@ -108,7 +117,9 @@ def __init__( self, SDKConfiguration( client=client, + client_supplied=client_supplied, async_client=async_client, + async_client_supplied=async_client_supplied, globals=_globals, security=security, server_url=server_url, @@ -123,7 +134,7 @@ def __init__( current_server_url, *_ = self.sdk_configuration.get_server_details() server_url, self.sdk_configuration.client = hooks.sdk_init( - current_server_url, self.sdk_configuration.client + current_server_url, client ) if current_server_url != server_url: self.sdk_configuration.server_url = server_url @@ -131,6 +142,16 @@ def __init__( # pylint: disable=protected-access self.sdk_configuration.__dict__["_hooks"] = hooks + weakref.finalize( + self, + close_clients, + cast(ClientOwner, self.sdk_configuration), + self.sdk_configuration.client, + self.sdk_configuration.client_supplied, + self.sdk_configuration.async_client, + self.sdk_configuration.async_client_supplied, + ) + self._init_sdks() def _init_sdks(self): @@ -139,7 +160,9 @@ def _init_sdks(self): self.code_samples = CodeSamples(self.sdk_configuration) self.github = Github(self.sdk_configuration) self.organizations = Organizations(self.sdk_configuration) + self.publishing_tokens = PublishingTokens(self.sdk_configuration) self.reports = Reports(self.sdk_configuration) + self.schema_store = SchemaStore(self.sdk_configuration) self.short_ur_ls = ShortURLs(self.sdk_configuration) self.subscriptions = Subscriptions(self.sdk_configuration) self.suggest = Suggest(self.sdk_configuration) @@ -153,9 +176,17 @@ async def __aenter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): - if self.sdk_configuration.client is not None: + if ( + self.sdk_configuration.client is not None + and not self.sdk_configuration.client_supplied + ): self.sdk_configuration.client.close() + self.sdk_configuration.client = None async def __aexit__(self, exc_type, exc_val, exc_tb): - if self.sdk_configuration.async_client is not None: + if ( + self.sdk_configuration.async_client is not None + and not self.sdk_configuration.async_client_supplied + ): await self.sdk_configuration.async_client.aclose() + self.sdk_configuration.async_client = None diff --git a/src/speakeasy_client_sdk_python/sdkconfiguration.py b/src/speakeasy_client_sdk_python/sdkconfiguration.py index bf614611..e4483943 100644 --- a/src/speakeasy_client_sdk_python/sdkconfiguration.py +++ b/src/speakeasy_client_sdk_python/sdkconfiguration.py @@ -1,6 +1,12 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from ._hooks import SDKHooks +from ._version import ( + __gen_version__, + __openapi_doc_version__, + __user_agent__, + __version__, +) from .httpclient import AsyncHttpClient, HttpClient from .utils import Logger, RetryConfig, remove_suffix from dataclasses import dataclass @@ -19,20 +25,20 @@ @dataclass class SDKConfiguration: - client: HttpClient - async_client: AsyncHttpClient + client: Union[HttpClient, None] + client_supplied: bool + async_client: Union[AsyncHttpClient, None] + async_client_supplied: bool debug_logger: Logger globals: internal.Globals security: Optional[Union[shared.Security, Callable[[], shared.Security]]] = None server_url: Optional[str] = "" server: Optional[str] = "" language: str = "python" - openapi_doc_version: str = "0.4.0" - sdk_version: str = "7.0.0-rc.2" - gen_version: str = "2.486.1" - user_agent: str = ( - "speakeasy-sdk/python 7.0.0-rc.2 2.486.1 0.4.0 speakeasy-client-sdk-python" - ) + openapi_doc_version: str = __openapi_doc_version__ + sdk_version: str = __version__ + gen_version: str = __gen_version__ + user_agent: str = __user_agent__ retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None diff --git a/src/speakeasy_client_sdk_python/shorturls.py b/src/speakeasy_client_sdk_python/shorturls.py index 31220d9c..4ca26f69 100644 --- a/src/speakeasy_client_sdk_python/shorturls.py +++ b/src/speakeasy_client_sdk_python/shorturls.py @@ -37,6 +37,8 @@ def create( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.CreateRequestBody) @@ -71,6 +73,7 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="create", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -89,7 +92,12 @@ def create( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -130,6 +138,8 @@ async def create_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.CreateRequestBody) @@ -164,6 +174,7 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="create", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -182,7 +193,12 @@ async def create_async( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res diff --git a/src/speakeasy_client_sdk_python/subscriptions.py b/src/speakeasy_client_sdk_python/subscriptions.py index 072d86b2..3dd1f38e 100644 --- a/src/speakeasy_client_sdk_python/subscriptions.py +++ b/src/speakeasy_client_sdk_python/subscriptions.py @@ -38,6 +38,8 @@ def activate_subscription_namespace( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -71,6 +73,7 @@ def activate_subscription_namespace( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="activateSubscriptionNamespace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -80,7 +83,7 @@ def activate_subscription_namespace( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.ActivateSubscriptionNamespaceResponse( status_code=http_res.status_code, @@ -88,8 +91,8 @@ def activate_subscription_namespace( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -132,6 +135,8 @@ async def activate_subscription_namespace_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -165,6 +170,7 @@ async def activate_subscription_namespace_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="activateSubscriptionNamespace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -174,7 +180,7 @@ async def activate_subscription_namespace_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.ActivateSubscriptionNamespaceResponse( status_code=http_res.status_code, @@ -182,8 +188,8 @@ async def activate_subscription_namespace_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -226,6 +232,8 @@ def ignore_subscription_namespace( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -259,6 +267,7 @@ def ignore_subscription_namespace( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="ignoreSubscriptionNamespace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -268,7 +277,7 @@ def ignore_subscription_namespace( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.IgnoreSubscriptionNamespaceResponse( status_code=http_res.status_code, @@ -276,8 +285,8 @@ def ignore_subscription_namespace( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -320,6 +329,8 @@ async def ignore_subscription_namespace_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -353,6 +364,7 @@ async def ignore_subscription_namespace_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="ignoreSubscriptionNamespace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -362,7 +374,7 @@ async def ignore_subscription_namespace_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.IgnoreSubscriptionNamespaceResponse( status_code=http_res.status_code, @@ -370,8 +382,8 @@ async def ignore_subscription_namespace_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( diff --git a/src/speakeasy_client_sdk_python/suggest.py b/src/speakeasy_client_sdk_python/suggest.py index 9c37b0b6..750d046f 100644 --- a/src/speakeasy_client_sdk_python/suggest.py +++ b/src/speakeasy_client_sdk_python/suggest.py @@ -37,6 +37,8 @@ def suggest( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.SuggestRequest) @@ -75,6 +77,7 @@ def suggest( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="suggest", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -92,7 +95,12 @@ def suggest( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -133,6 +141,8 @@ async def suggest_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.SuggestRequest) @@ -171,6 +181,7 @@ async def suggest_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="suggest", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -188,7 +199,12 @@ async def suggest_async( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -229,6 +245,8 @@ def suggest_items( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.SuggestItemsRequestBody) @@ -263,6 +281,7 @@ def suggest_items( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="suggestItems", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -279,7 +298,12 @@ def suggest_items( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -320,6 +344,8 @@ async def suggest_items_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.SuggestItemsRequestBody) @@ -354,6 +380,7 @@ async def suggest_items_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="suggestItems", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -370,7 +397,12 @@ async def suggest_items_async( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -413,6 +445,8 @@ def suggest_open_api( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.SuggestOpenAPIRequest) @@ -451,6 +485,7 @@ def suggest_open_api( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="suggestOpenAPI", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -468,7 +503,12 @@ def suggest_open_api( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -511,6 +551,8 @@ async def suggest_open_api_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.SuggestOpenAPIRequest) @@ -549,6 +591,7 @@ async def suggest_open_api_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="suggestOpenAPI", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -566,7 +609,12 @@ async def suggest_open_api_async( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -610,6 +658,8 @@ def suggest_open_api_registry( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.SuggestOpenAPIRegistryRequest) @@ -648,6 +698,7 @@ def suggest_open_api_registry( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="suggestOpenAPIRegistry", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -665,7 +716,12 @@ def suggest_open_api_registry( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res @@ -709,6 +765,8 @@ async def suggest_open_api_registry_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.SuggestOpenAPIRegistryRequest) @@ -747,6 +805,7 @@ async def suggest_open_api_registry_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="suggestOpenAPIRegistry", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -764,7 +823,12 @@ async def suggest_open_api_registry_async( content_type=http_res.headers.get("Content-Type") or "", raw_response=http_res, ) - if utils.match_response(http_res, ["4XX", "5XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( "API error occurred", http_res.status_code, http_res_text, http_res diff --git a/src/speakeasy_client_sdk_python/types/basemodel.py b/src/speakeasy_client_sdk_python/types/basemodel.py index a6187efa..231c2e37 100644 --- a/src/speakeasy_client_sdk_python/types/basemodel.py +++ b/src/speakeasy_client_sdk_python/types/basemodel.py @@ -2,7 +2,7 @@ from pydantic import ConfigDict, model_serializer from pydantic import BaseModel as PydanticBaseModel -from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union, NewType +from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union from typing_extensions import TypeAliasType, TypeAlias @@ -35,5 +35,5 @@ def __bool__(self) -> Literal[False]: "OptionalNullable", Union[Optional[Nullable[T]], Unset], type_params=(T,) ) -UnrecognizedInt = NewType("UnrecognizedInt", int) -UnrecognizedStr = NewType("UnrecognizedStr", str) +UnrecognizedInt: TypeAlias = int +UnrecognizedStr: TypeAlias = str diff --git a/src/speakeasy_client_sdk_python/utils/__init__.py b/src/speakeasy_client_sdk_python/utils/__init__.py index 26d51ae8..f2950eed 100644 --- a/src/speakeasy_client_sdk_python/utils/__init__.py +++ b/src/speakeasy_client_sdk_python/utils/__init__.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from .annotations import get_discriminator +from .datetimes import parse_datetime from .enums import OpenEnumMeta from .headers import get_headers, get_response_headers from .metadata import ( @@ -42,6 +43,7 @@ match_content_type, match_status_codes, match_response, + cast_partial, ) from .logger import Logger, get_body_content, get_default_logger @@ -94,4 +96,5 @@ "validate_float", "validate_int", "validate_open_enum", + "cast_partial", ] diff --git a/src/speakeasy_client_sdk_python/utils/datetimes.py b/src/speakeasy_client_sdk_python/utils/datetimes.py new file mode 100644 index 00000000..a6c52cd6 --- /dev/null +++ b/src/speakeasy_client_sdk_python/utils/datetimes.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from datetime import datetime +import sys + + +def parse_datetime(datetime_string: str) -> datetime: + """ + Convert a RFC 3339 / ISO 8601 formatted string into a datetime object. + Python versions 3.11 and later support parsing RFC 3339 directly with + datetime.fromisoformat(), but for earlier versions, this function + encapsulates the necessary extra logic. + """ + # Python 3.11 and later can parse RFC 3339 directly + if sys.version_info >= (3, 11): + return datetime.fromisoformat(datetime_string) + + # For Python 3.10 and earlier, a common ValueError is trailing 'Z' suffix, + # so fix that upfront. + if datetime_string.endswith("Z"): + datetime_string = datetime_string[:-1] + "+00:00" + + return datetime.fromisoformat(datetime_string) diff --git a/src/speakeasy_client_sdk_python/utils/enums.py b/src/speakeasy_client_sdk_python/utils/enums.py index c650b10c..c3bc13cf 100644 --- a/src/speakeasy_client_sdk_python/utils/enums.py +++ b/src/speakeasy_client_sdk_python/utils/enums.py @@ -1,34 +1,74 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" import enum - +import sys class OpenEnumMeta(enum.EnumMeta): - def __call__( - cls, value, names=None, *, module=None, qualname=None, type=None, start=1 - ): - # The `type` kwarg also happens to be a built-in that pylint flags as - # redeclared. Safe to ignore this lint rule with this scope. - # pylint: disable=redefined-builtin + # The __call__ method `boundary` kwarg was added in 3.11 and must be present + # for pyright. Refer also: https://github.com/pylint-dev/pylint/issues/9622 + # pylint: disable=unexpected-keyword-arg + # The __call__ method `values` varg must be named for pyright. + # pylint: disable=keyword-arg-before-vararg + + if sys.version_info >= (3, 11): + def __call__( + cls, value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None + ): + # The `type` kwarg also happens to be a built-in that pylint flags as + # redeclared. Safe to ignore this lint rule with this scope. + # pylint: disable=redefined-builtin + + if names is not None: + return super().__call__( + value, + names=names, + *values, + module=module, + qualname=qualname, + type=type, + start=start, + boundary=boundary, + ) + + try: + return super().__call__( + value, + names=names, # pyright: ignore[reportArgumentType] + *values, + module=module, + qualname=qualname, + type=type, + start=start, + boundary=boundary, + ) + except ValueError: + return value + else: + def __call__( + cls, value, names=None, *, module=None, qualname=None, type=None, start=1 + ): + # The `type` kwarg also happens to be a built-in that pylint flags as + # redeclared. Safe to ignore this lint rule with this scope. + # pylint: disable=redefined-builtin - if names is not None: - return super().__call__( - value, - names=names, - module=module, - qualname=qualname, - type=type, - start=start, - ) + if names is not None: + return super().__call__( + value, + names=names, + module=module, + qualname=qualname, + type=type, + start=start, + ) - try: - return super().__call__( - value, - names=names, # pyright: ignore[reportArgumentType] - module=module, - qualname=qualname, - type=type, - start=start, - ) - except ValueError: - return value + try: + return super().__call__( + value, + names=names, # pyright: ignore[reportArgumentType] + module=module, + qualname=qualname, + type=type, + start=start, + ) + except ValueError: + return value diff --git a/src/speakeasy_client_sdk_python/utils/serializers.py b/src/speakeasy_client_sdk_python/utils/serializers.py index c5eb3659..76e44d71 100644 --- a/src/speakeasy_client_sdk_python/utils/serializers.py +++ b/src/speakeasy_client_sdk_python/utils/serializers.py @@ -1,20 +1,24 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from decimal import Decimal +import functools import json -from typing import Any, Dict, List, Union, get_args -import httpx +import typing +from typing import Any, Dict, List, Tuple, Union, get_args +import typing_extensions from typing_extensions import get_origin + +import httpx from pydantic import ConfigDict, create_model from pydantic_core import from_json -from typing_inspect import is_optional_type from ..types.basemodel import BaseModel, Nullable, OptionalNullable, Unset def serialize_decimal(as_str: bool): def serialize(d): - if is_optional_type(type(d)) and d is None: + # Optional[T] is a Union[T, None] + if is_union(type(d)) and type(None) in get_args(type(d)) and d is None: return None if isinstance(d, Unset): return d @@ -42,7 +46,8 @@ def validate_decimal(d): def serialize_float(as_str: bool): def serialize(f): - if is_optional_type(type(f)) and f is None: + # Optional[T] is a Union[T, None] + if is_union(type(f)) and type(None) in get_args(type(f)) and f is None: return None if isinstance(f, Unset): return f @@ -70,7 +75,8 @@ def validate_float(f): def serialize_int(as_str: bool): def serialize(i): - if is_optional_type(type(i)) and i is None: + # Optional[T] is a Union[T, None] + if is_union(type(i)) and type(None) in get_args(type(i)) and i is None: return None if isinstance(i, Unset): return i @@ -118,7 +124,8 @@ def validate(e): def validate_const(v): def validate(c): - if is_optional_type(type(c)) and c is None: + # Optional[T] is a Union[T, None] + if is_union(type(c)) and type(None) in get_args(type(c)) and c is None: return None if v != c: @@ -163,7 +170,7 @@ def marshal_json(val, typ): if len(d) == 0: return "" - return json.dumps(d[next(iter(d))], separators=(",", ":"), sort_keys=True) + return json.dumps(d[next(iter(d))], separators=(",", ":")) def is_nullable(field): @@ -181,6 +188,13 @@ def is_nullable(field): return False +def is_union(obj: object) -> bool: + """ + Returns True if the given object is a typing.Union or typing_extensions.Union. + """ + return any(obj is typing_obj for typing_obj in _get_typing_objects_by_name_of("Union")) + + def stream_to_text(stream: httpx.Response) -> str: return "".join(stream.iter_text()) @@ -213,3 +227,22 @@ def _contains_pydantic_model(data: Any) -> bool: return any(_contains_pydantic_model(value) for value in data.values()) return False + + +@functools.cache +def _get_typing_objects_by_name_of(name: str) -> Tuple[Any, ...]: + """ + Get typing objects by name from typing and typing_extensions. + Reference: https://typing-extensions.readthedocs.io/en/latest/#runtime-use-of-types + """ + result = tuple( + getattr(module, name) + for module in (typing, typing_extensions) + if hasattr(module, name) + ) + if not result: + raise ValueError( + f"Neither typing nor typing_extensions has an object called {name!r}" + ) + return result + diff --git a/src/speakeasy_client_sdk_python/utils/values.py b/src/speakeasy_client_sdk_python/utils/values.py index 2b4b6832..dae01a44 100644 --- a/src/speakeasy_client_sdk_python/utils/values.py +++ b/src/speakeasy_client_sdk_python/utils/values.py @@ -3,8 +3,9 @@ from datetime import datetime from enum import Enum from email.message import Message +from functools import partial import os -from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union +from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union, cast from httpx import Response from pydantic import BaseModel @@ -51,6 +52,8 @@ def match_status_codes(status_codes: List[str], status_code: int) -> bool: T = TypeVar("T") +def cast_partial(typ): + return partial(cast, typ) def get_global_from_env( value: Optional[T], env_key: str, type_cast: Callable[[str], T] diff --git a/src/speakeasy_client_sdk_python/workspaces.py b/src/speakeasy_client_sdk_python/workspaces.py index 65477b00..d4ce2196 100644 --- a/src/speakeasy_client_sdk_python/workspaces.py +++ b/src/speakeasy_client_sdk_python/workspaces.py @@ -37,6 +37,8 @@ def create( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.Workspace) @@ -71,6 +73,7 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="createWorkspace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -80,7 +83,7 @@ def create( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.CreateWorkspaceResponse( workspace=utils.unmarshal_json( @@ -91,8 +94,8 @@ def create( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -134,6 +137,8 @@ async def create_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, shared.Workspace) @@ -168,6 +173,7 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="createWorkspace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -177,7 +183,7 @@ async def create_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.CreateWorkspaceResponse( workspace=utils.unmarshal_json( @@ -188,8 +194,8 @@ async def create_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -232,6 +238,8 @@ def create_token( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.CreateWorkspaceTokenRequest) @@ -269,6 +277,7 @@ def create_token( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="createWorkspaceToken", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -278,7 +287,7 @@ def create_token( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.CreateWorkspaceTokenResponse( status_code=http_res.status_code, @@ -286,8 +295,8 @@ def create_token( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -330,6 +339,8 @@ async def create_token_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.CreateWorkspaceTokenRequest) @@ -367,6 +378,7 @@ async def create_token_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="createWorkspaceToken", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -376,7 +388,7 @@ async def create_token_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.CreateWorkspaceTokenResponse( status_code=http_res.status_code, @@ -384,8 +396,8 @@ async def create_token_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -428,6 +440,8 @@ def delete_token( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.DeleteWorkspaceTokenRequest) @@ -462,6 +476,7 @@ def delete_token( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="deleteWorkspaceToken", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -471,7 +486,7 @@ def delete_token( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.DeleteWorkspaceTokenResponse( status_code=http_res.status_code, @@ -479,8 +494,8 @@ def delete_token( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -523,6 +538,8 @@ async def delete_token_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.DeleteWorkspaceTokenRequest) @@ -557,6 +574,7 @@ async def delete_token_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="deleteWorkspaceToken", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -566,7 +584,7 @@ async def delete_token_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.DeleteWorkspaceTokenResponse( status_code=http_res.status_code, @@ -574,8 +592,8 @@ async def delete_token_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -615,6 +633,8 @@ def get( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request( method="GET", path="/v1/workspace", @@ -641,6 +661,7 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceByContext", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -650,7 +671,7 @@ def get( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspaceByContextResponse( workspace_and_organization=utils.unmarshal_json( @@ -661,8 +682,8 @@ def get( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -702,6 +723,8 @@ async def get_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request_async( method="GET", path="/v1/workspace", @@ -728,6 +751,7 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceByContext", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -737,7 +761,7 @@ async def get_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspaceByContextResponse( workspace_and_organization=utils.unmarshal_json( @@ -748,8 +772,8 @@ async def get_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -789,6 +813,8 @@ def get_all( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request( method="GET", path="/v1/workspaces", @@ -815,6 +841,7 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaces", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -824,7 +851,7 @@ def get_all( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspacesResponse( workspaces=utils.unmarshal_json( @@ -835,8 +862,8 @@ def get_all( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -876,6 +903,8 @@ async def get_all_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) req = self._build_request_async( method="GET", path="/v1/workspaces", @@ -902,6 +931,7 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaces", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -911,7 +941,7 @@ async def get_all_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspacesResponse( workspaces=utils.unmarshal_json( @@ -922,8 +952,8 @@ async def get_all_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -967,6 +997,8 @@ def get_by_id( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceRequest) @@ -1001,6 +1033,7 @@ def get_by_id( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1010,7 +1043,7 @@ def get_by_id( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspaceResponse( workspace=utils.unmarshal_json( @@ -1021,8 +1054,8 @@ def get_by_id( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1066,6 +1099,8 @@ async def get_by_id_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceRequest) @@ -1100,6 +1135,7 @@ async def get_by_id_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1109,7 +1145,7 @@ async def get_by_id_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspaceResponse( workspace=utils.unmarshal_json( @@ -1120,8 +1156,8 @@ async def get_by_id_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1164,6 +1200,8 @@ def get_feature_flags( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -1200,6 +1238,7 @@ def get_feature_flags( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceFeatureFlags", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1209,7 +1248,7 @@ def get_feature_flags( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GetWorkspaceFeatureFlagsResponse( workspace_feature_flag_response=utils.unmarshal_json( @@ -1225,8 +1264,8 @@ def get_feature_flags( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = utils.stream_to_text(http_res) @@ -1264,6 +1303,8 @@ async def get_feature_flags_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -1300,6 +1341,7 @@ async def get_feature_flags_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceFeatureFlags", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1309,7 +1351,7 @@ async def get_feature_flags_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GetWorkspaceFeatureFlagsResponse( workspace_feature_flag_response=utils.unmarshal_json( @@ -1325,8 +1367,8 @@ async def get_feature_flags_async( "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "5XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) content_type = http_res.headers.get("Content-Type") http_res_text = await utils.stream_to_text_async(http_res) @@ -1366,6 +1408,8 @@ def get_settings( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceSettingsRequest) @@ -1400,6 +1444,7 @@ def get_settings( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceSettings", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1409,7 +1454,7 @@ def get_settings( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspaceSettingsResponse( workspace_settings=utils.unmarshal_json( @@ -1420,8 +1465,8 @@ def get_settings( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1466,6 +1511,8 @@ async def get_settings_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceSettingsRequest) @@ -1500,6 +1547,7 @@ async def get_settings_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceSettings", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1509,7 +1557,7 @@ async def get_settings_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspaceSettingsResponse( workspace_settings=utils.unmarshal_json( @@ -1520,8 +1568,8 @@ async def get_settings_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1564,6 +1612,8 @@ def get_team( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceTeamRequest) @@ -1598,6 +1648,7 @@ def get_team( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceTeam", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1607,7 +1658,7 @@ def get_team( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspaceTeamResponse( workspace_team_response=utils.unmarshal_json( @@ -1618,8 +1669,8 @@ def get_team( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1662,6 +1713,8 @@ async def get_team_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceTeamRequest) @@ -1696,6 +1749,7 @@ async def get_team_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceTeam", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1705,7 +1759,7 @@ async def get_team_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspaceTeamResponse( workspace_team_response=utils.unmarshal_json( @@ -1716,8 +1770,8 @@ async def get_team_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1760,6 +1814,8 @@ def get_tokens( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceTokensRequest) @@ -1794,6 +1850,7 @@ def get_tokens( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceTokens", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1803,7 +1860,7 @@ def get_tokens( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspaceTokensResponse( classes=utils.unmarshal_json( @@ -1814,8 +1871,8 @@ def get_tokens( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1858,6 +1915,8 @@ async def get_tokens_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.GetWorkspaceTokensRequest) @@ -1892,6 +1951,7 @@ async def get_tokens_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="getWorkspaceTokens", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1901,7 +1961,7 @@ async def get_tokens_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "application/json"): return operations.GetWorkspaceTokensResponse( classes=utils.unmarshal_json( @@ -1912,8 +1972,8 @@ async def get_tokens_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1956,6 +2016,8 @@ def grant_access( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -1992,6 +2054,7 @@ def grant_access( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="grantUserAccessToWorkspace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2001,7 +2064,7 @@ def grant_access( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GrantUserAccessToWorkspaceResponse( workspace_invite_response=utils.unmarshal_json( @@ -2012,8 +2075,8 @@ def grant_access( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -2056,6 +2119,8 @@ async def grant_access_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -2092,6 +2157,7 @@ async def grant_access_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="grantUserAccessToWorkspace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2101,7 +2167,7 @@ async def grant_access_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GrantUserAccessToWorkspaceResponse( workspace_invite_response=utils.unmarshal_json( @@ -2112,8 +2178,8 @@ async def grant_access_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -2156,6 +2222,8 @@ def revoke_access( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -2192,6 +2260,7 @@ def revoke_access( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="revokeUserAccessToWorkspace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2201,7 +2270,7 @@ def revoke_access( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.RevokeUserAccessToWorkspaceResponse( status_code=http_res.status_code, @@ -2209,8 +2278,8 @@ def revoke_access( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -2253,6 +2322,8 @@ async def revoke_access_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -2289,6 +2360,7 @@ async def revoke_access_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="revokeUserAccessToWorkspace", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2298,7 +2370,7 @@ async def revoke_access_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.RevokeUserAccessToWorkspaceResponse( status_code=http_res.status_code, @@ -2306,8 +2378,8 @@ async def revoke_access_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -2323,6 +2395,208 @@ async def revoke_access_async( http_res, ) + def set_feature_flags( + self, + *, + request: Union[ + shared.WorkspaceFeatureFlagRequest, + shared.WorkspaceFeatureFlagRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.SetWorkspaceFeatureFlagsResponse: + r"""Set workspace feature flags + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, shared.WorkspaceFeatureFlagRequest) + request = cast(shared.WorkspaceFeatureFlagRequest, request) + + req = self._build_request( + method="POST", + path="/v1/workspace/feature_flags", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", shared.WorkspaceFeatureFlagRequest + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="setWorkspaceFeatureFlags", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.SetWorkspaceFeatureFlagsResponse( + workspace_feature_flag_response=utils.unmarshal_json( + http_res.text, Optional[shared.WorkspaceFeatureFlagResponse] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def set_feature_flags_async( + self, + *, + request: Union[ + shared.WorkspaceFeatureFlagRequest, + shared.WorkspaceFeatureFlagRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.SetWorkspaceFeatureFlagsResponse: + r"""Set workspace feature flags + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, shared.WorkspaceFeatureFlagRequest) + request = cast(shared.WorkspaceFeatureFlagRequest, request) + + req = self._build_request_async( + method="POST", + path="/v1/workspace/feature_flags", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", shared.WorkspaceFeatureFlagRequest + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="setWorkspaceFeatureFlags", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.SetWorkspaceFeatureFlagsResponse( + workspace_feature_flag_response=utils.unmarshal_json( + http_res.text, Optional[shared.WorkspaceFeatureFlagResponse] + ), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "application/json"): + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + def update( self, *, @@ -2352,6 +2626,8 @@ def update( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.UpdateWorkspaceDetailsRequest) @@ -2389,6 +2665,7 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="updateWorkspaceDetails", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2398,7 +2675,7 @@ def update( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.UpdateWorkspaceDetailsResponse( status_code=http_res.status_code, @@ -2406,8 +2683,8 @@ def update( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -2452,6 +2729,8 @@ async def update_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, operations.UpdateWorkspaceDetailsRequest) @@ -2489,6 +2768,7 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="updateWorkspaceDetails", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2498,7 +2778,7 @@ async def update_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.UpdateWorkspaceDetailsResponse( status_code=http_res.status_code, @@ -2506,8 +2786,8 @@ async def update_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -2552,6 +2832,8 @@ def update_settings( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -2595,6 +2877,7 @@ def update_settings( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="updateWorkspaceSettings", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2604,7 +2887,7 @@ def update_settings( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.UpdateWorkspaceSettingsResponse( status_code=http_res.status_code, @@ -2612,8 +2895,8 @@ def update_settings( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -2658,6 +2941,8 @@ async def update_settings_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal( @@ -2701,6 +2986,7 @@ async def update_settings_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="updateWorkspaceSettings", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2710,7 +2996,7 @@ async def update_settings_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "2XX", "*"): return operations.UpdateWorkspaceSettingsResponse( status_code=http_res.status_code, @@ -2718,8 +3004,8 @@ async def update_settings_async( raw_response=http_res, ) if utils.match_response(http_res, "4XX", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.ErrorData) - raise errors.Error(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.ErrorData) + raise errors.Error(data=response_data) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError(