diff --git a/.rubocop.yml b/.rubocop.yml index f229c5ae..a8507d07 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,6 @@ +plugins: + - rubocop-minitest + AllCops: Exclude: - Rakefile diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 7148b0e6..a64abb0d 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,93 +1,82 @@ lockVersion: 2.0.0 id: ee307ad3-8dfc-4d06-9c04-86e7d437810d management: - docChecksum: cf89a4fde0fbc1524296a333f75ea848 - docVersion: 0.4.0 . - speakeasyVersion: 1.405.8 - generationVersion: 2.429.0 - releaseVersion: 4.2.24 - configChecksum: b44c4c6d10fc1cef416d8c5bd31c898a + docChecksum: b3a87fe4496712708270da5a3e560234 + docVersion: 0.4.0 + speakeasyVersion: 1.533.0 + generationVersion: 2.578.0 + releaseVersion: 4.3.0 + configChecksum: fce4f89d776f5dbee8d923e733c50a3b repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-ruby.git installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-ruby published: true features: ruby: - core: 3.2.26 - deprecations: 2.81.1 - examples: 2.81.3 + core: 3.6.2 + deprecations: 2.81.2 flattening: 2.81.1 - globalSecurity: 2.81.7 + getRequestBodies: 2.81.1 + globalSecurity: 2.81.8 globalServerURLs: 2.82.3 globals: 2.82.1 - groups: 2.81.2 - inputOutputModels: 2.83.0 nameOverrides: 2.81.2 + responseFormat: 0.1.0 + retries: 0.1.1 serverIDs: 2.81.1 generatedFiles: - .gitattributes - .rubocop.yml - - CONTRIBUTING.md - Gemfile - Gemfile.lock - Rakefile - USAGE.md + - docs/models/errors/error.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/createworkspacetokenrequest.md - docs/models/operations/createworkspacetokenresponse.md - - docs/models/operations/deleteapiendpointrequest.md - - docs/models/operations/deleteapiendpointresponse.md - - docs/models/operations/deleteapirequest.md - - docs/models/operations/deleteapiresponse.md - - docs/models/operations/deleteschemarequest.md - - docs/models/operations/deleteschemaresponse.md - - docs/models/operations/deleteversionmetadatarequest.md - - docs/models/operations/deleteversionmetadataresponse.md + - docs/models/operations/deletebillingaddonrequest.md + - docs/models/operations/deletebillingaddonresponse.md + - docs/models/operations/deletepublishingtokenrequest.md + - docs/models/operations/deletepublishingtokenresponse.md - docs/models/operations/deleteworkspacetokenrequest.md - docs/models/operations/deleteworkspacetokenresponse.md - - docs/models/operations/downloadschemarequest.md - - docs/models/operations/downloadschemaresponse.md - - docs/models/operations/downloadschemarevisionrequest.md - - docs/models/operations/downloadschemarevisionresponse.md - docs/models/operations/file.md - - docs/models/operations/findapiendpointrequest.md - - docs/models/operations/findapiendpointresponse.md - - docs/models/operations/generateopenapispecforapiendpointrequest.md - - docs/models/operations/generateopenapispecforapiendpointresponse.md - - docs/models/operations/generateopenapispecrequest.md - - docs/models/operations/generateopenapispecresponse.md - - docs/models/operations/generatepostmancollectionforapiendpointrequest.md - - docs/models/operations/generatepostmancollectionforapiendpointresponse.md - - docs/models/operations/generatepostmancollectionrequest.md - - docs/models/operations/generatepostmancollectionresponse.md - - docs/models/operations/generaterequestpostmancollectionrequest.md - - docs/models/operations/generaterequestpostmancollectionresponse.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/getallapiendpointsrequest.md - - docs/models/operations/getallapiendpointsresponse.md - - docs/models/operations/getallapiversionsrequest.md - - docs/models/operations/getallapiversionsresponse.md - - docs/models/operations/getallforversionapiendpointsrequest.md - - docs/models/operations/getallforversionapiendpointsresponse.md - - docs/models/operations/getapiendpointrequest.md - - docs/models/operations/getapiendpointresponse.md - - docs/models/operations/getapisrequest.md - - docs/models/operations/getapisresponse.md + - docs/models/operations/getbillingaddonsresponse.md - docs/models/operations/getblobrequest.md - docs/models/operations/getblobresponse.md - docs/models/operations/getchangesreportsignedurlrequest.md - docs/models/operations/getchangesreportsignedurlresponse.md - docs/models/operations/getchangesreportsignedurlsignedaccess.md - - docs/models/operations/getembedaccesstokenrequest.md - - docs/models/operations/getembedaccesstokenresponse.md + - docs/models/operations/getcodesamplepreviewasyncrequest.md + - docs/models/operations/getcodesamplepreviewasyncresponse.md + - docs/models/operations/getcodesamplepreviewasyncresponsebody.md - docs/models/operations/getgithubactionrequest.md - docs/models/operations/getgithubactionresponse.md + - docs/models/operations/getgithubsetupstaterequest.md + - docs/models/operations/getgithubsetupstateresponse.md - docs/models/operations/getlintingreportsignedurlrequest.md - docs/models/operations/getlintingreportsignedurlresponse.md - docs/models/operations/getlintingreportsignedurlsignedaccess.md @@ -98,24 +87,22 @@ generatedFiles: - docs/models/operations/getorganizationresponse.md - docs/models/operations/getorganizationsresponse.md - docs/models/operations/getorganizationusageresponse.md - - docs/models/operations/getrequestfromeventlogrequest.md - - docs/models/operations/getrequestfromeventlogresponse.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/getpublishingtokentargetbyidresponsebody.md - docs/models/operations/getrevisionsrequest.md - docs/models/operations/getrevisionsresponse.md - - docs/models/operations/getschemadiffrequest.md - - docs/models/operations/getschemadiffresponse.md - - docs/models/operations/getschemarequest.md - - docs/models/operations/getschemaresponse.md - - docs/models/operations/getschemarevisionrequest.md - - docs/models/operations/getschemarevisionresponse.md - - docs/models/operations/getschemasrequest.md - - docs/models/operations/getschemasresponse.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 - - docs/models/operations/getvalidembedaccesstokensresponse.md - - docs/models/operations/getversionmetadatarequest.md - - docs/models/operations/getversionmetadataresponse.md - docs/models/operations/getworkspaceaccessrequest.md - docs/models/operations/getworkspaceaccessresponse.md - docs/models/operations/getworkspacebycontextresponse.md @@ -147,27 +134,27 @@ generatedFiles: - docs/models/operations/githubtriggeractionresponse.md - docs/models/operations/grantuseraccesstoworkspacerequest.md - docs/models/operations/grantuseraccesstoworkspaceresponse.md - - docs/models/operations/insertversionmetadatarequest.md - - docs/models/operations/insertversionmetadataresponse.md - - docs/models/operations/op.md + - docs/models/operations/ignoresubscriptionnamespacerequest.md + - docs/models/operations/ignoresubscriptionnamespaceresponse.md + - docs/models/operations/linkgithubaccessrequest.md + - docs/models/operations/linkgithubaccessresponse.md + - docs/models/operations/listremotesourcesrequest.md + - docs/models/operations/listremotesourcesresponse.md - docs/models/operations/posttagsrequest.md - docs/models/operations/posttagsresponse.md - docs/models/operations/postworkspaceeventsrequest.md - docs/models/operations/postworkspaceeventsresponse.md - docs/models/operations/preflightresponse.md - - docs/models/operations/queryeventlogrequest.md - - docs/models/operations/queryeventlogresponse.md - - docs/models/operations/queryparamop.md - - docs/models/operations/registerschemarequest.md - - docs/models/operations/registerschemarequestbody.md - - docs/models/operations/registerschemaresponse.md - - docs/models/operations/revokeembedaccesstokenrequest.md - - docs/models/operations/revokeembedaccesstokenresponse.md - docs/models/operations/revokeuseraccesstoworkspacerequest.md - docs/models/operations/revokeuseraccesstoworkspaceresponse.md - docs/models/operations/schema.md - docs/models/operations/searchworkspaceeventsrequest.md - docs/models/operations/searchworkspaceeventsresponse.md + - 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 - docs/models/operations/suggestopenapirequest.md @@ -175,43 +162,36 @@ 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/updateworkspacedetailsrequest.md - docs/models/operations/updateworkspacedetailsresponse.md - docs/models/operations/updateworkspacesettingsrequest.md - docs/models/operations/updateworkspacesettingsresponse.md - - docs/models/operations/uploadreportfile.md - docs/models/operations/uploadreportrequestbody.md - docs/models/operations/uploadreportresponse.md - docs/models/operations/uploadreportuploadedreport.md - - docs/models/operations/upsertapiendpointrequest.md - - docs/models/operations/upsertapiendpointresponse.md - - docs/models/operations/upsertapirequest.md - - docs/models/operations/upsertapiresponse.md - docs/models/operations/validateapikeyresponse.md - docs/models/shared/accessdetails.md - docs/models/shared/accesstoken.md - docs/models/shared/accesstokenuser.md - docs/models/shared/accounttype.md + - docs/models/shared/actions.md - docs/models/shared/addtags.md - docs/models/shared/annotations.md - - docs/models/shared/api.md - - docs/models/shared/apiendpoint.md - - docs/models/shared/apiendpointinput.md - - docs/models/shared/apiinput.md - docs/models/shared/apikeydetails.md - docs/models/shared/auth.md - - docs/models/shared/boundedrequest.md + - docs/models/shared/billingaddon.md - docs/models/shared/claims.md - docs/models/shared/clievent.md + - docs/models/shared/codesampleschemainput.md + - docs/models/shared/codesamplesjobstatus.md + - docs/models/shared/compositespecmetadata.md - docs/models/shared/diagnostic.md - - docs/models/shared/embedaccesstokenresponse.md - - docs/models/shared/embedtoken.md - - docs/models/shared/error.md - docs/models/shared/featureflag.md - - docs/models/shared/filter.md - - docs/models/shared/filters.md + - docs/models/shared/format.md - docs/models/shared/generatebumptype.md - - docs/models/shared/generateopenapispecdiff.md - docs/models/shared/getnamespacesresponse.md - docs/models/shared/getrevisionsresponse.md - docs/models/shared/gettagsresponse.md @@ -222,6 +202,7 @@ generatedFiles: - docs/models/shared/githubgetactionresponse.md - docs/models/shared/githubmissingpublishingsecretsresponse.md - docs/models/shared/githubpublishingprresponse.md + - docs/models/shared/githubsetupstateresponse.md - docs/models/shared/githubstorepublishingsecretsrequest.md - docs/models/shared/githubtriggeractionrequest.md - docs/models/shared/interactiontype.md @@ -234,124 +215,125 @@ 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/requestmetadata.md - docs/models/shared/revision.md - - docs/models/shared/schema.md - - docs/models/shared/schemadiff.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 - docs/models/shared/ssometadata.md - docs/models/shared/suggestiontype.md + - docs/models/shared/suggestitemsrequestbody.md - docs/models/shared/suggestoptsold.md - 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/unboundedrequest.md + - docs/models/shared/usagesnippet.md + - docs/models/shared/usagesnippets.md - docs/models/shared/user.md - docs/models/shared/v2descriptor.md - - docs/models/shared/valuechange.md - - docs/models/shared/versionmetadata.md - - docs/models/shared/versionmetadatainput.md - 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 - docs/models/shared/workspacesettings.md - docs/models/shared/workspaceteamresponse.md - docs/models/shared/workspacetoken.md - - docs/sdks/apiendpoints/README.md - - docs/sdks/apis/README.md - docs/sdks/artifacts/README.md - docs/sdks/auth/README.md - - docs/sdks/embeds/README.md + - docs/sdks/codesamples/README.md - docs/sdks/events/README.md - docs/sdks/github/README.md - - docs/sdks/metadata/README.md - docs/sdks/organizations/README.md + - docs/sdks/publishingtokens/README.md - docs/sdks/reports/README.md - - docs/sdks/requests/README.md - - docs/sdks/schemas/README.md + - docs/sdks/schemastore/README.md - docs/sdks/shorturls/README.md - docs/sdks/speakeasyclientsdk/README.md - - docs/sdks/speakeasyclientsdkapiendpoints/README.md + - docs/sdks/subscriptions/README.md - docs/sdks/suggest/README.md - docs/sdks/workspaces/README.md - - lib/open_api_sdk/apiendpoints.rb - - lib/open_api_sdk/apis.rb + - lib/crystalline.rb + - lib/crystalline/metadata_fields.rb + - lib/crystalline/t.rb + - lib/crystalline/utils.rb - lib/open_api_sdk/artifacts.rb - lib/open_api_sdk/auth.rb - - lib/open_api_sdk/embeds.rb + - lib/open_api_sdk/codesamples.rb - lib/open_api_sdk/events.rb - lib/open_api_sdk/github.rb - - lib/open_api_sdk/metadata.rb + - lib/open_api_sdk/models/errors.rb + - lib/open_api_sdk/models/errors/apierror.rb + - lib/open_api_sdk/models/errors/error.rb - lib/open_api_sdk/models/operations.rb + - lib/open_api_sdk/models/operations/activatesubscriptionnamespace_request.rb + - lib/open_api_sdk/models/operations/activatesubscriptionnamespace_response.rb + - lib/open_api_sdk/models/operations/archivenamespace_request.rb + - lib/open_api_sdk/models/operations/archivenamespace_requestbody.rb + - lib/open_api_sdk/models/operations/archivenamespace_response.rb - lib/open_api_sdk/models/operations/checkgithubaccess_request.rb - lib/open_api_sdk/models/operations/checkgithubaccess_response.rb - lib/open_api_sdk/models/operations/create_requestbody.rb - lib/open_api_sdk/models/operations/create_response.rb + - lib/open_api_sdk/models/operations/createbillingaddons_response.rb - lib/open_api_sdk/models/operations/createfreetrial_response.rb - lib/open_api_sdk/models/operations/createorganization_response.rb + - lib/open_api_sdk/models/operations/createpublishingtoken_requestbody.rb + - lib/open_api_sdk/models/operations/createpublishingtoken_response.rb + - lib/open_api_sdk/models/operations/createremotesource_response.rb + - lib/open_api_sdk/models/operations/createschemastoreitem_requestbody.rb + - lib/open_api_sdk/models/operations/createschemastoreitem_response.rb - lib/open_api_sdk/models/operations/createworkspace_response.rb - lib/open_api_sdk/models/operations/createworkspacetoken_request.rb - lib/open_api_sdk/models/operations/createworkspacetoken_response.rb - - lib/open_api_sdk/models/operations/deleteapi_request.rb - - lib/open_api_sdk/models/operations/deleteapi_response.rb - - lib/open_api_sdk/models/operations/deleteapiendpoint_request.rb - - lib/open_api_sdk/models/operations/deleteapiendpoint_response.rb - - lib/open_api_sdk/models/operations/deleteschema_request.rb - - lib/open_api_sdk/models/operations/deleteschema_response.rb - - lib/open_api_sdk/models/operations/deleteversionmetadata_request.rb - - lib/open_api_sdk/models/operations/deleteversionmetadata_response.rb + - lib/open_api_sdk/models/operations/deletebillingaddon_request.rb + - lib/open_api_sdk/models/operations/deletebillingaddon_response.rb + - lib/open_api_sdk/models/operations/deletepublishingtoken_request.rb + - lib/open_api_sdk/models/operations/deletepublishingtoken_response.rb - lib/open_api_sdk/models/operations/deleteworkspacetoken_request.rb - lib/open_api_sdk/models/operations/deleteworkspacetoken_response.rb - - lib/open_api_sdk/models/operations/downloadschema_request.rb - - lib/open_api_sdk/models/operations/downloadschema_response.rb - - lib/open_api_sdk/models/operations/downloadschemarevision_request.rb - - lib/open_api_sdk/models/operations/downloadschemarevision_response.rb - lib/open_api_sdk/models/operations/file.rb - - lib/open_api_sdk/models/operations/findapiendpoint_request.rb - - lib/open_api_sdk/models/operations/findapiendpoint_response.rb - - lib/open_api_sdk/models/operations/generateopenapispec_request.rb - - lib/open_api_sdk/models/operations/generateopenapispec_response.rb - - lib/open_api_sdk/models/operations/generateopenapispecforapiendpoint_request.rb - - lib/open_api_sdk/models/operations/generateopenapispecforapiendpoint_response.rb - - lib/open_api_sdk/models/operations/generatepostmancollection_request.rb - - lib/open_api_sdk/models/operations/generatepostmancollection_response.rb - - lib/open_api_sdk/models/operations/generatepostmancollectionforapiendpoint_request.rb - - lib/open_api_sdk/models/operations/generatepostmancollectionforapiendpoint_response.rb - - lib/open_api_sdk/models/operations/generaterequestpostmancollection_request.rb - - lib/open_api_sdk/models/operations/generaterequestpostmancollection_response.rb + - lib/open_api_sdk/models/operations/format.rb + - lib/open_api_sdk/models/operations/generatecodesamplepreview_response.rb + - lib/open_api_sdk/models/operations/generatecodesamplepreviewasync_response.rb + - lib/open_api_sdk/models/operations/generatecodesamplepreviewasync_responsebody.rb - lib/open_api_sdk/models/operations/getaccesstoken_request.rb - lib/open_api_sdk/models/operations/getaccesstoken_response.rb - - lib/open_api_sdk/models/operations/getallapiendpoints_request.rb - - lib/open_api_sdk/models/operations/getallapiendpoints_response.rb - - lib/open_api_sdk/models/operations/getallapiversions_request.rb - - lib/open_api_sdk/models/operations/getallapiversions_response.rb - - lib/open_api_sdk/models/operations/getallforversionapiendpoints_request.rb - - lib/open_api_sdk/models/operations/getallforversionapiendpoints_response.rb - - lib/open_api_sdk/models/operations/getapiendpoint_request.rb - - lib/open_api_sdk/models/operations/getapiendpoint_response.rb - - lib/open_api_sdk/models/operations/getapis_request.rb - - lib/open_api_sdk/models/operations/getapis_response.rb + - lib/open_api_sdk/models/operations/getbillingaddons_response.rb - lib/open_api_sdk/models/operations/getblob_request.rb - lib/open_api_sdk/models/operations/getblob_response.rb - lib/open_api_sdk/models/operations/getchangesreportsignedurl_request.rb - lib/open_api_sdk/models/operations/getchangesreportsignedurl_response.rb - lib/open_api_sdk/models/operations/getchangesreportsignedurl_signedaccess.rb - - lib/open_api_sdk/models/operations/getembedaccesstoken_request.rb - - lib/open_api_sdk/models/operations/getembedaccesstoken_response.rb + - lib/open_api_sdk/models/operations/getcodesamplepreviewasync_request.rb + - lib/open_api_sdk/models/operations/getcodesamplepreviewasync_response.rb + - lib/open_api_sdk/models/operations/getcodesamplepreviewasync_responsebody.rb - lib/open_api_sdk/models/operations/getgithubaction_request.rb - lib/open_api_sdk/models/operations/getgithubaction_response.rb + - lib/open_api_sdk/models/operations/getgithubsetupstate_request.rb + - lib/open_api_sdk/models/operations/getgithubsetupstate_response.rb - lib/open_api_sdk/models/operations/getlintingreportsignedurl_request.rb - lib/open_api_sdk/models/operations/getlintingreportsignedurl_response.rb - lib/open_api_sdk/models/operations/getlintingreportsignedurl_signedaccess.rb @@ -362,24 +344,22 @@ generatedFiles: - lib/open_api_sdk/models/operations/getorganization_response.rb - lib/open_api_sdk/models/operations/getorganizations_response.rb - lib/open_api_sdk/models/operations/getorganizationusage_response.rb - - lib/open_api_sdk/models/operations/getrequestfromeventlog_request.rb - - lib/open_api_sdk/models/operations/getrequestfromeventlog_response.rb + - lib/open_api_sdk/models/operations/getpublishingtoken_response.rb + - lib/open_api_sdk/models/operations/getpublishingtokenbyid_request.rb + - lib/open_api_sdk/models/operations/getpublishingtokenbyid_response.rb + - lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_request.rb + - lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_response.rb + - lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_responsebody.rb + - lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_request.rb + - lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_response.rb + - lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_responsebody.rb - lib/open_api_sdk/models/operations/getrevisions_request.rb - lib/open_api_sdk/models/operations/getrevisions_response.rb - - lib/open_api_sdk/models/operations/getschema_request.rb - - lib/open_api_sdk/models/operations/getschema_response.rb - - lib/open_api_sdk/models/operations/getschemadiff_request.rb - - lib/open_api_sdk/models/operations/getschemadiff_response.rb - - lib/open_api_sdk/models/operations/getschemarevision_request.rb - - lib/open_api_sdk/models/operations/getschemarevision_response.rb - - lib/open_api_sdk/models/operations/getschemas_request.rb - - lib/open_api_sdk/models/operations/getschemas_response.rb + - lib/open_api_sdk/models/operations/getschemastoreitem_requestbody.rb + - lib/open_api_sdk/models/operations/getschemastoreitem_response.rb - lib/open_api_sdk/models/operations/gettags_request.rb - lib/open_api_sdk/models/operations/gettags_response.rb - lib/open_api_sdk/models/operations/getuser_response.rb - - lib/open_api_sdk/models/operations/getvalidembedaccesstokens_response.rb - - lib/open_api_sdk/models/operations/getversionmetadata_request.rb - - lib/open_api_sdk/models/operations/getversionmetadata_response.rb - lib/open_api_sdk/models/operations/getworkspace_request.rb - lib/open_api_sdk/models/operations/getworkspace_response.rb - lib/open_api_sdk/models/operations/getworkspaceaccess_request.rb @@ -411,72 +391,65 @@ generatedFiles: - lib/open_api_sdk/models/operations/githubtriggeraction_response.rb - lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_request.rb - lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_response.rb - - lib/open_api_sdk/models/operations/insertversionmetadata_request.rb - - lib/open_api_sdk/models/operations/insertversionmetadata_response.rb - - lib/open_api_sdk/models/operations/op.rb + - lib/open_api_sdk/models/operations/ignoresubscriptionnamespace_request.rb + - lib/open_api_sdk/models/operations/ignoresubscriptionnamespace_response.rb + - lib/open_api_sdk/models/operations/linkgithubaccess_request.rb + - lib/open_api_sdk/models/operations/linkgithubaccess_response.rb + - lib/open_api_sdk/models/operations/listremotesources_request.rb + - lib/open_api_sdk/models/operations/listremotesources_response.rb - lib/open_api_sdk/models/operations/posttags_request.rb - lib/open_api_sdk/models/operations/posttags_response.rb - lib/open_api_sdk/models/operations/postworkspaceevents_request.rb - lib/open_api_sdk/models/operations/postworkspaceevents_response.rb - lib/open_api_sdk/models/operations/preflight_response.rb - - lib/open_api_sdk/models/operations/queryeventlog_request.rb - - lib/open_api_sdk/models/operations/queryeventlog_response.rb - - lib/open_api_sdk/models/operations/queryparam_op.rb - - lib/open_api_sdk/models/operations/registerschema_request.rb - - lib/open_api_sdk/models/operations/registerschema_requestbody.rb - - lib/open_api_sdk/models/operations/registerschema_response.rb - - lib/open_api_sdk/models/operations/revokeembedaccesstoken_request.rb - - lib/open_api_sdk/models/operations/revokeembedaccesstoken_response.rb - lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_request.rb - lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_response.rb - lib/open_api_sdk/models/operations/schema.rb - lib/open_api_sdk/models/operations/searchworkspaceevents_request.rb - lib/open_api_sdk/models/operations/searchworkspaceevents_response.rb + - lib/open_api_sdk/models/operations/setvisibility_request.rb + - lib/open_api_sdk/models/operations/setvisibility_requestbody.rb + - lib/open_api_sdk/models/operations/setvisibility_response.rb + - lib/open_api_sdk/models/operations/setworkspacefeatureflags_response.rb - lib/open_api_sdk/models/operations/suggest_request.rb - lib/open_api_sdk/models/operations/suggest_response.rb + - lib/open_api_sdk/models/operations/suggestitems_response.rb - lib/open_api_sdk/models/operations/suggestopenapi_request.rb - lib/open_api_sdk/models/operations/suggestopenapi_requestbody.rb - lib/open_api_sdk/models/operations/suggestopenapi_response.rb - lib/open_api_sdk/models/operations/suggestopenapiregistry_request.rb - lib/open_api_sdk/models/operations/suggestopenapiregistry_response.rb + - lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_request.rb + - lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_requestbody.rb + - lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_response.rb - lib/open_api_sdk/models/operations/updateworkspacedetails_request.rb - lib/open_api_sdk/models/operations/updateworkspacedetails_response.rb - lib/open_api_sdk/models/operations/updateworkspacesettings_request.rb - lib/open_api_sdk/models/operations/updateworkspacesettings_response.rb - - lib/open_api_sdk/models/operations/uploadreport_file.rb - lib/open_api_sdk/models/operations/uploadreport_requestbody.rb - lib/open_api_sdk/models/operations/uploadreport_response.rb - lib/open_api_sdk/models/operations/uploadreport_uploadedreport.rb - - lib/open_api_sdk/models/operations/upsertapi_request.rb - - lib/open_api_sdk/models/operations/upsertapi_response.rb - - lib/open_api_sdk/models/operations/upsertapiendpoint_request.rb - - lib/open_api_sdk/models/operations/upsertapiendpoint_response.rb - lib/open_api_sdk/models/operations/validateapikey_response.rb - lib/open_api_sdk/models/shared.rb - lib/open_api_sdk/models/shared/accessdetails.rb - lib/open_api_sdk/models/shared/accesstoken.rb - lib/open_api_sdk/models/shared/accesstoken_user.rb - lib/open_api_sdk/models/shared/accounttype.rb + - lib/open_api_sdk/models/shared/actions.rb - lib/open_api_sdk/models/shared/addtags.rb - lib/open_api_sdk/models/shared/annotations.rb - - lib/open_api_sdk/models/shared/api.rb - - lib/open_api_sdk/models/shared/api_input.rb - - lib/open_api_sdk/models/shared/apiendpoint.rb - - lib/open_api_sdk/models/shared/apiendpoint_input.rb - lib/open_api_sdk/models/shared/apikeydetails.rb - lib/open_api_sdk/models/shared/auth.rb - - lib/open_api_sdk/models/shared/boundedrequest.rb + - lib/open_api_sdk/models/shared/billingaddon.rb - lib/open_api_sdk/models/shared/claims.rb - lib/open_api_sdk/models/shared/clievent.rb + - lib/open_api_sdk/models/shared/codesampleschemainput.rb + - lib/open_api_sdk/models/shared/codesamplesjobstatus.rb + - lib/open_api_sdk/models/shared/composite_spec_metadata.rb - lib/open_api_sdk/models/shared/diagnostic.rb - - lib/open_api_sdk/models/shared/embedaccesstokenresponse.rb - - lib/open_api_sdk/models/shared/embedtoken.rb - - lib/open_api_sdk/models/shared/error.rb - lib/open_api_sdk/models/shared/featureflag.rb - - lib/open_api_sdk/models/shared/filter.rb - - lib/open_api_sdk/models/shared/filters.rb + - lib/open_api_sdk/models/shared/format.rb - lib/open_api_sdk/models/shared/generate_bump_type.rb - - lib/open_api_sdk/models/shared/generateopenapispecdiff.rb - lib/open_api_sdk/models/shared/getnamespacesresponse.rb - lib/open_api_sdk/models/shared/getrevisionsresponse.rb - lib/open_api_sdk/models/shared/gettagsresponse.rb @@ -487,6 +460,7 @@ generatedFiles: - lib/open_api_sdk/models/shared/githubgetactionresponse.rb - lib/open_api_sdk/models/shared/githubmissingpublishingsecretsresponse.rb - lib/open_api_sdk/models/shared/githubpublishingprresponse.rb + - lib/open_api_sdk/models/shared/githubsetupstateresponse.rb - lib/open_api_sdk/models/shared/githubstorepublishingsecretsrequest.rb - lib/open_api_sdk/models/shared/githubtriggeractionrequest.rb - lib/open_api_sdk/models/shared/interactiontype.rb @@ -499,35 +473,46 @@ generatedFiles: - lib/open_api_sdk/models/shared/oassummary.rb - lib/open_api_sdk/models/shared/openapi_diff_bump_type.rb - lib/open_api_sdk/models/shared/organization.rb + - lib/open_api_sdk/models/shared/organizationbillingaddonrequest.rb + - lib/open_api_sdk/models/shared/organizationbillingaddonresponse.rb - lib/open_api_sdk/models/shared/organizationusage.rb - lib/open_api_sdk/models/shared/organizationusageresponse.rb - lib/open_api_sdk/models/shared/preflightrequest.rb - lib/open_api_sdk/models/shared/preflighttoken.rb + - lib/open_api_sdk/models/shared/publishingtoken.rb + - lib/open_api_sdk/models/shared/pull_request_metadata.rb - lib/open_api_sdk/models/shared/relationship.rb + - lib/open_api_sdk/models/shared/remotedocument.rb + - lib/open_api_sdk/models/shared/remotesource.rb + - lib/open_api_sdk/models/shared/remotesourcesubscriptionsettings.rb - lib/open_api_sdk/models/shared/report.rb - - lib/open_api_sdk/models/shared/requestmetadata.rb - lib/open_api_sdk/models/shared/revision.rb - - lib/open_api_sdk/models/shared/schema.rb - - lib/open_api_sdk/models/shared/schemadiff.rb + - lib/open_api_sdk/models/shared/revisioncontentsmetadata.rb + - lib/open_api_sdk/models/shared/revisioncontentsmetadata_type.rb + - lib/open_api_sdk/models/shared/schema_file.rb + - lib/open_api_sdk/models/shared/schemastoreitem.rb + - lib/open_api_sdk/models/shared/secrets.rb - lib/open_api_sdk/models/shared/security.rb - lib/open_api_sdk/models/shared/shorturl.rb - lib/open_api_sdk/models/shared/ssometadata.rb - lib/open_api_sdk/models/shared/suggestion_type.rb + - lib/open_api_sdk/models/shared/suggestitemsrequestbody.rb - lib/open_api_sdk/models/shared/suggestoptsold.rb - lib/open_api_sdk/models/shared/suggestrequestbody.rb - lib/open_api_sdk/models/shared/suggestrequestbody_suggestion_type.rb - lib/open_api_sdk/models/shared/tag.rb + - lib/open_api_sdk/models/shared/target_resource.rb - lib/open_api_sdk/models/shared/targetsdk.rb - lib/open_api_sdk/models/shared/type.rb - - lib/open_api_sdk/models/shared/unboundedrequest.rb + - lib/open_api_sdk/models/shared/usagesnippet.rb + - lib/open_api_sdk/models/shared/usagesnippets.rb - lib/open_api_sdk/models/shared/user.rb - lib/open_api_sdk/models/shared/v2descriptor.rb - - lib/open_api_sdk/models/shared/valuechange.rb - - lib/open_api_sdk/models/shared/versionmetadata.rb - - lib/open_api_sdk/models/shared/versionmetadata_input.rb - lib/open_api_sdk/models/shared/workflowdocument.rb - lib/open_api_sdk/models/shared/workspace.rb - lib/open_api_sdk/models/shared/workspaceandorganization.rb + - lib/open_api_sdk/models/shared/workspacefeatureflag.rb + - lib/open_api_sdk/models/shared/workspacefeatureflagrequest.rb - lib/open_api_sdk/models/shared/workspacefeatureflagresponse.rb - lib/open_api_sdk/models/shared/workspaceinviteresponse.rb - lib/open_api_sdk/models/shared/workspaces.rb @@ -535,16 +520,17 @@ generatedFiles: - lib/open_api_sdk/models/shared/workspaceteamresponse.rb - lib/open_api_sdk/models/shared/workspacetoken.rb - lib/open_api_sdk/organizations.rb + - lib/open_api_sdk/publishingtokens.rb - lib/open_api_sdk/reports.rb - - lib/open_api_sdk/requests.rb - - lib/open_api_sdk/schemas.rb + - lib/open_api_sdk/schemastore.rb + - lib/open_api_sdk/sdk_hooks/hooks.rb + - lib/open_api_sdk/sdk_hooks/types.rb - lib/open_api_sdk/sdkconfiguration.rb - lib/open_api_sdk/shorturls.rb - lib/open_api_sdk/speakeasyclientsdk.rb - - lib/open_api_sdk/speakeasyclientsdk_apiendpoints.rb + - lib/open_api_sdk/subscriptions.rb - lib/open_api_sdk/suggest.rb - - lib/open_api_sdk/utils/metadata_fields.rb - - lib/open_api_sdk/utils/t.rb + - lib/open_api_sdk/utils/retries.rb - lib/open_api_sdk/utils/utils.rb - lib/open_api_sdk/workspaces.rb - lib/speakeasy_client_sdk_ruby.rb @@ -558,6 +544,7 @@ generatedFiles: - sorbet/rbi/gems/erubi@1.12.0.rbi - sorbet/rbi/gems/faraday-multipart@1.0.4.rbi - sorbet/rbi/gems/faraday-net_http@3.0.2.rbi + - sorbet/rbi/gems/faraday-retry@2.2.1.rbi - sorbet/rbi/gems/faraday@2.7.11.rbi - sorbet/rbi/gems/json@2.6.3.rbi - sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi @@ -590,300 +577,18 @@ generatedFiles: - sorbet/tapioca/require.rb - speakeasy_client_sdk_ruby.gemspec examples: - getApis: - speakeasy-default-get-apis: - responses: - 2XX: - application/json: [] - 4XX: - application/json: {"message": "", "status_code": 107838} - getAllApiVersions: - speakeasy-default-get-all-api-versions: - parameters: - path: - apiID: "" - query: {} - responses: - 2XX: - application/json: [{"api_id": "", "created_at": "2022-12-01T14:20:45.655Z", "description": "cavernous so continually qua", "updated_at": "2023-05-30T05:25:29.047Z", "version_id": "", "workspace_id": ""}, {"api_id": "", "created_at": "2023-04-23T11:41:22.396Z", "description": "readmit chubby oof gym sedately micromanage trench", "updated_at": "2022-10-16T03:11:00.742Z", "version_id": "", "workspace_id": ""}, {"api_id": "", "created_at": "2023-03-06T08:55:20.384Z", "description": "aw even but peter abaft", "updated_at": "2024-07-27T04:38:48.315Z", "version_id": "", "workspace_id": ""}] - 4XX: - application/json: {"message": "", "status_code": 873085} - upsertApi: - speakeasy-default-upsert-api: - parameters: - path: - apiID: "" - requestBody: - application/json: {"api_id": "", "description": "consequently brr happily yowza however gosh investigate joyfully direct", "version_id": ""} - responses: - 2XX: - application/json: {"api_id": "", "created_at": "2023-12-28T17:35:28.584Z", "description": "handful finally jaunty ouch same as pfft meh shoulder under", "updated_at": "2023-05-07T09:17:47.683Z", "version_id": "", "workspace_id": ""} - 4XX: - application/json: {"message": "", "status_code": 225619} - deleteApi: - speakeasy-default-delete-api: - parameters: - path: - apiID: "" - versionID: "" - responses: - 4XX: - application/json: {"message": "", "status_code": 875451} - generateOpenApiSpec: - speakeasy-default-generate-open-api-spec: - parameters: - path: - apiID: "" - versionID: "" - responses: - 2XX: - application/json: {"current_schema": "", "new_schema": ""} - 4XX: - application/json: {"message": "", "status_code": 871055} - generatePostmanCollection: - speakeasy-default-generate-postman-collection: - parameters: - path: - apiID: "" - versionID: "" - responses: - 2XX: - application/octet-stream: "0xdB617f4bc9" - 4XX: - application/json: {"message": "", "status_code": 542004} - getAllApiEndpoints: - speakeasy-default-get-all-api-endpoints: - parameters: - path: - apiID: "" - responses: - 2XX: - application/json: [{"api_endpoint_id": "", "api_id": "", "created_at": "2023-01-29T03:25:40.769Z", "description": "proliferate anenst gadzooks gosh without frightfully", "display_name": "Mireille.Wolff", "method": "", "path": "/boot/defaults", "updated_at": "2023-01-23T16:26:38.331Z", "version_id": "", "workspace_id": ""}, {"api_endpoint_id": "", "api_id": "", "created_at": "2022-09-08T17:07:17.627Z", "description": "remark whoever for ignorance yahoo integer competent really tempting", "display_name": "Aliya.Hammes", "method": "", "path": "/boot", "updated_at": "2024-01-01T08:51:16.176Z", "version_id": "", "workspace_id": ""}, {"api_endpoint_id": "", "api_id": "", "created_at": "2024-05-10T15:45:00.302Z", "description": "rudely acclaimed sentimental aircraft book", "display_name": "Cathrine_Cummerata", "method": "", "path": "/opt/lib", "updated_at": "2024-11-01T08:41:53.910Z", "version_id": "", "workspace_id": ""}] - 4XX: - application/json: {"message": "", "status_code": 87408} - getAllForVersionApiEndpoints: - speakeasy-default-get-all-for-version-api-endpoints: - parameters: - path: - apiID: "" - versionID: "" - responses: - 2XX: - application/json: [{"api_endpoint_id": "", "api_id": "", "created_at": "2024-06-17T00:07:30.468Z", "description": "cutover knottily productive thump scrabble abaft gracious pulp", "display_name": "Alek.Kunze41", "method": "", "path": "/home/user", "updated_at": "2024-07-27T06:29:44.391Z", "version_id": "", "workspace_id": ""}, {"api_endpoint_id": "", "api_id": "", "created_at": "2022-06-22T07:41:12.922Z", "description": "sparse obligation er honorable offensively shallow", "display_name": "Jarrell82", "method": "", "path": "/sys", "updated_at": "2024-08-17T07:17:55.780Z", "version_id": "", "workspace_id": ""}, {"api_endpoint_id": "", "api_id": "", "created_at": "2023-06-20T19:40:53.688Z", "description": "yieldingly widow blah phooey uh-huh corny fess", "display_name": "Moshe.Streich", "method": "", "path": "/selinux", "updated_at": "2023-07-07T21:35:49.283Z", "version_id": "", "workspace_id": ""}] - 4XX: - application/json: {"message": "", "status_code": 321615} - findApiEndpoint: - speakeasy-default-find-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - displayName: "Don_Kihn39" - responses: - 2XX: - application/json: {"api_endpoint_id": "", "api_id": "", "created_at": "2023-10-16T19:23:50.697Z", "description": "axe pro between plus aw highly", "display_name": "Floyd.Collier78", "method": "", "path": "/home/user", "updated_at": "2024-11-03T17:06:00.965Z", "version_id": "", "workspace_id": ""} - 4XX: - application/json: {"message": "", "status_code": 834695} - deleteApiEndpoint: - speakeasy-default-delete-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - apiEndpointID: "" - responses: - 4XX: - application/json: {"message": "", "status_code": 788324} - getApiEndpoint: - speakeasy-default-get-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - apiEndpointID: "" - responses: - 2XX: - application/json: {"api_endpoint_id": "", "api_id": "", "created_at": "2024-12-16T12:54:48.841Z", "description": "self-reliant till before and pick openly boo", "display_name": "Frankie_Brown", "method": "", "path": "/media", "updated_at": "2022-12-01T02:36:45.697Z", "version_id": "", "workspace_id": ""} - 4XX: - application/json: {"message": "", "status_code": 497683} - upsertApiEndpoint: - speakeasy-default-upsert-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - apiEndpointID: "" - requestBody: - application/json: {"api_endpoint_id": "", "description": "commandeer equate pish psst hoot ugh frankly supposing", "display_name": "Eliseo.Little15", "method": "", "path": "/etc/defaults", "version_id": ""} - responses: - 2XX: - application/json: {"api_endpoint_id": "", "api_id": "", "created_at": "2024-02-14T10:37:57.359Z", "description": "loftily wasabi upbeat dense promptly supposing publication eek ultimately brand", "display_name": "Destiney84", "method": "", "path": "/Library", "updated_at": "2024-03-29T21:25:21.729Z", "version_id": "", "workspace_id": ""} - 4XX: - application/json: {"message": "", "status_code": 105983} - generateOpenApiSpecForApiEndpoint: - speakeasy-default-generate-open-api-spec-for-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - apiEndpointID: "" - responses: - 2XX: - application/json: {"current_schema": "", "new_schema": ""} - 4XX: - application/json: {"message": "", "status_code": 833540} - generatePostmanCollectionForApiEndpoint: - speakeasy-default-generate-postman-collection-for-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - apiEndpointID: "" - responses: - 2XX: - application/octet-stream: "0xBFe44DF0c2" - 4XX: - application/json: {"message": "", "status_code": 764595} - getVersionMetadata: - speakeasy-default-get-version-metadata: - parameters: - path: - apiID: "" - versionID: "" - responses: - 2XX: - application/json: [{"api_id": "", "created_at": "2022-06-27T04:40:43.913Z", "meta_key": "", "meta_value": "", "version_id": "", "workspace_id": ""}] - 4XX: - application/json: {"message": "", "status_code": 359814} - insertVersionMetadata: - speakeasy-default-insert-version-metadata: - parameters: - path: - apiID: "" - versionID: "" - requestBody: - application/json: {"meta_key": "", "meta_value": ""} - responses: - 2XX: - application/json: {"api_id": "", "created_at": "2022-03-18T13:32:09.275Z", "meta_key": "", "meta_value": "", "version_id": "", "workspace_id": ""} - 4XX: - application/json: {"message": "", "status_code": 734322} - deleteVersionMetadata: - speakeasy-default-delete-version-metadata: - parameters: - path: - apiID: "" - versionID: "" - metaKey: "" - metaValue: "" - responses: - 4XX: - application/json: {"message": "", "status_code": 730807} - getSchema: - speakeasy-default-get-schema: - parameters: - path: - apiID: "" - versionID: "" - responses: - 2XX: - application/json: {"api_id": "", "created_at": "2022-09-09T00:58:17.727Z", "description": "polyester instead slowly than safely meh appropriate heroine free", "revision_id": "", "version_id": "", "workspace_id": ""} - 4XX: - application/json: {"message": "", "status_code": 333689} - registerSchema: - speakeasy-default-register-schema: - parameters: - path: - apiID: "" - versionID: "" - requestBody: - multipart/form-data: {"file": {"": "0x9fcD0d6727"}} - responses: - 4XX: - application/json: {"message": "", "status_code": 213717} - downloadSchema: - speakeasy-default-download-schema: - parameters: - path: - apiID: "" - versionID: "" - responses: - 2XX: - application/json: "0xa62855Fa0e" - application/x-yaml: "0x82474cDE10" - 4XX: - application/json: {"message": "", "status_code": 17422} - getSchemaDiff: - speakeasy-default-get-schema-diff: - parameters: - path: - apiID: "" - versionID: "" - baseRevisionID: "" - targetRevisionID: "" - responses: - 2XX: - application/json: {"additions": [], "deletions": ["", ""], "modifications": {}} - 4XX: - application/json: {"message": "", "status_code": 842381} - deleteSchema: - speakeasy-default-delete-schema: - parameters: - path: - apiID: "" - versionID: "" - revisionID: "" - responses: - 4XX: - application/json: {"message": "", "status_code": 9376} - getSchemaRevision: - speakeasy-default-get-schema-revision: - parameters: - path: - apiID: "" - versionID: "" - revisionID: "" - responses: - 2XX: - application/json: {"api_id": "", "created_at": "2022-01-23T10:21:45.479Z", "description": "woot neaten whoever submitter upon altruistic regarding", "revision_id": "", "version_id": "", "workspace_id": ""} - 4XX: - application/json: {"message": "", "status_code": 907219} - downloadSchemaRevision: - speakeasy-default-download-schema-revision: - parameters: - path: - apiID: "" - versionID: "" - revisionID: "" - responses: - 2XX: - application/json: "0xC12bCE4870" - application/x-yaml: "0x6C6F78c8dA" - 4XX: - application/json: {"message": "", "status_code": 38692} - getSchemas: - speakeasy-default-get-schemas: - parameters: - path: - apiID: "" - versionID: "" - responses: - 2XX: - application/json: [] - 4XX: - application/json: {"message": "", "status_code": 235379} validateApiKey: speakeasy-default-validate-api-key: responses: 2XX: - application/json: {"workspace_id": "", "workspace_slug": "", "org_slug": "", "account_type_v2": "enterprise", "enabled_features": ["", "", ""], "telemetry_disabled": true} + application/json: {"workspace_id": "", "workspace_slug": "", "org_slug": "", "account_type_v2": "enterprise", "enabled_features": ["", "", ""], "billing_add_ons": [], "telemetry_disabled": true, "workspace_created_at": "2023-06-15T09:04:10.075Z"} 4XX: - application/json: {"message": "", "status_code": 365836} + application/json: {"message": "", "status_code": 871287} getUser: speakeasy-default-get-user: responses: 2XX: - application/json: {"id": "", "email": "Carolyne_Walsh@hotmail.com", "email_verified": true, "display_name": "King_Renner68", "confirmed": false, "whitelisted": false, "admin": false, "created_at": "2022-08-28T03:26:52.335Z", "updated_at": "2022-06-01T08:21:43.132Z"} + application/json: {"id": "", "email": "Carolyne_Walsh@hotmail.com", "email_verified": true, "display_name": "King_Renner68", "confirmed": false, "whitelisted": false, "admin": false, "created_at": "2023-08-28T03:26:52.335Z", "updated_at": "2023-06-01T08:21:43.132Z"} 4XX: application/json: {"message": "", "status_code": 237845} getAccessToken: @@ -893,41 +598,52 @@ examples: workspace_id: "" responses: 2XX: - application/json: {"access_token": ""} + application/json: {"access_token": "", "claims": {}, "user": {}} 4XX: application/json: {"message": "", "status_code": 299050} getWorkspaceAccess: speakeasy-default-get-workspace-access: responses: 2XX: - application/json: {"generation_allowed": true, "message": ""} - queryEventLog: - speakeasy-default-query-event-log: + application/json: {"generation_allowed": false, "message": ""} + generateCodeSamplePreview: + default: + requestBody: + multipart/form-data: {"language": "", "schema_file": {"": "0xc3dD8BfBef"}} responses: 2XX: - application/json: [] + application/json: {"snippets": [{"path": "/pet/{id}", "method": "get", "operationId": "getPetById", "language": "typescript", "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();"}]} + generateCodeSamplePreviewAsync: + speakeasy-default-generate-code-sample-preview-async: + requestBody: + multipart/form-data: {"language": "", "schema_file": {"": "0xED5CDd177E"}} + responses: + "202": + application/json: {"job_id": "", "status": "running"} 4XX: - application/json: {"message": "", "status_code": 621062} - getRequestFromEventLog: - speakeasy-default-get-request-from-event-log: + application/json: {"message": "", "status_code": 134142} + 5XX: + application/json: {"message": "", "status_code": 394086} + getCodeSamplePreviewAsync: + default: parameters: path: - requestID: "" + jobID: "" responses: 2XX: - application/json: {"created_at": "2024-07-06T20:33:24.477Z", "har": "", "har_size_bytes": 659422, "request_id": "", "workspace_id": ""} - 4XX: - application/json: {"message": "", "status_code": 799548} - generateRequestPostmanCollection: - speakeasy-default-generate-request-postman-collection: + application/json: {"snippets": [{"path": "/pet/{id}", "method": "get", "operationId": "getPetById", "language": "typescript", "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();"}]} + getGithubSetupState: + speakeasy-default-get-github-setup-state: parameters: - path: - requestID: "" + query: + org: "" + repo: "" + generate_gen_lock_id: "" responses: 2XX: - application/octet-stream: "0xebc3072f73" + application/json: {"app_installed": false, "actions": {"generation_action_configured": false, "publish_action_configured": false}, "secrets": {"api_key_configured": true, "publishing_secrets_configured": true}} 4XX: - application/json: {"message": "", "status_code": 878433} + application/json: {"message": "", "status_code": 743106} checkGithubAccess: speakeasy-default-check-github-access: parameters: @@ -937,6 +653,11 @@ examples: responses: 4XX: application/json: {"message": "", "status_code": 74604} + linkGithubAccess: + speakeasy-default-link-github-access: + responses: + 4XX: + application/json: {"message": "", "status_code": 774553} githubCheckPublishingPRs: speakeasy-default-github-check-publishing-P-rs: parameters: @@ -945,18 +666,20 @@ examples: org: "" repo: "" responses: + 2XX: + application/json: {} 4XX: application/json: {"message": "", "status_code": 670562} - 2XX: {} githubCheckPublishingSecrets: speakeasy-default-github-check-publishing-secrets: parameters: query: generate_gen_lock_id: "" responses: + 2XX: + application/json: {} 4XX: application/json: {"message": "", "status_code": 749379} - 2XX: {} githubStorePublishingSecrets: speakeasy-default-github-store-publishing-secrets: requestBody: @@ -1001,25 +724,26 @@ examples: org: "" repo: "" responses: + 2XX: + application/json: {} 4XX: application/json: {"message": "", "status_code": 252330} - 2XX: {} getOrganizations: speakeasy-default-get-organizations: responses: 2XX: - application/json: [{"id": "", "name": "", "slug": "", "account_type": "free", "telemetry_disabled": false, "created_at": "2023-12-15T17:14:28.501Z", "updated_at": "2022-01-18T20:59:19.735Z"}] + application/json: [{"id": "", "name": "", "slug": "", "account_type": "free", "telemetry_disabled": false, "created_at": "2024-12-14T17:14:28.501Z", "updated_at": "2023-01-18T20:59:19.735Z", "sso_activated": true}, {"id": "", "name": "", "slug": "", "account_type": "business", "telemetry_disabled": true, "created_at": "2025-06-02T06:56:00.093Z", "updated_at": "2025-05-15T08:23:31.361Z", "sso_activated": true}] 4XX: - application/json: {"message": "", "status_code": 463086} + application/json: {"message": "", "status_code": 217828} createOrganization: speakeasy-default-create-organization: requestBody: - application/json: {"id": "", "name": "", "slug": "", "account_type": "scale-up", "telemetry_disabled": false, "created_at": "2023-04-03T12:48:32.253Z", "updated_at": "2022-05-28T06:20:22.766Z"} + application/json: {"id": "", "name": "", "slug": "", "account_type": "scale-up", "telemetry_disabled": false, "created_at": "2024-04-02T12:48:32.253Z", "updated_at": "2023-05-28T06:20:22.766Z", "sso_activated": true} responses: 2XX: - application/json: {"id": "", "name": "", "slug": "", "account_type": "free", "telemetry_disabled": false, "created_at": "2024-11-08T08:43:39.394Z", "updated_at": "2022-01-01T02:16:41.381Z"} + application/json: {"id": "", "name": "", "slug": "", "account_type": "enterprise", "telemetry_disabled": false, "created_at": "2023-01-01T02:16:41.381Z", "updated_at": "2023-07-06T00:30:20.403Z", "sso_activated": true} 4XX: - application/json: {"message": "", "status_code": 169727} + application/json: {"message": "", "status_code": 792620} getOrganization: speakeasy-default-get-organization: parameters: @@ -1027,9 +751,9 @@ examples: organizationID: "" responses: 2XX: - application/json: {"id": "", "name": "", "slug": "", "account_type": "business", "telemetry_disabled": false, "created_at": "2023-08-20T11:11:04.610Z", "updated_at": "2023-07-26T06:33:15.810Z"} + application/json: {"id": "", "name": "", "slug": "", "account_type": "business", "telemetry_disabled": false, "created_at": "2024-08-19T11:11:04.610Z", "updated_at": "2024-07-25T06:33:15.810Z", "sso_activated": false} 4XX: - application/json: {"message": "", "status_code": 969961} + application/json: {"message": "", "status_code": 458049} createFreeTrial: speakeasy-default-create-free-trial: responses: @@ -1042,51 +766,113 @@ examples: application/json: {"usage": [], "total_allowed_languages": 863126, "allowed_languages": ["", ""]} 4XX: application/json: {"message": "", "status_code": 756888} - getEmbedAccessToken: - speakeasy-default-get-embed-access-token: + createBillingAddOns: + speakeasy-default-create-billing-add-ons: + requestBody: + application/json: {"add_ons": ["custom_code_regions", "custom_code_regions", "sdk_testing"]} responses: - 2XX: - application/json: {"access_token": ""} + "200": + application/json: {"add_ons": ["snippet_ai", "snippet_ai", "sdk_testing"]} + 5XX: + application/json: {"message": "", "status_code": 518517} + getBillingAddOns: + speakeasy-default-get-billing-add-ons: + responses: + "200": + application/json: {"add_ons": []} + 5XX: + application/json: {"message": "", "status_code": 697034} + deleteBillingAddOn: + speakeasy-default-delete-billing-add-on: + parameters: + path: + add_on: "snippet_ai" + responses: + 5XX: + application/json: {"message": "", "status_code": 783245} + getPublishingToken: + speakeasy-default-get-publishing-token: + responses: + "200": + application/json: [{"id": "", "token": "", "valid_until": "2024-08-22T19:26:20.850Z", "token_name": "", "target_id": "", "target_resource": "document", "created_at": "2025-01-13T10:26:00.433Z", "created_by": "", "organization_id": "", "workspace_id": ""}, {"id": "", "token": "", "valid_until": "2023-07-14T18:23:27.528Z", "token_name": "", "target_id": "", "target_resource": "document", "created_at": "2023-09-09T18:28:08.953Z", "created_by": "", "organization_id": "", "workspace_id": ""}, {"id": "", "token": "", "valid_until": "2023-06-17T12:14:27.999Z", "token_name": "", "target_id": "", "target_resource": "document", "created_at": "2024-11-27T13:02:27.296Z", "created_by": "", "organization_id": "", "workspace_id": ""}] 4XX: - application/json: {"message": "", "status_code": 964408} - getValidEmbedAccessTokens: - speakeasy-default-get-valid-embed-access-tokens: + application/json: {"message": "", "status_code": 639387} + createPublishingToken: + speakeasy-default-create-publishing-token: responses: - 2XX: - application/json: [{"created_at": "2023-04-01T02:00:55.877Z", "created_by": "", "description": "tedious impossible circa", "expires_at": "2022-07-22T15:28:07.761Z", "filters": "", "id": "", "workspace_id": ""}, {"created_at": "2022-12-26T20:48:17.803Z", "created_by": "", "description": "lest whoa before jaunty", "expires_at": "2023-07-27T09:40:38.504Z", "filters": "", "id": "", "workspace_id": ""}, {"created_at": "2022-05-24T13:57:56.058Z", "created_by": "", "description": "after pace supplier reclassify", "expires_at": "2024-03-28T04:21:31.912Z", "filters": "", "id": "", "workspace_id": ""}] + "200": + application/json: {"id": "", "token": "", "valid_until": "2024-06-17T07:14:55.338Z", "token_name": "", "target_id": "", "target_resource": "document", "created_at": "2024-11-30T17:06:07.804Z", "created_by": "", "organization_id": "", "workspace_id": ""} + 4XX: + application/json: {"message": "", "status_code": 417458} + getPublishingTokenByID: + speakeasy-default-get-publishing-token-by-ID: + parameters: + path: + tokenID: "" + responses: + "200": + application/json: {"id": "", "token": "", "valid_until": "2025-02-06T13:54:48.821Z", "token_name": "", "target_id": "", "target_resource": "document", "created_at": "2024-09-04T11:33:52.011Z", "created_by": "", "organization_id": "", "workspace_id": ""} + 4XX: + application/json: {"message": "", "status_code": 544221} + updatePublishingTokenExpiration: + speakeasy-default-update-publishing-token-expiration: + parameters: + path: + tokenID: "" + responses: + 4XX: + application/json: {"message": "", "status_code": 857478} + deletePublishingToken: + speakeasy-default-delete-publishing-token: + parameters: + path: + tokenID: "" + responses: + 4XX: + application/json: {"message": "", "status_code": 545907} + getPublishingTokenTargetByID: + speakeasy-default-get-publishing-token-target-by-ID: + parameters: + path: + tokenID: "" + responses: + "200": + text/yaml: "0x8608ACc78B" 4XX: - application/json: {"message": "", "status_code": 942675} - revokeEmbedAccessToken: - speakeasy-default-revoke-embed-access-token: + application/json: {"message": "", "status_code": 467064} + getPublishingTokenPublicMetadata: + speakeasy-default-get-publishing-token-public-metadata: parameters: path: tokenID: "" responses: + "200": + application/json: {} 4XX: - application/json: {"message": "", "status_code": 217594} + application/json: {"message": "", "status_code": 25297} getWorkspaces: speakeasy-default-get-workspaces: responses: 2XX: - application/json: [{"created_at": "2022-03-06T21:36:22.528Z", "id": "", "name": "", "organization_id": "", "slug": "", "telemetry_disabled": false, "updated_at": "2023-12-15T17:14:28.501Z", "verified": true}] + 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": 463086} + application/json: {"message": "", "status_code": 61756} getWorkspaceByContext: speakeasy-default-get-workspace-by-context: responses: 2XX: - application/json: {"workspace": {"created_at": "2024-02-07T13:54:48.821Z", "id": "", "name": "", "organization_id": "", "slug": "", "telemetry_disabled": false, "updated_at": "2023-08-20T11:11:04.610Z", "verified": false}, "organization": {"id": "", "name": "", "slug": "", "account_type": "enterprise", "telemetry_disabled": true, "created_at": "2023-05-10T02:28:23.533Z", "updated_at": "2022-10-16T00:34:27.106Z"}} + application/json: {"workspace": {"created_at": "2025-02-06T13:54:48.821Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2024-09-04T11:33:52.011Z", "verified": false}, "organization": {"id": "", "name": "", "slug": "", "account_type": "business", "telemetry_disabled": false, "created_at": "2024-05-17T00:32:02.244Z", "updated_at": "2024-05-09T02:28:23.533Z", "sso_activated": true}} 4XX: application/json: {"message": "", "status_code": 213457} createWorkspace: speakeasy-default-create-workspace: requestBody: - application/json: {"created_at": "2023-06-18T07:14:55.338Z", "id": "", "name": "", "organization_id": "", "slug": "", "telemetry_disabled": false, "updated_at": "2023-04-03T12:48:32.253Z", "verified": true} + application/json: {"created_at": "2024-06-17T07:14:55.338Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2024-11-30T17:06:07.804Z", "verified": true} responses: 2XX: - application/json: {"created_at": "2022-03-17T15:39:20.911Z", "id": "", "name": "", "organization_id": "", "slug": "", "telemetry_disabled": false, "updated_at": "2024-11-08T08:43:39.394Z", "verified": true} + application/json: {"created_at": "2023-05-28T06:20:22.766Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2023-03-17T15:39:20.911Z", "verified": false} 4XX: - application/json: {"message": "", "status_code": 169727} + application/json: {"message": "", "status_code": 951062} getWorkspace: speakeasy-default-get-workspace: parameters: @@ -1094,19 +880,19 @@ examples: workspace_id: "" responses: 2XX: - application/json: {"created_at": "2024-11-17T10:14:22.985Z", "id": "", "name": "", "organization_id": "", "slug": "", "telemetry_disabled": false, "updated_at": "2024-10-23T07:17:30.329Z", "verified": false} + application/json: {"created_at": "2025-11-17T10:14:22.985Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2025-07-28T15:04:25.117Z", "verified": false} 4XX: - application/json: {"message": "", "status_code": 627126} + application/json: {"message": "", "status_code": 868924} updateWorkspaceDetails: speakeasy-default-update-workspace-details: parameters: path: workspace_id: "" requestBody: - application/json: {"created_at": "2024-07-28T19:04:48.565Z", "id": "", "name": "", "organization_id": "", "slug": "", "telemetry_disabled": false, "updated_at": "2023-01-13T16:52:57.274Z", "verified": false} + application/json: {"created_at": "2025-01-31T20:44:31.776Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2024-08-03T18:26:06.739Z", "verified": true} responses: 4XX: - application/json: {"message": "", "status_code": 627690} + application/json: {"message": "", "status_code": 709056} getWorkspaceSettings: speakeasy-default-get-workspace-settings: parameters: @@ -1114,19 +900,19 @@ examples: workspace_id: "" responses: 2XX: - application/json: {"workspace_id": ""} + application/json: {"workspace_id": "", "webhook_url": "https://ideal-hospitalization.biz", "created_at": "2023-02-07T14:50:24.533Z", "updated_at": "2023-01-26T01:43:28.591Z"} 4XX: - application/json: {"message": "", "status_code": 802866} + application/json: {"message": "", "status_code": 864485} updateWorkspaceSettings: speakeasy-default-update-workspace-settings: parameters: path: workspace_id: "" requestBody: - application/json: {"workspace_id": ""} + application/json: {"workspace_id": "", "webhook_url": "https://last-suspension.info/", "created_at": "2024-12-28T06:46:35.807Z", "updated_at": "2025-02-03T10:37:56.725Z"} responses: 4XX: - application/json: {"message": "", "status_code": 169241} + application/json: {"message": "", "status_code": 54657} getWorkspaceTeam: speakeasy-default-get-workspace-team: parameters: @@ -1164,19 +950,19 @@ examples: workspace_id: "" responses: 2XX: - application/json: [{"id": "", "name": "", "alg": "", "key": "", "created_at": ""}, {"id": "", "name": "", "alg": "", "key": "", "created_at": ""}, {"id": "", "name": "", "alg": "", "key": "", "created_at": ""}] + application/json: [{"id": "", "name": "", "workspace_id": "", "alg": "", "key": "", "created_at": "2024-06-30T03:05:24.969Z"}, {"id": "", "name": "", "workspace_id": "", "alg": "", "key": "", "created_at": "2024-11-09T11:33:52.654Z"}, {"id": "", "name": "", "workspace_id": "", "alg": "", "key": "", "created_at": "2024-11-05T09:03:46.133Z"}] 4XX: - application/json: {"message": "", "status_code": 498293} + application/json: {"message": "", "status_code": 858647} createWorkspaceToken: speakeasy-default-create-workspace-token: parameters: path: workspace_id: "" requestBody: - application/json: {"id": "", "name": "", "alg": "", "key": "", "created_at": ""} + application/json: {"id": "", "name": "", "workspace_id": "", "alg": "", "key": "", "created_at": "2023-08-16T02:33:00.784Z"} responses: 4XX: - application/json: {"message": "", "status_code": 207213} + application/json: {"message": "", "status_code": 966454} deleteWorkspaceToken: speakeasy-default-delete-workspace-token: parameters: @@ -1186,15 +972,25 @@ examples: responses: 4XX: application/json: {"message": "", "status_code": 120260} + 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} getWorkspaceFeatureFlags: speakeasy-default-get-workspace-feature-flags: parameters: path: workspace_id: "" responses: + "200": + application/json: {} 5XX: application/json: {"message": "", "status_code": 104495} - "200": {} searchWorkspaceEvents: speakeasy-default-search-workspace-events: parameters: @@ -1203,7 +999,7 @@ examples: query: {} responses: "200": - application/json: [{"id": "", "execution_id": "", "workspace_id": "", "speakeasy_api_key_name": "", "interaction_type": "OPENAPI_DIFF", "local_started_at": "2022-07-27T14:45:48.105Z", "created_at": "2022-03-09T07:00:10.489Z", "speakeasy_version": "", "success": true}] + application/json: [{"id": "", "execution_id": "", "workspace_id": "", "speakeasy_api_key_name": "", "interaction_type": "TARGET_GENERATE", "local_started_at": "2023-07-27T14:45:48.105Z", "created_at": "2023-03-09T07:00:10.489Z", "speakeasy_version": "", "success": true}] 5XX: application/json: {"message": "", "status_code": 238575} postWorkspaceEvents: @@ -1212,7 +1008,7 @@ examples: path: workspace_id: "" requestBody: - application/json: [{"id": "", "execution_id": "", "workspace_id": "", "speakeasy_api_key_name": "", "interaction_type": "QUICKSTART", "local_started_at": "2023-09-09T05:59:33.876Z", "created_at": "2024-08-12T17:54:17.538Z", "speakeasy_version": "", "success": true}] + application/json: [{"id": "", "execution_id": "", "workspace_id": "", "speakeasy_api_key_name": "", "interaction_type": "RUN", "local_started_at": "2024-09-08T05:59:33.876Z", "created_at": "2025-08-12T17:54:17.538Z", "speakeasy_version": "", "success": true}] responses: 5XX: application/json: {"message": "", "status_code": 630719} @@ -1225,14 +1021,14 @@ examples: query: {} responses: "200": - application/json: [] + application/json: [{"id": "", "execution_id": "", "workspace_id": "", "speakeasy_api_key_name": "", "interaction_type": "CONFIGURE", "local_started_at": "2023-01-18T07:51:57.391Z", "created_at": "2025-12-18T03:00:08.229Z", "speakeasy_version": "", "success": true}, {"id": "", "execution_id": "", "workspace_id": "", "speakeasy_api_key_name": "", "interaction_type": "OPENAPI_DIFF", "local_started_at": "2025-06-04T15:43:06.754Z", "created_at": "2025-02-21T03:50:18.895Z", "speakeasy_version": "", "success": false}, {"id": "", "execution_id": "", "workspace_id": "", "speakeasy_api_key_name": "", "interaction_type": "CLI_EXEC", "local_started_at": "2024-04-17T07:50:30.050Z", "created_at": "2025-10-31T09:22:52.901Z", "speakeasy_version": "", "success": false}] 5XX: - application/json: {"message": "", "status_code": 296981} + application/json: {"message": "", "status_code": 270454} getWorkspaceTargets: speakeasy-default-get-workspace-targets: responses: "200": - application/json: [{"id": "", "last_event_id": "", "last_event_created_at": "2024-12-14T05:15:52.449Z", "last_event_interaction_type": "TARGET_GENERATE", "generate_target": "", "generate_gen_lock_id": ""}, {"id": "", "last_event_id": "", "last_event_created_at": "2022-05-31T08:33:28.499Z", "last_event_interaction_type": "CLI_EXEC", "generate_target": "", "generate_gen_lock_id": ""}] + application/json: [{"id": "", "last_event_id": "", "last_event_created_at": "2025-12-14T05:15:52.449Z", "last_event_interaction_type": "TARGET_GENERATE", "generate_target": "", "generate_gen_lock_id": ""}, {"id": "", "last_event_id": "", "last_event_created_at": "2023-05-31T08:33:28.499Z", "last_event_interaction_type": "CLI_EXEC", "generate_target": "", "generate_gen_lock_id": ""}] 5XX: application/json: {"message": "", "status_code": 801192} getWorkspaceTargetsDeprecated: @@ -1243,22 +1039,115 @@ examples: query: {} responses: "200": - application/json: [] + application/json: [{"id": "", "last_event_id": "", "last_event_created_at": "2023-10-08T11:47:38.510Z", "last_event_interaction_type": "TOMBSTONE", "generate_target": "", "generate_gen_lock_id": ""}] 5XX: - application/json: {"message": "", "status_code": 255923} + application/json: {"message": "", "status_code": 264673} + uploadReport: + speakeasy-default-upload-report: + requestBody: + multipart/form-data: {"data": {}, "file": {"": "0x8cc9e675ad"}} + responses: + 2XX: + application/json: {"url": "https://altruistic-pecan.biz/"} + getLintingReportSignedUrl: + speakeasy-default-get-linting-report-signed-url: + parameters: + path: + documentChecksum: "" + responses: + 2XX: + application/json: {"url": "https://grumpy-puppet.biz"} + getChangesReportSignedUrl: + speakeasy-default-get-changes-report-signed-url: + parameters: + path: + documentChecksum: "" + responses: + 2XX: + application/json: {"url": "https://variable-starboard.biz/"} + suggestOpenAPI: + speakeasy-default-suggest-open-API: + parameters: + header: + x-session-id: "" + requestBody: + multipart/form-data: {"schema": {"": "0x8a2EB0Aaa9"}} + responses: + 2XX: + application/json: "0xBB6b74bEc7" + suggest: + speakeasy-default-suggest: + parameters: + header: + x-session-id: "" + requestBody: + application/json: {"oas_summary": {"info": {"title": "", "summary": "", "description": "cake ew cute aboard nor curry wee to", "version": "", "license": {}}, "operations": [{"method": "", "path": "/dev", "operation_id": "", "description": "needy meanwhile yahoo brr", "tags": ["", ""]}, {"method": "", "path": "/usr/bin", "operation_id": "", "description": "who aside whereas discrete effector psst", "tags": [""]}]}, "suggestion_type": "method-names", "diagnostics": [{"message": "", "path": ["/usr/obj", "/usr/include", "/media"], "type": ""}, {"message": "", "path": ["/etc/periodic"], "type": ""}, {"message": "", "path": ["/mnt", "/var/log", "/Library"], "type": ""}]} + responses: + 2XX: + application/json: "0x2b64d8EF4c" + suggestItems: + speakeasy-default-suggest-items: + requestBody: + application/json: {"prompt": "", "items": []} + responses: + 2XX: + application/json: ["", ""] + suggestOpenAPIRegistry: + speakeasy-default-suggest-open-API-registry: + parameters: + path: + namespace_name: "" + revision_reference: "" + header: + x-session-id: "" + responses: + 2XX: + application/json: "0x2699C2d98a" + getSchemaStoreItem: + speakeasy-default-get-schema-store-item: + responses: + 2XX: + application/json: {"id": "", "spec": "", "packageName": "", "sdkClassname": "", "created_at": "2023-02-14T01:44:55.437Z", "format": "yaml"} + 4XX: + application/json: {"message": "", "status_code": 168509} + createSchemaStoreItem: + speakeasy-default-create-schema-store-item: + requestBody: + application/json: {"spec": "", "packageName": "", "sdkClassname": "", "format": "yaml"} + responses: + 2XX: + application/json: {"id": "", "spec": "", "packageName": "", "sdkClassname": "", "created_at": "2024-08-06T03:45:46.936Z", "format": "json"} + 4XX: + application/json: {"message": "", "status_code": 769739} + create: + speakeasy-default-create: + requestBody: + application/json: {"url": "https://probable-heating.com/"} + responses: + 2XX: + application/json: {"short_url": "https://standard-utilization.com/", "full_url": "https://brisk-seafood.net/"} preflight: speakeasy-default-preflight: responses: + 2XX: + application/json: {} 4XX: application/json: {"message": "", "status_code": 820828} - 2XX: {} getNamespaces: speakeasy-default-get-namespaces: responses: 2XX: - application/json: {"items": [{"id": "", "name": "", "created_at": "2024-01-20T10:11:46.428Z", "updated_at": "2022-01-07T04:43:36.873Z"}, {"id": "", "name": "", "created_at": "2023-07-06T07:26:30.970Z", "updated_at": "2024-01-31T11:34:19.590Z"}, {"id": "", "name": "", "created_at": "2022-08-10T13:43:30.983Z", "updated_at": "2022-07-15T08:41:36.371Z"}]} + application/json: {"items": [{"id": "", "name": "", "created_at": "2025-01-19T10:11:46.428Z", "updated_at": "2023-01-07T04:43:36.873Z"}, {"id": "", "name": "", "created_at": "2024-07-05T07:26:30.970Z", "updated_at": "2025-01-30T11:34:19.590Z"}, {"id": "", "name": "", "created_at": "2023-08-10T13:43:30.983Z", "updated_at": "2023-07-15T08:41:36.371Z"}]} 4XX: application/json: {"message": "", "status_code": 305198} + archiveNamespace: + speakeasy-default-archive-namespace: + parameters: + path: + namespace_name: "" + responses: + 4XX: + application/json: {"message": "", "status_code": 334009} getRevisions: speakeasy-default-get-revisions: parameters: @@ -1267,7 +1156,7 @@ examples: query: {} responses: 2XX: - application/json: {"items": [{"id": "", "digest": "sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f", "namespace_name": "", "tags": ["", "", ""], "created_at": "2022-10-21T22:31:00.392Z", "updated_at": "2023-12-06T05:58:38.953Z"}], "next_page_token": ""} + application/json: {"items": [{"id": "", "digest": "sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f", "namespace_name": "", "tags": ["", "", ""], "created_at": "2023-10-21T22:31:00.392Z", "updated_at": "2024-12-05T05:58:38.953Z"}], "next_page_token": ""} 4XX: application/json: {"message": "", "status_code": 414389} getTags: @@ -1288,6 +1177,29 @@ examples: responses: 4XX: application/json: {"message": "", "status_code": 581484} + setVisibility: + speakeasy-default-set-visibility: + parameters: + path: + namespace_name: "" + responses: + 4XX: + application/json: {"message": "", "status_code": 651364} + listRemoteSources: + speakeasy-default-list-remote-sources: + parameters: + query: + namespace_name: "" + responses: + 2XX: + application/json: {"inputs": [{"registry_url": "https://well-lit-cap.net"}, {"registry_url": "https://vibrant-labourer.net"}], "output": {"registry_url": "https://unfit-minor.biz"}} + 4XX: + application/json: {"message": "", "status_code": 754391} + createRemoteSource: + speakeasy-default-create-remote-source: + responses: + 4XX: + application/json: {"message": "", "status_code": 580557} getManifest: speakeasy-default-get-manifest: parameters: @@ -1314,64 +1226,23 @@ examples: application/octet-stream: "0x21CA56a82d" 4XX: application/json: {"message": "", "status_code": 940661} - uploadReport: - speakeasy-default-upload-report: - requestBody: - multipart/form-data: {"file": {"": "0x8cc9e675ad"}} - responses: - 2XX: - application/json: {"url": "https://everlasting-hexagon.info"} - getLintingReportSignedUrl: - speakeasy-default-get-linting-report-signed-url: - parameters: - path: - documentChecksum: "" - responses: - 2XX: - application/json: {"url": "https://negligible-merit.info"} - getChangesReportSignedUrl: - speakeasy-default-get-changes-report-signed-url: + ignoreSubscriptionNamespace: + speakeasy-default-ignore-subscription-namespace: parameters: path: - documentChecksum: "" - responses: - 2XX: - application/json: {"url": "https://rosy-masterpiece.biz/"} - suggestOpenAPI: - speakeasy-default-suggest-open-API: - parameters: - header: - x-session-id: "" - requestBody: - multipart/form-data: {"schema": {"": "0x8a2EB0Aaa9"}} + subscriptionID: "" + namespaceName: "" responses: - 2XX: - application/json: "0x5F8Df5AB67" - suggest: - speakeasy-default-suggest: - parameters: - header: - x-session-id: "" - requestBody: - application/json: {"oas_summary": {"info": {"title": "", "summary": "", "description": "ugh which garrote ashamed sarong fiddle really", "version": ""}, "operations": []}, "suggestion_type": "diagnostics-only", "diagnostics": []} - responses: - 2XX: - application/json: "0x67Cda9Fda2" - suggestOpenAPIRegistry: - speakeasy-default-suggest-open-API-registry: + 4XX: + application/json: {"message": "", "status_code": 844164} + activateSubscriptionNamespace: + speakeasy-default-activate-subscription-namespace: parameters: path: - namespace_name: "" - revision_reference: "" - header: - x-session-id: "" + subscriptionID: "" + namespaceName: "" responses: - 2XX: - application/json: "0x9DDBdD905F" - create: - speakeasy-default-create: - requestBody: - application/json: {"url": "https://probable-heating.com/"} - responses: - 2XX: - application/json: {"short_url": "https://standard-utilization.com/", "full_url": "https://brisk-seafood.net/"} + 4XX: + application/json: {"message": "", "status_code": 566510} +examplesVersion: 1.0.1 +generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 854d4625..b2e6ee06 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -7,14 +7,23 @@ generation: useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true + nameResolutionFeb2025: false parameterOrderingFeb2024: true requestResponseComponentNamesFeb2024: true + securityFeb2025: false auth: oAuth2ClientCredentialsEnabled: true + oAuth2PasswordEnabled: false ruby: - version: 4.2.24 + version: 4.3.0 + additionalDependencies: + development: {} + runtime: {} author: Speakeasy + clientServerStatusCodesAsErrors: true + defaultErrorName: APIError description: Ruby Client SDK Generated by Speakeasy + flattenGlobalSecurity: false imports: option: openapi paths: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index e399960a..c99e6eef 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.405.8 +speakeasyVersion: 1.533.0 sources: {} targets: speakeasy-client-sdk: @@ -21,3 +21,9 @@ workflow: publish: rubygems: token: $rubygems_auth_token + codeSamples: + registry: + location: registry.speakeasyapi.dev/speakeasy-self/speakeasy-self/-oas-ruby-code-samples + labelOverride: + fixedValue: Ruby (SDK) + blocking: false diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index e280bf77..91998931 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -15,3 +15,9 @@ targets: publish: rubygems: token: $rubygems_auth_token + codeSamples: + registry: + location: registry.speakeasyapi.dev/speakeasy-self/speakeasy-self/-oas-ruby-code-samples + labelOverride: + fixedValue: Ruby (SDK) + blocking: false diff --git a/README.md b/README.md index 4d0e7a28..56fa6b50 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,26 @@ Developer-friendly & type-safe Ruby SDK specifically catered to leverage *speake ## Summary -Speakeasy API: The Speakeasy API allows teams to manage common operations with their APIs +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 + +* [speakeasy_client_sdk_ruby](#speakeasyclientsdkruby) + * [SDK Installation](#sdk-installation) + * [SDK Example Usage](#sdk-example-usage) + * [Authentication](#authentication) + * [Available Resources and Operations](#available-resources-and-operations) + * [Global Parameters](#global-parameters) + * [Retries](#retries) + * [Server Selection](#server-selection) +* [Development](#development) + * [Maturity](#maturity) + * [Contributions](#contributions) -* [SDK Installation](#sdk-installation) -* [SDK Example Usage](#sdk-example-usage) -* [Available Resources and Operations](#available-resources-and-operations) -* [Server Selection](#server-selection) @@ -49,73 +57,87 @@ gem install speakeasy_client_sdk_ruby ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.apis.get_all(op=::OpenApiSDK::Operations::Op.new( - and_: false, -), metadata={ - "key": [ - "", - ], -}) - -if ! res.apis.nil? +res = s.auth.validate_api_key() + +if ! res.api_key_details.nil? # handle response end ``` - -## Available Resources and Operations + +## Authentication -
-Available methods +### Per-Client Security Schemes + +This SDK supports the following security schemes globally: + +| Name | Type | Scheme | +| ---------------------- | ------ | ----------- | +| `api_key` | apiKey | API key | +| `workspace_identifier` | apiKey | API key | +| `bearer` | http | HTTP Bearer | + +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: +```ruby +require 'speakeasy_client_sdk_ruby' -### [Apiendpoints](docs/sdks/apiendpoints/README.md) +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -* [list](docs/sdks/apiendpoints/README.md#list) - Get all Api endpoints for a particular apiID. +res = s.auth.validate_api_key() -### [Apis](docs/sdks/apis/README.md) +if ! res.api_key_details.nil? + # handle response +end -* [get_all](docs/sdks/apis/README.md#get_all) - Get a list of Apis for a given workspace -* [get_all_versions](docs/sdks/apis/README.md#get_all_versions) - Get all Api versions for a particular ApiEndpoint. -* [upsert](docs/sdks/apis/README.md#upsert) - Upsert an Api -* [delete](docs/sdks/apis/README.md#delete) - Delete an Api. -* [generate_open_api](docs/sdks/apis/README.md#generate_open_api) - Generate an OpenAPI specification for a particular Api. -* [generate_postman](docs/sdks/apis/README.md#generate_postman) - Generate a Postman collection for a particular Api. +``` + -### [Artifacts](docs/sdks/artifacts/README.md) + +## Available Resources and Operations + +
+Available methods + +### [artifacts](docs/sdks/artifacts/README.md) * [preflight](docs/sdks/artifacts/README.md#preflight) - Get access token for communicating with OCI distribution endpoints * [get_namespaces](docs/sdks/artifacts/README.md#get_namespaces) - Each namespace contains many revisions. +* [set_archived](docs/sdks/artifacts/README.md#set_archived) - Set whether a namespace is archived * [get_revisions](docs/sdks/artifacts/README.md#get_revisions) * [get_tags](docs/sdks/artifacts/README.md#get_tags) * [post_tags](docs/sdks/artifacts/README.md#post_tags) - Add tags to an existing revision +* [set_visibility](docs/sdks/artifacts/README.md#set_visibility) - Set visibility of a namespace with an existing metadata entry +* [list_remote_sources](docs/sdks/artifacts/README.md#list_remote_sources) - Get remote sources attached to a particular namespace +* [create_remote_source](docs/sdks/artifacts/README.md#create_remote_source) - Configure a new remote source * [get_manifest](docs/sdks/artifacts/README.md#get_manifest) - Get manifest for a particular reference * [get_blob](docs/sdks/artifacts/README.md#get_blob) - Get blob for a particular digest -### [Auth](docs/sdks/auth/README.md) +### [auth](docs/sdks/auth/README.md) * [validate_api_key](docs/sdks/auth/README.md#validate_api_key) - Validate the current api key. * [get_user](docs/sdks/auth/README.md#get_user) - Get information about the current user. * [get_access_token](docs/sdks/auth/README.md#get_access_token) - Get or refresh an access token for the current workspace. * [get_allowances](docs/sdks/auth/README.md#get_allowances) - Get access allowances for a particular workspace -### [Embeds](docs/sdks/embeds/README.md) +### [code_samples](docs/sdks/codesamples/README.md) -* [get_access_token](docs/sdks/embeds/README.md#get_access_token) - Get an embed access token for the current workspace. -* [get_valid](docs/sdks/embeds/README.md#get_valid) - Get all valid embed access tokens for the current workspace. -* [delete](docs/sdks/embeds/README.md#delete) - Revoke an embed access EmbedToken. +* [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_async](docs/sdks/codesamples/README.md#generate_code_sample_preview_async) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling. +* [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) +### [events](docs/sdks/events/README.md) * [search](docs/sdks/events/README.md#search) - Search events for a particular workspace by any field * [post](docs/sdks/events/README.md#post) - Post events for a specific workspace @@ -123,9 +145,11 @@ end * [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 -### [Github](docs/sdks/github/README.md) +### [github](docs/sdks/github/README.md) +* [get_setup](docs/sdks/github/README.md#get_setup) * [check_access](docs/sdks/github/README.md#check_access) +* [link_github](docs/sdks/github/README.md#link_github) * [check_publishing_p_rs](docs/sdks/github/README.md#check_publishing_p_rs) * [check_publishing_secrets](docs/sdks/github/README.md#check_publishing_secrets) * [store_publishing_secrets](docs/sdks/github/README.md#store_publishing_secrets) @@ -135,65 +159,56 @@ end * [trigger_action](docs/sdks/github/README.md#trigger_action) * [get_action](docs/sdks/github/README.md#get_action) -### [Metadata](docs/sdks/metadata/README.md) - -* [get](docs/sdks/metadata/README.md#get) - Get all metadata for a particular apiID and versionID. -* [insert_version](docs/sdks/metadata/README.md#insert_version) - Insert metadata for a particular apiID and versionID. -* [delete_version](docs/sdks/metadata/README.md#delete_version) - Delete metadata for a particular apiID and versionID. - -### [Organizations](docs/sdks/organizations/README.md) +### [organizations](docs/sdks/organizations/README.md) * [get_all](docs/sdks/organizations/README.md#get_all) - Get organizations for a user * [create](docs/sdks/organizations/README.md#create) - Create an organization * [get](docs/sdks/organizations/README.md#get) - Get organization * [create_free_trial](docs/sdks/organizations/README.md#create_free_trial) - Create a free trial for an organization * [get_usage](docs/sdks/organizations/README.md#get_usage) - Get billing usage summary for a particular organization +* [create_billing_add_ons](docs/sdks/organizations/README.md#create_billing_add_ons) - Create billing add ons +* [get_billing_add_ons](docs/sdks/organizations/README.md#get_billing_add_ons) - Get billing add ons +* [delete_billing_add_on](docs/sdks/organizations/README.md#delete_billing_add_on) - Delete billing add ons -### [Reports](docs/sdks/reports/README.md) +### [publishing_tokens](docs/sdks/publishingtokens/README.md) + +* [list](docs/sdks/publishingtokens/README.md#list) - Get publishing tokens for a workspace +* [create](docs/sdks/publishingtokens/README.md#create) - Create a publishing token for a workspace +* [get](docs/sdks/publishingtokens/README.md#get) - Get a specific publishing token +* [update](docs/sdks/publishingtokens/README.md#update) - Updates the validitity period of a publishing token +* [delete](docs/sdks/publishingtokens/README.md#delete) - Delete a specific publishing token +* [resolve_target](docs/sdks/publishingtokens/README.md#resolve_target) - Get a specific publishing token target +* [resolve_metadata](docs/sdks/publishingtokens/README.md#resolve_metadata) - Get metadata about the token + +### [reports](docs/sdks/reports/README.md) * [upload](docs/sdks/reports/README.md#upload) - Upload a report. * [get_signed_url](docs/sdks/reports/README.md#get_signed_url) - Get the signed access url for the linting reports for a particular document. * [get_changes_signed_url](docs/sdks/reports/README.md#get_changes_signed_url) - Get the signed access url for the change reports for a particular document. -### [Requests](docs/sdks/requests/README.md) - -* [query](docs/sdks/requests/README.md#query) - Query the event log to retrieve a list of requests. -* [get](docs/sdks/requests/README.md#get) - Get information about a particular request. -* [generate_postman_collection](docs/sdks/requests/README.md#generate_postman_collection) - Generate a Postman collection for a particular request. +### [schema_store](docs/sdks/schemastore/README.md) -### [Schemas](docs/sdks/schemas/README.md) +* [get_schema_store_item](docs/sdks/schemastore/README.md#get_schema_store_item) - Get a OAS schema from the schema store +* [create_schema_store_item](docs/sdks/schemastore/README.md#create_schema_store_item) - Create a schema in the schema store -* [get_latest](docs/sdks/schemas/README.md#get_latest) - Get information about the latest schema. -* [post](docs/sdks/schemas/README.md#post) - Register a schema. -* [download](docs/sdks/schemas/README.md#download) - Download the latest schema for a particular apiID. -* [get_diff](docs/sdks/schemas/README.md#get_diff) - Get a diff of two schema revisions for an Api. -* [delete](docs/sdks/schemas/README.md#delete) - Delete a particular schema revision for an Api. -* [get_revision](docs/sdks/schemas/README.md#get_revision) - Get information about a particular schema revision for an Api. -* [download_revision](docs/sdks/schemas/README.md#download_revision) - Download a particular schema revision for an Api. -* [get](docs/sdks/schemas/README.md#get) - Get information about all schemas associated with a particular apiID. - -### [ShortURLs](docs/sdks/shorturls/README.md) +### [short_ur_ls](docs/sdks/shorturls/README.md) * [create](docs/sdks/shorturls/README.md#create) - Shorten a URL. -### [SpeakeasyClientSDKApiEndpoints](docs/sdks/speakeasyclientsdkapiendpoints/README.md) +### [subscriptions](docs/sdks/subscriptions/README.md) -* [get_all](docs/sdks/speakeasyclientsdkapiendpoints/README.md#get_all) - Get all ApiEndpoints for a particular apiID and versionID. -* [find](docs/sdks/speakeasyclientsdkapiendpoints/README.md#find) - Find an ApiEndpoint via its displayName. -* [delete](docs/sdks/speakeasyclientsdkapiendpoints/README.md#delete) - Delete an ApiEndpoint. -* [get](docs/sdks/speakeasyclientsdkapiendpoints/README.md#get) - Get an ApiEndpoint. -* [upsert](docs/sdks/speakeasyclientsdkapiendpoints/README.md#upsert) - Upsert an ApiEndpoint. -* [generate_open_api_spec](docs/sdks/speakeasyclientsdkapiendpoints/README.md#generate_open_api_spec) - Generate an OpenAPI specification for a particular ApiEndpoint. -* [generate_postman_collection](docs/sdks/speakeasyclientsdkapiendpoints/README.md#generate_postman_collection) - Generate a Postman collection for a particular ApiEndpoint. +* [ignore_subscription_namespace](docs/sdks/subscriptions/README.md#ignore_subscription_namespace) - Ignored a namespace for a subscription +* [activate_subscription_namespace](docs/sdks/subscriptions/README.md#activate_subscription_namespace) - Activate an ignored namespace for a subscription -### [Suggest](docs/sdks/suggest/README.md) +### [suggest](docs/sdks/suggest/README.md) * [openapi](docs/sdks/suggest/README.md#openapi) - (DEPRECATED) Generate suggestions for improving an OpenAPI document. * [generate](docs/sdks/suggest/README.md#generate) - Generate suggestions for improving an OpenAPI document. +* [suggest_items](docs/sdks/suggest/README.md#suggest_items) - Generate generic suggestions for a list of items. * [openapi_registry](docs/sdks/suggest/README.md#openapi_registry) - Generate suggestions for improving an OpenAPI document stored in the registry. -### [Workspaces](docs/sdks/workspaces/README.md) +### [workspaces](docs/sdks/workspaces/README.md) * [get_all](docs/sdks/workspaces/README.md#get_all) - Get workspaces for a user * [get](docs/sdks/workspaces/README.md#get) - Get workspace by context @@ -208,29 +223,147 @@ end * [get_tokens](docs/sdks/workspaces/README.md#get_tokens) - Get tokens for a particular 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 +* [set_feature_flags](docs/sdks/workspaces/README.md#set_feature_flags) - Set workspace feature flags * [get_feature_flags](docs/sdks/workspaces/README.md#get_feature_flags) - Get workspace feature flags
- -## Server Selection + +## 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 | ::String | The workspace_id parameter. | + +### Example + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new + +res = s.auth.get_access_token(workspace_id="") + +if ! res.access_token.nil? + # handle response +end + +``` + + + +## 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: +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.auth.get_allowances(gen_lock_id="", target_type="", passive=false) + +if ! res.access_details.nil? + # handle response +end + +``` + +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: +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + retry_config: Utils::RetryConfig.new( + backoff: Utils::BackoffStrategy.new( + exponent: 1.1, + initial_interval: 1, + max_elapsed_time: 100, + max_interval: 50 + ), + retry_connection_errors: false, + strategy: 'backoff' + ), + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.auth.get_allowances(gen_lock_id="", target_type="", passive=false) + +if ! res.access_details.nil? + # handle response +end +``` + + + ## 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: +You can override the default server globally by passing a server name to the `server (Symbol)` 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 | Variables | -| ----- | ------ | --------- | -| `prod` | `https://api.prod.speakeasyapi.dev` | None | +| Name | Server | Description | +| ------ | ----------------------------------- | ----------- | +| `prod` | `https://api.prod.speakeasyapi.dev` | | +#### Example + +```ruby +require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + server: "prod", + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.auth.validate_api_key() + +if ! res.api_key_details.nil? + # handle response +end + +``` ### 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: +The default server can also be overridden globally by passing a URL to the `server_url (String)` optional parameter when initializing the SDK client instance. For example: +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + server_url: "https://api.prod.speakeasyapi.dev", + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.auth.validate_api_key() + +if ! res.api_key_details.nil? + # handle response +end + +``` diff --git a/RELEASES.md b/RELEASES.md index b16b9430..08f82c83 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -34,4 +34,14 @@ Based on: ### Generated - [ruby v4.2.24] . ### Releases -- [Ruby Gems v4.2.24] https://rubygems.org/gems/speakeasy_client_sdk_ruby/versions/4.2.24 - . \ No newline at end of file +- [Ruby Gems v4.2.24] https://rubygems.org/gems/speakeasy_client_sdk_ruby/versions/4.2.24 - . + +## 2025-04-17 00:13:43 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.533.0 (2.578.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [ruby v4.3.0] . +### Releases +- [Ruby Gems v4.3.0] https://rubygems.org/gems/speakeasy_client_sdk_ruby/versions/4.3.0 - . \ No newline at end of file diff --git a/Rakefile b/Rakefile index 86ad483b..18fbd6de 100644 --- a/Rakefile +++ b/Rakefile @@ -9,13 +9,15 @@ RuboCop::RakeTask.new Minitest::TestTask.create -# So far default is working - leaving this here for reference. +task :default => :test -# Minitest::TestTask.create(:test) do |t| -# t.libs << 'test' -# t.libs << 'lib' -# t.warning = false -# t.test_globs = ['test/**/*_test.rb'] -# end -task :default => :test +# Developers can run all tests with: +# +# $ rake test +# +# Developers can run individual test files with: +# +# $ rake test test/parameter_test +# +# and run individual tests by adding `focus` to the line before the test definition. \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 19b320bd..eec64f8c 100644 --- a/USAGE.md +++ b/USAGE.md @@ -2,24 +2,15 @@ ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) +res = s.auth.validate_api_key() - -res = s.apis.get_all(op=::OpenApiSDK::Operations::Op.new( - and_: false, -), metadata={ - "key": [ - "", - ], -}) - -if ! res.apis.nil? +if ! res.api_key_details.nil? # handle response end diff --git a/docs/models/shared/error.md b/docs/models/errors/error.md similarity index 100% rename from docs/models/shared/error.md rename to docs/models/errors/error.md diff --git a/docs/models/operations/activatesubscriptionnamespacerequest.md b/docs/models/operations/activatesubscriptionnamespacerequest.md new file mode 100644 index 00000000..7aa3328f --- /dev/null +++ b/docs/models/operations/activatesubscriptionnamespacerequest.md @@ -0,0 +1,9 @@ +# ActivateSubscriptionNamespaceRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `subscription_id` | *::String* | :heavy_check_mark: | The existing subscription ID | +| `namespace_name` | *::String* | :heavy_check_mark: | The namespace name | \ No newline at end of file diff --git a/docs/models/operations/deleteapiresponse.md b/docs/models/operations/activatesubscriptionnamespaceresponse.md similarity index 79% rename from docs/models/operations/deleteapiresponse.md rename to docs/models/operations/activatesubscriptionnamespaceresponse.md index 9fa58200..612de57f 100644 --- a/docs/models/operations/deleteapiresponse.md +++ b/docs/models/operations/activatesubscriptionnamespaceresponse.md @@ -1,4 +1,4 @@ -# DeleteApiResponse +# ActivateSubscriptionNamespaceResponse ## Fields @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/archivenamespacerequest.md b/docs/models/operations/archivenamespacerequest.md new file mode 100644 index 00000000..2492d6da --- /dev/null +++ b/docs/models/operations/archivenamespacerequest.md @@ -0,0 +1,9 @@ +# ArchiveNamespaceRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | +| `request_body` | [T.nilable(Models::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..3770bc26 --- /dev/null +++ b/docs/models/operations/archivenamespacerequestbody.md @@ -0,0 +1,10 @@ +# ArchiveNamespaceRequestBody + +Archived status + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `archived` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/registerschemaresponse.md b/docs/models/operations/archivenamespaceresponse.md similarity index 79% rename from docs/models/operations/registerschemaresponse.md rename to docs/models/operations/archivenamespaceresponse.md index 977c8e7a..37b436ff 100644 --- a/docs/models/operations/registerschemaresponse.md +++ b/docs/models/operations/archivenamespaceresponse.md @@ -1,4 +1,4 @@ -# RegisterSchemaResponse +# ArchiveNamespaceResponse ## Fields @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/checkgithubaccessresponse.md b/docs/models/operations/checkgithubaccessresponse.md index 413b0315..fb7e07e9 100644 --- a/docs/models/operations/checkgithubaccessresponse.md +++ b/docs/models/operations/checkgithubaccessresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/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..af944acd --- /dev/null +++ b/docs/models/operations/createbillingaddonsresponse.md @@ -0,0 +1,11 @@ +# CreateBillingAddOnsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organization_billing_add_on_response` | [T.nilable(Models::Shared::OrganizationBillingAddOnResponse)](../../models/shared/organizationbillingaddonresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/createfreetrialresponse.md b/docs/models/operations/createfreetrialresponse.md index b1e509c7..3f9944e9 100644 --- a/docs/models/operations/createfreetrialresponse.md +++ b/docs/models/operations/createfreetrialresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/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 09dafc5e..61158b8d 100644 --- a/docs/models/operations/createorganizationresponse.md +++ b/docs/models/operations/createorganizationresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `organization` | [T.nilable(::OpenApiSDK::Shared::Organization)](../../models/shared/organization.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organization` | [T.nilable(Models::Shared::Organization)](../../models/shared/organization.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/shared/unboundedrequest.md b/docs/models/operations/createpublishingtokenrequestbody.md similarity index 55% rename from docs/models/shared/unboundedrequest.md rename to docs/models/operations/createpublishingtokenrequestbody.md index e252c89f..9a028641 100644 --- a/docs/models/shared/unboundedrequest.md +++ b/docs/models/operations/createpublishingtokenrequestbody.md @@ -1,14 +1,13 @@ -# UnboundedRequest +# CreatePublishingTokenRequestBody -An UnboundedRequest represents the HAR content capture by Speakeasy when logging a request. +The publishing token to create ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp. | -| `har` | *::String* | :heavy_check_mark: | The HAR content of the request. | -| `har_size_bytes` | *::Integer* | :heavy_check_mark: | The size of the HAR content in bytes. | -| `request_id` | *::String* | :heavy_check_mark: | The ID of this request. | -| `workspace_id` | *::String* | :heavy_check_mark: | The workspace ID this request was made to. | \ No newline at end of file +| `target_id` | *::String* | :heavy_check_mark: | N/A | +| `target_resource` | *::String* | :heavy_check_mark: | N/A | +| `valid_until` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `token_name` | *::String* | :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..e6e1e407 --- /dev/null +++ b/docs/models/operations/createpublishingtokenresponse.md @@ -0,0 +1,11 @@ +# CreatePublishingTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `publishing_token` | [T.nilable(Models::Shared::PublishingToken)](../../models/shared/publishingtoken.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/deleteapiendpointresponse.md b/docs/models/operations/createremotesourceresponse.md similarity index 79% rename from docs/models/operations/deleteapiendpointresponse.md rename to docs/models/operations/createremotesourceresponse.md index dd1a1679..81227d35 100644 --- a/docs/models/operations/deleteapiendpointresponse.md +++ b/docs/models/operations/createremotesourceresponse.md @@ -1,4 +1,4 @@ -# DeleteApiEndpointResponse +# CreateRemoteSourceResponse ## Fields @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/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 6ab49174..2a7723ab 100644 --- a/docs/models/operations/createresponse.md +++ b/docs/models/operations/createresponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `short_url` | [T.nilable(::OpenApiSDK::Shared::ShortURL)](../../models/shared/shorturl.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `short_url` | [T.nilable(Models::Shared::ShortURL)](../../models/shared/shorturl.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/generatepostmancollectionforapiendpointrequest.md b/docs/models/operations/createschemastoreitemrequestbody.md similarity index 57% rename from docs/models/operations/generatepostmancollectionforapiendpointrequest.md rename to docs/models/operations/createschemastoreitemrequestbody.md index 968881e0..b54d59af 100644 --- a/docs/models/operations/generatepostmancollectionforapiendpointrequest.md +++ b/docs/models/operations/createschemastoreitemrequestbody.md @@ -1,10 +1,11 @@ -# GeneratePostmanCollectionForApiEndpointRequest +# CreateSchemaStoreItemRequestBody ## Fields | Field | Type | Required | Description | | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to generate a Postman collection for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to generate a Postman collection for. | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint to generate a Postman collection for. | \ No newline at end of file +| `spec` | *::String* | :heavy_check_mark: | The OpenAPI specification to store. | +| `package_name` | *::String* | :heavy_check_mark: | The package name to use in code snippets / quickstart. | +| `sdk_classname` | *::String* | :heavy_check_mark: | The classname of the SDK to use in code snippets / quickstart. | +| `format` | [Models::Operations::Format](../../models/operations/format.md) | :heavy_check_mark: | The format of the OpenAPI specification. | \ 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..958d42c5 --- /dev/null +++ b/docs/models/operations/createschemastoreitemresponse.md @@ -0,0 +1,11 @@ +# CreateSchemaStoreItemResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `schema_store_item` | [T.nilable(Models::Shared::SchemaStoreItem)](../../models/shared/schemastoreitem.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/createworkspaceresponse.md b/docs/models/operations/createworkspaceresponse.md index cadf9b50..1ef04540 100644 --- a/docs/models/operations/createworkspaceresponse.md +++ b/docs/models/operations/createworkspaceresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `workspace` | [T.nilable(::OpenApiSDK::Shared::Workspace)](../../models/shared/workspace.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspace` | [T.nilable(Models::Shared::Workspace)](../../models/shared/workspace.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/createworkspacetokenrequest.md b/docs/models/operations/createworkspacetokenrequest.md index 5521c7ba..6e15b303 100644 --- a/docs/models/operations/createworkspacetokenrequest.md +++ b/docs/models/operations/createworkspacetokenrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | -| `workspace_token` | [::OpenApiSDK::Shared::WorkspaceToken](../../models/shared/workspacetoken.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `workspace_token` | [Models::Shared::WorkspaceToken](../../models/shared/workspacetoken.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createworkspacetokenresponse.md b/docs/models/operations/createworkspacetokenresponse.md index 41ff7f73..63d6244b 100644 --- a/docs/models/operations/createworkspacetokenresponse.md +++ b/docs/models/operations/createworkspacetokenresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deleteapiendpointrequest.md b/docs/models/operations/deleteapiendpointrequest.md deleted file mode 100644 index 5999a85b..00000000 --- a/docs/models/operations/deleteapiendpointrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# DeleteApiEndpointRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api the ApiEndpoint belongs to. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api the ApiEndpoint belongs to. | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint to delete. | \ No newline at end of file diff --git a/docs/models/operations/deleteapirequest.md b/docs/models/operations/deleteapirequest.md deleted file mode 100644 index b97abfac..00000000 --- a/docs/models/operations/deleteapirequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# DeleteApiRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to delete. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete. | \ 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..4973f89d --- /dev/null +++ b/docs/models/operations/deletebillingaddonrequest.md @@ -0,0 +1,8 @@ +# DeleteBillingAddOnRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `add_on` | [Models::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..5d4a8984 --- /dev/null +++ b/docs/models/operations/deletebillingaddonresponse.md @@ -0,0 +1,10 @@ +# DeleteBillingAddOnResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/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..b1a05db6 --- /dev/null +++ b/docs/models/operations/deletepublishingtokenrequest.md @@ -0,0 +1,8 @@ +# DeletePublishingTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *::String* | :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..fffae98c --- /dev/null +++ b/docs/models/operations/deletepublishingtokenresponse.md @@ -0,0 +1,10 @@ +# DeletePublishingTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deleteschemarequest.md b/docs/models/operations/deleteschemarequest.md deleted file mode 100644 index 93e4c211..00000000 --- a/docs/models/operations/deleteschemarequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# DeleteSchemaRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to delete schemas for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `revision_id` | *::String* | :heavy_check_mark: | The revision ID of the schema to delete. | \ No newline at end of file diff --git a/docs/models/operations/deleteversionmetadatarequest.md b/docs/models/operations/deleteversionmetadatarequest.md deleted file mode 100644 index 68da9aa9..00000000 --- a/docs/models/operations/deleteversionmetadatarequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteVersionMetadataRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to delete metadata for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `meta_key` | *::String* | :heavy_check_mark: | The key of the metadata to delete. | -| `meta_value` | *::String* | :heavy_check_mark: | The value of the metadata to delete. | \ No newline at end of file diff --git a/docs/models/operations/deleteversionmetadataresponse.md b/docs/models/operations/deleteversionmetadataresponse.md deleted file mode 100644 index 94d263bd..00000000 --- a/docs/models/operations/deleteversionmetadataresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteVersionMetadataResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/deleteworkspacetokenrequest.md b/docs/models/operations/deleteworkspacetokenrequest.md index 788fa526..ad13be64 100644 --- a/docs/models/operations/deleteworkspacetokenrequest.md +++ b/docs/models/operations/deleteworkspacetokenrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | | `token_id` | *::String* | :heavy_check_mark: | Unique identifier of the token. | \ No newline at end of file diff --git a/docs/models/operations/deleteworkspacetokenresponse.md b/docs/models/operations/deleteworkspacetokenresponse.md index 56e5bdb5..c24e5d27 100644 --- a/docs/models/operations/deleteworkspacetokenresponse.md +++ b/docs/models/operations/deleteworkspacetokenresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/downloadschemarequest.md b/docs/models/operations/downloadschemarequest.md deleted file mode 100644 index c55675fa..00000000 --- a/docs/models/operations/downloadschemarequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# DownloadSchemaRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to download the schema for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | \ No newline at end of file diff --git a/docs/models/operations/downloadschemaresponse.md b/docs/models/operations/downloadschemaresponse.md deleted file mode 100644 index 2f492019..00000000 --- a/docs/models/operations/downloadschemaresponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# DownloadSchemaResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `two_xx_application_json_schema` | *T.nilable(::String)* | :heavy_minus_sign: | OK | -| `two_xx_application_x_yaml_schema` | *T.nilable(::String)* | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/downloadschemarevisionrequest.md b/docs/models/operations/downloadschemarevisionrequest.md deleted file mode 100644 index a2a3245a..00000000 --- a/docs/models/operations/downloadschemarevisionrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# DownloadSchemaRevisionRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve schemas for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `revision_id` | *::String* | :heavy_check_mark: | The revision ID of the schema to retrieve. | \ No newline at end of file diff --git a/docs/models/operations/downloadschemarevisionresponse.md b/docs/models/operations/downloadschemarevisionresponse.md deleted file mode 100644 index a32d5947..00000000 --- a/docs/models/operations/downloadschemarevisionresponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# DownloadSchemaRevisionResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `two_xx_application_json_schema` | *T.nilable(::String)* | :heavy_minus_sign: | OK | -| `two_xx_application_x_yaml_schema` | *T.nilable(::String)* | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/findapiendpointresponse.md b/docs/models/operations/findapiendpointresponse.md deleted file mode 100644 index 567bc6b8..00000000 --- a/docs/models/operations/findapiendpointresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# FindApiEndpointResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `api_endpoint` | [T.nilable(::OpenApiSDK::Shared::ApiEndpoint)](../../models/shared/apiendpoint.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ 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/generatecodesamplepreviewasyncresponse.md b/docs/models/operations/generatecodesamplepreviewasyncresponse.md new file mode 100644 index 00000000..7d802288 --- /dev/null +++ b/docs/models/operations/generatecodesamplepreviewasyncresponse.md @@ -0,0 +1,11 @@ +# GenerateCodeSamplePreviewAsyncResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::GenerateCodeSamplePreviewAsyncResponseBody)](../../models/operations/generatecodesamplepreviewasyncresponsebody.md) | :heavy_minus_sign: | Job accepted, returns a job ID to poll for status and result | \ No newline at end of file diff --git a/docs/models/operations/generatecodesamplepreviewasyncresponsebody.md b/docs/models/operations/generatecodesamplepreviewasyncresponsebody.md new file mode 100644 index 00000000..74f54b05 --- /dev/null +++ b/docs/models/operations/generatecodesamplepreviewasyncresponsebody.md @@ -0,0 +1,11 @@ +# GenerateCodeSamplePreviewAsyncResponseBody + +Job accepted, returns a job ID to poll for status and result + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `job_id` | *::String* | :heavy_check_mark: | The job ID for polling | +| `status` | [Models::Shared::CodeSamplesJobStatus](../../models/shared/codesamplesjobstatus.md) | :heavy_check_mark: | The current status of the job. Possible values are `pending` or `running`. | \ No newline at end of file diff --git a/docs/models/operations/getschemadiffresponse.md b/docs/models/operations/generatecodesamplepreviewresponse.md similarity index 76% rename from docs/models/operations/getschemadiffresponse.md rename to docs/models/operations/generatecodesamplepreviewresponse.md index b235d2f1..a94d4a0b 100644 --- a/docs/models/operations/getschemadiffresponse.md +++ b/docs/models/operations/generatecodesamplepreviewresponse.md @@ -1,4 +1,4 @@ -# GetSchemaDiffResponse +# GenerateCodeSamplePreviewResponse ## Fields @@ -8,5 +8,4 @@ | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | | `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `schema_diff` | [T.nilable(::OpenApiSDK::Shared::SchemaDiff)](../../models/shared/schemadiff.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `usage_snippets` | [T.nilable(Models::Shared::UsageSnippets)](../../models/shared/usagesnippets.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/generateopenapispecforapiendpointrequest.md b/docs/models/operations/generateopenapispecforapiendpointrequest.md deleted file mode 100644 index 29ef123a..00000000 --- a/docs/models/operations/generateopenapispecforapiendpointrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# GenerateOpenApiSpecForApiEndpointRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to generate an OpenAPI specification for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to generate an OpenAPI specification for. | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint to generate an OpenAPI specification for. | \ No newline at end of file diff --git a/docs/models/operations/generateopenapispecforapiendpointresponse.md b/docs/models/operations/generateopenapispecforapiendpointresponse.md deleted file mode 100644 index fd7528b6..00000000 --- a/docs/models/operations/generateopenapispecforapiendpointresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GenerateOpenApiSpecForApiEndpointResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `generate_open_api_spec_diff` | [T.nilable(::OpenApiSDK::Shared::GenerateOpenApiSpecDiff)](../../models/shared/generateopenapispecdiff.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/generateopenapispecrequest.md b/docs/models/operations/generateopenapispecrequest.md deleted file mode 100644 index 3c831fac..00000000 --- a/docs/models/operations/generateopenapispecrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GenerateOpenApiSpecRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to generate an OpenAPI specification for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to generate an OpenAPI specification for. | \ No newline at end of file diff --git a/docs/models/operations/generateopenapispecresponse.md b/docs/models/operations/generateopenapispecresponse.md deleted file mode 100644 index 705bb7f2..00000000 --- a/docs/models/operations/generateopenapispecresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GenerateOpenApiSpecResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `generate_open_api_spec_diff` | [T.nilable(::OpenApiSDK::Shared::GenerateOpenApiSpecDiff)](../../models/shared/generateopenapispecdiff.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/generatepostmancollectionforapiendpointresponse.md b/docs/models/operations/generatepostmancollectionforapiendpointresponse.md deleted file mode 100644 index a96c1d3b..00000000 --- a/docs/models/operations/generatepostmancollectionforapiendpointresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GeneratePostmanCollectionForApiEndpointResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `postman_collection` | *T.nilable(::String)* | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/generatepostmancollectionrequest.md b/docs/models/operations/generatepostmancollectionrequest.md deleted file mode 100644 index 10d627f2..00000000 --- a/docs/models/operations/generatepostmancollectionrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GeneratePostmanCollectionRequest - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to generate a Postman collection for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to generate a Postman collection for. | \ No newline at end of file diff --git a/docs/models/operations/generatepostmancollectionresponse.md b/docs/models/operations/generatepostmancollectionresponse.md deleted file mode 100644 index c55db6b2..00000000 --- a/docs/models/operations/generatepostmancollectionresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GeneratePostmanCollectionResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `postman_collection` | *T.nilable(::String)* | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/generaterequestpostmancollectionrequest.md b/docs/models/operations/generaterequestpostmancollectionrequest.md deleted file mode 100644 index 56e022cf..00000000 --- a/docs/models/operations/generaterequestpostmancollectionrequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GenerateRequestPostmanCollectionRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `request_id` | *::String* | :heavy_check_mark: | The ID of the request to retrieve. | \ No newline at end of file diff --git a/docs/models/operations/generaterequestpostmancollectionresponse.md b/docs/models/operations/generaterequestpostmancollectionresponse.md deleted file mode 100644 index 24dbb4f7..00000000 --- a/docs/models/operations/generaterequestpostmancollectionresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GenerateRequestPostmanCollectionResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `postman_collection` | *T.nilable(::String)* | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getaccesstokenresponse.md b/docs/models/operations/getaccesstokenresponse.md index ee592c69..dca49681 100644 --- a/docs/models/operations/getaccesstokenresponse.md +++ b/docs/models/operations/getaccesstokenresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `access_token` | [T.nilable(::OpenApiSDK::Shared::AccessToken)](../../models/shared/accesstoken.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `access_token` | [T.nilable(Models::Shared::AccessToken)](../../models/shared/accesstoken.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getallapiendpointsrequest.md b/docs/models/operations/getallapiendpointsrequest.md deleted file mode 100644 index 671a0b52..00000000 --- a/docs/models/operations/getallapiendpointsrequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetAllApiEndpointsRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve ApiEndpoints for. | \ No newline at end of file diff --git a/docs/models/operations/getallapiendpointsresponse.md b/docs/models/operations/getallapiendpointsresponse.md deleted file mode 100644 index 15afdd4c..00000000 --- a/docs/models/operations/getallapiendpointsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetAllApiEndpointsResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `api_endpoints` | T::Array<[::OpenApiSDK::Shared::ApiEndpoint](../../models/shared/apiendpoint.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getallapiversionsrequest.md b/docs/models/operations/getallapiversionsrequest.md deleted file mode 100644 index 05d36eb9..00000000 --- a/docs/models/operations/getallapiversionsrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAllApiVersionsRequest - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve. | -| `op` | [T.nilable(::OpenApiSDK::Operations::QueryParamOp)](../../models/operations/queryparamop.md) | :heavy_minus_sign: | Configuration for filter operations | -| `metadata` | T::Hash[Symbol, T::Array<*::String*>] | :heavy_minus_sign: | Metadata to filter Apis on | \ No newline at end of file diff --git a/docs/models/operations/getallapiversionsresponse.md b/docs/models/operations/getallapiversionsresponse.md deleted file mode 100644 index 2a30ac84..00000000 --- a/docs/models/operations/getallapiversionsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetAllApiVersionsResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `apis` | T::Array<[::OpenApiSDK::Shared::Api](../../models/shared/api.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getallforversionapiendpointsrequest.md b/docs/models/operations/getallforversionapiendpointsrequest.md deleted file mode 100644 index 254586e2..00000000 --- a/docs/models/operations/getallforversionapiendpointsrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetAllForVersionApiEndpointsRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve ApiEndpoints for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to retrieve ApiEndpoints for. | \ No newline at end of file diff --git a/docs/models/operations/getallforversionapiendpointsresponse.md b/docs/models/operations/getallforversionapiendpointsresponse.md deleted file mode 100644 index dffef663..00000000 --- a/docs/models/operations/getallforversionapiendpointsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetAllForVersionApiEndpointsResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `api_endpoints` | T::Array<[::OpenApiSDK::Shared::ApiEndpoint](../../models/shared/apiendpoint.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getapiendpointrequest.md b/docs/models/operations/getapiendpointrequest.md deleted file mode 100644 index 3e2463e1..00000000 --- a/docs/models/operations/getapiendpointrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetApiEndpointRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api the ApiEndpoint belongs to. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api the ApiEndpoint belongs to. | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint to retrieve. | \ No newline at end of file diff --git a/docs/models/operations/getapiendpointresponse.md b/docs/models/operations/getapiendpointresponse.md deleted file mode 100644 index d990f90c..00000000 --- a/docs/models/operations/getapiendpointresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetApiEndpointResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `api_endpoint` | [T.nilable(::OpenApiSDK::Shared::ApiEndpoint)](../../models/shared/apiendpoint.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getapisrequest.md b/docs/models/operations/getapisrequest.md deleted file mode 100644 index 220eeee1..00000000 --- a/docs/models/operations/getapisrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetApisRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `op` | [T.nilable(::OpenApiSDK::Operations::Op)](../../models/operations/op.md) | :heavy_minus_sign: | Configuration for filter operations | -| `metadata` | T::Hash[Symbol, T::Array<*::String*>] | :heavy_minus_sign: | Metadata to filter Apis on | \ No newline at end of file diff --git a/docs/models/operations/getapisresponse.md b/docs/models/operations/getapisresponse.md deleted file mode 100644 index ac1bac01..00000000 --- a/docs/models/operations/getapisresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetApisResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `apis` | T::Array<[::OpenApiSDK::Shared::Api](../../models/shared/api.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ 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..39f858c4 --- /dev/null +++ b/docs/models/operations/getbillingaddonsresponse.md @@ -0,0 +1,11 @@ +# GetBillingAddOnsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organization_billing_add_on_response` | [T.nilable(Models::Shared::OrganizationBillingAddOnResponse)](../../models/shared/organizationbillingaddonresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/getblobresponse.md b/docs/models/operations/getblobresponse.md index 0207c592..bbb3badc 100644 --- a/docs/models/operations/getblobresponse.md +++ b/docs/models/operations/getblobresponse.md @@ -8,5 +8,4 @@ | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | | `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `blob` | *T.nilable(::String)* | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `blob` | *T.nilable(::String)* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getchangesreportsignedurlresponse.md b/docs/models/operations/getchangesreportsignedurlresponse.md index 573326d1..802d6f07 100644 --- a/docs/models/operations/getchangesreportsignedurlresponse.md +++ b/docs/models/operations/getchangesreportsignedurlresponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `signed_access` | [T.nilable(::OpenApiSDK::Operations::GetChangesReportSignedUrlSignedAccess)](../../models/operations/getchangesreportsignedurlsignedaccess.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `signed_access` | [T.nilable(Models::Operations::GetChangesReportSignedUrlSignedAccess)](../../models/operations/getchangesreportsignedurlsignedaccess.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getcodesamplepreviewasyncrequest.md b/docs/models/operations/getcodesamplepreviewasyncrequest.md new file mode 100644 index 00000000..b278fc3b --- /dev/null +++ b/docs/models/operations/getcodesamplepreviewasyncrequest.md @@ -0,0 +1,8 @@ +# GetCodeSamplePreviewAsyncRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `job_id` | *::String* | :heavy_check_mark: | The ID of the job to check the status and retrieve results | \ No newline at end of file diff --git a/docs/models/operations/getcodesamplepreviewasyncresponse.md b/docs/models/operations/getcodesamplepreviewasyncresponse.md new file mode 100644 index 00000000..3d00afc9 --- /dev/null +++ b/docs/models/operations/getcodesamplepreviewasyncresponse.md @@ -0,0 +1,12 @@ +# GetCodeSamplePreviewAsyncResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `usage_snippets` | [T.nilable(Models::Shared::UsageSnippets)](../../models/shared/usagesnippets.md) | :heavy_minus_sign: | OK | +| `object` | [T.nilable(Models::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/getcodesamplepreviewasyncresponsebody.md b/docs/models/operations/getcodesamplepreviewasyncresponsebody.md new file mode 100644 index 00000000..79bd0825 --- /dev/null +++ b/docs/models/operations/getcodesamplepreviewasyncresponsebody.md @@ -0,0 +1,10 @@ +# GetCodeSamplePreviewAsyncResponseBody + +Job is still in progress + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `status` | [Models::Shared::CodeSamplesJobStatus](../../models/shared/codesamplesjobstatus.md) | :heavy_check_mark: | The current status of the job. Possible values are `pending` or `running`. | \ No newline at end of file diff --git a/docs/models/operations/getembedaccesstokenrequest.md b/docs/models/operations/getembedaccesstokenrequest.md deleted file mode 100644 index 512d5fba..00000000 --- a/docs/models/operations/getembedaccesstokenrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetEmbedAccessTokenRequest - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the embed access token. | -| `duration` | *T.nilable(::Integer)* | :heavy_minus_sign: | The duration (in minutes) of the embed access token. | -| `filters` | [T.nilable(::OpenApiSDK::Shared::Filters)](../../models/shared/filters.md) | :heavy_minus_sign: | The filter to apply to the query. | \ No newline at end of file diff --git a/docs/models/operations/getembedaccesstokenresponse.md b/docs/models/operations/getembedaccesstokenresponse.md deleted file mode 100644 index 08cc9af6..00000000 --- a/docs/models/operations/getembedaccesstokenresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetEmbedAccessTokenResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `embed_access_token_response` | [T.nilable(::OpenApiSDK::Shared::EmbedAccessTokenResponse)](../../models/shared/embedaccesstokenresponse.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getgithubactionrequest.md b/docs/models/operations/getgithubactionrequest.md index 5be9ad5d..2060e909 100644 --- a/docs/models/operations/getgithubactionrequest.md +++ b/docs/models/operations/getgithubactionrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `target_name` | *T.nilable(::String)* | :heavy_minus_sign: | The targetName of the workflow target. | | `org` | *::String* | :heavy_check_mark: | N/A | -| `repo` | *::String* | :heavy_check_mark: | N/A | -| `target_name` | *T.nilable(::String)* | :heavy_minus_sign: | The targetName of the workflow target. | \ No newline at end of file +| `repo` | *::String* | :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 6baee957..0bf42d4f 100644 --- a/docs/models/operations/getgithubactionresponse.md +++ b/docs/models/operations/getgithubactionresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `github_get_action_response` | [T.nilable(::OpenApiSDK::Shared::GithubGetActionResponse)](../../models/shared/githubgetactionresponse.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `github_get_action_response` | [T.nilable(Models::Shared::GithubGetActionResponse)](../../models/shared/githubgetactionresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getgithubsetupstaterequest.md b/docs/models/operations/getgithubsetupstaterequest.md new file mode 100644 index 00000000..d03451cd --- /dev/null +++ b/docs/models/operations/getgithubsetupstaterequest.md @@ -0,0 +1,10 @@ +# GetGithubSetupStateRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `org` | *::String* | :heavy_check_mark: | N/A | +| `repo` | *::String* | :heavy_check_mark: | N/A | +| `generate_gen_lock_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getgithubsetupstateresponse.md b/docs/models/operations/getgithubsetupstateresponse.md new file mode 100644 index 00000000..506c56bb --- /dev/null +++ b/docs/models/operations/getgithubsetupstateresponse.md @@ -0,0 +1,11 @@ +# GetGithubSetupStateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `github_setup_state_response` | [T.nilable(Models::Shared::GithubSetupStateResponse)](../../models/shared/githubsetupstateresponse.md) | :heavy_minus_sign: | github setup state response | \ No newline at end of file diff --git a/docs/models/operations/getlintingreportsignedurlresponse.md b/docs/models/operations/getlintingreportsignedurlresponse.md index 950e81b6..506c64f6 100644 --- a/docs/models/operations/getlintingreportsignedurlresponse.md +++ b/docs/models/operations/getlintingreportsignedurlresponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `signed_access` | [T.nilable(::OpenApiSDK::Operations::GetLintingReportSignedUrlSignedAccess)](../../models/operations/getlintingreportsignedurlsignedaccess.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `signed_access` | [T.nilable(Models::Operations::GetLintingReportSignedUrlSignedAccess)](../../models/operations/getlintingreportsignedurlsignedaccess.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getmanifestresponse.md b/docs/models/operations/getmanifestresponse.md index 246440c8..a1eedd0e 100644 --- a/docs/models/operations/getmanifestresponse.md +++ b/docs/models/operations/getmanifestresponse.md @@ -8,5 +8,4 @@ | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | | | `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | -| `manifest` | [T.nilable(::OpenApiSDK::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
} | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | | \ No newline at end of file +| `manifest` | [T.nilable(Models::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 diff --git a/docs/models/operations/getnamespacesresponse.md b/docs/models/operations/getnamespacesresponse.md index 8197f593..c5097887 100644 --- a/docs/models/operations/getnamespacesresponse.md +++ b/docs/models/operations/getnamespacesresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `get_namespaces_response` | [T.nilable(::OpenApiSDK::Shared::GetNamespacesResponse)](../../models/shared/getnamespacesresponse.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `get_namespaces_response` | [T.nilable(Models::Shared::GetNamespacesResponse)](../../models/shared/getnamespacesresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getorganizationresponse.md b/docs/models/operations/getorganizationresponse.md index 86eba7eb..65921e16 100644 --- a/docs/models/operations/getorganizationresponse.md +++ b/docs/models/operations/getorganizationresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `organization` | [T.nilable(::OpenApiSDK::Shared::Organization)](../../models/shared/organization.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organization` | [T.nilable(Models::Shared::Organization)](../../models/shared/organization.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getorganizationsresponse.md b/docs/models/operations/getorganizationsresponse.md index 582eb36f..4fc6ac01 100644 --- a/docs/models/operations/getorganizationsresponse.md +++ b/docs/models/operations/getorganizationsresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `organizations` | T::Array<[::OpenApiSDK::Shared::Organization](../../models/shared/organization.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organizations` | T::Array<[Models::Shared::Organization](../../models/shared/organization.md)> | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getorganizationusageresponse.md b/docs/models/operations/getorganizationusageresponse.md index 995988cf..f42d0c6a 100644 --- a/docs/models/operations/getorganizationusageresponse.md +++ b/docs/models/operations/getorganizationusageresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `organization_usage_response` | [T.nilable(::OpenApiSDK::Shared::OrganizationUsageResponse)](../../models/shared/organizationusageresponse.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organization_usage_response` | [T.nilable(Models::Shared::OrganizationUsageResponse)](../../models/shared/organizationusageresponse.md) | :heavy_minus_sign: | OK | \ 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..c7e41b06 --- /dev/null +++ b/docs/models/operations/getpublishingtokenbyidrequest.md @@ -0,0 +1,8 @@ +# GetPublishingTokenByIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *::String* | :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..f98bc95d --- /dev/null +++ b/docs/models/operations/getpublishingtokenbyidresponse.md @@ -0,0 +1,11 @@ +# GetPublishingTokenByIDResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `publishing_token` | [T.nilable(Models::Shared::PublishingToken)](../../models/shared/publishingtoken.md) | :heavy_minus_sign: | OK | \ 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..d0da8d3e --- /dev/null +++ b/docs/models/operations/getpublishingtokenpublicmetadatarequest.md @@ -0,0 +1,8 @@ +# GetPublishingTokenPublicMetadataRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *::String* | :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..bd412b05 --- /dev/null +++ b/docs/models/operations/getpublishingtokenpublicmetadataresponse.md @@ -0,0 +1,11 @@ +# GetPublishingTokenPublicMetadataResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::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..2ea99443 --- /dev/null +++ b/docs/models/operations/getpublishingtokenpublicmetadataresponsebody.md @@ -0,0 +1,14 @@ +# GetPublishingTokenPublicMetadataResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `target_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `target_resource` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `valid_until` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :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..f9f8e5ca --- /dev/null +++ b/docs/models/operations/getpublishingtokenresponse.md @@ -0,0 +1,11 @@ +# GetPublishingTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `publishing_tokens` | T::Array<[Models::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..db6d28c8 --- /dev/null +++ b/docs/models/operations/getpublishingtokentargetbyidrequest.md @@ -0,0 +1,8 @@ +# GetPublishingTokenTargetByIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *::String* | :heavy_check_mark: | Unique identifier of the publishing token. | \ No newline at end of file diff --git a/docs/models/operations/deleteschemaresponse.md b/docs/models/operations/getpublishingtokentargetbyidresponse.md similarity index 81% rename from docs/models/operations/deleteschemaresponse.md rename to docs/models/operations/getpublishingtokentargetbyidresponse.md index d63efa13..f7ba7d9b 100644 --- a/docs/models/operations/deleteschemaresponse.md +++ b/docs/models/operations/getpublishingtokentargetbyidresponse.md @@ -1,4 +1,4 @@ -# DeleteSchemaResponse +# GetPublishingTokenTargetByIDResponse ## Fields @@ -8,4 +8,4 @@ | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | | `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `body` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getpublishingtokentargetbyidresponsebody.md b/docs/models/operations/getpublishingtokentargetbyidresponsebody.md new file mode 100644 index 00000000..4dfc06fb --- /dev/null +++ b/docs/models/operations/getpublishingtokentargetbyidresponsebody.md @@ -0,0 +1,9 @@ +# GetPublishingTokenTargetByIDResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/getrequestfromeventlogrequest.md b/docs/models/operations/getrequestfromeventlogrequest.md deleted file mode 100644 index d9e7a9a6..00000000 --- a/docs/models/operations/getrequestfromeventlogrequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetRequestFromEventLogRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `request_id` | *::String* | :heavy_check_mark: | The ID of the request to retrieve. | \ No newline at end of file diff --git a/docs/models/operations/getrequestfromeventlogresponse.md b/docs/models/operations/getrequestfromeventlogresponse.md deleted file mode 100644 index 45936e59..00000000 --- a/docs/models/operations/getrequestfromeventlogresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetRequestFromEventLogResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `unbounded_request` | [T.nilable(::OpenApiSDK::Shared::UnboundedRequest)](../../models/shared/unboundedrequest.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getrevisionsresponse.md b/docs/models/operations/getrevisionsresponse.md index e937930c..f42f0787 100644 --- a/docs/models/operations/getrevisionsresponse.md +++ b/docs/models/operations/getrevisionsresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `get_revisions_response` | [T.nilable(::OpenApiSDK::Shared::GetRevisionsResponse)](../../models/shared/getrevisionsresponse.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `get_revisions_response` | [T.nilable(Models::Shared::GetRevisionsResponse)](../../models/shared/getrevisionsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getschemadiffrequest.md b/docs/models/operations/getschemadiffrequest.md deleted file mode 100644 index e879ccf4..00000000 --- a/docs/models/operations/getschemadiffrequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSchemaDiffRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve schemas for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `base_revision_id` | *::String* | :heavy_check_mark: | The base revision ID of the schema to retrieve. | -| `target_revision_id` | *::String* | :heavy_check_mark: | The target revision ID of the schema to retrieve. | \ No newline at end of file diff --git a/docs/models/operations/getschemarequest.md b/docs/models/operations/getschemarequest.md deleted file mode 100644 index c71ddace..00000000 --- a/docs/models/operations/getschemarequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetSchemaRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to get the schema for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | \ No newline at end of file diff --git a/docs/models/operations/getschemaresponse.md b/docs/models/operations/getschemaresponse.md deleted file mode 100644 index 8b39cd88..00000000 --- a/docs/models/operations/getschemaresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetSchemaResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `schema` | [T.nilable(::OpenApiSDK::Shared::Schema)](../../models/shared/schema.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getschemarevisionrequest.md b/docs/models/operations/getschemarevisionrequest.md deleted file mode 100644 index a59e7b4f..00000000 --- a/docs/models/operations/getschemarevisionrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSchemaRevisionRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve schemas for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `revision_id` | *::String* | :heavy_check_mark: | The revision ID of the schema to retrieve. | \ No newline at end of file diff --git a/docs/models/operations/getschemarevisionresponse.md b/docs/models/operations/getschemarevisionresponse.md deleted file mode 100644 index befb4731..00000000 --- a/docs/models/operations/getschemarevisionresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetSchemaRevisionResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `schema` | [T.nilable(::OpenApiSDK::Shared::Schema)](../../models/shared/schema.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getschemasrequest.md b/docs/models/operations/getschemasrequest.md deleted file mode 100644 index 22d8aec9..00000000 --- a/docs/models/operations/getschemasrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetSchemasRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve schemas for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | \ No newline at end of file diff --git a/docs/models/operations/getschemasresponse.md b/docs/models/operations/getschemasresponse.md deleted file mode 100644 index 8f66a05e..00000000 --- a/docs/models/operations/getschemasresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetSchemasResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `schemata` | T::Array<[::OpenApiSDK::Shared::Schema](../../models/shared/schema.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ 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..a3e06d79 --- /dev/null +++ b/docs/models/operations/getschemastoreitemrequestbody.md @@ -0,0 +1,8 @@ +# GetSchemaStoreItemRequestBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/findapiendpointrequest.md b/docs/models/operations/getschemastoreitemresponse.md similarity index 54% rename from docs/models/operations/findapiendpointrequest.md rename to docs/models/operations/getschemastoreitemresponse.md index 8fed775a..9be6b526 100644 --- a/docs/models/operations/findapiendpointrequest.md +++ b/docs/models/operations/getschemastoreitemresponse.md @@ -1,10 +1,11 @@ -# FindApiEndpointRequest +# GetSchemaStoreItemResponse ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api the ApiEndpoint belongs to. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api the ApiEndpoint belongs to. | -| `display_name` | *::String* | :heavy_check_mark: | The displayName of the ApiEndpoint to find (set by operationId from OpenAPI schema). | \ No newline at end of file +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `schema_store_item` | [T.nilable(Models::Shared::SchemaStoreItem)](../../models/shared/schemastoreitem.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/gettagsresponse.md b/docs/models/operations/gettagsresponse.md index 151843c3..20b2a213 100644 --- a/docs/models/operations/gettagsresponse.md +++ b/docs/models/operations/gettagsresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `get_tags_response` | [T.nilable(::OpenApiSDK::Shared::GetTagsResponse)](../../models/shared/gettagsresponse.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `get_tags_response` | [T.nilable(Models::Shared::GetTagsResponse)](../../models/shared/gettagsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getuserresponse.md b/docs/models/operations/getuserresponse.md index 5dc10eb8..f4c29d15 100644 --- a/docs/models/operations/getuserresponse.md +++ b/docs/models/operations/getuserresponse.md @@ -8,5 +8,4 @@ | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | | `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `user` | [T.nilable(::OpenApiSDK::Shared::User)](../../models/shared/user.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `user` | [T.nilable(Models::Shared::User)](../../models/shared/user.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getvalidembedaccesstokensresponse.md b/docs/models/operations/getvalidembedaccesstokensresponse.md deleted file mode 100644 index f923a6bf..00000000 --- a/docs/models/operations/getvalidembedaccesstokensresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetValidEmbedAccessTokensResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `embed_tokens` | T::Array<[::OpenApiSDK::Shared::EmbedToken](../../models/shared/embedtoken.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getversionmetadatarequest.md b/docs/models/operations/getversionmetadatarequest.md deleted file mode 100644 index 369313b0..00000000 --- a/docs/models/operations/getversionmetadatarequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetVersionMetadataRequest - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve metadata for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to retrieve metadata for. | \ No newline at end of file diff --git a/docs/models/operations/getversionmetadataresponse.md b/docs/models/operations/getversionmetadataresponse.md deleted file mode 100644 index ed2f5934..00000000 --- a/docs/models/operations/getversionmetadataresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetVersionMetadataResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `version_metadata` | T::Array<[::OpenApiSDK::Shared::VersionMetadata](../../models/shared/versionmetadata.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/getworkspaceaccessresponse.md b/docs/models/operations/getworkspaceaccessresponse.md index ef20d366..f8d4216e 100644 --- a/docs/models/operations/getworkspaceaccessresponse.md +++ b/docs/models/operations/getworkspaceaccessresponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `access_details` | [T.nilable(::OpenApiSDK::Shared::AccessDetails)](../../models/shared/accessdetails.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `access_details` | [T.nilable(Models::Shared::AccessDetails)](../../models/shared/accessdetails.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getworkspacebycontextresponse.md b/docs/models/operations/getworkspacebycontextresponse.md index ca86b4a3..e678606f 100644 --- a/docs/models/operations/getworkspacebycontextresponse.md +++ b/docs/models/operations/getworkspacebycontextresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `workspace_and_organization` | [T.nilable(::OpenApiSDK::Shared::WorkspaceAndOrganization)](../../models/shared/workspaceandorganization.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspace_and_organization` | [T.nilable(Models::Shared::WorkspaceAndOrganization)](../../models/shared/workspaceandorganization.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getworkspaceeventsbytargetrequest.md b/docs/models/operations/getworkspaceeventsbytargetrequest.md index b0a90fc2..706975c0 100644 --- a/docs/models/operations/getworkspaceeventsbytargetrequest.md +++ b/docs/models/operations/getworkspaceeventsbytargetrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | | `target_id` | *::String* | :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://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :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 faf2ea58..2d86d161 100644 --- a/docs/models/operations/getworkspaceeventsbytargetresponse.md +++ b/docs/models/operations/getworkspaceeventsbytargetresponse.md @@ -8,5 +8,4 @@ | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | | `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `cli_event_batch` | T::Array<[::OpenApiSDK::Shared::CliEvent](../../models/shared/clievent.md)> | :heavy_minus_sign: | Success | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file +| `cli_event_batch` | T::Array<[Models::Shared::CliEvent](../../models/shared/clievent.md)> | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/getworkspacefeatureflagsrequest.md b/docs/models/operations/getworkspacefeatureflagsrequest.md index 4c390a79..b77bff7e 100644 --- a/docs/models/operations/getworkspacefeatureflagsrequest.md +++ b/docs/models/operations/getworkspacefeatureflagsrequest.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file diff --git a/docs/models/operations/getworkspacefeatureflagsresponse.md b/docs/models/operations/getworkspacefeatureflagsresponse.md index f69f9e10..c2240f1e 100644 --- a/docs/models/operations/getworkspacefeatureflagsresponse.md +++ b/docs/models/operations/getworkspacefeatureflagsresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `workspace_feature_flag_response` | [T.nilable(::OpenApiSDK::Shared::WorkspaceFeatureFlagResponse)](../../models/shared/workspacefeatureflagresponse.md) | :heavy_minus_sign: | Success | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspace_feature_flag_response` | [T.nilable(Models::Shared::WorkspaceFeatureFlagResponse)](../../models/shared/workspacefeatureflagresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/getworkspacerequest.md b/docs/models/operations/getworkspacerequest.md index bd2dfab1..a0627571 100644 --- a/docs/models/operations/getworkspacerequest.md +++ b/docs/models/operations/getworkspacerequest.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file diff --git a/docs/models/operations/getworkspaceresponse.md b/docs/models/operations/getworkspaceresponse.md index 3734d33c..c3af627d 100644 --- a/docs/models/operations/getworkspaceresponse.md +++ b/docs/models/operations/getworkspaceresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `workspace` | [T.nilable(::OpenApiSDK::Shared::Workspace)](../../models/shared/workspace.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspace` | [T.nilable(Models::Shared::Workspace)](../../models/shared/workspace.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getworkspacesettingsrequest.md b/docs/models/operations/getworkspacesettingsrequest.md index 411e9296..299ea4a6 100644 --- a/docs/models/operations/getworkspacesettingsrequest.md +++ b/docs/models/operations/getworkspacesettingsrequest.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file diff --git a/docs/models/operations/getworkspacesettingsresponse.md b/docs/models/operations/getworkspacesettingsresponse.md index e6e21b8e..dac52d65 100644 --- a/docs/models/operations/getworkspacesettingsresponse.md +++ b/docs/models/operations/getworkspacesettingsresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `workspace_settings` | [T.nilable(::OpenApiSDK::Shared::WorkspaceSettings)](../../models/shared/workspacesettings.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspace_settings` | [T.nilable(Models::Shared::WorkspaceSettings)](../../models/shared/workspacesettings.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getworkspacesresponse.md b/docs/models/operations/getworkspacesresponse.md index 70a38dd7..20ec4f36 100644 --- a/docs/models/operations/getworkspacesresponse.md +++ b/docs/models/operations/getworkspacesresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `workspaces` | T::Array<[::OpenApiSDK::Shared::Workspace](../../models/shared/workspace.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspaces` | T::Array<[Models::Shared::Workspace](../../models/shared/workspace.md)> | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getworkspacetargetsdeprecatedrequest.md b/docs/models/operations/getworkspacetargetsdeprecatedrequest.md index b88ff4d1..57244948 100644 --- a/docs/models/operations/getworkspacetargetsdeprecatedrequest.md +++ b/docs/models/operations/getworkspacetargetsdeprecatedrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | | `after_last_event_created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Filter to only return targets with events created after this timestamp | \ No newline at end of file diff --git a/docs/models/operations/getworkspacetargetsdeprecatedresponse.md b/docs/models/operations/getworkspacetargetsdeprecatedresponse.md index db7206e4..4d470a88 100644 --- a/docs/models/operations/getworkspacetargetsdeprecatedresponse.md +++ b/docs/models/operations/getworkspacetargetsdeprecatedresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `target_sdk_list` | T::Array<[::OpenApiSDK::Shared::TargetSDK](../../models/shared/targetsdk.md)> | :heavy_minus_sign: | Success | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `target_sdk_list` | T::Array<[Models::Shared::TargetSDK](../../models/shared/targetsdk.md)> | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/getworkspacetargetsresponse.md b/docs/models/operations/getworkspacetargetsresponse.md index cf172a5c..358fc3f4 100644 --- a/docs/models/operations/getworkspacetargetsresponse.md +++ b/docs/models/operations/getworkspacetargetsresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `target_sdk_list` | T::Array<[::OpenApiSDK::Shared::TargetSDK](../../models/shared/targetsdk.md)> | :heavy_minus_sign: | Success | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `target_sdk_list` | T::Array<[Models::Shared::TargetSDK](../../models/shared/targetsdk.md)> | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/getworkspaceteamrequest.md b/docs/models/operations/getworkspaceteamrequest.md index a1bd684d..2e35887e 100644 --- a/docs/models/operations/getworkspaceteamrequest.md +++ b/docs/models/operations/getworkspaceteamrequest.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file diff --git a/docs/models/operations/getworkspaceteamresponse.md b/docs/models/operations/getworkspaceteamresponse.md index 3f289928..3a737865 100644 --- a/docs/models/operations/getworkspaceteamresponse.md +++ b/docs/models/operations/getworkspaceteamresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `workspace_team_response` | [T.nilable(::OpenApiSDK::Shared::WorkspaceTeamResponse)](../../models/shared/workspaceteamresponse.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspace_team_response` | [T.nilable(Models::Shared::WorkspaceTeamResponse)](../../models/shared/workspaceteamresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getworkspacetokensrequest.md b/docs/models/operations/getworkspacetokensrequest.md index 79b37c35..f77cf992 100644 --- a/docs/models/operations/getworkspacetokensrequest.md +++ b/docs/models/operations/getworkspacetokensrequest.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | \ No newline at end of file +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file diff --git a/docs/models/operations/getworkspacetokensresponse.md b/docs/models/operations/getworkspacetokensresponse.md index 18a02f96..66698835 100644 --- a/docs/models/operations/getworkspacetokensresponse.md +++ b/docs/models/operations/getworkspacetokensresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `workspace_tokens` | T::Array<[::OpenApiSDK::Shared::WorkspaceToken](../../models/shared/workspacetoken.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspace_tokens` | T::Array<[Models::Shared::WorkspaceToken](../../models/shared/workspacetoken.md)> | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/githubcheckpublishingprsresponse.md b/docs/models/operations/githubcheckpublishingprsresponse.md index 31aad293..07022f6c 100644 --- a/docs/models/operations/githubcheckpublishingprsresponse.md +++ b/docs/models/operations/githubcheckpublishingprsresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `github_publishing_pr_response` | [T.nilable(::OpenApiSDK::Shared::GithubPublishingPRResponse)](../../models/shared/githubpublishingprresponse.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `github_publishing_pr_response` | [T.nilable(Models::Shared::GithubPublishingPRResponse)](../../models/shared/githubpublishingprresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/githubcheckpublishingsecretsresponse.md b/docs/models/operations/githubcheckpublishingsecretsresponse.md index e3088a8a..27941aa4 100644 --- a/docs/models/operations/githubcheckpublishingsecretsresponse.md +++ b/docs/models/operations/githubcheckpublishingsecretsresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `github_missing_publishing_secrets_response` | [T.nilable(::OpenApiSDK::Shared::GithubMissingPublishingSecretsResponse)](../../models/shared/githubmissingpublishingsecretsresponse.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `github_missing_publishing_secrets_response` | [T.nilable(Models::Shared::GithubMissingPublishingSecretsResponse)](../../models/shared/githubmissingpublishingsecretsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/githubconfigurecodesamplesresponse.md b/docs/models/operations/githubconfigurecodesamplesresponse.md index a94a29a5..5ba55b39 100644 --- a/docs/models/operations/githubconfigurecodesamplesresponse.md +++ b/docs/models/operations/githubconfigurecodesamplesresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `github_configure_code_samples_response` | [T.nilable(::OpenApiSDK::Shared::GithubConfigureCodeSamplesResponse)](../../models/shared/githubconfigurecodesamplesresponse.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `github_configure_code_samples_response` | [T.nilable(Models::Shared::GithubConfigureCodeSamplesResponse)](../../models/shared/githubconfigurecodesamplesresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/githubconfiguremintlifyreporesponse.md b/docs/models/operations/githubconfiguremintlifyreporesponse.md index c0565830..7b994e32 100644 --- a/docs/models/operations/githubconfiguremintlifyreporesponse.md +++ b/docs/models/operations/githubconfiguremintlifyreporesponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/githubconfiguretargetresponse.md b/docs/models/operations/githubconfiguretargetresponse.md index c80bd3f0..a47aff34 100644 --- a/docs/models/operations/githubconfiguretargetresponse.md +++ b/docs/models/operations/githubconfiguretargetresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/githubstorepublishingsecretsresponse.md b/docs/models/operations/githubstorepublishingsecretsresponse.md index 4dea51cc..b1049a9a 100644 --- a/docs/models/operations/githubstorepublishingsecretsresponse.md +++ b/docs/models/operations/githubstorepublishingsecretsresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/githubtriggeractionresponse.md b/docs/models/operations/githubtriggeractionresponse.md index 505f8596..c27aa142 100644 --- a/docs/models/operations/githubtriggeractionresponse.md +++ b/docs/models/operations/githubtriggeractionresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/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 04dcd5a5..9fce15c4 100644 --- a/docs/models/operations/grantuseraccesstoworkspacerequest.md +++ b/docs/models/operations/grantuseraccesstoworkspacerequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | | `email` | *::String* | :heavy_check_mark: | Email of the user to grant access to. | \ No newline at end of file diff --git a/docs/models/operations/grantuseraccesstoworkspaceresponse.md b/docs/models/operations/grantuseraccesstoworkspaceresponse.md index 9f4f1dbc..1c2d2b16 100644 --- a/docs/models/operations/grantuseraccesstoworkspaceresponse.md +++ b/docs/models/operations/grantuseraccesstoworkspaceresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `workspace_invite_response` | [T.nilable(::OpenApiSDK::Shared::WorkspaceInviteResponse)](../../models/shared/workspaceinviteresponse.md) | :heavy_minus_sign: | Success | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspace_invite_response` | [T.nilable(Models::Shared::WorkspaceInviteResponse)](../../models/shared/workspaceinviteresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/ignoresubscriptionnamespacerequest.md b/docs/models/operations/ignoresubscriptionnamespacerequest.md new file mode 100644 index 00000000..835588e6 --- /dev/null +++ b/docs/models/operations/ignoresubscriptionnamespacerequest.md @@ -0,0 +1,9 @@ +# IgnoreSubscriptionNamespaceRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `subscription_id` | *::String* | :heavy_check_mark: | The existing subscription ID | +| `namespace_name` | *::String* | :heavy_check_mark: | The namespace name | \ No newline at end of file diff --git a/docs/models/operations/ignoresubscriptionnamespaceresponse.md b/docs/models/operations/ignoresubscriptionnamespaceresponse.md new file mode 100644 index 00000000..f2479afa --- /dev/null +++ b/docs/models/operations/ignoresubscriptionnamespaceresponse.md @@ -0,0 +1,10 @@ +# IgnoreSubscriptionNamespaceResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/insertversionmetadatarequest.md b/docs/models/operations/insertversionmetadatarequest.md deleted file mode 100644 index 227dc67d..00000000 --- a/docs/models/operations/insertversionmetadatarequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# InsertVersionMetadataRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to insert metadata for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to insert metadata for. | -| `version_metadata` | [::OpenApiSDK::Shared::VersionMetadataInput](../../models/shared/versionmetadatainput.md) | :heavy_check_mark: | A JSON representation of the metadata to insert. | \ No newline at end of file diff --git a/docs/models/operations/insertversionmetadataresponse.md b/docs/models/operations/insertversionmetadataresponse.md deleted file mode 100644 index 6fd852f7..00000000 --- a/docs/models/operations/insertversionmetadataresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# InsertVersionMetadataResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `version_metadata` | [T.nilable(::OpenApiSDK::Shared::VersionMetadata)](../../models/shared/versionmetadata.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/shared/requestmetadata.md b/docs/models/operations/linkgithubaccessrequest.md similarity index 52% rename from docs/models/shared/requestmetadata.md rename to docs/models/operations/linkgithubaccessrequest.md index d3fc715d..1e20536d 100644 --- a/docs/models/shared/requestmetadata.md +++ b/docs/models/operations/linkgithubaccessrequest.md @@ -1,11 +1,10 @@ -# RequestMetadata - -Key-Value pairs associated with a request +# LinkGithubAccessRequest ## Fields | Field | Type | Required | Description | | --------------------- | --------------------- | --------------------- | --------------------- | -| `key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `value` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `installation_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `github_org` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `github_oidc_token` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/linkgithubaccessresponse.md b/docs/models/operations/linkgithubaccessresponse.md new file mode 100644 index 00000000..50132ed5 --- /dev/null +++ b/docs/models/operations/linkgithubaccessresponse.md @@ -0,0 +1,10 @@ +# LinkGithubAccessResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/shared/generateopenapispecdiff.md b/docs/models/operations/listremotesourcesrequest.md similarity index 53% rename from docs/models/shared/generateopenapispecdiff.md rename to docs/models/operations/listremotesourcesrequest.md index 61d07f9a..7b7c0bff 100644 --- a/docs/models/shared/generateopenapispecdiff.md +++ b/docs/models/operations/listremotesourcesrequest.md @@ -1,9 +1,8 @@ -# GenerateOpenApiSpecDiff +# ListRemoteSourcesRequest ## Fields | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `current_schema` | *::String* | :heavy_check_mark: | N/A | -| `new_schema` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listremotesourcesresponse.md b/docs/models/operations/listremotesourcesresponse.md new file mode 100644 index 00000000..f2956c70 --- /dev/null +++ b/docs/models/operations/listremotesourcesresponse.md @@ -0,0 +1,11 @@ +# ListRemoteSourcesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `remote_source` | [T.nilable(Models::Shared::RemoteSource)](../../models/shared/remotesource.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/op.md b/docs/models/operations/op.md deleted file mode 100644 index 6ca68a6e..00000000 --- a/docs/models/operations/op.md +++ /dev/null @@ -1,10 +0,0 @@ -# Op - -Configuration for filter operations - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `and_` | *T::Boolean* | :heavy_check_mark: | Whether to AND or OR the filters | \ No newline at end of file diff --git a/docs/models/operations/posttagsrequest.md b/docs/models/operations/posttagsrequest.md index ffcebfd7..c150e5b1 100644 --- a/docs/models/operations/posttagsrequest.md +++ b/docs/models/operations/posttagsrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `namespace_name` | *::String* | :heavy_check_mark: | N/A | -| `add_tags` | [T.nilable(::OpenApiSDK::Shared::AddTags)](../../models/shared/addtags.md) | :heavy_minus_sign: | A JSON representation of the tags to add | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | +| `add_tags` | [T.nilable(Models::Shared::AddTags)](../../models/shared/addtags.md) | :heavy_minus_sign: | A JSON representation of the tags to add | \ No newline at end of file diff --git a/docs/models/operations/posttagsresponse.md b/docs/models/operations/posttagsresponse.md index f85e0230..73ef647f 100644 --- a/docs/models/operations/posttagsresponse.md +++ b/docs/models/operations/posttagsresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/postworkspaceeventsrequest.md b/docs/models/operations/postworkspaceeventsrequest.md index e7bd160e..5d3b0184 100644 --- a/docs/models/operations/postworkspaceeventsrequest.md +++ b/docs/models/operations/postworkspaceeventsrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | -| `request_body` | T::Array<[::OpenApiSDK::Shared::CliEvent](../../models/shared/clievent.md)> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `request_body` | T::Array<[Models::Shared::CliEvent](../../models/shared/clievent.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postworkspaceeventsresponse.md b/docs/models/operations/postworkspaceeventsresponse.md index fa2aad59..79b4c2e1 100644 --- a/docs/models/operations/postworkspaceeventsresponse.md +++ b/docs/models/operations/postworkspaceeventsresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/preflightresponse.md b/docs/models/operations/preflightresponse.md index e9bf78a7..12f702ad 100644 --- a/docs/models/operations/preflightresponse.md +++ b/docs/models/operations/preflightresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `preflight_token` | [T.nilable(::OpenApiSDK::Shared::PreflightToken)](../../models/shared/preflighttoken.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `preflight_token` | [T.nilable(Models::Shared::PreflightToken)](../../models/shared/preflighttoken.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/queryeventlogrequest.md b/docs/models/operations/queryeventlogrequest.md deleted file mode 100644 index ff226e6c..00000000 --- a/docs/models/operations/queryeventlogrequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# QueryEventLogRequest - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `filters` | [T.nilable(::OpenApiSDK::Shared::Filters)](../../models/shared/filters.md) | :heavy_minus_sign: | The filter to apply to the query. | \ No newline at end of file diff --git a/docs/models/operations/queryeventlogresponse.md b/docs/models/operations/queryeventlogresponse.md deleted file mode 100644 index ae816898..00000000 --- a/docs/models/operations/queryeventlogresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryEventLogResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `bounded_requests` | T::Array<[::OpenApiSDK::Shared::BoundedRequest](../../models/shared/boundedrequest.md)> | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/queryparamop.md b/docs/models/operations/queryparamop.md deleted file mode 100644 index ef6cf316..00000000 --- a/docs/models/operations/queryparamop.md +++ /dev/null @@ -1,10 +0,0 @@ -# QueryParamOp - -Configuration for filter operations - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `and_` | *T::Boolean* | :heavy_check_mark: | Whether to AND or OR the filters | \ No newline at end of file diff --git a/docs/models/operations/registerschemarequest.md b/docs/models/operations/registerschemarequest.md deleted file mode 100644 index daf893b5..00000000 --- a/docs/models/operations/registerschemarequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# RegisterSchemaRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to get the schema for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `request_body` | [::OpenApiSDK::Operations::RegisterSchemaRequestBody](../../models/operations/registerschemarequestbody.md) | :heavy_check_mark: | The schema file to upload provided as a multipart/form-data file segment. | \ No newline at end of file diff --git a/docs/models/operations/registerschemarequestbody.md b/docs/models/operations/registerschemarequestbody.md deleted file mode 100644 index 8ce7b0ad..00000000 --- a/docs/models/operations/registerschemarequestbody.md +++ /dev/null @@ -1,10 +0,0 @@ -# RegisterSchemaRequestBody - -The schema file to upload provided as a multipart/form-data file segment. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `file` | [::OpenApiSDK::Operations::File](../../models/operations/file.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/revokeembedaccesstokenrequest.md b/docs/models/operations/revokeembedaccesstokenrequest.md deleted file mode 100644 index dcf707a4..00000000 --- a/docs/models/operations/revokeembedaccesstokenrequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# RevokeEmbedAccessTokenRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `token_id` | *::String* | :heavy_check_mark: | The ID of the EmbedToken to revoke. | \ No newline at end of file diff --git a/docs/models/operations/revokeembedaccesstokenresponse.md b/docs/models/operations/revokeembedaccesstokenresponse.md deleted file mode 100644 index dc7a725b..00000000 --- a/docs/models/operations/revokeembedaccesstokenresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# RevokeEmbedAccessTokenResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/revokeuseraccesstoworkspacerequest.md b/docs/models/operations/revokeuseraccesstoworkspacerequest.md index 8b802498..5af855ee 100644 --- a/docs/models/operations/revokeuseraccesstoworkspacerequest.md +++ b/docs/models/operations/revokeuseraccesstoworkspacerequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | | `user_id` | *::String* | :heavy_check_mark: | Unique identifier of the user. | \ No newline at end of file diff --git a/docs/models/operations/revokeuseraccesstoworkspaceresponse.md b/docs/models/operations/revokeuseraccesstoworkspaceresponse.md index babe8e11..b22df3fd 100644 --- a/docs/models/operations/revokeuseraccesstoworkspaceresponse.md +++ b/docs/models/operations/revokeuseraccesstoworkspaceresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/searchworkspaceeventsrequest.md b/docs/models/operations/searchworkspaceeventsrequest.md index 984165b3..9f695299 100644 --- a/docs/models/operations/searchworkspaceeventsrequest.md +++ b/docs/models/operations/searchworkspaceeventsrequest.md @@ -3,11 +3,14 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | -| `source_revision_digest` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the source revision digest. | -| `lint_report_digest` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the lint report digest. | -| `openapi_diff_report_digest` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the openapi diff report digest. | -| `interaction_type` | [T.nilable(::OpenApiSDK::Shared::InteractionType)](../../models/shared/interactiontype.md) | :heavy_minus_sign: | Specified interaction type for events. | -| `generate_gen_lock_id` | *T.nilable(::String)* | :heavy_minus_sign: | A specific gen lock ID for the events. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `source_revision_digest` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the source revision digest. | +| `lint_report_digest` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the lint report digest. | +| `openapi_diff_report_digest` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the openapi diff report digest. | +| `interaction_type` | [T.nilable(Models::Shared::InteractionType)](../../models/shared/interactiontype.md) | :heavy_minus_sign: | Specified interaction type for events. | +| `generate_gen_lock_id` | *T.nilable(::String)* | :heavy_minus_sign: | A specific gen lock ID for the events. | +| `execution_id` | *T.nilable(::String)* | :heavy_minus_sign: | Shared execution ID for cli events across a single action. | +| `success` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether the event was successful or not. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Number of results to return. | \ No newline at end of file diff --git a/docs/models/operations/searchworkspaceeventsresponse.md b/docs/models/operations/searchworkspaceeventsresponse.md index 2ffba4d9..ea755e79 100644 --- a/docs/models/operations/searchworkspaceeventsresponse.md +++ b/docs/models/operations/searchworkspaceeventsresponse.md @@ -8,5 +8,4 @@ | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | | `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `cli_event_batch` | T::Array<[::OpenApiSDK::Shared::CliEvent](../../models/shared/clievent.md)> | :heavy_minus_sign: | Success | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file +| `cli_event_batch` | T::Array<[Models::Shared::CliEvent](../../models/shared/clievent.md)> | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/setvisibilityrequest.md b/docs/models/operations/setvisibilityrequest.md new file mode 100644 index 00000000..d8e2d95c --- /dev/null +++ b/docs/models/operations/setvisibilityrequest.md @@ -0,0 +1,9 @@ +# SetVisibilityRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | +| `request_body` | [T.nilable(Models::Operations::SetVisibilityRequestBody)](../../models/operations/setvisibilityrequestbody.md) | :heavy_minus_sign: | Namespace visibility | \ No newline at end of file diff --git a/docs/models/shared/embedaccesstokenresponse.md b/docs/models/operations/setvisibilityrequestbody.md similarity index 52% rename from docs/models/shared/embedaccesstokenresponse.md rename to docs/models/operations/setvisibilityrequestbody.md index 8f26e8c8..6e7a23bd 100644 --- a/docs/models/shared/embedaccesstokenresponse.md +++ b/docs/models/operations/setvisibilityrequestbody.md @@ -1,10 +1,10 @@ -# EmbedAccessTokenResponse +# SetVisibilityRequestBody -An EmbedAccessTokenResponse contains a token that can be used to embed a Speakeasy dashboard. +Namespace visibility ## Fields | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `access_token` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file +| `public` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/setvisibilityresponse.md b/docs/models/operations/setvisibilityresponse.md new file mode 100644 index 00000000..0528e1a9 --- /dev/null +++ b/docs/models/operations/setvisibilityresponse.md @@ -0,0 +1,10 @@ +# SetVisibilityResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/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..be6fff43 --- /dev/null +++ b/docs/models/operations/setworkspacefeatureflagsresponse.md @@ -0,0 +1,11 @@ +# SetWorkspaceFeatureFlagsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workspace_feature_flag_response` | [T.nilable(Models::Shared::WorkspaceFeatureFlagResponse)](../../models/shared/workspacefeatureflagresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/suggestitemsresponse.md b/docs/models/operations/suggestitemsresponse.md new file mode 100644 index 00000000..64008972 --- /dev/null +++ b/docs/models/operations/suggestitemsresponse.md @@ -0,0 +1,11 @@ +# SuggestItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `strings` | T::Array<*::String*> | :heavy_minus_sign: | One suggestion per item. Guaranteed to be the same length as the input items. | \ No newline at end of file diff --git a/docs/models/operations/suggestopenapiregistryrequest.md b/docs/models/operations/suggestopenapiregistryrequest.md index 2e67897c..35fc669f 100644 --- a/docs/models/operations/suggestopenapiregistryrequest.md +++ b/docs/models/operations/suggestopenapiregistryrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `x_session_id` | *::String* | :heavy_check_mark: | N/A | -| `namespace_name` | *::String* | :heavy_check_mark: | N/A | -| `revision_reference` | *::String* | :heavy_check_mark: | Tag or digest | -| `suggest_request_body` | [T.nilable(::OpenApiSDK::Shared::SuggestRequestBody)](../../models/shared/suggestrequestbody.md) | :heavy_minus_sign: | Suggest options | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `x_session_id` | *::String* | :heavy_check_mark: | N/A | +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | +| `revision_reference` | *::String* | :heavy_check_mark: | Tag or digest | +| `suggest_request_body` | [T.nilable(Models::Shared::SuggestRequestBody)](../../models/shared/suggestrequestbody.md) | :heavy_minus_sign: | Suggest options | \ No newline at end of file diff --git a/docs/models/operations/suggestopenapirequest.md b/docs/models/operations/suggestopenapirequest.md index 760d92a0..5e323fd8 100644 --- a/docs/models/operations/suggestopenapirequest.md +++ b/docs/models/operations/suggestopenapirequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `x_session_id` | *::String* | :heavy_check_mark: | N/A | -| `request_body` | [::OpenApiSDK::Operations::SuggestOpenAPIRequestBody](../../models/operations/suggestopenapirequestbody.md) | :heavy_check_mark: | The schema file to upload provided as a multipart/form-data file segment. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `x_session_id` | *::String* | :heavy_check_mark: | N/A | +| `request_body` | [Models::Operations::SuggestOpenAPIRequestBody](../../models/operations/suggestopenapirequestbody.md) | :heavy_check_mark: | The schema file to upload provided as a multipart/form-data file segment. | \ No newline at end of file diff --git a/docs/models/operations/suggestopenapirequestbody.md b/docs/models/operations/suggestopenapirequestbody.md index 6d971801..8345f525 100644 --- a/docs/models/operations/suggestopenapirequestbody.md +++ b/docs/models/operations/suggestopenapirequestbody.md @@ -5,7 +5,7 @@ The schema file to upload provided as a multipart/form-data file segment. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `opts` | [T.nilable(::OpenApiSDK::Shared::SuggestOptsOld)](../../models/shared/suggestoptsold.md) | :heavy_minus_sign: | N/A | -| `schema` | [::OpenApiSDK::Operations::Schema](../../models/operations/schema.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `opts` | [T.nilable(Models::Shared::SuggestOptsOld)](../../models/shared/suggestoptsold.md) | :heavy_minus_sign: | N/A | +| `schema` | [Models::Operations::Schema](../../models/operations/schema.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/suggestrequest.md b/docs/models/operations/suggestrequest.md index 148aa174..b0374a7c 100644 --- a/docs/models/operations/suggestrequest.md +++ b/docs/models/operations/suggestrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `x_session_id` | *::String* | :heavy_check_mark: | N/A | -| `suggest_request_body` | [::OpenApiSDK::Shared::SuggestRequestBody](../../models/shared/suggestrequestbody.md) | :heavy_check_mark: | The OAS summary and diagnostics to use for the suggestion. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `x_session_id` | *::String* | :heavy_check_mark: | N/A | +| `suggest_request_body` | [Models::Shared::SuggestRequestBody](../../models/shared/suggestrequestbody.md) | :heavy_check_mark: | The OAS summary and diagnostics to use for the suggestion. | \ 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..5f47a728 --- /dev/null +++ b/docs/models/operations/updatepublishingtokenexpirationrequest.md @@ -0,0 +1,9 @@ +# UpdatePublishingTokenExpirationRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `token_id` | *::String* | :heavy_check_mark: | Unique identifier of the publishing token. | +| `request_body` | [T.nilable(Models::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..377d985c --- /dev/null +++ b/docs/models/operations/updatepublishingtokenexpirationrequestbody.md @@ -0,0 +1,11 @@ +# UpdatePublishingTokenExpirationRequestBody + +The publishing token to update + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `valid_until` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The new expiration date for the publishing token. | +| `token_name` | *T.nilable(::String)* | :heavy_minus_sign: | The new name 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..ef44fffc --- /dev/null +++ b/docs/models/operations/updatepublishingtokenexpirationresponse.md @@ -0,0 +1,10 @@ +# UpdatePublishingTokenExpirationResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/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 46b5c000..808c6469 100644 --- a/docs/models/operations/updateworkspacedetailsrequest.md +++ b/docs/models/operations/updateworkspacedetailsrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | -| `workspace` | [::OpenApiSDK::Shared::Workspace](../../models/shared/workspace.md) | :heavy_check_mark: | The workspace details to update. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `workspace` | [Models::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/updateworkspacedetailsresponse.md b/docs/models/operations/updateworkspacedetailsresponse.md index 7a1829dc..174059f5 100644 --- a/docs/models/operations/updateworkspacedetailsresponse.md +++ b/docs/models/operations/updateworkspacedetailsresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/updateworkspacesettingsrequest.md b/docs/models/operations/updateworkspacesettingsrequest.md index e792b9db..a08f7a19 100644 --- a/docs/models/operations/updateworkspacesettingsrequest.md +++ b/docs/models/operations/updateworkspacesettingsrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | -| `workspace_settings` | [::OpenApiSDK::Shared::WorkspaceSettings](../../models/shared/workspacesettings.md) | :heavy_check_mark: | The workspace settings to update. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | +| `workspace_settings` | [Models::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/updateworkspacesettingsresponse.md b/docs/models/operations/updateworkspacesettingsresponse.md index 6f188f65..f7e3cbae 100644 --- a/docs/models/operations/updateworkspacesettingsresponse.md +++ b/docs/models/operations/updateworkspacesettingsresponse.md @@ -7,5 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/uploadreportrequestbody.md b/docs/models/operations/uploadreportrequestbody.md index 473cc8bf..add498c3 100644 --- a/docs/models/operations/uploadreportrequestbody.md +++ b/docs/models/operations/uploadreportrequestbody.md @@ -5,7 +5,7 @@ The report file to upload provided as a multipart/form-data file segment. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `data` | [::OpenApiSDK::Shared::Report](../../models/shared/report.md) | :heavy_check_mark: | N/A | -| `file` | [::OpenApiSDK::Operations::UploadReportFile](../../models/operations/uploadreportfile.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `data` | [Models::Shared::Report](../../models/shared/report.md) | :heavy_check_mark: | N/A | +| `file` | [Models::Operations::File](../../models/operations/file.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/uploadreportresponse.md b/docs/models/operations/uploadreportresponse.md index cc9a858b..3657f585 100644 --- a/docs/models/operations/uploadreportresponse.md +++ b/docs/models/operations/uploadreportresponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `uploaded_report` | [T.nilable(::OpenApiSDK::Operations::UploadReportUploadedReport)](../../models/operations/uploadreportuploadedreport.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `uploaded_report` | [T.nilable(Models::Operations::UploadReportUploadedReport)](../../models/operations/uploadreportuploadedreport.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/upsertapiendpointrequest.md b/docs/models/operations/upsertapiendpointrequest.md deleted file mode 100644 index 3ced2532..00000000 --- a/docs/models/operations/upsertapiendpointrequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpsertApiEndpointRequest - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api the ApiEndpoint belongs to. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api the ApiEndpoint belongs to. | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint to upsert. | -| `api_endpoint` | [::OpenApiSDK::Shared::ApiEndpointInput](../../models/shared/apiendpointinput.md) | :heavy_check_mark: | A JSON representation of the ApiEndpoint to upsert. | \ No newline at end of file diff --git a/docs/models/operations/upsertapiendpointresponse.md b/docs/models/operations/upsertapiendpointresponse.md deleted file mode 100644 index d795dc1f..00000000 --- a/docs/models/operations/upsertapiendpointresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpsertApiEndpointResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `api_endpoint` | [T.nilable(::OpenApiSDK::Shared::ApiEndpoint)](../../models/shared/apiendpoint.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/upsertapirequest.md b/docs/models/operations/upsertapirequest.md deleted file mode 100644 index 7febc624..00000000 --- a/docs/models/operations/upsertapirequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpsertApiRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to upsert. | -| `api` | [::OpenApiSDK::Shared::ApiInput](../../models/shared/apiinput.md) | :heavy_check_mark: | A JSON representation of the Api to upsert | \ No newline at end of file diff --git a/docs/models/operations/upsertapiresponse.md b/docs/models/operations/upsertapiresponse.md deleted file mode 100644 index c423c33f..00000000 --- a/docs/models/operations/upsertapiresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpsertApiResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `api` | [T.nilable(::OpenApiSDK::Shared::Api)](../../models/shared/api.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file diff --git a/docs/models/operations/validateapikeyresponse.md b/docs/models/operations/validateapikeyresponse.md index 7a2a82bd..96652aa1 100644 --- a/docs/models/operations/validateapikeyresponse.md +++ b/docs/models/operations/validateapikeyresponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | -| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `api_key_details` | [T.nilable(::OpenApiSDK::Shared::ApiKeyDetails)](../../models/shared/apikeydetails.md) | :heavy_minus_sign: | OK | -| `error` | [T.nilable(::OpenApiSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `api_key_details` | [T.nilable(Models::Shared::ApiKeyDetails)](../../models/shared/apikeydetails.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/shared/accessdetails.md b/docs/models/shared/accessdetails.md index 75acc906..2b931058 100644 --- a/docs/models/shared/accessdetails.md +++ b/docs/models/shared/accessdetails.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `generation_allowed` | *T::Boolean* | :heavy_check_mark: | N/A | -| `message` | *::String* | :heavy_check_mark: | N/A | -| `level` | [T.nilable(::OpenApiSDK::Shared::Level)](../../models/shared/level.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `generation_allowed` | *T::Boolean* | :heavy_check_mark: | N/A | +| `message` | *::String* | :heavy_check_mark: | N/A | +| `level` | [T.nilable(Models::Shared::Level)](../../models/shared/level.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accesstoken.md b/docs/models/shared/accesstoken.md index 15826743..50b8cc79 100644 --- a/docs/models/shared/accesstoken.md +++ b/docs/models/shared/accesstoken.md @@ -5,10 +5,10 @@ An AccessToken is a token that can be used to authenticate with the Speakeasy AP ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `access_token` | *::String* | :heavy_check_mark: | N/A | -| `claims` | [::OpenApiSDK::Shared::Claims](../../models/shared/claims.md) | :heavy_check_mark: | N/A | -| `user` | [::OpenApiSDK::Shared::AccessTokenUser](../../models/shared/accesstokenuser.md) | :heavy_check_mark: | N/A | -| `workspaces` | T::Array<[::OpenApiSDK::Shared::Workspaces](../../models/shared/workspaces.md)> | :heavy_minus_sign: | N/A | -| `feature_flags` | T::Array<[::OpenApiSDK::Shared::FeatureFlag](../../models/shared/featureflag.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `access_token` | *::String* | :heavy_check_mark: | N/A | +| `claims` | [Models::Shared::Claims](../../models/shared/claims.md) | :heavy_check_mark: | N/A | +| `user` | [Models::Shared::AccessTokenUser](../../models/shared/accesstokenuser.md) | :heavy_check_mark: | N/A | +| `workspaces` | T::Array<[Models::Shared::Workspaces](../../models/shared/workspaces.md)> | :heavy_minus_sign: | N/A | +| `feature_flags` | T::Array<[Models::Shared::FeatureFlag](../../models/shared/featureflag.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/actions.md b/docs/models/shared/actions.md new file mode 100644 index 00000000..60fa02d6 --- /dev/null +++ b/docs/models/shared/actions.md @@ -0,0 +1,9 @@ +# Actions + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `generation_action_configured` | *T::Boolean* | :heavy_check_mark: | N/A | +| `publish_action_configured` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/api.md b/docs/models/shared/api.md deleted file mode 100644 index 8898bea9..00000000 --- a/docs/models/shared/api.md +++ /dev/null @@ -1,17 +0,0 @@ -# Api - -An Api is representation of a API (a collection of API Endpoints) within the Speakeasy Platform. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of this Api. This is a human-readable name (subject to change). | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp. | -| `description` | *::String* | :heavy_check_mark: | A detailed description of the Api. | -| `matched` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Determines if all the endpoints within the Api are found in the OpenAPI spec associated with the Api. | -| `meta_data` | T::Hash[Symbol, T::Array<*::String*>] | :heavy_minus_sign: | A set of values associated with a meta_data key. This field is only set on get requests. | -| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last update timestamp. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of this Api. This is semantic version identifier. | -| `workspace_id` | *::String* | :heavy_check_mark: | The workspace ID this Api belongs to. | \ No newline at end of file diff --git a/docs/models/shared/apiendpoint.md b/docs/models/shared/apiendpoint.md deleted file mode 100644 index c82b467d..00000000 --- a/docs/models/shared/apiendpoint.md +++ /dev/null @@ -1,20 +0,0 @@ -# ApiEndpoint - -An ApiEndpoint is a description of an Endpoint for an API. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of this ApiEndpoint. This is a hash of the method and path. | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api this ApiEndpoint belongs to. | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp. | -| `description` | *::String* | :heavy_check_mark: | A detailed description of the ApiEndpoint. | -| `display_name` | *::String* | :heavy_check_mark: | A human-readable name for the ApiEndpoint. | -| `matched` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Determines if the endpoint was found in the OpenAPI spec associated with the parent Api. | -| `method` | *::String* | :heavy_check_mark: | HTTP verb. | -| `path` | *::String* | :heavy_check_mark: | Path that handles this Api. | -| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last update timestamp. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api this ApiEndpoint belongs to. | -| `workspace_id` | *::String* | :heavy_check_mark: | The workspace ID this ApiEndpoint belongs to. | \ No newline at end of file diff --git a/docs/models/shared/apiendpointinput.md b/docs/models/shared/apiendpointinput.md deleted file mode 100644 index 2cf879ea..00000000 --- a/docs/models/shared/apiendpointinput.md +++ /dev/null @@ -1,15 +0,0 @@ -# ApiEndpointInput - -An ApiEndpoint is a description of an Endpoint for an API. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of this ApiEndpoint. This is a hash of the method and path. | -| `description` | *::String* | :heavy_check_mark: | A detailed description of the ApiEndpoint. | -| `display_name` | *::String* | :heavy_check_mark: | A human-readable name for the ApiEndpoint. | -| `method` | *::String* | :heavy_check_mark: | HTTP verb. | -| `path` | *::String* | :heavy_check_mark: | Path that handles this Api. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api this ApiEndpoint belongs to. | \ No newline at end of file diff --git a/docs/models/shared/apiinput.md b/docs/models/shared/apiinput.md deleted file mode 100644 index 3f11f7e4..00000000 --- a/docs/models/shared/apiinput.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiInput - -An Api is representation of a API (a collection of API Endpoints) within the Speakeasy Platform. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of this Api. This is a human-readable name (subject to change). | -| `description` | *::String* | :heavy_check_mark: | A detailed description of the Api. | -| `meta_data` | T::Hash[Symbol, T::Array<*::String*>] | :heavy_minus_sign: | A set of values associated with a meta_data key. This field is only set on get requests. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of this Api. This is semantic version identifier. | \ No newline at end of file diff --git a/docs/models/shared/apikeydetails.md b/docs/models/shared/apikeydetails.md index 41680fcd..abc5f01f 100644 --- a/docs/models/shared/apikeydetails.md +++ b/docs/models/shared/apikeydetails.md @@ -9,7 +9,9 @@ | `workspace_slug` | *::String* | :heavy_check_mark: | N/A | | `org_slug` | *::String* | :heavy_check_mark: | N/A | | `generation_access_unlimited` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | -| `account_type_v2` | [::OpenApiSDK::Shared::AccountType](../../models/shared/accounttype.md) | :heavy_check_mark: | N/A | +| `account_type_v2` | [Models::Shared::AccountType](../../models/shared/accounttype.md) | :heavy_check_mark: | N/A | | `enabled_features` | T::Array<*::String*> | :heavy_check_mark: | N/A | +| `billing_add_ons` | T::Array<[Models::Shared::BillingAddOn](../../models/shared/billingaddon.md)> | :heavy_check_mark: | N/A | | ~~`feature_flags`~~ | T::Array<*::String*> | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | -| `telemetry_disabled` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file +| `telemetry_disabled` | *T::Boolean* | :heavy_check_mark: | N/A | +| `workspace_created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Workspace creation timestamp. | \ 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/boundedrequest.md b/docs/models/shared/boundedrequest.md deleted file mode 100644 index e8978431..00000000 --- a/docs/models/shared/boundedrequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# BoundedRequest - -A BoundedRequest is a request that has been logged by the Speakeasy without the contents of the request. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint this request was made to. | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api this request was made to. | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp. | -| `customer_id` | *::String* | :heavy_check_mark: | The ID of the customer that made this request. | -| `latency` | *::Integer* | :heavy_check_mark: | The latency of the request. | -| `method` | *::String* | :heavy_check_mark: | HTTP verb. | -| `path` | *::String* | :heavy_check_mark: | The path of the request. | -| `request_finish_time` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The time the request finished. | -| `request_id` | *::String* | :heavy_check_mark: | The ID of this request. | -| `request_start_time` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The time the request was made. | -| `status` | *::Integer* | :heavy_check_mark: | The status code of the request. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api this request was made to. | -| `workspace_id` | *::String* | :heavy_check_mark: | The workspace ID this request was made to. | -| `metadata` | T::Array<[::OpenApiSDK::Shared::RequestMetadata](../../models/shared/requestmetadata.md)> | :heavy_minus_sign: | Metadata associated with this request | \ No newline at end of file diff --git a/docs/models/shared/clievent.md b/docs/models/shared/clievent.md index c948a095..251292c8 100644 --- a/docs/models/shared/clievent.md +++ b/docs/models/shared/clievent.md @@ -9,7 +9,7 @@ | `execution_id` | *::String* | :heavy_check_mark: | Unique identifier for each execution of the CLI. | | `workspace_id` | *::String* | :heavy_check_mark: | Identifier of the workspace. | | `speakeasy_api_key_name` | *::String* | :heavy_check_mark: | Identifier of the Speakeasy API key. | -| `interaction_type` | [::OpenApiSDK::Shared::InteractionType](../../models/shared/interactiontype.md) | :heavy_check_mark: | Type of interaction. | +| `interaction_type` | [Models::Shared::InteractionType](../../models/shared/interactiontype.md) | :heavy_check_mark: | Type of interaction. | | `local_started_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp when the event started, in local time. | | `local_completed_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Timestamp when the event completed, in local time. | | `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp when the event was created in the database. | @@ -21,6 +21,8 @@ | `gh_action_run_link` | *T.nilable(::String)* | :heavy_minus_sign: | Link to the GitHub action run. | | `gh_action_version` | *T.nilable(::String)* | :heavy_minus_sign: | Version of the GitHub action. | | `gh_action_organization` | *T.nilable(::String)* | :heavy_minus_sign: | GitHub organization of the action. | +| `gh_pull_request` | *T.nilable(::String)* | :heavy_minus_sign: | The reference to a created pull request URL. | +| `gh_changes_committed` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether or not changes were committed from generation in the Github Action. | | `gh_action_ref` | *T.nilable(::String)* | :heavy_minus_sign: | GitHub Action ref value. | | `gh_action_repository` | *T.nilable(::String)* | :heavy_minus_sign: | GitHub repository of the action. | | `repo_label` | *T.nilable(::String)* | :heavy_minus_sign: | Label of the git repository. | @@ -54,9 +56,10 @@ | `generate_gen_lock_pre_revision_digest` | *T.nilable(::String)* | :heavy_minus_sign: | Revision digest of the Previous Generation | | `generate_gen_lock_pre_blob_digest` | *T.nilable(::String)* | :heavy_minus_sign: | Blob digest of the Previous Generation | | `generate_gen_lock_pre_namespace_name` | *T.nilable(::String)* | :heavy_minus_sign: | Namespace name of the Previous Generation | -| `generate_bump_type` | [T.nilable(::OpenApiSDK::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_bump_type` | [T.nilable(Models::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_number_of_operations_ignored` | *T.nilable(::Integer)* | :heavy_minus_sign: | The number of operations ignored in generation. | | `generate_number_of_operations_used` | *T.nilable(::Integer)* | :heavy_minus_sign: | The number of operations used in generation. | +| `generate_number_of_terraform_resources` | *T.nilable(::Integer)* | :heavy_minus_sign: | The number of terraform resources used in generation. | | `generate_published` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Indicates whether the target was considered published. | | `generate_repo_url` | *T.nilable(::String)* | :heavy_minus_sign: | Expected Repo URL, for use in documentation generation. | | `publish_package_url` | *T.nilable(::String)* | :heavy_minus_sign: | URL of the published package. | @@ -75,10 +78,11 @@ | `openapi_diff_base_source_blob_digest` | *T.nilable(::String)* | :heavy_minus_sign: | The blob digest of the base source. | | `openapi_diff_base_source_namespace_name` | *T.nilable(::String)* | :heavy_minus_sign: | The namespace name of the base source. | | `openapi_diff_breaking_changes_count` | *T.nilable(::Integer)* | :heavy_minus_sign: | The number of breaking changes in the openapi diff report. | -| `openapi_diff_bump_type` | [T.nilable(::OpenApiSDK::Shared::OpenapiDiffBumpType)](../../models/shared/openapidiffbumptype.md) | :heavy_minus_sign: | Bump type of the lock file (calculated semver delta, or a custom change (manual release)) | +| `openapi_diff_bump_type` | [T.nilable(Models::Shared::OpenapiDiffBumpType)](../../models/shared/openapidiffbumptype.md) | :heavy_minus_sign: | Bump type of the lock file (calculated semver delta, or a custom change (manual release)) | | `error` | *T.nilable(::String)* | :heavy_minus_sign: | Error message if the event was not successful. | | `mermaid_diagram` | *T.nilable(::String)* | :heavy_minus_sign: | Mermaid diagram | | `last_step` | *T.nilable(::String)* | :heavy_minus_sign: | The last step of the event. | +| `test_report_raw` | *T.nilable(::String)* | :heavy_minus_sign: | The raw test report xml | | `workflow_pre_raw` | *T.nilable(::String)* | :heavy_minus_sign: | Workflow file (prior to execution) | | `workflow_post_raw` | *T.nilable(::String)* | :heavy_minus_sign: | Workflow file (post execution) | | `workflow_lock_pre_raw` | *T.nilable(::String)* | :heavy_minus_sign: | Workflow lock file (prior to execution) | diff --git a/docs/models/shared/codesampleschemainput.md b/docs/models/shared/codesampleschemainput.md new file mode 100644 index 00000000..c03e0ec9 --- /dev/null +++ b/docs/models/shared/codesampleschemainput.md @@ -0,0 +1,12 @@ +# CodeSampleSchemaInput + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `package_name` | *T.nilable(::String)* | :heavy_minus_sign: | The name of the package | +| `sdk_class_name` | *T.nilable(::String)* | :heavy_minus_sign: | The SDK class name | +| `language` | *::String* | :heavy_check_mark: | The language to generate code samples for | +| `operation_ids` | T::Array<*::String*> | :heavy_minus_sign: | A list of operations IDs to generate code samples for | +| `schema_file` | [Models::Shared::SchemaFile](../../models/shared/schemafile.md) | :heavy_check_mark: | The OpenAPI file to be uploaded | \ No newline at end of file diff --git a/docs/models/shared/codesamplesjobstatus.md b/docs/models/shared/codesamplesjobstatus.md new file mode 100644 index 00000000..2dd86bc3 --- /dev/null +++ b/docs/models/shared/codesamplesjobstatus.md @@ -0,0 +1,11 @@ +# CodeSamplesJobStatus + +The current status of the job. Possible values are `pending` or `running`. + + +## Values + +| Name | Value | +| --------- | --------- | +| `PENDING` | pending | +| `RUNNING` | running | \ No newline at end of file diff --git a/docs/models/shared/compositespecmetadata.md b/docs/models/shared/compositespecmetadata.md new file mode 100644 index 00000000..93609db1 --- /dev/null +++ b/docs/models/shared/compositespecmetadata.md @@ -0,0 +1,9 @@ +# CompositeSpecMetadata + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `subscription_id` | *::String* | :heavy_check_mark: | The subscription ID for the remote source subscription, if applicable. This indicates that the namespace is created by a remote source and thus is composite. | +| `subscription_settings` | [Models::Shared::RemoteSourceSubscriptionSettings](../../models/shared/remotesourcesubscriptionsettings.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/embedtoken.md b/docs/models/shared/embedtoken.md deleted file mode 100644 index d3acedba..00000000 --- a/docs/models/shared/embedtoken.md +++ /dev/null @@ -1,19 +0,0 @@ -# EmbedToken - -A representation of an embed token granted for working with Speakeasy components. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp. | -| `created_by` | *::String* | :heavy_check_mark: | The ID of the user that created this token. | -| `description` | *::String* | :heavy_check_mark: | A detailed description of the EmbedToken. | -| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The time this token expires. | -| `filters` | *::String* | :heavy_check_mark: | The filters applied to this token. | -| `id` | *::String* | :heavy_check_mark: | The ID of this EmbedToken. | -| `last_used` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | The last time this token was used. | -| `revoked_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | The time this token was revoked. | -| `revoked_by` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the user that revoked this token. | -| `workspace_id` | *::String* | :heavy_check_mark: | The workspace ID this token belongs to. | \ No newline at end of file diff --git a/docs/models/shared/featureflag.md b/docs/models/shared/featureflag.md index d33df787..8926c726 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` | *::String* | :heavy_check_mark: | N/A | -| `trial_ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `feature_flag` | [Models::Shared::WorkspaceFeatureFlag](../../models/shared/workspacefeatureflag.md) | :heavy_check_mark: | enum value workspace feature flag | +| `trial_ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/filter.md b/docs/models/shared/filter.md deleted file mode 100644 index 8ae9f896..00000000 --- a/docs/models/shared/filter.md +++ /dev/null @@ -1,12 +0,0 @@ -# Filter - -A filter is a key-value pair that can be used to filter a list of requests. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `key` | *::String* | :heavy_check_mark: | The key of the filter. | -| `operator` | *::String* | :heavy_check_mark: | The operator of the filter. | -| `value` | *::String* | :heavy_check_mark: | The value of the filter. | \ No newline at end of file diff --git a/docs/models/shared/filters.md b/docs/models/shared/filters.md deleted file mode 100644 index ec5b1b86..00000000 --- a/docs/models/shared/filters.md +++ /dev/null @@ -1,13 +0,0 @@ -# Filters - -Filters are used to query requests. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `filters` | T::Array<[::OpenApiSDK::Shared::Filter](../../models/shared/filter.md)> | :heavy_check_mark: | A list of filters to apply to the query. | -| `limit` | *::Integer* | :heavy_check_mark: | The maximum number of results to return. | -| `offset` | *::Integer* | :heavy_check_mark: | The offset to start the query from. | -| `operator` | *::String* | :heavy_check_mark: | The operator to use when combining filters. | \ 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/getnamespacesresponse.md b/docs/models/shared/getnamespacesresponse.md index 9fc56dd2..e25b21ea 100644 --- a/docs/models/shared/getnamespacesresponse.md +++ b/docs/models/shared/getnamespacesresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `items` | T::Array<[::OpenApiSDK::Shared::Namespace](../../models/shared/namespace.md)> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Namespace](../../models/shared/namespace.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getrevisionsresponse.md b/docs/models/shared/getrevisionsresponse.md index 7bbda32c..273ec544 100644 --- a/docs/models/shared/getrevisionsresponse.md +++ b/docs/models/shared/getrevisionsresponse.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `items` | T::Array<[::OpenApiSDK::Shared::Revision](../../models/shared/revision.md)> | :heavy_check_mark: | N/A | -| `next_page_token` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Revision](../../models/shared/revision.md)> | :heavy_check_mark: | N/A | +| `next_page_token` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/gettagsresponse.md b/docs/models/shared/gettagsresponse.md index a5c679fc..8222e3ac 100644 --- a/docs/models/shared/gettagsresponse.md +++ b/docs/models/shared/gettagsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `items` | T::Array<[::OpenApiSDK::Shared::Tag](../../models/shared/tag.md)> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Tag](../../models/shared/tag.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/githubconfigurecodesamplesresponse.md b/docs/models/shared/githubconfigurecodesamplesresponse.md index 172632db..0fb8dead 100644 --- a/docs/models/shared/githubconfigurecodesamplesresponse.md +++ b/docs/models/shared/githubconfigurecodesamplesresponse.md @@ -5,8 +5,8 @@ A response to configure GitHub code samples ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `source` | [::OpenApiSDK::Shared::WorkflowDocument](../../models/shared/workflowdocument.md) | :heavy_check_mark: | A document referenced by a workflow | -| `code_sample_overlay_registry_url` | *::String* | :heavy_check_mark: | The URL of the code sample overlay registry | -| `gh_action_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the GitHub action that was dispatched | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `source` | [Models::Shared::WorkflowDocument](../../models/shared/workflowdocument.md) | :heavy_check_mark: | A document referenced by a workflow | +| `code_sample_overlay_registry_url` | *::String* | :heavy_check_mark: | The URL of the code sample overlay registry | +| `gh_action_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the GitHub action that was dispatched | \ No newline at end of file diff --git a/docs/models/shared/githubpublishingprresponse.md b/docs/models/shared/githubpublishingprresponse.md index b6ed2237..e64665ea 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` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `pending_version` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `pull_request` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `pending_version` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `pull_request_metadata` | [T.nilable(Models::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/githubsetupstateresponse.md b/docs/models/shared/githubsetupstateresponse.md new file mode 100644 index 00000000..619b7ad8 --- /dev/null +++ b/docs/models/shared/githubsetupstateresponse.md @@ -0,0 +1,12 @@ +# GithubSetupStateResponse + +The state of a particular SDK targets github setup + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `app_installed` | *T::Boolean* | :heavy_check_mark: | N/A | +| `actions` | [Models::Shared::Actions](../../models/shared/actions.md) | :heavy_check_mark: | N/A | +| `secrets` | [Models::Shared::Secrets](../../models/shared/secrets.md) | :heavy_check_mark: | N/A | \ 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/manifest.md b/docs/models/shared/manifest.md index ad67343e..fe575a95 100644 --- a/docs/models/shared/manifest.md +++ b/docs/models/shared/manifest.md @@ -10,5 +10,5 @@ Returns the requested manifest file | `schema_version` | *T.nilable(::Integer)* | :heavy_minus_sign: | Schema version | | `media_type` | *T.nilable(::String)* | :heavy_minus_sign: | Media type usually application/vnd.docker.distribution.manifest.v2+json if this is in the accept header | | `artifact_type` | *T.nilable(::String)* | :heavy_minus_sign: | Type of artifact | -| `annotations` | [T.nilable(::OpenApiSDK::Shared::Annotations)](../../models/shared/annotations.md) | :heavy_minus_sign: | Annotations | -| `layers` | T::Array<[::OpenApiSDK::Shared::V2Descriptor](../../models/shared/v2descriptor.md)> | :heavy_minus_sign: | List of V2 image layer information | \ No newline at end of file +| `annotations` | [T.nilable(Models::Shared::Annotations)](../../models/shared/annotations.md) | :heavy_minus_sign: | Annotations | +| `layers` | T::Array<[Models::Shared::V2Descriptor](../../models/shared/v2descriptor.md)> | :heavy_minus_sign: | List of V2 image layer information | \ No newline at end of file diff --git a/docs/models/shared/namespace.md b/docs/models/shared/namespace.md index 911068f7..8fa30ccc 100644 --- a/docs/models/shared/namespace.md +++ b/docs/models/shared/namespace.md @@ -5,9 +5,13 @@ A namespace contains many revisions. ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | {organization_slug}/{workspace_slug}/{namespace_name} | -| `name` | *::String* | :heavy_check_mark: | A human-readable name for the namespace. | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | -| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `id` | *::String* | :heavy_check_mark: | {organization_slug}/{workspace_slug}/{namespace_name} | +| `name` | *::String* | :heavy_check_mark: | A human-readable name for the namespace. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `public` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Indicates whether the namespace is publicly accessible | +| `archived_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | +| `latest_revision_metadata` | [T.nilable(Models::Shared::RevisionContentsMetadata)](../../models/shared/revisioncontentsmetadata.md) | :heavy_minus_sign: | N/A | +| `composite_spec_metadata` | [T.nilable(Models::Shared::CompositeSpecMetadata)](../../models/shared/compositespecmetadata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/oasinfo.md b/docs/models/shared/oasinfo.md index a28977c5..c48cfd1b 100644 --- a/docs/models/shared/oasinfo.md +++ b/docs/models/shared/oasinfo.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `title` | *::String* | :heavy_check_mark: | N/A | -| `summary` | *::String* | :heavy_check_mark: | N/A | -| `description` | *::String* | :heavy_check_mark: | N/A | -| `version` | *::String* | :heavy_check_mark: | N/A | -| `license` | [::OpenApiSDK::Shared::License](../../models/shared/license.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `title` | *::String* | :heavy_check_mark: | N/A | +| `summary` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | N/A | +| `version` | *::String* | :heavy_check_mark: | N/A | +| `license` | [Models::Shared::License](../../models/shared/license.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/oassummary.md b/docs/models/shared/oassummary.md index a152016b..60629018 100644 --- a/docs/models/shared/oassummary.md +++ b/docs/models/shared/oassummary.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `info` | [::OpenApiSDK::Shared::OASInfo](../../models/shared/oasinfo.md) | :heavy_check_mark: | N/A | -| `operations` | T::Array<[::OpenApiSDK::Shared::OASOperation](../../models/shared/oasoperation.md)> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `info` | [Models::Shared::OASInfo](../../models/shared/oasinfo.md) | :heavy_check_mark: | N/A | +| `operations` | T::Array<[Models::Shared::OASOperation](../../models/shared/oasoperation.md)> | :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 ba46b39c..cd968025 100644 --- a/docs/models/shared/organization.md +++ b/docs/models/shared/organization.md @@ -5,13 +5,16 @@ A speakeasy organization ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | N/A | -| `name` | *::String* | :heavy_check_mark: | N/A | -| `slug` | *::String* | :heavy_check_mark: | N/A | -| `account_type` | [::OpenApiSDK::Shared::AccountType](../../models/shared/accounttype.md) | :heavy_check_mark: | N/A | -| `telemetry_disabled` | *T::Boolean* | :heavy_check_mark: | N/A | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | -| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | -| `free_trial_expiry` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `slug` | *::String* | :heavy_check_mark: | N/A | +| `account_type` | [Models::Shared::AccountType](../../models/shared/accounttype.md) | :heavy_check_mark: | N/A | +| `telemetry_disabled` | *T::Boolean* | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `free_trial_expiry` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | +| `sso_connection_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `sso_activated` | *T::Boolean* | :heavy_check_mark: | N/A | +| `internal` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | 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..4ba673d0 --- /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` | T::Array<[Models::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..a6493ecc --- /dev/null +++ b/docs/models/shared/organizationbillingaddonresponse.md @@ -0,0 +1,10 @@ +# OrganizationBillingAddOnResponse + +Billing add on response + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `add_ons` | T::Array<[Models::Shared::BillingAddOn](../../models/shared/billingaddon.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/organizationusage.md b/docs/models/shared/organizationusage.md index 7ce53fad..57a2187d 100644 --- a/docs/models/shared/organizationusage.md +++ b/docs/models/shared/organizationusage.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `number_of_operations` | *::Integer* | :heavy_check_mark: | Number of operations performed | -| `language` | *::String* | :heavy_check_mark: | The programming language used | -| `used_features` | T::Array<*::String*> | :heavy_check_mark: | Features that have been used | -| `accessible_features` | T::Array<*::String*> | :heavy_check_mark: | Features that are accessible | -| `accessible` | *T::Boolean* | :heavy_check_mark: | Indicates if the features are accessible | -| `workspaces` | T::Array<*::String*> | :heavy_check_mark: | List of workspace IDs | -| `gen_lock_ids` | T::Array<*::String*> | :heavy_check_mark: | List of generation lock IDs | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `number_of_operations` | *::Integer* | :heavy_check_mark: | Number of operations performed | +| `max_operations` | *::Integer* | :heavy_check_mark: | Maximum Number of operations per SDK specific in contract | +| `language` | *::String* | :heavy_check_mark: | The programming language used | +| `used_features` | T::Array<*::String*> | :heavy_check_mark: | Features that have been used | +| `accessible_features` | T::Array<*::String*> | :heavy_check_mark: | Features that are accessible | +| `accessible` | *T::Boolean* | :heavy_check_mark: | Indicates if the features are accessible | +| `workspaces` | T::Array<*::String*> | :heavy_check_mark: | List of workspace IDs | +| `gen_lock_ids` | T::Array<*::String*> | :heavy_check_mark: | List of generation lock IDs | \ No newline at end of file diff --git a/docs/models/shared/organizationusageresponse.md b/docs/models/shared/organizationusageresponse.md index 84836cc4..c40b3fa9 100644 --- a/docs/models/shared/organizationusageresponse.md +++ b/docs/models/shared/organizationusageresponse.md @@ -5,9 +5,9 @@ A billing summary of organization usage ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `usage` | T::Array<[::OpenApiSDK::Shared::OrganizationUsage](../../models/shared/organizationusage.md)> | :heavy_check_mark: | N/A | -| `free_trial_expiry` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Expiry date of the free trial, will be null if no trial | -| `total_allowed_languages` | *::Integer* | :heavy_check_mark: | Total number of allowed languages, -1 if unlimited | -| `allowed_languages` | T::Array<*::String*> | :heavy_check_mark: | List of allowed languages | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `usage` | T::Array<[Models::Shared::OrganizationUsage](../../models/shared/organizationusage.md)> | :heavy_check_mark: | N/A | +| `free_trial_expiry` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Expiry date of the free trial, will be null if no trial | +| `total_allowed_languages` | *::Integer* | :heavy_check_mark: | Total number of allowed languages, -1 if unlimited | +| `allowed_languages` | T::Array<*::String*> | :heavy_check_mark: | List of allowed languages | \ 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..af44de1d --- /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 | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `token` | *::String* | :heavy_check_mark: | N/A | +| `valid_until` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `token_name` | *::String* | :heavy_check_mark: | N/A | +| `target_id` | *::String* | :heavy_check_mark: | N/A | +| `target_resource` | [Models::Shared::TargetResource](../../models/shared/targetresource.md) | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | +| `created_by` | *::String* | :heavy_check_mark: | N/A | +| `updated_by` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `workspace_id` | *::String* | :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..baba12fd --- /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 | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `status` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `title` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | truncated to first 1000 characters | +| `head_branch` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `base_branch` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `can_merge` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | +| `labels` | T::Array<*::String*> | :heavy_minus_sign: | List of github labels | +| `requested_reviewers` | T::Array<*::String*> | :heavy_minus_sign: | List of github handles | \ No newline at end of file diff --git a/docs/models/shared/remotedocument.md b/docs/models/shared/remotedocument.md new file mode 100644 index 00000000..c4406df3 --- /dev/null +++ b/docs/models/shared/remotedocument.md @@ -0,0 +1,10 @@ +# RemoteDocument + +A document hosted in the registry + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `registry_url` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/remotesource.md b/docs/models/shared/remotesource.md new file mode 100644 index 00000000..8afc98ae --- /dev/null +++ b/docs/models/shared/remotesource.md @@ -0,0 +1,12 @@ +# RemoteSource + +Remote source configuration + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `inputs` | T::Array<[Models::Shared::RemoteDocument](../../models/shared/remotedocument.md)> | :heavy_check_mark: | N/A | +| `overlays` | T::Array<[Models::Shared::RemoteDocument](../../models/shared/remotedocument.md)> | :heavy_minus_sign: | N/A | +| `output` | [Models::Shared::RemoteDocument](../../models/shared/remotedocument.md) | :heavy_check_mark: | A document hosted in the registry | \ No newline at end of file diff --git a/docs/models/shared/remotesourcesubscriptionsettings.md b/docs/models/shared/remotesourcesubscriptionsettings.md new file mode 100644 index 00000000..91992725 --- /dev/null +++ b/docs/models/shared/remotesourcesubscriptionsettings.md @@ -0,0 +1,11 @@ +# RemoteSourceSubscriptionSettings + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `base_spec_namespaces` | T::Array<*::String*> | :heavy_check_mark: | N/A | +| `overlay_namespaces` | T::Array<*::String*> | :heavy_check_mark: | N/A | +| `ignored_namespaces` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `output_namespace` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/report.md b/docs/models/shared/report.md index d8ebbef5..a6061448 100644 --- a/docs/models/shared/report.md +++ b/docs/models/shared/report.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `type` | [T.nilable(::OpenApiSDK::Shared::Type)](../../models/shared/type.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `type` | [T.nilable(Models::Shared::Type)](../../models/shared/type.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/revision.md b/docs/models/shared/revision.md index 043d2b45..503c1bf8 100644 --- a/docs/models/shared/revision.md +++ b/docs/models/shared/revision.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Format {namespace_id}/{revision_digest} | | -| `digest` | *::String* | :heavy_check_mark: | N/A | sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f | -| `namespace_name` | *::String* | :heavy_check_mark: | N/A | | -| `tags` | T::Array<*::String*> | :heavy_check_mark: | N/A | | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | | -| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `id` | *::String* | :heavy_check_mark: | Format {namespace_id}/{revision_digest} | | +| `digest` | *::String* | :heavy_check_mark: | N/A | sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f | +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | | +| `tags` | T::Array<*::String*> | :heavy_check_mark: | N/A | | +| `contents_metadata` | [T.nilable(Models::Shared::RevisionContentsMetadata)](../../models/shared/revisioncontentsmetadata.md) | :heavy_minus_sign: | N/A | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | | +| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :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..901f0dcb --- /dev/null +++ b/docs/models/shared/revisioncontentsmetadata.md @@ -0,0 +1,20 @@ +# RevisionContentsMetadata + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `type` | [Models::Shared::RevisionContentsMetadataType](../../models/shared/revisioncontentsmetadatatype.md) | :heavy_check_mark: | N/A | +| `workspace_id` | *::String* | :heavy_check_mark: | The workspace ID | +| `namespace` | *::String* | :heavy_check_mark: | The fully qualified namespace | +| `revision_digest` | *::String* | :heavy_check_mark: | The digest of the parent bundle | +| `title` | *::String* | :heavy_check_mark: | The OAS title | +| `description` | *::String* | :heavy_check_mark: | The OAS description | +| `version` | *::String* | :heavy_check_mark: | The OAS version | +| `hash` | *::String* | :heavy_check_mark: | The hash of the contents | +| `tags` | T::Array<*::String*> | :heavy_check_mark: | The tags contained in the OAS -- NOT the OCI tags. Will be empty if the OAS is an overlay. | +| `operation_ids` | T::Array<*::String*> | :heavy_check_mark: | The operation IDs contained in the OAS. Will be empty if the OAS is an overlay. | +| `num_overlay_actions` | *::Integer* | :heavy_check_mark: | The number of overlay actions in the OAS. Will be 0 if the OAS is not an overlay. | +| `contains_code_samples` | *T::Boolean* | :heavy_check_mark: | Whether the OAS contains code samples. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | \ 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/schemadiff.md b/docs/models/shared/schemadiff.md deleted file mode 100644 index 4fae56b2..00000000 --- a/docs/models/shared/schemadiff.md +++ /dev/null @@ -1,12 +0,0 @@ -# SchemaDiff - -A SchemaDiff represents a diff of two Schemas. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `additions` | T::Array<*::String*> | :heavy_check_mark: | Holds every addition change in the diff. | -| `deletions` | T::Array<*::String*> | :heavy_check_mark: | Holds every deletion change in the diff. | -| `modifications` | T::Hash[Symbol, [::OpenApiSDK::Shared::ValueChange](../../models/shared/valuechange.md)] | :heavy_check_mark: | Holds every modification change in the diff. | \ No newline at end of file diff --git a/docs/models/operations/uploadreportfile.md b/docs/models/shared/schemafile.md similarity index 94% rename from docs/models/operations/uploadreportfile.md rename to docs/models/shared/schemafile.md index 7416ae42..7b1e9fc3 100644 --- a/docs/models/operations/uploadreportfile.md +++ b/docs/models/shared/schemafile.md @@ -1,4 +1,4 @@ -# UploadReportFile +# SchemaFile ## Fields diff --git a/docs/models/shared/schema.md b/docs/models/shared/schemastoreitem.md similarity index 61% rename from docs/models/shared/schema.md rename to docs/models/shared/schemastoreitem.md index 291f9478..3a8f0ea0 100644 --- a/docs/models/shared/schema.md +++ b/docs/models/shared/schemastoreitem.md @@ -1,15 +1,13 @@ -# Schema - -A Schema represents an API schema for a particular Api and Version. +# SchemaStoreItem ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api this Schema belongs to. | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp. | -| `description` | *::String* | :heavy_check_mark: | A detailed description of the Schema. | -| `revision_id` | *::String* | :heavy_check_mark: | An ID referencing this particular revision of the Schema. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api this Schema belongs to. | -| `workspace_id` | *::String* | :heavy_check_mark: | The workspace ID this Schema belongs to. | \ No newline at end of file +| `id` | *::String* | :heavy_check_mark: | N/A | +| `spec` | *::String* | :heavy_check_mark: | N/A | +| `package_name` | *::String* | :heavy_check_mark: | N/A | +| `sdk_classname` | *::String* | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `format` | [Models::Shared::Format](../../models/shared/format.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/secrets.md b/docs/models/shared/secrets.md new file mode 100644 index 00000000..75d00b4a --- /dev/null +++ b/docs/models/shared/secrets.md @@ -0,0 +1,9 @@ +# Secrets + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `api_key_configured` | *T::Boolean* | :heavy_check_mark: | N/A | +| `publishing_secrets_configured` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/suggestitemsrequestbody.md b/docs/models/shared/suggestitemsrequestbody.md new file mode 100644 index 00000000..d04d8828 --- /dev/null +++ b/docs/models/shared/suggestitemsrequestbody.md @@ -0,0 +1,9 @@ +# SuggestItemsRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `prompt` | *::String* | :heavy_check_mark: | The prompt to use for the suggestion. Think of this as the "preamble". | +| `items` | T::Array<*::String*> | :heavy_check_mark: | The list of "things" to get suggestions for. One suggestion will be returned for each item in the list. | \ No newline at end of file diff --git a/docs/models/shared/suggestoptsold.md b/docs/models/shared/suggestoptsold.md index 53581b14..b452f782 100644 --- a/docs/models/shared/suggestoptsold.md +++ b/docs/models/shared/suggestoptsold.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `suggestion_type` | [::OpenApiSDK::Shared::SuggestionType](../../models/shared/suggestiontype.md) | :heavy_check_mark: | N/A | -| `diagnostics` | T::Array<[::OpenApiSDK::Shared::Diagnostic](../../models/shared/diagnostic.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `suggestion_type` | [Models::Shared::SuggestionType](../../models/shared/suggestiontype.md) | :heavy_check_mark: | N/A | +| `diagnostics` | T::Array<[Models::Shared::Diagnostic](../../models/shared/diagnostic.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/suggestrequestbody.md b/docs/models/shared/suggestrequestbody.md index 649c26a0..343b0f60 100644 --- a/docs/models/shared/suggestrequestbody.md +++ b/docs/models/shared/suggestrequestbody.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `oas_summary` | [::OpenApiSDK::Shared::OASSummary](../../models/shared/oassummary.md) | :heavy_check_mark: | N/A | -| `suggestion_type` | [::OpenApiSDK::Shared::SuggestRequestBodySuggestionType](../../models/shared/suggestrequestbodysuggestiontype.md) | :heavy_check_mark: | N/A | -| `diagnostics` | T::Array<[::OpenApiSDK::Shared::Diagnostic](../../models/shared/diagnostic.md)> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `oas_summary` | [Models::Shared::OASSummary](../../models/shared/oassummary.md) | :heavy_check_mark: | N/A | +| `suggestion_type` | [Models::Shared::SuggestRequestBodySuggestionType](../../models/shared/suggestrequestbodysuggestiontype.md) | :heavy_check_mark: | N/A | +| `diagnostics` | T::Array<[Models::Shared::Diagnostic](../../models/shared/diagnostic.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 adf55bab..a445d19c 100644 --- a/docs/models/shared/targetsdk.md +++ b/docs/models/shared/targetsdk.md @@ -8,7 +8,7 @@ | `id` | *::String* | :heavy_check_mark: | Unique identifier of the target the same as `generate_gen_lock_id` | | `last_event_id` | *::String* | :heavy_check_mark: | Unique identifier of the last event for the target | | `last_event_created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp when the event was created in the database. | -| `last_event_interaction_type` | [::OpenApiSDK::Shared::InteractionType](../../models/shared/interactiontype.md) | :heavy_check_mark: | Type of interaction. | +| `last_event_interaction_type` | [Models::Shared::InteractionType](../../models/shared/interactiontype.md) | :heavy_check_mark: | Type of interaction. | | `success` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Indicates whether the event was successful. | | `commit_head` | *T.nilable(::String)* | :heavy_minus_sign: | Remote commit ID. | | `git_remote_default_owner` | *T.nilable(::String)* | :heavy_minus_sign: | Default owner for git remote. | @@ -24,6 +24,7 @@ | `generate_eligible_features` | *T.nilable(::String)* | :heavy_minus_sign: | Eligible feature set during generation | | `generate_number_of_operations_ignored` | *T.nilable(::Integer)* | :heavy_minus_sign: | The number of operations ignored in generation. | | `generate_number_of_operations_used` | *T.nilable(::Integer)* | :heavy_minus_sign: | The number of operations used in generation. | +| `generate_number_of_terraform_resources` | *T.nilable(::Integer)* | :heavy_minus_sign: | The number of terraform resources used in generation. | | `generate_published` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Indicates whether the target was considered published. | | `continuous_integration_environment` | *T.nilable(::String)* | :heavy_minus_sign: | Name of the CI environment. | | `gh_action_ref` | *T.nilable(::String)* | :heavy_minus_sign: | GitHub Action ref value. | @@ -41,7 +42,11 @@ | `error` | *T.nilable(::String)* | :heavy_minus_sign: | Error message if the last event was not successful. | | `workflow_pre_raw` | *T.nilable(::String)* | :heavy_minus_sign: | Workflow file (prior to execution) | | `workflow_post_raw` | *T.nilable(::String)* | :heavy_minus_sign: | Workflow file (post execution) | +| `workflow_lock_pre_raw` | *T.nilable(::String)* | :heavy_minus_sign: | Workflow lock file (prior to execution) | +| `workflow_lock_post_raw` | *T.nilable(::String)* | :heavy_minus_sign: | Workflow lock file (post execution) | | `publish_package_url` | *T.nilable(::String)* | :heavy_minus_sign: | URL of the published package. | | `publish_package_name` | *T.nilable(::String)* | :heavy_minus_sign: | Name of the published package. | | `publish_package_version` | *T.nilable(::String)* | :heavy_minus_sign: | Version of the published package. | -| `publish_package_registry_name` | *T.nilable(::String)* | :heavy_minus_sign: | Name of the registry where the package was published. | \ No newline at end of file +| `publish_package_registry_name` | *T.nilable(::String)* | :heavy_minus_sign: | Name of the registry where the package was published. | +| `last_publish_created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Timestamp when the last publishing event was created. | +| `last_publish_gh_action_run_link` | *T.nilable(::String)* | :heavy_minus_sign: | Link to the GitHub action run for the last publishing event. | \ No newline at end of file diff --git a/docs/models/shared/usagesnippet.md b/docs/models/shared/usagesnippet.md new file mode 100644 index 00000000..db72fe29 --- /dev/null +++ b/docs/models/shared/usagesnippet.md @@ -0,0 +1,12 @@ +# UsageSnippet + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `path` | *::String* | :heavy_check_mark: | The path of the operation | +| `method` | *::Object* | :heavy_check_mark: | The HTTP method of the operation | +| `operation_id` | *::String* | :heavy_check_mark: | The operation ID for the snippet | +| `language` | *::String* | :heavy_check_mark: | The language of the snippet | +| `code` | *::String* | :heavy_check_mark: | The code snippet | \ No newline at end of file diff --git a/docs/models/shared/usagesnippets.md b/docs/models/shared/usagesnippets.md new file mode 100644 index 00000000..d2ca77a2 --- /dev/null +++ b/docs/models/shared/usagesnippets.md @@ -0,0 +1,8 @@ +# UsageSnippets + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `snippets` | T::Array<[Models::Shared::UsageSnippet](../../models/shared/usagesnippet.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/user.md b/docs/models/shared/user.md index fdc17d31..ce74351f 100644 --- a/docs/models/shared/user.md +++ b/docs/models/shared/user.md @@ -3,18 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Unique identifier for the user. | -| `email` | *::String* | :heavy_check_mark: | Email address of the user. | -| `email_verified` | *T::Boolean* | :heavy_check_mark: | Indicates whether the email address has been verified. | -| `github_handle` | *T.nilable(::String)* | :heavy_minus_sign: | GitHub handle of the user. | -| `display_name` | *::String* | :heavy_check_mark: | Display name of the user. | -| `photo_url` | *T.nilable(::String)* | :heavy_minus_sign: | URL of the user's photo. | -| `default_workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Identifier of the default workspace. | -| `confirmed` | *T::Boolean* | :heavy_check_mark: | Indicates whether the user has been confirmed. | -| `whitelisted` | *T::Boolean* | :heavy_check_mark: | Indicates whether the user has been whitelisted. | -| `last_login_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Timestamp of the last login. | -| `admin` | *T::Boolean* | :heavy_check_mark: | Indicates whether the user is an admin. | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp of the user's creation. | -| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp of the user's last update. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Unique identifier for the user. | +| `email` | *::String* | :heavy_check_mark: | Email address of the user. | +| `email_verified` | *T::Boolean* | :heavy_check_mark: | Indicates whether the email address has been verified. | +| `github_handle` | *T.nilable(::String)* | :heavy_minus_sign: | GitHub handle of the user. | +| `display_name` | *::String* | :heavy_check_mark: | Display name of the user. | +| `photo_url` | *T.nilable(::String)* | :heavy_minus_sign: | URL of the user's photo. | +| `default_workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Identifier of the default workspace. | +| `confirmed` | *T::Boolean* | :heavy_check_mark: | Indicates whether the user has been confirmed. | +| `whitelisted` | *T::Boolean* | :heavy_check_mark: | Indicates whether the user has been whitelisted. | +| `last_login_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Timestamp of the last login. | +| `admin` | *T::Boolean* | :heavy_check_mark: | Indicates whether the user is an admin. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp of the user's creation. | +| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp of the user's last update. | +| `internal` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Indicates whether the user is internal. | +| `pylon_identity_hash` | *T.nilable(::String)* | :heavy_minus_sign: | Hash used for pylon identity verification returned on v1/user. | +| `has_created_api_key` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Indicates whether the user has created an API key. Not always populated | \ No newline at end of file diff --git a/docs/models/shared/v2descriptor.md b/docs/models/shared/v2descriptor.md index 907bb7b0..b22f23c1 100644 --- a/docs/models/shared/v2descriptor.md +++ b/docs/models/shared/v2descriptor.md @@ -5,9 +5,9 @@ V2 descriptor ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `digest` | *T.nilable(::String)* | :heavy_minus_sign: | Digest | -| `media_type` | *T.nilable(::String)* | :heavy_minus_sign: | Media type | -| `size` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size | -| `annotations` | [T.nilable(::OpenApiSDK::Shared::Annotations)](../../models/shared/annotations.md) | :heavy_minus_sign: | Annotations | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `digest` | *T.nilable(::String)* | :heavy_minus_sign: | Digest | +| `media_type` | *T.nilable(::String)* | :heavy_minus_sign: | Media type | +| `size` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size | +| `annotations` | [T.nilable(Models::Shared::Annotations)](../../models/shared/annotations.md) | :heavy_minus_sign: | Annotations | \ No newline at end of file diff --git a/docs/models/shared/valuechange.md b/docs/models/shared/valuechange.md deleted file mode 100644 index 3f64fae5..00000000 --- a/docs/models/shared/valuechange.md +++ /dev/null @@ -1,9 +0,0 @@ -# ValueChange - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `from` | *::String* | :heavy_check_mark: | Represents the previous value of the element. | -| `to` | *::String* | :heavy_check_mark: | Represents the current value of the element. | \ No newline at end of file diff --git a/docs/models/shared/versionmetadata.md b/docs/models/shared/versionmetadata.md deleted file mode 100644 index 231a7911..00000000 --- a/docs/models/shared/versionmetadata.md +++ /dev/null @@ -1,15 +0,0 @@ -# VersionMetadata - -A set of keys and associated values, attached to a particular version of an Api. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api this Metadata belongs to. | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp. | -| `meta_key` | *::String* | :heavy_check_mark: | The key for this metadata. | -| `meta_value` | *::String* | :heavy_check_mark: | One of the values for this metadata. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api this Metadata belongs to. | -| `workspace_id` | *::String* | :heavy_check_mark: | The workspace ID this Metadata belongs to. | \ No newline at end of file diff --git a/docs/models/shared/versionmetadatainput.md b/docs/models/shared/versionmetadatainput.md deleted file mode 100644 index 223a9d0b..00000000 --- a/docs/models/shared/versionmetadatainput.md +++ /dev/null @@ -1,11 +0,0 @@ -# VersionMetadataInput - -A set of keys and associated values, attached to a particular version of an Api. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `meta_key` | *::String* | :heavy_check_mark: | The key for this metadata. | -| `meta_value` | *::String* | :heavy_check_mark: | One of the values for this metadata. | \ No newline at end of file diff --git a/docs/models/shared/workflowdocument.md b/docs/models/shared/workflowdocument.md index 6102421f..c2eb045a 100644 --- a/docs/models/shared/workflowdocument.md +++ b/docs/models/shared/workflowdocument.md @@ -5,7 +5,7 @@ A document referenced by a workflow ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `location` | *::String* | :heavy_check_mark: | N/A | -| `auth` | [T.nilable(::OpenApiSDK::Shared::Auth)](../../models/shared/auth.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `location` | *::String* | :heavy_check_mark: | N/A | +| `auth` | [T.nilable(Models::Shared::Auth)](../../models/shared/auth.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspace.md b/docs/models/shared/workspace.md index f58dc7e3..e978c89d 100644 --- a/docs/models/shared/workspace.md +++ b/docs/models/shared/workspace.md @@ -5,15 +5,14 @@ A speakeasy workspace ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | -| `id` | *::String* | :heavy_check_mark: | N/A | -| `name` | *::String* | :heavy_check_mark: | N/A | -| `oci_repo` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `oci_repo_created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | -| `organization_id` | *::String* | :heavy_check_mark: | N/A | -| `slug` | *::String* | :heavy_check_mark: | N/A | -| `telemetry_disabled` | *T::Boolean* | :heavy_check_mark: | N/A | -| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | -| `verified` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `slug` | *::String* | :heavy_check_mark: | N/A | +| `inactive` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | +| ~~`telemetry_disabled`~~ | *T.nilable(T::Boolean)* | :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://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `verified` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspaceandorganization.md b/docs/models/shared/workspaceandorganization.md index a7eb25e7..8a430285 100644 --- a/docs/models/shared/workspaceandorganization.md +++ b/docs/models/shared/workspaceandorganization.md @@ -5,7 +5,7 @@ A workspace and organization ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `workspace` | [::OpenApiSDK::Shared::Workspace](../../models/shared/workspace.md) | :heavy_check_mark: | A speakeasy workspace | -| `organization` | [::OpenApiSDK::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | A speakeasy organization | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `workspace` | [Models::Shared::Workspace](../../models/shared/workspace.md) | :heavy_check_mark: | A speakeasy workspace | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | A speakeasy organization | \ 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..bdeafd48 --- /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` | T::Array<[Models::Shared::WorkspaceFeatureFlag](../../models/shared/workspacefeatureflag.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspacefeatureflagresponse.md b/docs/models/shared/workspacefeatureflagresponse.md index edcc6109..52afdf6e 100644 --- a/docs/models/shared/workspacefeatureflagresponse.md +++ b/docs/models/shared/workspacefeatureflagresponse.md @@ -5,6 +5,6 @@ Workspace feature flag response ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `feature_flags` | T::Array<[::OpenApiSDK::Shared::FeatureFlag](../../models/shared/featureflag.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `feature_flags` | T::Array<[Models::Shared::FeatureFlag](../../models/shared/featureflag.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspaceinviteresponse.md b/docs/models/shared/workspaceinviteresponse.md index 5b10ddb3..c76c017a 100644 --- a/docs/models/shared/workspaceinviteresponse.md +++ b/docs/models/shared/workspaceinviteresponse.md @@ -5,7 +5,7 @@ A response for workspace user invite ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `relationship` | [::OpenApiSDK::Shared::Relationship](../../models/shared/relationship.md) | :heavy_check_mark: | N/A | -| `invite_link` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `relationship` | [Models::Shared::Relationship](../../models/shared/relationship.md) | :heavy_check_mark: | N/A | +| `invite_link` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspaces.md b/docs/models/shared/workspaces.md index c1e221b6..508556e8 100644 --- a/docs/models/shared/workspaces.md +++ b/docs/models/shared/workspaces.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | -| `account_type` | [T.nilable(::OpenApiSDK::Shared::AccountType)](../../models/shared/accounttype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | +| `account_type` | [T.nilable(Models::Shared::AccountType)](../../models/shared/accounttype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workspacesettings.md b/docs/models/shared/workspacesettings.md index ee6d754d..2fc6d997 100644 --- a/docs/models/shared/workspacesettings.md +++ b/docs/models/shared/workspacesettings.md @@ -3,7 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | N/A | -| `webhook_url` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `workspace_id` | *::String* | :heavy_check_mark: | N/A | +| `webhook_url` | *::String* | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :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 e3b119c0..b5e67e6f 100644 --- a/docs/models/shared/workspaceteamresponse.md +++ b/docs/models/shared/workspaceteamresponse.md @@ -5,7 +5,7 @@ Workspace team response ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `users` | T::Array<[::OpenApiSDK::Shared::User](../../models/shared/user.md)> | :heavy_check_mark: | N/A | -| `sso_metadata` | [T.nilable(::OpenApiSDK::Shared::SSOMetadata)](../../models/shared/ssometadata.md) | :heavy_minus_sign: | SSO metadata for a workspace | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `users` | T::Array<[Models::Shared::User](../../models/shared/user.md)> | :heavy_check_mark: | N/A | +| `sso_metadata` | [T.nilable(Models::Shared::SSOMetadata)](../../models/shared/ssometadata.md) | :heavy_minus_sign: | SSO metadata for a workspace | \ No newline at end of file diff --git a/docs/models/shared/workspacetoken.md b/docs/models/shared/workspacetoken.md index e2aff63f..56aa53e1 100644 --- a/docs/models/shared/workspacetoken.md +++ b/docs/models/shared/workspacetoken.md @@ -5,14 +5,16 @@ A workspace token ## Fields -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `id` | *::String* | :heavy_check_mark: | N/A | -| `name` | *::String* | :heavy_check_mark: | N/A | -| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `alg` | *::String* | :heavy_check_mark: | N/A | -| `key` | *::String* | :heavy_check_mark: | N/A | -| `last_used` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `created_at` | *::String* | :heavy_check_mark: | N/A | -| `created_by` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `email` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `workspace_id` | *::String* | :heavy_check_mark: | N/A | +| `alg` | *::String* | :heavy_check_mark: | N/A | +| `key` | *::String* | :heavy_check_mark: | N/A | +| `last_used` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `created_by` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `created_by_name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `created_by_photo_url` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/apiendpoints/README.md b/docs/sdks/apiendpoints/README.md deleted file mode 100644 index ec359ef8..00000000 --- a/docs/sdks/apiendpoints/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Apiendpoints - -## Overview - -### Available Operations - -* [list](#list) - Get all Api endpoints for a particular apiID. - -## list - -Get all Api endpoints for a particular apiID. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.apiendpoints.list(api_id="") - -if ! res.api_endpoints.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve ApiEndpoints for. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetAllApiEndpointsResponse)](../../models/operations/getallapiendpointsresponse.md)** - diff --git a/docs/sdks/apis/README.md b/docs/sdks/apis/README.md deleted file mode 100644 index c7e291c1..00000000 --- a/docs/sdks/apis/README.md +++ /dev/null @@ -1,268 +0,0 @@ -# Apis - -## Overview - -REST APIs for managing Api entities - -### Available Operations - -* [get_all](#get_all) - Get a list of Apis for a given workspace -* [get_all_versions](#get_all_versions) - Get all Api versions for a particular ApiEndpoint. -* [upsert](#upsert) - Upsert an Api -* [delete](#delete) - Delete an Api. -* [generate_open_api](#generate_open_api) - Generate an OpenAPI specification for a particular Api. -* [generate_postman](#generate_postman) - Generate a Postman collection for a particular Api. - -## get_all - -Get a list of all Apis and their versions for a given workspace. -Supports filtering the APIs based on metadata attributes. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.apis.get_all(op=::OpenApiSDK::Operations::Op.new( - and_: false, -), metadata={ - "key": [ - "", - ], -}) - -if ! res.apis.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `op` | [T.nilable(::OpenApiSDK::Operations::Op)](../../models/operations/op.md) | :heavy_minus_sign: | Configuration for filter operations | -| `metadata` | T::Hash[Symbol, T::Array<*::String*>] | :heavy_minus_sign: | Metadata to filter Apis on | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetApisResponse)](../../models/operations/getapisresponse.md)** - - - -## get_all_versions - -Get all Api versions for a particular ApiEndpoint. -Supports filtering the versions based on metadata attributes. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.apis.get_all_versions(api_id="", op=::OpenApiSDK::Operations::QueryParamOp.new( - and_: false, -), metadata={ - "key": [ - "", - ], -}) - -if ! res.apis.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve. | -| `op` | [T.nilable(::OpenApiSDK::Operations::QueryParamOp)](../../models/operations/queryparamop.md) | :heavy_minus_sign: | Configuration for filter operations | -| `metadata` | T::Hash[Symbol, T::Array<*::String*>] | :heavy_minus_sign: | Metadata to filter Apis on | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetAllApiVersionsResponse)](../../models/operations/getallapiversionsresponse.md)** - - - -## upsert - -Upsert an Api. If the Api does not exist, it will be created. -If the Api exists, it will be updated. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.apis.upsert(api_id="", api=::OpenApiSDK::Shared::ApiInput.new( - api_id: "", - description: "curiously painfully proliferate awful bump without fly", - version_id: "", -)) - -if ! res.api.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to upsert. | -| `api` | [::OpenApiSDK::Shared::ApiInput](../../models/shared/apiinput.md) | :heavy_check_mark: | A JSON representation of the Api to upsert | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::UpsertApiResponse)](../../models/operations/upsertapiresponse.md)** - - - -## delete - -Delete a particular version of an Api. The will also delete all associated ApiEndpoints, Metadata, Schemas & Request Logs (if using a Postgres datastore). - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.apis.delete(api_id="", version_id="") - -if res.status_code == 200 - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to delete. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::DeleteApiResponse)](../../models/operations/deleteapiresponse.md)** - - - -## generate_open_api - -This endpoint will generate any missing operations in any registered OpenAPI document if the operation does not already exist in the document. -Returns the original document and the newly generated document allowing a diff to be performed to see what has changed. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.apis.generate_open_api(api_id="", version_id="") - -if ! res.generate_open_api_spec_diff.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to generate an OpenAPI specification for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to generate an OpenAPI specification for. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GenerateOpenApiSpecResponse)](../../models/operations/generateopenapispecresponse.md)** - - - -## generate_postman - -Generates a postman collection containing all endpoints for a particular API. Includes variables produced for any path/query/header parameters included in the OpenAPI document. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.apis.generate_postman(api_id="", version_id="") - -if ! res.postman_collection.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to generate a Postman collection for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to generate a Postman collection for. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GeneratePostmanCollectionResponse)](../../models/operations/generatepostmancollectionresponse.md)** - diff --git a/docs/sdks/artifacts/README.md b/docs/sdks/artifacts/README.md index a6c4bf7a..72ef3811 100644 --- a/docs/sdks/artifacts/README.md +++ b/docs/sdks/artifacts/README.md @@ -1,4 +1,5 @@ # Artifacts +(*artifacts*) ## Overview @@ -8,9 +9,13 @@ REST APIs for working with Registry artifacts * [preflight](#preflight) - Get access token for communicating with OCI distribution endpoints * [get_namespaces](#get_namespaces) - Each namespace contains many revisions. +* [set_archived](#set_archived) - Set whether a namespace is archived * [get_revisions](#get_revisions) * [get_tags](#get_tags) * [post_tags](#post_tags) - Add tags to an existing revision +* [set_visibility](#set_visibility) - Set visibility of a namespace with an existing metadata entry +* [list_remote_sources](#list_remote_sources) - Get remote sources attached to a particular namespace +* [create_remote_source](#create_remote_source) - Configure a new remote source * [get_manifest](#get_manifest) - Get manifest for a particular reference * [get_blob](#get_blob) - Get blob for a particular digest @@ -23,19 +28,16 @@ Get access token for communicating with OCI distribution endpoints ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Shared::PreflightRequest.new( +req = Models::Shared::PreflightRequest.new( namespace_name: "", ) - + res = s.artifacts.preflight(req) if ! res.preflight_token.nil? @@ -46,13 +48,13 @@ end ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Shared::PreflightRequest](../../models/shared/preflightrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [Models::Shared::PreflightRequest](../../models/shared/preflightrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::PreflightResponse)](../../models/operations/preflightresponse.md)** +**[T.nilable(Models::Operations::PreflightResponse)](../../models/operations/preflightresponse.md)** @@ -65,15 +67,12 @@ Each namespace contains many revisions. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.artifacts.get_namespaces() if ! res.get_namespaces_response.nil? @@ -84,26 +83,59 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetNamespacesResponse)](../../models/operations/getnamespacesresponse.md)** +**[T.nilable(Models::Operations::GetNamespacesResponse)](../../models/operations/getnamespacesresponse.md)** -## get_revisions +## set_archived + +Set whether a namespace is archived ### Example Usage ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) +res = s.artifacts.set_archived(namespace_name="", request_body=Models::Operations::ArchiveNamespaceRequestBody.new()) + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | +| `request_body` | [T.nilable(Models::Operations::ArchiveNamespaceRequestBody)](../../models/operations/archivenamespacerequestbody.md) | :heavy_minus_sign: | Archived status | + +### Response + +**[T.nilable(Models::Operations::ArchiveNamespaceResponse)](../../models/operations/archivenamespaceresponse.md)** + + + +## get_revisions + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) - res = s.artifacts.get_revisions(namespace_name="", next_page_token="") if ! res.get_revisions_response.nil? @@ -121,7 +153,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetRevisionsResponse)](../../models/operations/getrevisionsresponse.md)** +**[T.nilable(Models::Operations::GetRevisionsResponse)](../../models/operations/getrevisionsresponse.md)** @@ -132,15 +164,12 @@ end ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.artifacts.get_tags(namespace_name="") if ! res.get_tags_response.nil? @@ -157,7 +186,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetTagsResponse)](../../models/operations/gettagsresponse.md)** +**[T.nilable(Models::Operations::GetTagsResponse)](../../models/operations/gettagsresponse.md)** @@ -170,16 +199,13 @@ Add tags to an existing revision ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.artifacts.post_tags(namespace_name="", add_tags=::OpenApiSDK::Shared::AddTags.new( +res = s.artifacts.post_tags(namespace_name="", add_tags=Models::Shared::AddTags.new( revision_digest: "", tags: [ "", @@ -194,35 +220,151 @@ end ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `namespace_name` | *::String* | :heavy_check_mark: | N/A | -| `add_tags` | [T.nilable(::OpenApiSDK::Shared::AddTags)](../../models/shared/addtags.md) | :heavy_minus_sign: | A JSON representation of the tags to add | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | +| `add_tags` | [T.nilable(Models::Shared::AddTags)](../../models/shared/addtags.md) | :heavy_minus_sign: | A JSON representation of the tags to add | ### Response -**[T.nilable(::OpenApiSDK::Operations::PostTagsResponse)](../../models/operations/posttagsresponse.md)** +**[T.nilable(Models::Operations::PostTagsResponse)](../../models/operations/posttagsresponse.md)** -## get_manifest +## set_visibility -Get manifest for a particular reference +Set visibility of a namespace with an existing metadata entry ### Example Usage ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.artifacts.set_visibility(namespace_name="", request_body=Models::Operations::SetVisibilityRequestBody.new( + public: false, +)) + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | +| `request_body` | [T.nilable(Models::Operations::SetVisibilityRequestBody)](../../models/operations/setvisibilityrequestbody.md) | :heavy_minus_sign: | Namespace visibility | + +### Response + +**[T.nilable(Models::Operations::SetVisibilityResponse)](../../models/operations/setvisibilityresponse.md)** + + + +## list_remote_sources + +Get remote sources attached to a particular namespace + +### Example Usage -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.artifacts.list_remote_sources(namespace_name="") + +if ! res.remote_source.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::ListRemoteSourcesResponse)](../../models/operations/listremotesourcesresponse.md)** + + + +## create_remote_source + +Configure a new remote source + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +req = Models::Shared::RemoteSource.new( + inputs: [ + Models::Shared::RemoteDocument.new( + registry_url: "https://productive-swine.net", + ), + ], + output: Models::Shared::RemoteDocument.new( + registry_url: "https://spiteful-apricot.info", + ), ) - +res = s.artifacts.create_remote_source(req) + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [Models::Shared::RemoteSource](../../models/shared/remotesource.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CreateRemoteSourceResponse)](../../models/operations/createremotesourceresponse.md)** + + + +## get_manifest + +Get manifest for a particular reference + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + res = s.artifacts.get_manifest(organization_slug="", workspace_slug="", namespace_name="", revision_reference="") if ! res.manifest.nil? @@ -242,7 +384,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetManifestResponse)](../../models/operations/getmanifestresponse.md)** +**[T.nilable(Models::Operations::GetManifestResponse)](../../models/operations/getmanifestresponse.md)** @@ -255,15 +397,12 @@ Get blob for a particular digest ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.artifacts.get_blob(organization_slug="", workspace_slug="", namespace_name="", digest="") if ! res.blob.nil? @@ -283,5 +422,5 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetBlobResponse)](../../models/operations/getblobresponse.md)** +**[T.nilable(Models::Operations::GetBlobResponse)](../../models/operations/getblobresponse.md)** diff --git a/docs/sdks/auth/README.md b/docs/sdks/auth/README.md index 7f869b88..618c1d93 100644 --- a/docs/sdks/auth/README.md +++ b/docs/sdks/auth/README.md @@ -1,4 +1,5 @@ # Auth +(*auth*) ## Overview @@ -20,15 +21,12 @@ Validate the current api key. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.auth.validate_api_key() if ! res.api_key_details.nil? @@ -39,7 +37,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::ValidateApiKeyResponse)](../../models/operations/validateapikeyresponse.md)** +**[T.nilable(Models::Operations::ValidateApiKeyResponse)](../../models/operations/validateapikeyresponse.md)** @@ -52,15 +50,12 @@ Get information about the current user. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.auth.get_user() if ! res.user.nil? @@ -71,7 +66,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetUserResponse)](../../models/operations/getuserresponse.md)** +**[T.nilable(Models::Operations::GetUserResponse)](../../models/operations/getuserresponse.md)** @@ -84,10 +79,8 @@ Get or refresh an access token for the current workspace. ```ruby require 'speakeasy_client_sdk_ruby' - s = ::OpenApiSDK::SpeakeasyClientSDK.new - res = s.auth.get_access_token(workspace_id="") if ! res.access_token.nil? @@ -104,7 +97,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetAccessTokenResponse)](../../models/operations/getaccesstokenresponse.md)** +**[T.nilable(Models::Operations::GetAccessTokenResponse)](../../models/operations/getaccesstokenresponse.md)** @@ -117,15 +110,12 @@ Checks if generation is permitted for a particular run of the CLI ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.auth.get_allowances(gen_lock_id="", target_type="", passive=false) if ! res.access_details.nil? @@ -144,5 +134,5 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspaceAccessResponse)](../../models/operations/getworkspaceaccessresponse.md)** +**[T.nilable(Models::Operations::GetWorkspaceAccessResponse)](../../models/operations/getworkspaceaccessresponse.md)** diff --git a/docs/sdks/codesamples/README.md b/docs/sdks/codesamples/README.md new file mode 100644 index 00000000..4fe157be --- /dev/null +++ b/docs/sdks/codesamples/README.md @@ -0,0 +1,132 @@ +# CodeSamples +(*code_samples*) + +## Overview + +REST APIs for retrieving Code Samples + +### Available Operations + +* [generate_code_sample_preview](#generate_code_sample_preview) - Generate Code Sample previews from a file and configuration parameters. +* [generate_code_sample_preview_async](#generate_code_sample_preview_async) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling. +* [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 + +This endpoint generates Code Sample previews from a file and configuration parameters. + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +req = Models::Shared::CodeSampleSchemaInput.new( + language: "", + schema_file: Models::Shared::SchemaFile.new( + file_name: "example.file", + content: "0xc3dD8BfBef".encode(), + ), +) + +res = s.code_samples.generate_code_sample_preview(req) + +if ! res.usage_snippets.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::CodeSampleSchemaInput](../../models/shared/codesampleschemainput.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::GenerateCodeSamplePreviewResponse)](../../models/operations/generatecodesamplepreviewresponse.md)** + + + +## generate_code_sample_preview_async + +This endpoint generates Code Sample previews from a file and configuration parameters, receiving an async JobID response for polling. + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +req = Models::Shared::CodeSampleSchemaInput.new( + language: "", + schema_file: Models::Shared::SchemaFile.new( + file_name: "example.file", + content: "0xED5CDd177E".encode(), + ), +) + +res = s.code_samples.generate_code_sample_preview_async(req) + +if ! res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::CodeSampleSchemaInput](../../models/shared/codesampleschemainput.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::GenerateCodeSamplePreviewAsyncResponse)](../../models/operations/generatecodesamplepreviewasyncresponse.md)** + + + +## get_code_sample_preview_async + +Poll for the result of an asynchronous Code Sample preview generation. + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.code_samples.get_code_sample_preview_async(job_id="") + +if ! res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `job_id` | *::String* | :heavy_check_mark: | The ID of the job to check the status and retrieve results | + +### Response + +**[T.nilable(Models::Operations::GetCodeSamplePreviewAsyncResponse)](../../models/operations/getcodesamplepreviewasyncresponse.md)** + diff --git a/docs/sdks/embeds/README.md b/docs/sdks/embeds/README.md deleted file mode 100644 index ab4812b7..00000000 --- a/docs/sdks/embeds/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# Embeds - -## Overview - -REST APIs for managing embeds - -### Available Operations - -* [get_access_token](#get_access_token) - Get an embed access token for the current workspace. -* [get_valid](#get_valid) - Get all valid embed access tokens for the current workspace. -* [delete](#delete) - Revoke an embed access EmbedToken. - -## get_access_token - -Returns an embed access token for the current workspace. This can be used to authenticate access to externally embedded content. -Filters can be applied allowing views to be filtered to things like particular customerIds. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.embeds.get_access_token(description="ew archaeology weekly lest lumpy", duration=330261, filters=::OpenApiSDK::Shared::Filters.new( - filters: [ - ::OpenApiSDK::Shared::Filter.new( - key: "", - operator: "", - value: "", - ), - ], - limit: 347573, - offset: 52901, - operator: "", -)) - -if ! res.embed_access_token_response.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the embed access token. | -| `duration` | *T.nilable(::Integer)* | :heavy_minus_sign: | The duration (in minutes) of the embed access token. | -| `filters` | [T.nilable(::OpenApiSDK::Shared::Filters)](../../models/shared/filters.md) | :heavy_minus_sign: | The filter to apply to the query. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetEmbedAccessTokenResponse)](../../models/operations/getembedaccesstokenresponse.md)** - - - -## get_valid - -Get all valid embed access tokens for the current workspace. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.embeds.get_valid() - -if ! res.embed_tokens.nil? - # handle response -end - -``` - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetValidEmbedAccessTokensResponse)](../../models/operations/getvalidembedaccesstokensresponse.md)** - - - -## delete - -Revoke an embed access EmbedToken. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.embeds.delete(token_id="") - -if res.status_code == 200 - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `token_id` | *::String* | :heavy_check_mark: | The ID of the EmbedToken to revoke. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::RevokeEmbedAccessTokenResponse)](../../models/operations/revokeembedaccesstokenresponse.md)** - diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index af88d2f7..2740d7f7 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -1,8 +1,9 @@ # Events +(*events*) ## Overview -REST APIs for capturing event data +REST APIs for managing events captured by a speakeasy binary (CLI, GitHub Action etc) ### Available Operations @@ -21,19 +22,16 @@ Search events for a particular workspace by any field ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Operations::SearchWorkspaceEventsRequest.new( +req = Models::Operations::SearchWorkspaceEventsRequest.new( workspace_id: "", ) - + res = s.events.search(req) if ! res.cli_event_batch.nil? @@ -44,13 +42,13 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Operations::SearchWorkspaceEventsRequest](../../models/operations/searchworkspaceeventsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::SearchWorkspaceEventsRequest](../../models/operations/searchworkspaceeventsrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::SearchWorkspaceEventsResponse)](../../models/operations/searchworkspaceeventsresponse.md)** +**[T.nilable(Models::Operations::SearchWorkspaceEventsResponse)](../../models/operations/searchworkspaceeventsresponse.md)** @@ -63,28 +61,25 @@ Sends an array of events to be stored for a particular workspace. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.events.post(workspace_id="", request_body=[ - ::OpenApiSDK::Shared::CliEvent.new( +res = s.events.post(request_body=[ + Models::Shared::CliEvent.new( id: "", execution_id: "", workspace_id: "", speakeasy_api_key_name: "", - interaction_type: ::OpenApiSDK::Shared::InteractionType::TARGET_GENERATE, - local_started_at: DateTime.iso8601('2024-03-02T10:07:28.113Z'), - created_at: DateTime.iso8601('2023-09-09T05:59:33.876Z'), + interaction_type: Models::Shared::InteractionType::TOMBSTONE, + local_started_at: DateTime.iso8601('2025-03-02T10:07:28.113Z'), + created_at: DateTime.iso8601('2024-09-08T05:59:33.876Z'), speakeasy_version: "", success: false, ), -]) +], workspace_id="") if res.status_code == 200 # handle response @@ -94,14 +89,14 @@ end ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | -| `request_body` | T::Array<[::OpenApiSDK::Shared::CliEvent](../../models/shared/clievent.md)> | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request_body` | T::Array<[Models::Shared::CliEvent](../../models/shared/clievent.md)> | :heavy_check_mark: | N/A | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::PostWorkspaceEventsResponse)](../../models/operations/postworkspaceeventsresponse.md)** +**[T.nilable(Models::Operations::PostWorkspaceEventsResponse)](../../models/operations/postworkspaceeventsresponse.md)** @@ -114,16 +109,13 @@ Load recent events for a particular workspace ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.events.get_by_target(workspace_id="", target_id="", after_created_at=DateTime.iso8601('2024-03-28T13:02:13.730Z')) +res = s.events.get_by_target(target_id="", workspace_id="", after_created_at=DateTime.iso8601('2025-03-28T13:02:13.730Z')) if ! res.cli_event_batch.nil? # handle response @@ -135,13 +127,13 @@ end | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | | `target_id` | *::String* | :heavy_check_mark: | Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | | `after_created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Filter to only return events created after this timestamp | ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspaceEventsByTargetResponse)](../../models/operations/getworkspaceeventsbytargetresponse.md)** +**[T.nilable(Models::Operations::GetWorkspaceEventsByTargetResponse)](../../models/operations/getworkspaceeventsbytargetresponse.md)** @@ -154,16 +146,13 @@ Load targets for a particular workspace ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.events.get_targets(after_last_event_created_at=DateTime.iso8601('2023-07-22T21:05:41.157Z')) +res = s.events.get_targets(after_last_event_created_at=DateTime.iso8601('2024-07-21T21:05:41.157Z')) if ! res.target_sdk_list.nil? # handle response @@ -179,7 +168,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspaceTargetsResponse)](../../models/operations/getworkspacetargetsresponse.md)** +**[T.nilable(Models::Operations::GetWorkspaceTargetsResponse)](../../models/operations/getworkspacetargetsresponse.md)** @@ -192,16 +181,13 @@ Load targets for a particular workspace ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.events.get_targets_deprecated(workspace_id="", after_last_event_created_at=DateTime.iso8601('2022-09-16T02:27:30.906Z')) +res = s.events.get_targets_deprecated(workspace_id="", after_last_event_created_at=DateTime.iso8601('2023-09-16T02:27:30.906Z')) if ! res.target_sdk_list.nil? # handle response @@ -213,10 +199,10 @@ end | Parameter | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | | `after_last_event_created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Filter to only return targets with events created after this timestamp | ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspaceTargetsDeprecatedResponse)](../../models/operations/getworkspacetargetsdeprecatedresponse.md)** +**[T.nilable(Models::Operations::GetWorkspaceTargetsDeprecatedResponse)](../../models/operations/getworkspacetargetsdeprecatedresponse.md)** diff --git a/docs/sdks/github/README.md b/docs/sdks/github/README.md index 632dd9a8..43d0ff2d 100644 --- a/docs/sdks/github/README.md +++ b/docs/sdks/github/README.md @@ -1,10 +1,15 @@ # Github +(*github*) ## Overview +REST APIs for managing the github integration + ### Available Operations +* [get_setup](#get_setup) * [check_access](#check_access) +* [link_github](#link_github) * [check_publishing_p_rs](#check_publishing_p_rs) * [check_publishing_secrets](#check_publishing_secrets) * [store_publishing_secrets](#store_publishing_secrets) @@ -14,22 +19,54 @@ * [trigger_action](#trigger_action) * [get_action](#get_action) -## check_access +## get_setup ### Example Usage ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.github.get_setup(org="", repo="", generate_gen_lock_id="") + +if ! res.github_setup_state_response.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `org` | *::String* | :heavy_check_mark: | N/A | +| `repo` | *::String* | :heavy_check_mark: | N/A | +| `generate_gen_lock_id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::GetGithubSetupStateResponse)](../../models/operations/getgithubsetupstateresponse.md)** -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - + +## check_access + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + res = s.github.check_access(org="", repo="") if res.status_code == 200 @@ -47,26 +84,58 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::CheckGithubAccessResponse)](../../models/operations/checkgithubaccessresponse.md)** +**[T.nilable(Models::Operations::CheckGithubAccessResponse)](../../models/operations/checkgithubaccessresponse.md)** -## check_publishing_p_rs +## link_github ### Example Usage ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) +res = s.github.link_github(installation_id="", github_org="", github_oidc_token="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `installation_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `github_org` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `github_oidc_token` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | + +### Response + +**[T.nilable(Models::Operations::LinkGithubAccessResponse)](../../models/operations/linkgithubaccessresponse.md)** + + + +## check_publishing_p_rs + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) - res = s.github.check_publishing_p_rs(generate_gen_lock_id="", org="", repo="") if ! res.github_publishing_pr_response.nil? @@ -85,7 +154,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GithubCheckPublishingPRsResponse)](../../models/operations/githubcheckpublishingprsresponse.md)** +**[T.nilable(Models::Operations::GithubCheckPublishingPRsResponse)](../../models/operations/githubcheckpublishingprsresponse.md)** @@ -96,15 +165,12 @@ end ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.github.check_publishing_secrets(generate_gen_lock_id="") if ! res.github_missing_publishing_secrets_response.nil? @@ -121,7 +187,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GithubCheckPublishingSecretsResponse)](../../models/operations/githubcheckpublishingsecretsresponse.md)** +**[T.nilable(Models::Operations::GithubCheckPublishingSecretsResponse)](../../models/operations/githubcheckpublishingsecretsresponse.md)** @@ -132,19 +198,16 @@ end ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Shared::GithubStorePublishingSecretsRequest.new( +req = Models::Shared::GithubStorePublishingSecretsRequest.new( generate_gen_lock_id: "", ) - + res = s.github.store_publishing_secrets(req) if res.status_code == 200 @@ -155,13 +218,13 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Shared::GithubStorePublishingSecretsRequest](../../models/shared/githubstorepublishingsecretsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::GithubStorePublishingSecretsRequest](../../models/shared/githubstorepublishingsecretsrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GithubStorePublishingSecretsResponse)](../../models/operations/githubstorepublishingsecretsresponse.md)** +**[T.nilable(Models::Operations::GithubStorePublishingSecretsResponse)](../../models/operations/githubstorepublishingsecretsresponse.md)** @@ -172,21 +235,18 @@ end ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Shared::GithubConfigureCodeSamplesRequest.new( +req = Models::Shared::GithubConfigureCodeSamplesRequest.new( org: "", repo: "", target_name: "", ) - + res = s.github.configure_code_samples(req) if ! res.github_configure_code_samples_response.nil? @@ -197,13 +257,13 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Shared::GithubConfigureCodeSamplesRequest](../../models/shared/githubconfigurecodesamplesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::GithubConfigureCodeSamplesRequest](../../models/shared/githubconfigurecodesamplesrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GithubConfigureCodeSamplesResponse)](../../models/operations/githubconfigurecodesamplesresponse.md)** +**[T.nilable(Models::Operations::GithubConfigureCodeSamplesResponse)](../../models/operations/githubconfigurecodesamplesresponse.md)** @@ -214,16 +274,13 @@ end ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Shared::GithubConfigureMintlifyRepoRequest.new( +req = Models::Shared::GithubConfigureMintlifyRepoRequest.new( org: "", repo: "", input: "", @@ -231,7 +288,7 @@ req = ::OpenApiSDK::Shared::GithubConfigureMintlifyRepoRequest.new( "", ], ) - + res = s.github.configure_mintlify_repo(req) if res.status_code == 200 @@ -242,13 +299,13 @@ end ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Shared::GithubConfigureMintlifyRepoRequest](../../models/shared/githubconfiguremintlifyreporequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::GithubConfigureMintlifyRepoRequest](../../models/shared/githubconfiguremintlifyreporequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GithubConfigureMintlifyRepoResponse)](../../models/operations/githubconfiguremintlifyreporesponse.md)** +**[T.nilable(Models::Operations::GithubConfigureMintlifyRepoResponse)](../../models/operations/githubconfiguremintlifyreporesponse.md)** @@ -259,20 +316,17 @@ end ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Shared::GithubConfigureTargetRequest.new( +req = Models::Shared::GithubConfigureTargetRequest.new( org: "", repo_name: "", ) - + res = s.github.configure_target(req) if res.status_code == 200 @@ -283,13 +337,13 @@ end ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Shared::GithubConfigureTargetRequest](../../models/shared/githubconfiguretargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::GithubConfigureTargetRequest](../../models/shared/githubconfiguretargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GithubConfigureTargetResponse)](../../models/operations/githubconfiguretargetresponse.md)** +**[T.nilable(Models::Operations::GithubConfigureTargetResponse)](../../models/operations/githubconfiguretargetresponse.md)** @@ -300,21 +354,18 @@ end ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Shared::GithubTriggerActionRequest.new( +req = Models::Shared::GithubTriggerActionRequest.new( org: "", repo_name: "", gen_lock_id: "", ) - + res = s.github.trigger_action(req) if res.status_code == 200 @@ -325,13 +376,13 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Shared::GithubTriggerActionRequest](../../models/shared/githubtriggeractionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::GithubTriggerActionRequest](../../models/shared/githubtriggeractionrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GithubTriggerActionResponse)](../../models/operations/githubtriggeractionresponse.md)** +**[T.nilable(Models::Operations::GithubTriggerActionResponse)](../../models/operations/githubtriggeractionresponse.md)** @@ -342,15 +393,12 @@ end ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.github.get_action(org="", repo="", target_name="") if ! res.github_get_action_response.nil? @@ -369,5 +417,5 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetGitHubActionResponse)](../../models/operations/getgithubactionresponse.md)** +**[T.nilable(Models::Operations::GetGitHubActionResponse)](../../models/operations/getgithubactionresponse.md)** diff --git a/docs/sdks/metadata/README.md b/docs/sdks/metadata/README.md deleted file mode 100644 index 0d07b43a..00000000 --- a/docs/sdks/metadata/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# Metadata - -## Overview - -REST APIs for managing Version Metadata entities - -### Available Operations - -* [get](#get) - Get all metadata for a particular apiID and versionID. -* [insert_version](#insert_version) - Insert metadata for a particular apiID and versionID. -* [delete_version](#delete_version) - Delete metadata for a particular apiID and versionID. - -## get - -Get all metadata for a particular apiID and versionID. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.metadata.get(api_id="", version_id="") - -if ! res.version_metadata.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve metadata for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to retrieve metadata for. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetVersionMetadataResponse)](../../models/operations/getversionmetadataresponse.md)** - - - -## insert_version - -Insert metadata for a particular apiID and versionID. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.metadata.insert_version(api_id="", version_id="", version_metadata=::OpenApiSDK::Shared::VersionMetadataInput.new( - meta_key: "", - meta_value: "", -)) - -if ! res.version_metadata.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to insert metadata for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to insert metadata for. | -| `version_metadata` | [::OpenApiSDK::Shared::VersionMetadataInput](../../models/shared/versionmetadatainput.md) | :heavy_check_mark: | A JSON representation of the metadata to insert. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::InsertVersionMetadataResponse)](../../models/operations/insertversionmetadataresponse.md)** - - - -## delete_version - -Delete metadata for a particular apiID and versionID. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.metadata.delete_version(api_id="", version_id="", meta_key="", meta_value="") - -if res.status_code == 200 - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to delete metadata for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `meta_key` | *::String* | :heavy_check_mark: | The key of the metadata to delete. | -| `meta_value` | *::String* | :heavy_check_mark: | The value of the metadata to delete. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::DeleteVersionMetadataResponse)](../../models/operations/deleteversionmetadataresponse.md)** - diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index b0b1e1bf..2ca76cd0 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -1,7 +1,10 @@ # Organizations +(*organizations*) ## Overview +REST APIs for managing Organizations (speakeasy L1 Tenancy construct) + ### Available Operations * [get_all](#get_all) - Get organizations for a user @@ -9,6 +12,9 @@ * [get](#get) - Get organization * [create_free_trial](#create_free_trial) - Create a free trial for an organization * [get_usage](#get_usage) - Get billing usage summary for a particular organization +* [create_billing_add_ons](#create_billing_add_ons) - Create billing add ons +* [get_billing_add_ons](#get_billing_add_ons) - Get billing add ons +* [delete_billing_add_on](#delete_billing_add_on) - Delete billing add ons ## get_all @@ -19,15 +25,12 @@ Returns a list of organizations a user has access too ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.organizations.get_all() if ! res.organizations.nil? @@ -38,7 +41,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetOrganizationsResponse)](../../models/operations/getorganizationsresponse.md)** +**[T.nilable(Models::Operations::GetOrganizationsResponse)](../../models/operations/getorganizationsresponse.md)** @@ -51,25 +54,23 @@ Creates an organization ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Shared::Organization.new( +req = Models::Shared::Organization.new( id: "", name: "", slug: "", - account_type: ::OpenApiSDK::Shared::AccountType::SCALE_UP, + account_type: Models::Shared::AccountType::SCALE_UP, telemetry_disabled: false, - created_at: DateTime.iso8601('2023-12-01T17:06:07.804Z'), - updated_at: DateTime.iso8601('2023-04-03T12:48:32.253Z'), + created_at: DateTime.iso8601('2024-11-30T17:06:07.804Z'), + updated_at: DateTime.iso8601('2024-04-02T12:48:32.253Z'), + sso_activated: false, ) - + res = s.organizations.create(req) if ! res.organization.nil? @@ -80,13 +81,13 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::CreateOrganizationResponse)](../../models/operations/createorganizationresponse.md)** +**[T.nilable(Models::Operations::CreateOrganizationResponse)](../../models/operations/createorganizationresponse.md)** @@ -99,15 +100,12 @@ Get information about a particular organization. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.organizations.get(organization_id="") if ! res.organization.nil? @@ -124,7 +122,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetOrganizationResponse)](../../models/operations/getorganizationresponse.md)** +**[T.nilable(Models::Operations::GetOrganizationResponse)](../../models/operations/getorganizationresponse.md)** @@ -137,15 +135,12 @@ Creates a free trial for an organization ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.organizations.create_free_trial() if res.status_code == 200 @@ -156,7 +151,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::CreateFreeTrialResponse)](../../models/operations/createfreetrialresponse.md)** +**[T.nilable(Models::Operations::CreateFreeTrialResponse)](../../models/operations/createfreetrialresponse.md)** @@ -169,15 +164,12 @@ Returns a billing usage summary by target languages for a particular organizatio ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.organizations.get_usage() if ! res.organization_usage_response.nil? @@ -188,5 +180,110 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetOrganizationUsageResponse)](../../models/operations/getorganizationusageresponse.md)** +**[T.nilable(Models::Operations::GetOrganizationUsageResponse)](../../models/operations/getorganizationusageresponse.md)** + + + +## create_billing_add_ons + +Create billing add ons + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +req = Models::Shared::OrganizationBillingAddOnRequest.new( + add_ons: [ + Models::Shared::BillingAddOn::SNIPPET_AI, + ], +) + +res = s.organizations.create_billing_add_ons(req) + +if ! res.organization_billing_add_on_response.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::OrganizationBillingAddOnRequest](../../models/shared/organizationbillingaddonrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CreateBillingAddOnsResponse)](../../models/operations/createbillingaddonsresponse.md)** + + + +## get_billing_add_ons + +Get billing add ons + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.organizations.get_billing_add_ons() + +if ! res.organization_billing_add_on_response.nil? + # handle response +end + +``` + +### Response + +**[T.nilable(Models::Operations::GetBillingAddOnsResponse)](../../models/operations/getbillingaddonsresponse.md)** + + + +## delete_billing_add_on + +Delete billing add ons + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.organizations.delete_billing_add_on(add_on=Models::Shared::BillingAddOn::SNIPPET_AI) + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `add_on` | [Models::Shared::BillingAddOn](../../models/shared/billingaddon.md) | :heavy_check_mark: | The specific add-on to delete. | + +### Response + +**[T.nilable(Models::Operations::DeleteBillingAddOnResponse)](../../models/operations/deletebillingaddonresponse.md)** diff --git a/docs/sdks/publishingtokens/README.md b/docs/sdks/publishingtokens/README.md new file mode 100644 index 00000000..67d9a11b --- /dev/null +++ b/docs/sdks/publishingtokens/README.md @@ -0,0 +1,262 @@ +# PublishingTokens +(*publishing_tokens*) + +## Overview + +### Available Operations + +* [list](#list) - Get publishing tokens for a workspace +* [create](#create) - Create a publishing token for a workspace +* [get](#get) - Get a specific publishing token +* [update](#update) - Updates the validitity period of a publishing token +* [delete](#delete) - Delete a specific publishing token +* [resolve_target](#resolve_target) - Get a specific publishing token target +* [resolve_metadata](#resolve_metadata) - Get metadata about the token + +## list + +Returns a publishing token for the current workspace + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.publishing_tokens.list() + +if ! res.publishing_tokens.nil? + # handle response +end + +``` + +### Response + +**[T.nilable(Models::Operations::GetPublishingTokenResponse)](../../models/operations/getpublishingtokenresponse.md)** + + + +## create + +Creates a publishing token for the current workspace + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +req = Models::Operations::CreatePublishingTokenRequestBody.new( + target_id: "", + target_resource: "", + valid_until: DateTime.iso8601('2024-06-17T07:14:55.338Z'), + token_name: "", +) + +res = s.publishing_tokens.create(req) + +if ! res.publishing_token.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CreatePublishingTokenRequestBody](../../models/operations/createpublishingtokenrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CreatePublishingTokenResponse)](../../models/operations/createpublishingtokenresponse.md)** + + + +## get + +Get information about a particular publishing token. + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.publishing_tokens.get(token_id="") + +if ! res.publishing_token.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *::String* | :heavy_check_mark: | Unique identifier of the publishing token. | + +### Response + +**[T.nilable(Models::Operations::GetPublishingTokenByIDResponse)](../../models/operations/getpublishingtokenbyidresponse.md)** + + + +## update + +Updates the validity period of a particular publishing token. + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.publishing_tokens.update(token_id="", request_body=Models::Operations::UpdatePublishingTokenExpirationRequestBody.new( + valid_until: DateTime.iso8601('2025-07-28T19:04:48.565Z'), +)) + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `token_id` | *::String* | :heavy_check_mark: | Unique identifier of the publishing token. | +| `request_body` | [T.nilable(Models::Operations::UpdatePublishingTokenExpirationRequestBody)](../../models/operations/updatepublishingtokenexpirationrequestbody.md) | :heavy_minus_sign: | The publishing token to update | + +### Response + +**[T.nilable(Models::Operations::UpdatePublishingTokenExpirationResponse)](../../models/operations/updatepublishingtokenexpirationresponse.md)** + + + +## delete + +Delete a particular publishing token. + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.publishing_tokens.delete(token_id="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *::String* | :heavy_check_mark: | Unique identifier of the publishing token. | + +### Response + +**[T.nilable(Models::Operations::DeletePublishingTokenResponse)](../../models/operations/deletepublishingtokenresponse.md)** + + + +## resolve_target + +Get information about a particular publishing token target. + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.publishing_tokens.resolve_target(token_id="") + +if ! res.body.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *::String* | :heavy_check_mark: | Unique identifier of the publishing token. | + +### Response + +**[T.nilable(Models::Operations::GetPublishingTokenTargetByIDResponse)](../../models/operations/getpublishingtokentargetbyidresponse.md)** + + + +## resolve_metadata + +Get information about a particular publishing token. + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.publishing_tokens.resolve_metadata(token_id="") + +if ! res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `token_id` | *::String* | :heavy_check_mark: | Unique identifier of the publishing token. | + +### Response + +**[T.nilable(Models::Operations::GetPublishingTokenPublicMetadataResponse)](../../models/operations/getpublishingtokenpublicmetadataresponse.md)** + diff --git a/docs/sdks/reports/README.md b/docs/sdks/reports/README.md index 95398f85..160ba0dd 100644 --- a/docs/sdks/reports/README.md +++ b/docs/sdks/reports/README.md @@ -1,8 +1,9 @@ # Reports +(*reports*) ## Overview -REST APIs for managing reports +REST APIs for managing reports (lint reports, change reports, etc) ### Available Operations @@ -19,23 +20,20 @@ Upload a report. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Operations::UploadReportRequestBody.new( - data: ::OpenApiSDK::Shared::Report.new(), - file: ::OpenApiSDK::Operations::UploadReportFile.new( +req = Models::Operations::UploadReportRequestBody.new( + data: Models::Shared::Report.new(), + file: Models::Operations::File.new( file_name: "example.file", content: "0x8cc9e675ad".encode(), ), ) - + res = s.reports.upload(req) if ! res.uploaded_report.nil? @@ -46,13 +44,13 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Operations::UploadReportRequestBody](../../models/operations/uploadreportrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::UploadReportRequestBody](../../models/operations/uploadreportrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::UploadReportResponse)](../../models/operations/uploadreportresponse.md)** +**[T.nilable(Models::Operations::UploadReportResponse)](../../models/operations/uploadreportresponse.md)** @@ -65,15 +63,12 @@ Get the signed access url for the linting reports for a particular document. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.reports.get_signed_url(document_checksum="") if ! res.signed_access.nil? @@ -90,7 +85,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetLintingReportSignedUrlResponse)](../../models/operations/getlintingreportsignedurlresponse.md)** +**[T.nilable(Models::Operations::GetLintingReportSignedUrlResponse)](../../models/operations/getlintingreportsignedurlresponse.md)** @@ -103,15 +98,12 @@ Get the signed access url for the change reports for a particular document. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.reports.get_changes_signed_url(document_checksum="") if ! res.signed_access.nil? @@ -128,5 +120,5 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetChangesReportSignedUrlResponse)](../../models/operations/getchangesreportsignedurlresponse.md)** +**[T.nilable(Models::Operations::GetChangesReportSignedUrlResponse)](../../models/operations/getchangesreportsignedurlresponse.md)** diff --git a/docs/sdks/requests/README.md b/docs/sdks/requests/README.md deleted file mode 100644 index cd5acf79..00000000 --- a/docs/sdks/requests/README.md +++ /dev/null @@ -1,137 +0,0 @@ -# Requests - -## Overview - -REST APIs for retrieving request information - -### Available Operations - -* [query](#query) - Query the event log to retrieve a list of requests. -* [get](#get) - Get information about a particular request. -* [generate_postman_collection](#generate_postman_collection) - Generate a Postman collection for a particular request. - -## query - -Supports retrieving a list of request captured by the SDK for this workspace. -Allows the filtering of requests on a number of criteria such as ApiID, VersionID, Path, Method, etc. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.requests.query(filters=::OpenApiSDK::Shared::Filters.new( - filters: [ - ::OpenApiSDK::Shared::Filter.new( - key: "", - operator: "", - value: "", - ), - ], - limit: 764604, - offset: 989836, - operator: "", -)) - -if ! res.bounded_requests.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `filters` | [T.nilable(::OpenApiSDK::Shared::Filters)](../../models/shared/filters.md) | :heavy_minus_sign: | The filter to apply to the query. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::QueryEventLogResponse)](../../models/operations/queryeventlogresponse.md)** - - - -## get - -Get information about a particular request. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.requests.get(request_id="") - -if ! res.unbounded_request.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `request_id` | *::String* | :heavy_check_mark: | The ID of the request to retrieve. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetRequestFromEventLogResponse)](../../models/operations/getrequestfromeventlogresponse.md)** - - - -## generate_postman_collection - -Generates a Postman collection for a particular request. -Allowing it to be replayed with the same inputs that were captured by the SDK. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.requests.generate_postman_collection(request_id="") - -if ! res.postman_collection.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `request_id` | *::String* | :heavy_check_mark: | The ID of the request to retrieve. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GenerateRequestPostmanCollectionResponse)](../../models/operations/generaterequestpostmancollectionresponse.md)** - diff --git a/docs/sdks/schemas/README.md b/docs/sdks/schemas/README.md deleted file mode 100644 index 2207a054..00000000 --- a/docs/sdks/schemas/README.md +++ /dev/null @@ -1,342 +0,0 @@ -# Schemas - -## Overview - -REST APIs for managing Schema entities - -### Available Operations - -* [get_latest](#get_latest) - Get information about the latest schema. -* [post](#post) - Register a schema. -* [download](#download) - Download the latest schema for a particular apiID. -* [get_diff](#get_diff) - Get a diff of two schema revisions for an Api. -* [delete](#delete) - Delete a particular schema revision for an Api. -* [get_revision](#get_revision) - Get information about a particular schema revision for an Api. -* [download_revision](#download_revision) - Download a particular schema revision for an Api. -* [get](#get) - Get information about all schemas associated with a particular apiID. - -## get_latest - -Returns information about the last uploaded schema for a particular API version. -This won't include the schema itself, that can be retrieved via the downloadSchema operation. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.schemas.get_latest(api_id="", version_id="") - -if ! res.schema.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to get the schema for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetSchemaResponse)](../../models/operations/getschemaresponse.md)** - - - -## post - -Allows uploading a schema for a particular API version. -This will be used to populate ApiEndpoints and used as a base for any schema generation if present. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.schemas.post(api_id="", version_id="", request_body=::OpenApiSDK::Operations::RegisterSchemaRequestBody.new( - file: ::OpenApiSDK::Operations::File.new( - file_name: "example.file", - content: "0x9fcD0d6727".encode(), - ), -)) - -if res.status_code == 200 - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to get the schema for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `request_body` | [::OpenApiSDK::Operations::RegisterSchemaRequestBody](../../models/operations/registerschemarequestbody.md) | :heavy_check_mark: | The schema file to upload provided as a multipart/form-data file segment. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::RegisterSchemaResponse)](../../models/operations/registerschemaresponse.md)** - - - -## download - -Download the latest schema for a particular apiID. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.schemas.download(api_id="", version_id="") - -if ! res.two_xx_application_json_schema.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to download the schema for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::DownloadSchemaResponse)](../../models/operations/downloadschemaresponse.md)** - - - -## get_diff - -Get a diff of two schema revisions for an Api. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.schemas.get_diff(api_id="", version_id="", base_revision_id="", target_revision_id="") - -if ! res.schema_diff.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve schemas for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `base_revision_id` | *::String* | :heavy_check_mark: | The base revision ID of the schema to retrieve. | -| `target_revision_id` | *::String* | :heavy_check_mark: | The target revision ID of the schema to retrieve. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetSchemaDiffResponse)](../../models/operations/getschemadiffresponse.md)** - - - -## delete - -Delete a particular schema revision for an Api. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.schemas.delete(api_id="", version_id="", revision_id="") - -if res.status_code == 200 - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to delete schemas for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `revision_id` | *::String* | :heavy_check_mark: | The revision ID of the schema to delete. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::DeleteSchemaResponse)](../../models/operations/deleteschemaresponse.md)** - - - -## get_revision - -Returns information about the last uploaded schema for a particular schema revision. -This won't include the schema itself, that can be retrieved via the downloadSchema operation. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.schemas.get_revision(api_id="", version_id="", revision_id="") - -if ! res.schema.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve schemas for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `revision_id` | *::String* | :heavy_check_mark: | The revision ID of the schema to retrieve. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetSchemaRevisionResponse)](../../models/operations/getschemarevisionresponse.md)** - - - -## download_revision - -Download a particular schema revision for an Api. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.schemas.download_revision(api_id="", version_id="", revision_id="") - -if ! res.two_xx_application_json_schema.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve schemas for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | -| `revision_id` | *::String* | :heavy_check_mark: | The revision ID of the schema to retrieve. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::DownloadSchemaRevisionResponse)](../../models/operations/downloadschemarevisionresponse.md)** - - - -## get - -Returns information the schemas associated with a particular apiID. -This won't include the schemas themselves, they can be retrieved via the downloadSchema operation. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.schemas.get(api_id="", version_id="") - -if ! res.schemata.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve schemas for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to delete metadata for. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetSchemasResponse)](../../models/operations/getschemasresponse.md)** - diff --git a/docs/sdks/schemastore/README.md b/docs/sdks/schemastore/README.md new file mode 100644 index 00000000..eeefa3b1 --- /dev/null +++ b/docs/sdks/schemastore/README.md @@ -0,0 +1,87 @@ +# SchemaStore +(*schema_store*) + +## Overview + +### Available Operations + +* [get_schema_store_item](#get_schema_store_item) - Get a OAS schema from the schema store +* [create_schema_store_item](#create_schema_store_item) - Create a schema in the schema store + +## get_schema_store_item + +Get a OAS schema from the schema store + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +req = Models::Operations::GetSchemaStoreItemRequestBody.new() + +res = s.schema_store.get_schema_store_item(req) + +if ! res.schema_store_item.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::GetSchemaStoreItemRequestBody](../../models/operations/getschemastoreitemrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::GetSchemaStoreItemResponse)](../../models/operations/getschemastoreitemresponse.md)** + + + +## create_schema_store_item + +Create a schema in the schema store + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +req = Models::Operations::CreateSchemaStoreItemRequestBody.new( + spec: "", + package_name: "", + sdk_classname: "", + format: Models::Operations::Format::YAML, +) + +res = s.schema_store.create_schema_store_item(req) + +if ! res.schema_store_item.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CreateSchemaStoreItemRequestBody](../../models/operations/createschemastoreitemrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CreateSchemaStoreItemResponse)](../../models/operations/createschemastoreitemresponse.md)** + diff --git a/docs/sdks/shorturls/README.md b/docs/sdks/shorturls/README.md index 13f2813d..46849472 100644 --- a/docs/sdks/shorturls/README.md +++ b/docs/sdks/shorturls/README.md @@ -1,4 +1,5 @@ # ShortURLs +(*short_ur_ls*) ## Overview @@ -17,19 +18,16 @@ Shorten a URL. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Operations::CreateRequestBody.new( +req = Models::Operations::CreateRequestBody.new( url: "https://probable-heating.com/", ) - + res = s.short_ur_ls.create(req) if ! res.short_url.nil? @@ -40,11 +38,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Operations::CreateRequestBody](../../models/operations/createrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CreateRequestBody](../../models/operations/createrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::CreateResponse)](../../models/operations/createresponse.md)** +**[T.nilable(Models::Operations::CreateResponse)](../../models/operations/createresponse.md)** diff --git a/docs/sdks/speakeasyclientsdk/README.md b/docs/sdks/speakeasyclientsdk/README.md index 9bd59948..d1b0a7f0 100644 --- a/docs/sdks/speakeasyclientsdk/README.md +++ b/docs/sdks/speakeasyclientsdk/README.md @@ -2,7 +2,9 @@ ## Overview -Speakeasy API: The Speakeasy API allows teams to manage common operations with their APIs +Speakeasy API: The Subscriptions API manages subscriptions for CLI and registry events The Speakeasy Platform Documentation - \ No newline at end of file + + +### Available Operations diff --git a/docs/sdks/speakeasyclientsdkapiendpoints/README.md b/docs/sdks/speakeasyclientsdkapiendpoints/README.md deleted file mode 100644 index 9f36bd4d..00000000 --- a/docs/sdks/speakeasyclientsdkapiendpoints/README.md +++ /dev/null @@ -1,303 +0,0 @@ -# SpeakeasyClientSDKApiEndpoints - -## Overview - -REST APIs for managing ApiEndpoint entities - -### Available Operations - -* [get_all](#get_all) - Get all ApiEndpoints for a particular apiID and versionID. -* [find](#find) - Find an ApiEndpoint via its displayName. -* [delete](#delete) - Delete an ApiEndpoint. -* [get](#get) - Get an ApiEndpoint. -* [upsert](#upsert) - Upsert an ApiEndpoint. -* [generate_open_api_spec](#generate_open_api_spec) - Generate an OpenAPI specification for a particular ApiEndpoint. -* [generate_postman_collection](#generate_postman_collection) - Generate a Postman collection for a particular ApiEndpoint. - -## get_all - -Get all ApiEndpoints for a particular apiID and versionID. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.api_endpoints.get_all(api_id="", version_id="") - -if ! res.api_endpoints.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to retrieve ApiEndpoints for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to retrieve ApiEndpoints for. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetAllForVersionApiEndpointsResponse)](../../models/operations/getallforversionapiendpointsresponse.md)** - - - -## find - -Find an ApiEndpoint via its displayName (set by operationId from a registered OpenAPI schema). -This is useful for finding the ID of an ApiEndpoint to use in the /v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID} endpoints. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.api_endpoints.find(api_id="", version_id="", display_name="Aliyah.Weimann41") - -if ! res.api_endpoint.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api the ApiEndpoint belongs to. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api the ApiEndpoint belongs to. | -| `display_name` | *::String* | :heavy_check_mark: | The displayName of the ApiEndpoint to find (set by operationId from OpenAPI schema). | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::FindApiEndpointResponse)](../../models/operations/findapiendpointresponse.md)** - - - -## delete - -Delete an ApiEndpoint. This will also delete all associated Request Logs (if using a Postgres datastore). - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.api_endpoints.delete(api_id="", version_id="", api_endpoint_id="") - -if res.status_code == 200 - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api the ApiEndpoint belongs to. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api the ApiEndpoint belongs to. | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint to delete. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::DeleteApiEndpointResponse)](../../models/operations/deleteapiendpointresponse.md)** - - - -## get - -Get an ApiEndpoint. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.api_endpoints.get(api_id="", version_id="", api_endpoint_id="") - -if ! res.api_endpoint.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api the ApiEndpoint belongs to. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api the ApiEndpoint belongs to. | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint to retrieve. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GetApiEndpointResponse)](../../models/operations/getapiendpointresponse.md)** - - - -## upsert - -Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.api_endpoints.upsert(api_id="", version_id="", api_endpoint_id="", api_endpoint=::OpenApiSDK::Shared::ApiEndpointInput.new( - api_endpoint_id: "", - description: "curiously painfully proliferate awful bump without fly", - display_name: "Dorian_Mertz62", - method: "", - path: "/usr/libexec", - version_id: "", -)) - -if ! res.api_endpoint.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api the ApiEndpoint belongs to. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api the ApiEndpoint belongs to. | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint to upsert. | -| `api_endpoint` | [::OpenApiSDK::Shared::ApiEndpointInput](../../models/shared/apiendpointinput.md) | :heavy_check_mark: | A JSON representation of the ApiEndpoint to upsert. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::UpsertApiEndpointResponse)](../../models/operations/upsertapiendpointresponse.md)** - - - -## generate_open_api_spec - -This endpoint will generate a new operation in any registered OpenAPI document if the operation does not already exist in the document. -Returns the original document and the newly generated document allowing a diff to be performed to see what has changed. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.api_endpoints.generate_open_api_spec(api_id="", version_id="", api_endpoint_id="") - -if ! res.generate_open_api_spec_diff.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to generate an OpenAPI specification for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to generate an OpenAPI specification for. | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint to generate an OpenAPI specification for. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GenerateOpenApiSpecForApiEndpointResponse)](../../models/operations/generateopenapispecforapiendpointresponse.md)** - - - -## generate_postman_collection - -Generates a postman collection that allows the endpoint to be called from postman variables produced for any path/query/header parameters included in the OpenAPI document. - -### Example Usage - -```ruby -require 'speakeasy_client_sdk_ruby' - - -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.api_endpoints.generate_postman_collection(api_id="", version_id="", api_endpoint_id="") - -if ! res.postman_collection.nil? - # handle response -end - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `api_id` | *::String* | :heavy_check_mark: | The ID of the Api to generate a Postman collection for. | -| `version_id` | *::String* | :heavy_check_mark: | The version ID of the Api to generate a Postman collection for. | -| `api_endpoint_id` | *::String* | :heavy_check_mark: | The ID of the ApiEndpoint to generate a Postman collection for. | - -### Response - -**[T.nilable(::OpenApiSDK::Operations::GeneratePostmanCollectionForApiEndpointResponse)](../../models/operations/generatepostmancollectionforapiendpointresponse.md)** - diff --git a/docs/sdks/subscriptions/README.md b/docs/sdks/subscriptions/README.md new file mode 100644 index 00000000..6b59e2a5 --- /dev/null +++ b/docs/sdks/subscriptions/README.md @@ -0,0 +1,82 @@ +# Subscriptions +(*subscriptions*) + +## Overview + +REST APIs for managing subscriptions + +### Available Operations + +* [ignore_subscription_namespace](#ignore_subscription_namespace) - Ignored a namespace for a subscription +* [activate_subscription_namespace](#activate_subscription_namespace) - Activate an ignored namespace for a subscription + +## ignore_subscription_namespace + +Ignored a namespace for a subscription + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.subscriptions.ignore_subscription_namespace(subscription_id="", namespace_name="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `subscription_id` | *::String* | :heavy_check_mark: | The existing subscription ID | +| `namespace_name` | *::String* | :heavy_check_mark: | The namespace name | + +### Response + +**[T.nilable(Models::Operations::IgnoreSubscriptionNamespaceResponse)](../../models/operations/ignoresubscriptionnamespaceresponse.md)** + + + +## activate_subscription_namespace + +Activate an ignored namespace for a subscription + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.subscriptions.activate_subscription_namespace(subscription_id="", namespace_name="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `subscription_id` | *::String* | :heavy_check_mark: | The existing subscription ID | +| `namespace_name` | *::String* | :heavy_check_mark: | The namespace name | + +### Response + +**[T.nilable(Models::Operations::ActivateSubscriptionNamespaceResponse)](../../models/operations/activatesubscriptionnamespaceresponse.md)** + diff --git a/docs/sdks/suggest/README.md b/docs/sdks/suggest/README.md index dcf00b26..58184c70 100644 --- a/docs/sdks/suggest/README.md +++ b/docs/sdks/suggest/README.md @@ -1,4 +1,5 @@ # Suggest +(*suggest*) ## Overview @@ -8,6 +9,7 @@ REST APIs for managing LLM OAS suggestions * [openapi](#openapi) - (DEPRECATED) Generate suggestions for improving an OpenAPI document. * [generate](#generate) - Generate suggestions for improving an OpenAPI document. +* [suggest_items](#suggest_items) - Generate generic suggestions for a list of items. * [openapi_registry](#openapi_registry) - Generate suggestions for improving an OpenAPI document stored in the registry. ## openapi @@ -19,17 +21,14 @@ Get suggestions from an LLM model for improving an OpenAPI document. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.suggest.openapi(x_session_id="", request_body=::OpenApiSDK::Operations::SuggestOpenAPIRequestBody.new( - schema: ::OpenApiSDK::Operations::Schema.new( +res = s.suggest.openapi(x_session_id="", request_body=Models::Operations::SuggestOpenAPIRequestBody.new( + schema: Models::Operations::Schema.new( file_name: "example.file", content: "0x8a2EB0Aaa9".encode(), ), @@ -43,14 +42,14 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `x_session_id` | *::String* | :heavy_check_mark: | N/A | -| `request_body` | [::OpenApiSDK::Operations::SuggestOpenAPIRequestBody](../../models/operations/suggestopenapirequestbody.md) | :heavy_check_mark: | The schema file to upload provided as a multipart/form-data file segment. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `x_session_id` | *::String* | :heavy_check_mark: | N/A | +| `request_body` | [Models::Operations::SuggestOpenAPIRequestBody](../../models/operations/suggestopenapirequestbody.md) | :heavy_check_mark: | The schema file to upload provided as a multipart/form-data file segment. | ### Response -**[T.nilable(::OpenApiSDK::Operations::SuggestOpenAPIResponse)](../../models/operations/suggestopenapiresponse.md)** +**[T.nilable(Models::Operations::SuggestOpenAPIResponse)](../../models/operations/suggestopenapiresponse.md)** @@ -63,26 +62,23 @@ Get suggestions from an LLM model for improving an OpenAPI document. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.suggest.generate(x_session_id="", suggest_request_body=::OpenApiSDK::Shared::SuggestRequestBody.new( - oas_summary: ::OpenApiSDK::Shared::OASSummary.new( - info: ::OpenApiSDK::Shared::OASInfo.new( +res = s.suggest.generate(x_session_id="", suggest_request_body=Models::Shared::SuggestRequestBody.new( + oas_summary: Models::Shared::OASSummary.new( + info: Models::Shared::OASInfo.new( title: "", summary: "", description: "cake ew cute aboard nor curry wee to", version: "", - license: ::OpenApiSDK::Shared::License.new(), + license: Models::Shared::License.new(), ), operations: [ - ::OpenApiSDK::Shared::OASOperation.new( + Models::Shared::OASOperation.new( method: "", path: "/selinux", operation_id: "", @@ -93,9 +89,9 @@ res = s.suggest.generate(x_session_id="", suggest_request_body=::OpenApiSDK: ), ], ), - suggestion_type: ::OpenApiSDK::Shared::SuggestRequestBodySuggestionType::METHOD_NAMES, + suggestion_type: Models::Shared::SuggestRequestBodySuggestionType::METHOD_NAMES, diagnostics: [ - ::OpenApiSDK::Shared::Diagnostic.new( + Models::Shared::Diagnostic.new( message: "", path: [ "/var/spool", @@ -113,46 +109,85 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `x_session_id` | *::String* | :heavy_check_mark: | N/A | -| `suggest_request_body` | [::OpenApiSDK::Shared::SuggestRequestBody](../../models/shared/suggestrequestbody.md) | :heavy_check_mark: | The OAS summary and diagnostics to use for the suggestion. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `x_session_id` | *::String* | :heavy_check_mark: | N/A | +| `suggest_request_body` | [Models::Shared::SuggestRequestBody](../../models/shared/suggestrequestbody.md) | :heavy_check_mark: | The OAS summary and diagnostics to use for the suggestion. | ### Response -**[T.nilable(::OpenApiSDK::Operations::SuggestResponse)](../../models/operations/suggestresponse.md)** +**[T.nilable(Models::Operations::SuggestResponse)](../../models/operations/suggestresponse.md)** -## openapi_registry +## suggest_items -Get suggestions from an LLM model for improving an OpenAPI document stored in the registry. +Generate generic suggestions for a list of items. ### Example Usage ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) +req = Models::Shared::SuggestItemsRequestBody.new( + prompt: "", + items: [ + "", + ], ) - -res = s.suggest.openapi_registry(x_session_id="", namespace_name="", revision_reference="", suggest_request_body=::OpenApiSDK::Shared::SuggestRequestBody.new( - oas_summary: ::OpenApiSDK::Shared::OASSummary.new( - info: ::OpenApiSDK::Shared::OASInfo.new( +res = s.suggest.suggest_items(req) + +if ! res.strings.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::SuggestItemsRequestBody](../../models/shared/suggestitemsrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::SuggestItemsResponse)](../../models/operations/suggestitemsresponse.md)** + + + +## openapi_registry + +Get suggestions from an LLM model for improving an OpenAPI document stored in the registry. + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + +res = s.suggest.openapi_registry(x_session_id="", namespace_name="", revision_reference="", suggest_request_body=Models::Shared::SuggestRequestBody.new( + oas_summary: Models::Shared::OASSummary.new( + info: Models::Shared::OASInfo.new( title: "", summary: "", description: "honesty impossible till qua", version: "", - license: ::OpenApiSDK::Shared::License.new(), + license: Models::Shared::License.new(), ), operations: [ - ::OpenApiSDK::Shared::OASOperation.new( + Models::Shared::OASOperation.new( method: "", path: "/home/user/dir", operation_id: "", @@ -163,9 +198,9 @@ res = s.suggest.openapi_registry(x_session_id="", namespace_name="", ), ], ), - suggestion_type: ::OpenApiSDK::Shared::SuggestRequestBodySuggestionType::DIAGNOSTICS_ONLY, + suggestion_type: Models::Shared::SuggestRequestBodySuggestionType::DIAGNOSTICS_ONLY, diagnostics: [ - ::OpenApiSDK::Shared::Diagnostic.new( + Models::Shared::Diagnostic.new( message: "", path: [ "/usr/local/bin", @@ -183,14 +218,14 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `x_session_id` | *::String* | :heavy_check_mark: | N/A | -| `namespace_name` | *::String* | :heavy_check_mark: | N/A | -| `revision_reference` | *::String* | :heavy_check_mark: | Tag or digest | -| `suggest_request_body` | [T.nilable(::OpenApiSDK::Shared::SuggestRequestBody)](../../models/shared/suggestrequestbody.md) | :heavy_minus_sign: | Suggest options | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `x_session_id` | *::String* | :heavy_check_mark: | N/A | +| `namespace_name` | *::String* | :heavy_check_mark: | N/A | +| `revision_reference` | *::String* | :heavy_check_mark: | Tag or digest | +| `suggest_request_body` | [T.nilable(Models::Shared::SuggestRequestBody)](../../models/shared/suggestrequestbody.md) | :heavy_minus_sign: | Suggest options | ### Response -**[T.nilable(::OpenApiSDK::Operations::SuggestOpenAPIRegistryResponse)](../../models/operations/suggestopenapiregistryresponse.md)** +**[T.nilable(Models::Operations::SuggestOpenAPIRegistryResponse)](../../models/operations/suggestopenapiregistryresponse.md)** diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index b25f1c07..21de0bba 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -1,7 +1,10 @@ # Workspaces +(*workspaces*) ## Overview +REST APIs for managing Workspaces (speakeasy tenancy) + ### Available Operations * [get_all](#get_all) - Get workspaces for a user @@ -17,6 +20,7 @@ * [get_tokens](#get_tokens) - Get tokens for a particular workspace * [create_token](#create_token) - Create a token for a particular workspace * [delete_token](#delete_token) - Delete a token for a particular workspace +* [set_feature_flags](#set_feature_flags) - Set workspace feature flags * [get_feature_flags](#get_feature_flags) - Get workspace feature flags ## get_all @@ -28,15 +32,12 @@ Returns a list of workspaces a user has access too ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.workspaces.get_all() if ! res.workspaces.nil? @@ -47,7 +48,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspacesResponse)](../../models/operations/getworkspacesresponse.md)** +**[T.nilable(Models::Operations::GetWorkspacesResponse)](../../models/operations/getworkspacesresponse.md)** @@ -60,15 +61,12 @@ Get information about a particular workspace by context. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.workspaces.get() if ! res.workspace_and_organization.nil? @@ -79,7 +77,7 @@ end ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspaceByContextResponse)](../../models/operations/getworkspacebycontextresponse.md)** +**[T.nilable(Models::Operations::GetWorkspaceByContextResponse)](../../models/operations/getworkspacebycontextresponse.md)** @@ -92,26 +90,22 @@ Creates a workspace ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -req = ::OpenApiSDK::Shared::Workspace.new( - created_at: DateTime.iso8601('2023-06-18T07:14:55.338Z'), +req = Models::Shared::Workspace.new( + created_at: DateTime.iso8601('2024-06-17T07:14:55.338Z'), id: "", name: "", organization_id: "", slug: "", - telemetry_disabled: false, - updated_at: DateTime.iso8601('2023-12-01T17:06:07.804Z'), + updated_at: DateTime.iso8601('2024-11-30T17:06:07.804Z'), verified: false, ) - + res = s.workspaces.create(req) if ! res.workspace.nil? @@ -122,13 +116,13 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `request` | [::OpenApiSDK::Shared::Workspace](../../models/shared/workspace.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `request` | [Models::Shared::Workspace](../../models/shared/workspace.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[T.nilable(::OpenApiSDK::Operations::CreateWorkspaceResponse)](../../models/operations/createworkspaceresponse.md)** +**[T.nilable(Models::Operations::CreateWorkspaceResponse)](../../models/operations/createworkspaceresponse.md)** @@ -141,15 +135,12 @@ Get information about a particular workspace. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.workspaces.get_by_id(workspace_id="") if ! res.workspace.nil? @@ -162,11 +153,11 @@ end | Parameter | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspaceResponse)](../../models/operations/getworkspaceresponse.md)** +**[T.nilable(Models::Operations::GetWorkspaceResponse)](../../models/operations/getworkspaceresponse.md)** @@ -179,25 +170,21 @@ Update information about a particular workspace. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.workspaces.update_details(workspace_id="", workspace=::OpenApiSDK::Shared::Workspace.new( - created_at: DateTime.iso8601('2024-02-01T20:44:31.776Z'), +res = s.workspaces.update_details(workspace=Models::Shared::Workspace.new( + created_at: DateTime.iso8601('2025-01-31T20:44:31.776Z'), id: "", name: "", organization_id: "", slug: "", - telemetry_disabled: false, - updated_at: DateTime.iso8601('2023-08-04T18:26:06.739Z'), + updated_at: DateTime.iso8601('2024-08-03T18:26:06.739Z'), verified: false, -)) +), workspace_id="") if res.status_code == 200 # handle response @@ -207,14 +194,14 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | -| `workspace` | [::OpenApiSDK::Shared::Workspace](../../models/shared/workspace.md) | :heavy_check_mark: | The workspace details to update. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `workspace` | [Models::Shared::Workspace](../../models/shared/workspace.md) | :heavy_check_mark: | The workspace details to update. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::UpdateWorkspaceDetailsResponse)](../../models/operations/updateworkspacedetailsresponse.md)** +**[T.nilable(Models::Operations::UpdateWorkspaceDetailsResponse)](../../models/operations/updateworkspacedetailsresponse.md)** @@ -227,15 +214,12 @@ Get settings about a particular workspace. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.workspaces.get_settings(workspace_id="") if ! res.workspace_settings.nil? @@ -248,11 +232,11 @@ end | Parameter | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspaceSettingsResponse)](../../models/operations/getworkspacesettingsresponse.md)** +**[T.nilable(Models::Operations::GetWorkspaceSettingsResponse)](../../models/operations/getworkspacesettingsresponse.md)** @@ -265,18 +249,18 @@ Update settings about a particular workspace. ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.workspaces.update_settings(workspace_id="", workspace_settings=::OpenApiSDK::Shared::WorkspaceSettings.new( +res = s.workspaces.update_settings(workspace_settings=Models::Shared::WorkspaceSettings.new( workspace_id: "", -)) + webhook_url: "https://last-suspension.info/", + created_at: DateTime.iso8601('2024-12-28T06:46:35.807Z'), + updated_at: DateTime.iso8601('2025-02-03T10:37:56.725Z'), +), workspace_id="") if res.status_code == 200 # handle response @@ -286,14 +270,14 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | -| `workspace_settings` | [::OpenApiSDK::Shared::WorkspaceSettings](../../models/shared/workspacesettings.md) | :heavy_check_mark: | The workspace settings to update. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `workspace_settings` | [Models::Shared::WorkspaceSettings](../../models/shared/workspacesettings.md) | :heavy_check_mark: | The workspace settings to update. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::UpdateWorkspaceSettingsResponse)](../../models/operations/updateworkspacesettingsresponse.md)** +**[T.nilable(Models::Operations::UpdateWorkspaceSettingsResponse)](../../models/operations/updateworkspacesettingsresponse.md)** @@ -306,15 +290,12 @@ Get team members for a particular workspace ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.workspaces.get_team(workspace_id="") if ! res.workspace_team_response.nil? @@ -327,11 +308,11 @@ end | Parameter | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspaceTeamResponse)](../../models/operations/getworkspaceteamresponse.md)** +**[T.nilable(Models::Operations::GetWorkspaceTeamResponse)](../../models/operations/getworkspaceteamresponse.md)** @@ -344,16 +325,13 @@ Grant a user access to a particular workspace ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.workspaces.grant_access(workspace_id="", email="Lucinda.Batz8@hotmail.com") +res = s.workspaces.grant_access(email="Lucinda.Batz8@hotmail.com", workspace_id="") if ! res.workspace_invite_response.nil? # handle response @@ -365,12 +343,12 @@ end | Parameter | Type | Required | Description | | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | | `email` | *::String* | :heavy_check_mark: | Email of the user to grant access to. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GrantUserAccessToWorkspaceResponse)](../../models/operations/grantuseraccesstoworkspaceresponse.md)** +**[T.nilable(Models::Operations::GrantUserAccessToWorkspaceResponse)](../../models/operations/grantuseraccesstoworkspaceresponse.md)** @@ -383,16 +361,13 @@ Revoke a user's access to a particular workspace ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.workspaces.revoke_access(workspace_id="", user_id="") +res = s.workspaces.revoke_access(user_id="", workspace_id="") if res.status_code == 200 # handle response @@ -404,12 +379,12 @@ end | Parameter | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | | `user_id` | *::String* | :heavy_check_mark: | Unique identifier of the user. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceResponse)](../../models/operations/revokeuseraccesstoworkspaceresponse.md)** +**[T.nilable(Models::Operations::RevokeUserAccessToWorkspaceResponse)](../../models/operations/revokeuseraccesstoworkspaceresponse.md)** @@ -422,15 +397,12 @@ Get tokens for a particular workspace ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - res = s.workspaces.get_tokens(workspace_id="") if ! res.workspace_tokens.nil? @@ -443,11 +415,11 @@ end | Parameter | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspaceTokensResponse)](../../models/operations/getworkspacetokensresponse.md)** +**[T.nilable(Models::Operations::GetWorkspaceTokensResponse)](../../models/operations/getworkspacetokensresponse.md)** @@ -460,22 +432,20 @@ Create a token for a particular workspace ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.workspaces.create_token(workspace_id="", workspace_token=::OpenApiSDK::Shared::WorkspaceToken.new( +res = s.workspaces.create_token(workspace_token=Models::Shared::WorkspaceToken.new( id: "", name: "", + workspace_id: "", alg: "", key: "", - created_at: "", -)) + created_at: DateTime.iso8601('2023-08-16T02:33:00.784Z'), +), workspace_id="") if res.status_code == 200 # handle response @@ -485,14 +455,14 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | -| `workspace_token` | [::OpenApiSDK::Shared::WorkspaceToken](../../models/shared/workspacetoken.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `workspace_token` | [Models::Shared::WorkspaceToken](../../models/shared/workspacetoken.md) | :heavy_check_mark: | N/A | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::CreateWorkspaceTokenResponse)](../../models/operations/createworkspacetokenresponse.md)** +**[T.nilable(Models::Operations::CreateWorkspaceTokenResponse)](../../models/operations/createworkspacetokenresponse.md)** @@ -505,16 +475,13 @@ Delete a token for a particular workspace ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) -) - - -res = s.workspaces.delete_token(workspace_id="", token_id="") +res = s.workspaces.delete_token(token_id="", workspace_id="") if res.status_code == 200 # handle response @@ -526,33 +493,71 @@ end | Parameter | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | | `token_id` | *::String* | :heavy_check_mark: | Unique identifier of the token. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::DeleteWorkspaceTokenResponse)](../../models/operations/deleteworkspacetokenresponse.md)** +**[T.nilable(Models::Operations::DeleteWorkspaceTokenResponse)](../../models/operations/deleteworkspacetokenresponse.md)** -## get_feature_flags +## set_feature_flags -Get workspace feature flags +Set workspace feature flags ### Example Usage ```ruby require 'speakeasy_client_sdk_ruby' +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) -s = ::OpenApiSDK::SpeakeasyClientSDK.new -s.config_security( - ::OpenApiSDK::Shared::Security.new( - api_key: "", - ) +req = Models::Shared::WorkspaceFeatureFlagRequest.new( + feature_flags: [ + Models::Shared::WorkspaceFeatureFlag::SKIP_SCHEMA_REGISTRY, + ], ) - +res = s.workspaces.set_feature_flags(req) + +if ! res.workspace_feature_flag_response.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::WorkspaceFeatureFlagRequest](../../models/shared/workspacefeatureflagrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::SetWorkspaceFeatureFlagsResponse)](../../models/operations/setworkspacefeatureflagsresponse.md)** + + + +## get_feature_flags + +Get workspace feature flags + +### Example Usage + +```ruby +require 'speakeasy_client_sdk_ruby' + +s = ::OpenApiSDK::SpeakeasyClientSDK.new( + security: Models::Shared::Security.new( + api_key: "", + ), + ) + res = s.workspaces.get_feature_flags(workspace_id="") if ! res.workspace_feature_flag_response.nil? @@ -565,9 +570,9 @@ end | Parameter | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `workspace_id` | *::String* | :heavy_check_mark: | Unique identifier of the workspace. | +| `workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier of the workspace. | ### Response -**[T.nilable(::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsResponse)](../../models/operations/getworkspacefeatureflagsresponse.md)** +**[T.nilable(Models::Operations::GetWorkspaceFeatureFlagsResponse)](../../models/operations/getworkspacefeatureflagsresponse.md)** diff --git a/lib/crystalline.rb b/lib/crystalline.rb new file mode 100644 index 00000000..d3e92904 --- /dev/null +++ b/lib/crystalline.rb @@ -0,0 +1,12 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module Crystalline + autoload :MetadataFields, 'crystalline/metadata_fields' +end + + +require_relative 'crystalline/utils' +require_relative 'crystalline/t' diff --git a/lib/open_api_sdk/utils/metadata_fields.rb b/lib/crystalline/metadata_fields.rb similarity index 58% rename from lib/open_api_sdk/utils/metadata_fields.rb rename to lib/crystalline/metadata_fields.rb index 4eca945d..2e85a72b 100644 --- a/lib/open_api_sdk/utils/metadata_fields.rb +++ b/lib/crystalline/metadata_fields.rb @@ -3,7 +3,8 @@ # typed: true # frozen_string_literal: true -module OpenApiSDK +module Crystalline + extend T::Sig module MetadataFields extend T::Sig @@ -32,9 +33,13 @@ def field(field_name, type, metadata = {}) fields << Field.new(field_name, type, metadata) end + def field_augmented? + true + end + def unmarshal_single(field_type, value, decoder = nil) - if field_type.respond_to? :unmarshal_json - unmarshalled = field_type.unmarshal_json(value) + if field_type.instance_of?(Class) && field_type.include?(::Crystalline::MetadataFields) + unmarshalled = field_type.from_dict(value) return unmarshalled elsif field_type.to_s == 'Object' # rubocop:disable Lint/SuppressedException @@ -52,14 +57,20 @@ def unmarshal_single(field_type, value, decoder = nil) end end - sig { params(json_obj: T.any(String, T::Hash[Symbol, String])).returns(Utils::FieldAugmented) } - def unmarshal_json(json_obj) - to_build = new + sig { params(json_obj: T.any(String, T::Hash[Symbol, String])).returns(Object) } + def from_json(json_obj) begin d = JSON.parse(json_obj) rescue TypeError, JSON::ParserError d = json_obj end + from_dict(d) + end + + sig { params(d: T::Hash[Symbol, String]).returns(Object) } + def from_dict(d) + to_build = new + fields.each do |field| field_type = field.type if T.nilable? field_type @@ -69,6 +80,10 @@ def unmarshal_json(json_obj) key = "#{field.name}=" lookup = field.metadata.fetch(:format_json, {}).fetch(:letter_case, nil).call value = d[lookup] + + # If field is not nilable, and the value is not in the dict, raise a KeyError + raise KeyError, "key #{lookup} not found in hash" if value.nil? && !T.nilable?(field.type) + # If field is nilable, and the value is not in the dict, just move to the next field next if value.nil? if T.arr? field_type @@ -82,12 +97,41 @@ def unmarshal_json(json_obj) unmarshalled_hash = value.map { |k, v| [k, unmarshal_single(val_type, v)] }.to_h # rubocop:enable Style/HashTransformValues to_build.send(key, unmarshalled_hash) + elsif T.union? field_type + discriminator = field.metadata.fetch(:discriminator, nil) + if !discriminator.nil? + type_to_deserialize = value.fetch(discriminator) + type_to_deserialize = T.get_union_types(field_type).find { |t| t.name.split('::').last == type_to_deserialize } + unmarshalled_val = Crystalline.unmarshal_json(value, type_to_deserialize) + to_build.send(key, unmarshalled_val) + else + union_types = T.get_union_types(field_type) + union_types = union_types.sort_by { |klass| Crystalline.non_nilable_attr_count(klass) } + + union_types.each do |union_type| + begin + unmarshalled_val = Crystalline.unmarshal_json(value, union_type) + to_build.send(key, unmarshalled_val) + rescue TypeError + next + rescue NoMethodError + next + rescue KeyError + next + end + break + end + end + elsif field_type.instance_of?(Class) && field_type.include?(::Crystalline::MetadataFields) + unmarshalled = Crystalline.unmarshal_json(value, field_type) + to_build.send(key, unmarshalled) else decoder = field.metadata.fetch(:format_json, {}).fetch(:decoder, nil) final_value = unmarshal_single(field_type, value, decoder) to_build.send(key, final_value) end end + to_build end end @@ -113,15 +157,15 @@ def field(field_name) end def marshal_single(field) - if field.respond_to? :marshal_json - field.marshal_json(encode: false) + if field.class.include? ::Crystalline::MetadataFields + field.to_dict else - Utils.val_to_string(field, primitives: false) + ::Crystalline.val_to_string(field, primitives: false) end end - def marshal_json(encode: true) - d = {} + def to_dict + result = {} fields.sort_by(&:name).each do |field| f = send(field.name) next if f.nil? @@ -133,18 +177,20 @@ def marshal_json(encode: true) key = field.name end if f.is_a? Array - d[key] = f.map { |o| marshal_single(o) } + result[key] = f.map { |o| marshal_single(o) } elsif f.is_a? Hash - d[key] = f.map { |k, v| [k, marshal_single(v)] } + result[key] = f.map { |k, v| [k, marshal_single(v)] } else - d[key] = marshal_single(f) + result[key] = marshal_single(f) end end - if encode - JSON.dump(d) - else - d - end + result + end + + def to_json(*args) + JSON.generate(to_dict, *args) end end + + end diff --git a/lib/open_api_sdk/utils/t.rb b/lib/crystalline/t.rb similarity index 53% rename from lib/open_api_sdk/utils/t.rb rename to lib/crystalline/t.rb index f1341c9e..92c7329e 100644 --- a/lib/open_api_sdk/utils/t.rb +++ b/lib/crystalline/t.rb @@ -27,11 +27,17 @@ def self.hash_of(t) end def self.nilable?(t) - t.respond_to? :unwrap_nilable + # in sorbet all `T.any` types provide unwrap_nilable for some reason + # So, in order to make this check more robust, we check if the type responds to the `types` method, and if so, whether + # one of those types is NilClass. For non-nilable unions, `types` will return a valid list that does not include NilClass + return false unless t.respond_to?(:unwrap_nilable) + return true unless t.respond_to?(:types) + t.types.map { |tt| simplify_type(tt) }.include?(NilClass) end def self.nilable_of(t) - if t.respond_to? :unwrap_nilable + + if nilable t return simplify_type t.unwrap_nilable end nil @@ -48,6 +54,19 @@ def self.simplify_type(t) t end + + def self.union?(t) + return false unless t.respond_to? :types + return false if t.types.any? { |tt| get_raw_type(tt) == TrueClass } + return false if t.types.length == 2 && t.types.any? { |tt| get_raw_type(tt) == NilClass } + t.types.length > 1 + end + + def self.get_union_types(t) + t.types.map { |tt| get_raw_type(tt) } + end + + def self.get_raw_type(t) if t.respond_to? :raw_type return t.raw_type diff --git a/lib/crystalline/utils.rb b/lib/crystalline/utils.rb new file mode 100644 index 00000000..4b5e2a7a --- /dev/null +++ b/lib/crystalline/utils.rb @@ -0,0 +1,77 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'sorbet-runtime' + +module Crystalline + extend T::Sig + + sig { params(complex: Object).returns(Object) } + def self.to_dict(complex) + if complex.is_a? Array + complex.map { |v| Crystalline.to_dict(v) } + elsif complex.is_a? Hash + complex.transform_values { |v| Crystalline.to_dict(v) } + elsif complex.respond_to?(:class) && complex.class.include?(::Crystalline::MetadataFields) + complex.to_dict + else + val_to_string complex, primitives: false + end + end + + def self.to_json(complex) + JSON.dump(to_dict(complex)) + end + + sig { params(data: Object, type: Object).returns(Object) } + def self.unmarshal_json(data, type) + if T.simplifiable? type + type = T.simplify_type type + end + if type.instance_of?(Class) && type.include?(::Crystalline::MetadataFields) + type.from_dict(data) + elsif T.arr? type + data.map { |v| Crystalline.unmarshal_json(v, T.arr_of(type)) } + elsif T.hash? type + data.transform_values { |v| Crystalline.unmarshal_json(v, T.hash_of(type)) } + else + data + end + end + + sig { params(val: Object, primitives: T::Boolean).returns(Object) } + def self.val_to_string(val, primitives: true) + if val.is_a? T::Enum + val.serialize + elsif val.is_a? DateTime + val.strftime('%Y-%m-%dT%H:%M:%S.%NZ') + elsif primitives + val.to_s + else + val + end + end + + sig { params(klass: T.any(Class, T::Types::TypedArray, T::Types::TypedHash)).returns(Integer) } + def self.non_nilable_attr_count(klass) + # somewhat sane sort ordering for Union deserialization. + # All Crystalline objects return the number of non-nilable fields + # All non-string primitives return 2 + # All arrays and hashes return 1 + # Strings return 0 (since any data can deserialize to a string, it should be our last attempt) + if klass.respond_to? :fields + return -1 * klass.fields.count do |field| + !T.nilable? field.type + end + else + if klass == String + return 0 + elsif klass.is_a?(T::Types::TypedArray) || klass.is_a?(T::Types::TypedHash) + return 1 + end + return 2 + end + end +end diff --git a/lib/open_api_sdk/apiendpoints.rb b/lib/open_api_sdk/apiendpoints.rb deleted file mode 100644 index d5b0ed86..00000000 --- a/lib/open_api_sdk/apiendpoints.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -require 'faraday' -require 'faraday/multipart' -require 'sorbet-runtime' - -module OpenApiSDK - extend T::Sig - class Apiendpoints - extend T::Sig - - - sig { params(sdk_config: SDKConfiguration).void } - def initialize(sdk_config) - @sdk_configuration = sdk_config - end - - - sig { params(api_id: ::String).returns(::OpenApiSDK::Operations::GetAllApiEndpointsResponse) } - def list(api_id) - # list - Get all Api endpoints for a particular apiID. - request = ::OpenApiSDK::Operations::GetAllApiEndpointsRequest.new( - - api_id: api_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GetAllApiEndpointsRequest, - base_url, - '/v1/apis/{apiID}/api_endpoints', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetAllApiEndpointsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::ApiEndpoint]) - res.api_endpoints = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - end -end diff --git a/lib/open_api_sdk/apis.rb b/lib/open_api_sdk/apis.rb deleted file mode 100644 index 8c91f1e8..00000000 --- a/lib/open_api_sdk/apis.rb +++ /dev/null @@ -1,310 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -require 'faraday' -require 'faraday/multipart' -require 'sorbet-runtime' - -module OpenApiSDK - extend T::Sig - class Apis - extend T::Sig - # REST APIs for managing Api entities - - sig { params(sdk_config: SDKConfiguration).void } - def initialize(sdk_config) - @sdk_configuration = sdk_config - end - - - sig { params(op: T.nilable(::OpenApiSDK::Operations::Op), metadata: T.nilable(T::Hash[Symbol, T::Array[::String]])).returns(::OpenApiSDK::Operations::GetApisResponse) } - def get_all(op = nil, metadata = nil) - # get_all - Get a list of Apis for a given workspace - # Get a list of all Apis and their versions for a given workspace. - # Supports filtering the APIs based on metadata attributes. - request = ::OpenApiSDK::Operations::GetApisRequest.new( - - op: op, - metadata: metadata - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = "#{base_url}/v1/apis" - headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetApisRequest, request, @sdk_configuration.globals) - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetApisResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::Api]) - res.apis = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, op: T.nilable(::OpenApiSDK::Operations::QueryParamOp), metadata: T.nilable(T::Hash[Symbol, T::Array[::String]])).returns(::OpenApiSDK::Operations::GetAllApiVersionsResponse) } - def get_all_versions(api_id, op = nil, metadata = nil) - # get_all_versions - Get all Api versions for a particular ApiEndpoint. - # Get all Api versions for a particular ApiEndpoint. - # Supports filtering the versions based on metadata attributes. - request = ::OpenApiSDK::Operations::GetAllApiVersionsRequest.new( - - api_id: api_id, - op: op, - metadata: metadata - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GetAllApiVersionsRequest, - base_url, - '/v1/apis/{apiID}', - request, - @sdk_configuration.globals - ) - headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetAllApiVersionsRequest, request, @sdk_configuration.globals) - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetAllApiVersionsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::Api]) - res.apis = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, api: ::OpenApiSDK::Shared::ApiInput).returns(::OpenApiSDK::Operations::UpsertApiResponse) } - def upsert(api_id, api) - # upsert - Upsert an Api - # Upsert an Api. If the Api does not exist, it will be created. - # If the Api exists, it will be updated. - request = ::OpenApiSDK::Operations::UpsertApiRequest.new( - - api_id: api_id, - api: api - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::UpsertApiRequest, - base_url, - '/v1/apis/{apiID}', - request, - @sdk_configuration.globals - ) - headers = {} - req_content_type, data, form = Utils.serialize_request_body(request, :api, :json) - headers['content-type'] = req_content_type - raise StandardError, 'request body is required' if data.nil? && form.nil? - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.put(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::UpsertApiResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Api) - res.api = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String).returns(::OpenApiSDK::Operations::DeleteApiResponse) } - def delete(api_id, version_id) - # delete - Delete an Api. - # Delete a particular version of an Api. The will also delete all associated ApiEndpoints, Metadata, Schemas & Request Logs (if using a Postgres datastore). - request = ::OpenApiSDK::Operations::DeleteApiRequest.new( - - api_id: api_id, - version_id: version_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::DeleteApiRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.delete(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::DeleteApiResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String).returns(::OpenApiSDK::Operations::GenerateOpenApiSpecResponse) } - def generate_open_api(api_id, version_id) - # generate_open_api - Generate an OpenAPI specification for a particular Api. - # This endpoint will generate any missing operations in any registered OpenAPI document if the operation does not already exist in the document. - # Returns the original document and the newly generated document allowing a diff to be performed to see what has changed. - request = ::OpenApiSDK::Operations::GenerateOpenApiSpecRequest.new( - - api_id: api_id, - version_id: version_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GenerateOpenApiSpecRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/generate/openapi', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GenerateOpenApiSpecResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::GenerateOpenApiSpecDiff) - res.generate_open_api_spec_diff = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String).returns(::OpenApiSDK::Operations::GeneratePostmanCollectionResponse) } - def generate_postman(api_id, version_id) - # generate_postman - Generate a Postman collection for a particular Api. - # Generates a postman collection containing all endpoints for a particular API. Includes variables produced for any path/query/header parameters included in the OpenAPI document. - request = ::OpenApiSDK::Operations::GeneratePostmanCollectionRequest.new( - - api_id: api_id, - version_id: version_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GeneratePostmanCollectionRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/generate/postman', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GeneratePostmanCollectionResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - res.postman_collection = r.env.response_body if Utils.match_content_type(content_type, 'application/octet-stream') - - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - end -end diff --git a/lib/open_api_sdk/artifacts.rb b/lib/open_api_sdk/artifacts.rb index 0c5a47a4..da0e013c 100644 --- a/lib/open_api_sdk/artifacts.rb +++ b/lib/open_api_sdk/artifacts.rb @@ -5,7 +5,10 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig @@ -19,8 +22,8 @@ def initialize(sdk_config) end - sig { params(request: T.nilable(::OpenApiSDK::Shared::PreflightRequest)).returns(::OpenApiSDK::Operations::PreflightResponse) } - def preflight(request) + sig { params(request: T.nilable(Models::Shared::PreflightRequest), timeout_ms: T.nilable(Integer)).returns(Models::Operations::PreflightResponse) } + def preflight(request: nil, timeout_ms: nil) # preflight - Get access token for communicating with OCI distribution endpoints url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -28,43 +31,120 @@ def preflight(request) headers = {} req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) headers['content-type'] = req_content_type + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::PreflightResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'preflight', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::PreflightToken) - res.preflight_token = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::PreflightToken) + response = Models::Operations::PreflightResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + preflight_token: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { returns(::OpenApiSDK::Operations::GetNamespacesResponse) } - def get_namespaces + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetNamespacesResponse) } + def get_namespaces(timeout_ms: nil) # get_namespaces - Each namespace contains many revisions. url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -73,35 +153,234 @@ def get_namespaces headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GetNamespacesResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getNamespaces', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::GetNamespacesResponse) - res.get_namespaces_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::GetNamespacesResponse) + response = Models::Operations::GetNamespacesResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + get_namespaces_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(namespace_name: ::String, request_body: T.nilable(Models::Operations::ArchiveNamespaceRequestBody), timeout_ms: T.nilable(Integer)).returns(Models::Operations::ArchiveNamespaceResponse) } + def set_archived(namespace_name:, request_body: nil, timeout_ms: nil) + # set_archived - Set whether a namespace is archived + request = Models::Operations::ArchiveNamespaceRequest.new( + + namespace_name: namespace_name, + request_body: request_body + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::ArchiveNamespaceRequest, + base_url, + '/v1/artifacts/namespaces/{namespace_name}/archive', + request, + @sdk_configuration.globals + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json) + headers['content-type'] = req_content_type + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'archiveNamespace', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) end - elsif r.status >= 400 && r.status < 500 + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::ArchiveNamespaceResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(namespace_name: ::String, next_page_token: T.nilable(::String)).returns(::OpenApiSDK::Operations::GetRevisionsResponse) } - def get_revisions(namespace_name, next_page_token = nil) + sig { params(namespace_name: ::String, next_page_token: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetRevisionsResponse) } + def get_revisions(namespace_name:, next_page_token: nil, timeout_ms: nil) - request = ::OpenApiSDK::Operations::GetRevisionsRequest.new( + request = Models::Operations::GetRevisionsRequest.new( namespace_name: namespace_name, next_page_token: next_page_token @@ -109,54 +388,129 @@ def get_revisions(namespace_name, next_page_token = nil) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetRevisionsRequest, + Models::Operations::GetRevisionsRequest, base_url, '/v1/artifacts/namespaces/{namespace_name}/revisions', request, @sdk_configuration.globals ) headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetRevisionsRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::GetRevisionsRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetRevisionsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getRevisions', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::GetRevisionsResponse) - res.get_revisions_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::GetRevisionsResponse) + response = Models::Operations::GetRevisionsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + get_revisions_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(namespace_name: ::String).returns(::OpenApiSDK::Operations::GetTagsResponse) } - def get_tags(namespace_name) + sig { params(namespace_name: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetTagsResponse) } + def get_tags(namespace_name:, timeout_ms: nil) - request = ::OpenApiSDK::Operations::GetTagsRequest.new( + request = Models::Operations::GetTagsRequest.new( namespace_name: namespace_name ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetTagsRequest, + Models::Operations::GetTagsRequest, base_url, '/v1/artifacts/namespaces/{namespace_name}/tags', request, @@ -166,35 +520,110 @@ def get_tags(namespace_name) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetTagsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getTags', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::GetTagsResponse) - res.get_tags_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::GetTagsResponse) + response = Models::Operations::GetTagsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + get_tags_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(namespace_name: ::String, add_tags: T.nilable(::OpenApiSDK::Shared::AddTags)).returns(::OpenApiSDK::Operations::PostTagsResponse) } - def post_tags(namespace_name, add_tags = nil) + sig { params(namespace_name: ::String, add_tags: T.nilable(Models::Shared::AddTags), timeout_ms: T.nilable(Integer)).returns(Models::Operations::PostTagsResponse) } + def post_tags(namespace_name:, add_tags: nil, timeout_ms: nil) # post_tags - Add tags to an existing revision - request = ::OpenApiSDK::Operations::PostTagsRequest.new( + request = Models::Operations::PostTagsRequest.new( namespace_name: namespace_name, add_tags: add_tags @@ -202,7 +631,7 @@ def post_tags(namespace_name, add_tags = nil) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::PostTagsRequest, + Models::Operations::PostTagsRequest, base_url, '/v1/artifacts/namespaces/{namespace_name}/tags', request, @@ -211,41 +640,467 @@ def post_tags(namespace_name, add_tags = nil) headers = {} req_content_type, data, form = Utils.serialize_request_body(request, :add_tags, :json) headers['content-type'] = req_content_type + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'postTags', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::PostTagsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(namespace_name: ::String, request_body: T.nilable(Models::Operations::SetVisibilityRequestBody), timeout_ms: T.nilable(Integer)).returns(Models::Operations::SetVisibilityResponse) } + def set_visibility(namespace_name:, request_body: nil, timeout_ms: nil) + # set_visibility - Set visibility of a namespace with an existing metadata entry + request = Models::Operations::SetVisibilityRequest.new( + + namespace_name: namespace_name, + request_body: request_body + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::SetVisibilityRequest, + base_url, + '/v1/artifacts/namespaces/{namespace_name}/visibility', + request, + @sdk_configuration.globals + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json) + headers['content-type'] = req_content_type + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'setVisibility', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::SetVisibilityResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(namespace_name: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListRemoteSourcesResponse) } + def list_remote_sources(namespace_name:, timeout_ms: nil) + # list_remote_sources - Get remote sources attached to a particular namespace + request = Models::Operations::ListRemoteSourcesRequest.new( + + namespace_name: namespace_name + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/artifacts/remote_sources" + headers = {} + query_params = Utils.get_query_params(Models::Operations::ListRemoteSourcesRequest, request, @sdk_configuration.globals) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'listRemoteSources', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::RemoteSource) + response = Models::Operations::ListRemoteSourcesResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + remote_source: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj else - req.body = data + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end + end + + + sig { params(request: T.nilable(Models::Shared::RemoteSource), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateRemoteSourceResponse) } + def create_remote_source(request: nil, timeout_ms: nil) + # create_remote_source - Configure a new remote source + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/artifacts/remote_sources" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::PostTagsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'createRemoteSource', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CreateRemoteSourceResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(organization_slug: ::String, workspace_slug: ::String, namespace_name: ::String, revision_reference: ::String).returns(::OpenApiSDK::Operations::GetManifestResponse) } - def get_manifest(organization_slug, workspace_slug, namespace_name, revision_reference) + sig { params(organization_slug: ::String, workspace_slug: ::String, namespace_name: ::String, revision_reference: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetManifestResponse) } + def get_manifest(organization_slug:, workspace_slug:, namespace_name:, revision_reference:, timeout_ms: nil) # get_manifest - Get manifest for a particular reference - request = ::OpenApiSDK::Operations::GetManifestRequest.new( + request = Models::Operations::GetManifestRequest.new( organization_slug: organization_slug, workspace_slug: workspace_slug, @@ -255,45 +1110,120 @@ def get_manifest(organization_slug, workspace_slug, namespace_name, revision_ref url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetManifestRequest, + Models::Operations::GetManifestRequest, base_url, '/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/manifests/{revision_reference}', request, @sdk_configuration.globals ) headers = {} - headers['Accept'] = 'application/json;q=1, application/vnd.oci.image.manifest.v1+json;q=0' + headers['Accept'] = 'application/vnd.oci.image.manifest.v1+json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GetManifestResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getManifest', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/vnd.oci.image.manifest.v1+json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Manifest) - res.manifest = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Manifest) + response = Models::Operations::GetManifestResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + manifest: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(organization_slug: ::String, workspace_slug: ::String, namespace_name: ::String, digest: ::String).returns(::OpenApiSDK::Operations::GetBlobResponse) } - def get_blob(organization_slug, workspace_slug, namespace_name, digest) + sig { params(organization_slug: ::String, workspace_slug: ::String, namespace_name: ::String, digest: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetBlobResponse) } + def get_blob(organization_slug:, workspace_slug:, namespace_name:, digest:, timeout_ms: nil) # get_blob - Get blob for a particular digest - request = ::OpenApiSDK::Operations::GetBlobRequest.new( + request = Models::Operations::GetBlobRequest.new( organization_slug: organization_slug, workspace_slug: workspace_slug, @@ -303,36 +1233,112 @@ def get_blob(organization_slug, workspace_slug, namespace_name, digest) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetBlobRequest, + Models::Operations::GetBlobRequest, base_url, '/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/blobs/{digest}', request, @sdk_configuration.globals ) headers = {} - headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' + headers['Accept'] = 'application/octet-stream' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GetBlobResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getBlob', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - res.blob = r.env.response_body if Utils.match_content_type(content_type, 'application/octet-stream') + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end - elsif r.status >= 400 && r.status < 500 + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/octet-stream') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = http_response.env.body + + return Models::Operations::GetBlobResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + blob: obj + ) + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end end end diff --git a/lib/open_api_sdk/auth.rb b/lib/open_api_sdk/auth.rb index ad55007c..b84419da 100644 --- a/lib/open_api_sdk/auth.rb +++ b/lib/open_api_sdk/auth.rb @@ -5,7 +5,10 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig @@ -19,8 +22,8 @@ def initialize(sdk_config) end - sig { returns(::OpenApiSDK::Operations::ValidateApiKeyResponse) } - def validate_api_key + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::ValidateApiKeyResponse) } + def validate_api_key(timeout_ms: nil) # validate_api_key - Validate the current api key. url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -29,33 +32,108 @@ def validate_api_key headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::ValidateApiKeyResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'validateApiKey', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::ApiKeyDetails) - res.api_key_details = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ApiKeyDetails) + response = Models::Operations::ValidateApiKeyResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + api_key_details: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { returns(::OpenApiSDK::Operations::GetUserResponse) } - def get_user + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetUserResponse) } + def get_user(timeout_ms: nil) # get_user - Get information about the current user. url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -64,35 +142,110 @@ def get_user headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetUserResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getUser', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::User) - res.user = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::User) + response = Models::Operations::GetUserResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + user: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetAccessTokenResponse) } - def get_access_token(workspace_id) + sig { params(workspace_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetAccessTokenResponse) } + def get_access_token(workspace_id:, timeout_ms: nil) # get_access_token - Get or refresh an access token for the current workspace. - request = ::OpenApiSDK::Operations::GetAccessTokenRequest.new( + request = Models::Operations::GetAccessTokenRequest.new( workspace_id: workspace_id ) @@ -100,40 +253,113 @@ def get_access_token(workspace_id) base_url = Utils.template_url(url, params) url = "#{base_url}/v1/auth/access_token" headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetAccessTokenRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::GetAccessTokenRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - end + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetAccessTokenResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getAccessToken', + security_source: nil ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::AccessToken) - res.access_token = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::AccessToken) + response = Models::Operations::GetAccessTokenResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + access_token: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(gen_lock_id: T.nilable(::String), target_type: T.nilable(::String), passive: T.nilable(T::Boolean)).returns(::OpenApiSDK::Operations::GetWorkspaceAccessResponse) } - def get_allowances(gen_lock_id = nil, target_type = nil, passive = nil) + sig { params(gen_lock_id: T.nilable(::String), target_type: T.nilable(::String), passive: T.nilable(T::Boolean), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspaceAccessResponse) } + def get_allowances(gen_lock_id: nil, target_type: nil, passive: nil, retries: nil, timeout_ms: nil) # get_allowances - Get access allowances for a particular workspace # Checks if generation is permitted for a particular run of the CLI - request = ::OpenApiSDK::Operations::GetWorkspaceAccessRequest.new( + request = Models::Operations::GetWorkspaceAccessRequest.new( gen_lock_id: gen_lock_id, target_type: target_type, @@ -143,28 +369,111 @@ def get_allowances(gen_lock_id = nil, target_type = nil, passive = nil) base_url = Utils.template_url(url, params) url = "#{base_url}/v1/workspace/access" headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetWorkspaceAccessRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::GetWorkspaceAccessRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent + retries ||= @sdk_configuration.retry_config + retries ||= Utils::RetryConfig.new( + backoff: Utils::BackoffStrategy.new( + exponent: 1.5, + initial_interval: 100, + max_elapsed_time: 60_000, + max_interval: 2000 + ), + retry_connection_errors: true, + strategy: 'backoff' + ) + retry_options = retries.to_faraday_retry_options(initial_time: Time.now) + retry_options[:retry_statuses] = [408, 500, 502, 503] - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client.dup + connection.request :retry, retry_options - res = ::OpenApiSDK::Operations::GetWorkspaceAccessResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspaceAccess', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::AccessDetails) - res.access_details = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::AccessDetails) + response = Models::Operations::GetWorkspaceAccessResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + access_details: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end end end diff --git a/lib/open_api_sdk/codesamples.rb b/lib/open_api_sdk/codesamples.rb new file mode 100644 index 00000000..6fad8267 --- /dev/null +++ b/lib/open_api_sdk/codesamples.rb @@ -0,0 +1,444 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CodeSamples + extend T::Sig + # REST APIs for retrieving Code Samples + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Shared::CodeSampleSchemaInput, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GenerateCodeSamplePreviewResponse) } + def generate_code_sample_preview(request:, timeout_ms: nil) + # generate_code_sample_preview - Generate Code Sample previews from a file and configuration parameters. + # This endpoint generates Code Sample previews from a file and configuration parameters. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/code_sample/preview" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :multipart) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'generateCodeSamplePreview', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::UsageSnippets) + response = Models::Operations::GenerateCodeSamplePreviewResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + usage_snippets: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::CodeSampleSchemaInput, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GenerateCodeSamplePreviewAsyncResponse) } + def generate_code_sample_preview_async(request:, timeout_ms: nil) + # generate_code_sample_preview_async - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling. + # This endpoint generates Code Sample previews from a file and configuration parameters, receiving an async JobID response for polling. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/code_sample/preview/async" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :multipart) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'generateCodeSamplePreviewAsync', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['202']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Operations::GenerateCodeSamplePreviewAsyncResponseBody) + response = Models::Operations::GenerateCodeSamplePreviewAsyncResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(job_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetCodeSamplePreviewAsyncResponse) } + def get_code_sample_preview_async(job_id:, timeout_ms: nil) + # get_code_sample_preview_async - Poll for the result of an asynchronous Code Sample preview generation. + # Poll for the result of an asynchronous Code Sample preview generation. + request = Models::Operations::GetCodeSamplePreviewAsyncRequest.new( + + job_id: job_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::GetCodeSamplePreviewAsyncRequest, + base_url, + '/v1/code_sample/preview/async/{jobID}', + request, + @sdk_configuration.globals + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getCodeSamplePreviewAsync', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['202']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Operations::GetCodeSamplePreviewAsyncResponseBody) + response = Models::Operations::GetCodeSamplePreviewAsyncResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::UsageSnippets) + response = Models::Operations::GetCodeSamplePreviewAsyncResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + usage_snippets: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/embeds.rb b/lib/open_api_sdk/embeds.rb deleted file mode 100644 index 753e327d..00000000 --- a/lib/open_api_sdk/embeds.rb +++ /dev/null @@ -1,142 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -require 'faraday' -require 'faraday/multipart' -require 'sorbet-runtime' - -module OpenApiSDK - extend T::Sig - class Embeds - extend T::Sig - # REST APIs for managing embeds - - sig { params(sdk_config: SDKConfiguration).void } - def initialize(sdk_config) - @sdk_configuration = sdk_config - end - - - sig { params(description: T.nilable(::String), duration: T.nilable(::Integer), filters: T.nilable(::OpenApiSDK::Shared::Filters)).returns(::OpenApiSDK::Operations::GetEmbedAccessTokenResponse) } - def get_access_token(description = nil, duration = nil, filters = nil) - # get_access_token - Get an embed access token for the current workspace. - # Returns an embed access token for the current workspace. This can be used to authenticate access to externally embedded content. - # Filters can be applied allowing views to be filtered to things like particular customerIds. - request = ::OpenApiSDK::Operations::GetEmbedAccessTokenRequest.new( - - description: description, - duration: duration, - filters: filters - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = "#{base_url}/v1/workspace/embed-access-token" - headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetEmbedAccessTokenRequest, request, @sdk_configuration.globals) - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetEmbedAccessTokenResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::EmbedAccessTokenResponse) - res.embed_access_token_response = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { returns(::OpenApiSDK::Operations::GetValidEmbedAccessTokensResponse) } - def get_valid - # get_valid - Get all valid embed access tokens for the current workspace. - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = "#{base_url}/v1/workspace/embed-access-tokens/valid" - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetValidEmbedAccessTokensResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::EmbedToken]) - res.embed_tokens = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(token_id: ::String).returns(::OpenApiSDK::Operations::RevokeEmbedAccessTokenResponse) } - def delete(token_id) - # delete - Revoke an embed access EmbedToken. - request = ::OpenApiSDK::Operations::RevokeEmbedAccessTokenRequest.new( - - token_id: token_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::RevokeEmbedAccessTokenRequest, - base_url, - '/v1/workspace/embed-access-tokens/{tokenID}', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.delete(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::RevokeEmbedAccessTokenResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - end -end diff --git a/lib/open_api_sdk/events.rb b/lib/open_api_sdk/events.rb index a850f91f..35177dd0 100644 --- a/lib/open_api_sdk/events.rb +++ b/lib/open_api_sdk/events.rb @@ -5,13 +5,16 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig class Events extend T::Sig - # REST APIs for capturing event data + # REST APIs for managing events captured by a speakeasy binary (CLI, GitHub Action etc) sig { params(sdk_config: SDKConfiguration).void } def initialize(sdk_config) @@ -19,62 +22,137 @@ def initialize(sdk_config) end - sig { params(request: T.nilable(::OpenApiSDK::Operations::SearchWorkspaceEventsRequest)).returns(::OpenApiSDK::Operations::SearchWorkspaceEventsResponse) } - def search(request) + sig { params(request: Models::Operations::SearchWorkspaceEventsRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::SearchWorkspaceEventsResponse) } + def search(request:, timeout_ms: nil) # search - Search events for a particular workspace by any field url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::SearchWorkspaceEventsRequest, + Models::Operations::SearchWorkspaceEventsRequest, base_url, '/v1/workspace/{workspace_id}/events', request, @sdk_configuration.globals ) headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::SearchWorkspaceEventsRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::SearchWorkspaceEventsRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::SearchWorkspaceEventsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'searchWorkspaceEvents', + security_source: @sdk_configuration.security_source ) - if r.status == 200 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::CliEvent]) - res.cli_event_batch = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T::Array[Models::Shared::CliEvent]) + response = Models::Operations::SearchWorkspaceEventsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + cli_event_batch: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 500 && r.status < 600 + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String, request_body: T::Array[::OpenApiSDK::Shared::CliEvent]).returns(::OpenApiSDK::Operations::PostWorkspaceEventsResponse) } - def post(workspace_id, request_body) + sig { params(request_body: T::Array[Models::Shared::CliEvent], workspace_id: T.nilable(::String), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::PostWorkspaceEventsResponse) } + def post(request_body:, workspace_id: nil, retries: nil, timeout_ms: nil) # post - Post events for a specific workspace # Sends an array of events to be stored for a particular workspace. - request = ::OpenApiSDK::Operations::PostWorkspaceEventsRequest.new( + request = Models::Operations::PostWorkspaceEventsRequest.new( - workspace_id: workspace_id, - request_body: request_body + request_body: request_body, + workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::PostWorkspaceEventsRequest, + Models::Operations::PostWorkspaceEventsRequest, base_url, '/v1/workspace/{workspace_id}/events', request, @@ -84,90 +162,252 @@ def post(workspace_id, request_body) req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent + retries ||= @sdk_configuration.retry_config + retries ||= Utils::RetryConfig.new( + backoff: Utils::BackoffStrategy.new( + exponent: 1.5, + initial_interval: 100, + max_elapsed_time: 60_000, + max_interval: 2000 + ), + retry_connection_errors: true, + strategy: 'backoff' + ) + retry_options = retries.to_faraday_retry_options(initial_time: Time.now) + retry_options[:retry_statuses] = [408, 500, 502, 503] - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client.dup + connection.request :retry, retry_options - res = ::OpenApiSDK::Operations::PostWorkspaceEventsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'postWorkspaceEvents', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 500 && r.status < 600 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::PostWorkspaceEventsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String, target_id: ::String, after_created_at: T.nilable(::DateTime)).returns(::OpenApiSDK::Operations::GetWorkspaceEventsByTargetResponse) } - def get_by_target(workspace_id, target_id, after_created_at = nil) + sig { params(target_id: ::String, workspace_id: T.nilable(::String), after_created_at: T.nilable(::DateTime), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspaceEventsByTargetResponse) } + def get_by_target(target_id:, workspace_id: nil, after_created_at: nil, timeout_ms: nil) # get_by_target - Load recent events for a particular workspace - request = ::OpenApiSDK::Operations::GetWorkspaceEventsByTargetRequest.new( + request = Models::Operations::GetWorkspaceEventsByTargetRequest.new( - workspace_id: workspace_id, target_id: target_id, + workspace_id: workspace_id, after_created_at: after_created_at ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetWorkspaceEventsByTargetRequest, + Models::Operations::GetWorkspaceEventsByTargetRequest, base_url, '/v1/workspace/{workspace_id}/events/targets/{target_id}/events', request, @sdk_configuration.globals ) headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetWorkspaceEventsByTargetRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::GetWorkspaceEventsByTargetRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetWorkspaceEventsByTargetResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspaceEventsByTarget', + security_source: @sdk_configuration.security_source ) - if r.status == 200 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::CliEvent]) - res.cli_event_batch = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T::Array[Models::Shared::CliEvent]) + response = Models::Operations::GetWorkspaceEventsByTargetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + cli_event_batch: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 500 && r.status < 600 + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(after_last_event_created_at: T.nilable(::DateTime)).returns(::OpenApiSDK::Operations::GetWorkspaceTargetsResponse) } - def get_targets(after_last_event_created_at = nil) + sig { params(after_last_event_created_at: T.nilable(::DateTime), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspaceTargetsResponse) } + def get_targets(after_last_event_created_at: nil, timeout_ms: nil) # get_targets - Load targets for a particular workspace - request = ::OpenApiSDK::Operations::GetWorkspaceTargetsRequest.new( + request = Models::Operations::GetWorkspaceTargetsRequest.new( after_last_event_created_at: after_last_event_created_at ) @@ -175,40 +415,115 @@ def get_targets(after_last_event_created_at = nil) base_url = Utils.template_url(url, params) url = "#{base_url}/v1/workspace/events/targets" headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetWorkspaceTargetsRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::GetWorkspaceTargetsRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetWorkspaceTargetsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspaceTargets', + security_source: @sdk_configuration.security_source ) - if r.status == 200 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::TargetSDK]) - res.target_sdk_list = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T::Array[Models::Shared::TargetSDK]) + response = Models::Operations::GetWorkspaceTargetsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + target_sdk_list: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 500 && r.status < 600 + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String, after_last_event_created_at: T.nilable(::DateTime)).returns(::OpenApiSDK::Operations::GetWorkspaceTargetsDeprecatedResponse) } - def get_targets_deprecated(workspace_id, after_last_event_created_at = nil) + sig { params(workspace_id: T.nilable(::String), after_last_event_created_at: T.nilable(::DateTime), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspaceTargetsDeprecatedResponse) } + def get_targets_deprecated(workspace_id: nil, after_last_event_created_at: nil, timeout_ms: nil) # get_targets_deprecated - Load targets for a particular workspace - request = ::OpenApiSDK::Operations::GetWorkspaceTargetsDeprecatedRequest.new( + request = Models::Operations::GetWorkspaceTargetsDeprecatedRequest.new( workspace_id: workspace_id, after_last_event_created_at: after_last_event_created_at @@ -216,40 +531,115 @@ def get_targets_deprecated(workspace_id, after_last_event_created_at = nil) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetWorkspaceTargetsDeprecatedRequest, + Models::Operations::GetWorkspaceTargetsDeprecatedRequest, base_url, '/v1/workspace/{workspace_id}/events/targets', request, @sdk_configuration.globals ) headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetWorkspaceTargetsDeprecatedRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::GetWorkspaceTargetsDeprecatedRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetWorkspaceTargetsDeprecatedResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspaceTargetsDeprecated', + security_source: @sdk_configuration.security_source ) - if r.status == 200 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::TargetSDK]) - res.target_sdk_list = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T::Array[Models::Shared::TargetSDK]) + response = Models::Operations::GetWorkspaceTargetsDeprecatedResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + target_sdk_list: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 500 && r.status < 600 + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end end end diff --git a/lib/open_api_sdk/github.rb b/lib/open_api_sdk/github.rb index 76e08481..d98e6826 100644 --- a/lib/open_api_sdk/github.rb +++ b/lib/open_api_sdk/github.rb @@ -5,13 +5,16 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig class Github extend T::Sig - + # REST APIs for managing the github integration sig { params(sdk_config: SDKConfiguration).void } def initialize(sdk_config) @@ -19,10 +22,128 @@ def initialize(sdk_config) end - sig { params(org: ::String, repo: ::String).returns(::OpenApiSDK::Operations::CheckGithubAccessResponse) } - def check_access(org, repo) + sig { params(org: ::String, repo: ::String, generate_gen_lock_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetGithubSetupStateResponse) } + def get_setup(org:, repo:, generate_gen_lock_id:, timeout_ms: nil) + + request = Models::Operations::GetGithubSetupStateRequest.new( + + org: org, + repo: repo, + generate_gen_lock_id: generate_gen_lock_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/github/setup" + headers = {} + query_params = Utils.get_query_params(Models::Operations::GetGithubSetupStateRequest, request, @sdk_configuration.globals) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getGithubSetupState', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::GithubSetupStateResponse) + response = Models::Operations::GetGithubSetupStateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + github_setup_state_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(org: ::String, repo: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CheckGithubAccessResponse) } + def check_access(org:, repo:, timeout_ms: nil) - request = ::OpenApiSDK::Operations::CheckGithubAccessRequest.new( + request = Models::Operations::CheckGithubAccessRequest.new( org: org, repo: repo @@ -31,36 +152,217 @@ def check_access(org, repo) base_url = Utils.template_url(url, params) url = "#{base_url}/v1/github/check_access" headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::CheckGithubAccessRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::CheckGithubAccessRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'checkGithubAccess', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CheckGithubAccessResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end + end - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - res = ::OpenApiSDK::Operations::CheckGithubAccessResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + sig { params(installation_id: T.nilable(::String), github_org: T.nilable(::String), github_oidc_token: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::LinkGithubAccessResponse) } + def link_github(installation_id: nil, github_org: nil, github_oidc_token: nil, timeout_ms: nil) + + request = Models::Operations::LinkGithubAccessRequest.new( + + installation_id: installation_id, + github_org: github_org, + github_oidc_token: github_oidc_token ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/github/link" + headers = {} + query_params = Utils.get_query_params(Models::Operations::LinkGithubAccessRequest, request, @sdk_configuration.globals) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'linkGithubAccess', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::LinkGithubAccessResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(generate_gen_lock_id: ::String, org: ::String, repo: ::String).returns(::OpenApiSDK::Operations::GithubCheckPublishingPRsResponse) } - def check_publishing_p_rs(generate_gen_lock_id, org, repo) + sig { params(generate_gen_lock_id: ::String, org: ::String, repo: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GithubCheckPublishingPRsResponse) } + def check_publishing_p_rs(generate_gen_lock_id:, org:, repo:, timeout_ms: nil) - request = ::OpenApiSDK::Operations::GithubCheckPublishingPRsRequest.new( + request = Models::Operations::GithubCheckPublishingPRsRequest.new( generate_gen_lock_id: generate_gen_lock_id, org: org, @@ -70,40 +372,115 @@ def check_publishing_p_rs(generate_gen_lock_id, org, repo) base_url = Utils.template_url(url, params) url = "#{base_url}/v1/github/publishing_prs" headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GithubCheckPublishingPRsRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::GithubCheckPublishingPRsRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GithubCheckPublishingPRsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'githubCheckPublishingPRs', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::GithubPublishingPRResponse) - res.github_publishing_pr_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::GithubPublishingPRResponse) + response = Models::Operations::GithubCheckPublishingPRsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + github_publishing_pr_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(generate_gen_lock_id: ::String).returns(::OpenApiSDK::Operations::GithubCheckPublishingSecretsResponse) } - def check_publishing_secrets(generate_gen_lock_id) + sig { params(generate_gen_lock_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GithubCheckPublishingSecretsResponse) } + def check_publishing_secrets(generate_gen_lock_id:, timeout_ms: nil) - request = ::OpenApiSDK::Operations::GithubCheckPublishingSecretsRequest.new( + request = Models::Operations::GithubCheckPublishingSecretsRequest.new( generate_gen_lock_id: generate_gen_lock_id ) @@ -111,38 +488,113 @@ def check_publishing_secrets(generate_gen_lock_id) base_url = Utils.template_url(url, params) url = "#{base_url}/v1/github/publishing_secrets" headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GithubCheckPublishingSecretsRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::GithubCheckPublishingSecretsRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GithubCheckPublishingSecretsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'githubCheckPublishingSecrets', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::GithubMissingPublishingSecretsResponse) - res.github_missing_publishing_secrets_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::GithubMissingPublishingSecretsResponse) + response = Models::Operations::GithubCheckPublishingSecretsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + github_missing_publishing_secrets_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(request: ::OpenApiSDK::Shared::GithubStorePublishingSecretsRequest).returns(::OpenApiSDK::Operations::GithubStorePublishingSecretsResponse) } - def store_publishing_secrets(request) + sig { params(request: Models::Shared::GithubStorePublishingSecretsRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GithubStorePublishingSecretsResponse) } + def store_publishing_secrets(request:, timeout_ms: nil) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -151,39 +603,112 @@ def store_publishing_secrets(request) req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GithubStorePublishingSecretsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'githubStorePublishingSecrets', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::GithubStorePublishingSecretsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(request: ::OpenApiSDK::Shared::GithubConfigureCodeSamplesRequest).returns(::OpenApiSDK::Operations::GithubConfigureCodeSamplesResponse) } - def configure_code_samples(request) + sig { params(request: Models::Shared::GithubConfigureCodeSamplesRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GithubConfigureCodeSamplesResponse) } + def configure_code_samples(request:, timeout_ms: nil) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -192,43 +717,120 @@ def configure_code_samples(request) req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GithubConfigureCodeSamplesResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'githubConfigureCodeSamples', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::GithubConfigureCodeSamplesResponse) - res.github_configure_code_samples_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::GithubConfigureCodeSamplesResponse) + response = Models::Operations::GithubConfigureCodeSamplesResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + github_configure_code_samples_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(request: ::OpenApiSDK::Shared::GithubConfigureMintlifyRepoRequest).returns(::OpenApiSDK::Operations::GithubConfigureMintlifyRepoResponse) } - def configure_mintlify_repo(request) + sig { params(request: Models::Shared::GithubConfigureMintlifyRepoRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GithubConfigureMintlifyRepoResponse) } + def configure_mintlify_repo(request:, timeout_ms: nil) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -237,39 +839,112 @@ def configure_mintlify_repo(request) req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GithubConfigureMintlifyRepoResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'githubConfigureMintlifyRepo', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::GithubConfigureMintlifyRepoResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(request: ::OpenApiSDK::Shared::GithubConfigureTargetRequest).returns(::OpenApiSDK::Operations::GithubConfigureTargetResponse) } - def configure_target(request) + sig { params(request: Models::Shared::GithubConfigureTargetRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GithubConfigureTargetResponse) } + def configure_target(request:, timeout_ms: nil) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -278,39 +953,112 @@ def configure_target(request) req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GithubConfigureTargetResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'githubConfigureTarget', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::GithubConfigureTargetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(request: ::OpenApiSDK::Shared::GithubTriggerActionRequest).returns(::OpenApiSDK::Operations::GithubTriggerActionResponse) } - def trigger_action(request) + sig { params(request: Models::Shared::GithubTriggerActionRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GithubTriggerActionResponse) } + def trigger_action(request:, timeout_ms: nil) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -319,41 +1067,114 @@ def trigger_action(request) req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GithubTriggerActionResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'githubTriggerAction', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::GithubTriggerActionResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(org: ::String, repo: ::String, target_name: T.nilable(::String)).returns(::OpenApiSDK::Operations::GetGitHubActionResponse) } - def get_action(org, repo, target_name = nil) + sig { params(org: ::String, repo: ::String, target_name: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetGitHubActionResponse) } + def get_action(org:, repo:, target_name: nil, timeout_ms: nil) - request = ::OpenApiSDK::Operations::GetGitHubActionRequest.new( + request = Models::Operations::GetGitHubActionRequest.new( org: org, repo: repo, @@ -363,33 +1184,108 @@ def get_action(org, repo, target_name = nil) base_url = Utils.template_url(url, params) url = "#{base_url}/v1/github/action" headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetGitHubActionRequest, request, @sdk_configuration.globals) + query_params = Utils.get_query_params(Models::Operations::GetGitHubActionRequest, request, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetGitHubActionResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getGitHubAction', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::GithubGetActionResponse) - res.github_get_action_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::GithubGetActionResponse) + response = Models::Operations::GetGitHubActionResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + github_get_action_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end end end diff --git a/lib/open_api_sdk/metadata.rb b/lib/open_api_sdk/metadata.rb deleted file mode 100644 index be017f85..00000000 --- a/lib/open_api_sdk/metadata.rb +++ /dev/null @@ -1,168 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -require 'faraday' -require 'faraday/multipart' -require 'sorbet-runtime' - -module OpenApiSDK - extend T::Sig - class Metadata - extend T::Sig - # REST APIs for managing Version Metadata entities - - sig { params(sdk_config: SDKConfiguration).void } - def initialize(sdk_config) - @sdk_configuration = sdk_config - end - - - sig { params(api_id: ::String, version_id: ::String).returns(::OpenApiSDK::Operations::GetVersionMetadataResponse) } - def get(api_id, version_id) - # get - Get all metadata for a particular apiID and versionID. - request = ::OpenApiSDK::Operations::GetVersionMetadataRequest.new( - - api_id: api_id, - version_id: version_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GetVersionMetadataRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/metadata', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetVersionMetadataResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::VersionMetadata]) - res.version_metadata = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, version_metadata: ::OpenApiSDK::Shared::VersionMetadataInput).returns(::OpenApiSDK::Operations::InsertVersionMetadataResponse) } - def insert_version(api_id, version_id, version_metadata) - # insert_version - Insert metadata for a particular apiID and versionID. - request = ::OpenApiSDK::Operations::InsertVersionMetadataRequest.new( - - api_id: api_id, - version_id: version_id, - version_metadata: version_metadata - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::InsertVersionMetadataRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/metadata', - request, - @sdk_configuration.globals - ) - headers = {} - req_content_type, data, form = Utils.serialize_request_body(request, :version_metadata, :json) - headers['content-type'] = req_content_type - raise StandardError, 'request body is required' if data.nil? && form.nil? - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::InsertVersionMetadataResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::VersionMetadata) - res.version_metadata = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, meta_key: ::String, meta_value: ::String).returns(::OpenApiSDK::Operations::DeleteVersionMetadataResponse) } - def delete_version(api_id, version_id, meta_key, meta_value) - # delete_version - Delete metadata for a particular apiID and versionID. - request = ::OpenApiSDK::Operations::DeleteVersionMetadataRequest.new( - - api_id: api_id, - version_id: version_id, - meta_key: meta_key, - meta_value: meta_value - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::DeleteVersionMetadataRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/metadata/{metaKey}/{metaValue}', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.delete(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::DeleteVersionMetadataResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - end -end diff --git a/lib/open_api_sdk/models/errors.rb b/lib/open_api_sdk/models/errors.rb new file mode 100644 index 00000000..1a5f0c02 --- /dev/null +++ b/lib/open_api_sdk/models/errors.rb @@ -0,0 +1,13 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module OpenApiSDK + module Models + module Errors + autoload :APIError, 'open_api_sdk/models/errors/apierror.rb' + autoload :Error, 'open_api_sdk/models/errors/error.rb' + end + end +end diff --git a/lib/open_api_sdk/models/errors/apierror.rb b/lib/open_api_sdk/models/errors/apierror.rb new file mode 100644 index 00000000..140d3fc7 --- /dev/null +++ b/lib/open_api_sdk/models/errors/apierror.rb @@ -0,0 +1,38 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module OpenApiSDK + module Models + module Errors + + class APIError < StandardError + include Crystalline::MetadataFields + extend T::Sig + + + field :body, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('body') } } + field :raw_response, T.nilable(Faraday::Response), {} + field :status_code, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status_code') } } + + + sig { params(status_code: ::Integer, body: ::String, raw_response: Faraday::Response).void } + def initialize(status_code:, body:, raw_response:) + @status_code = status_code + @body = body + @raw_response = raw_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @msg == other.msg + return false unless @status_code == other.status_code + return false unless @body == other.body + return false unless @raw_response == other.raw_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/errors/error.rb b/lib/open_api_sdk/models/errors/error.rb new file mode 100644 index 00000000..1bad9179 --- /dev/null +++ b/lib/open_api_sdk/models/errors/error.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Errors + + # The `Status` type defines a logical error model + class Error + extend T::Sig + include Crystalline::MetadataFields + + # A developer-facing error message. + field :message, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('message') } } + # The HTTP status code + field :status_code, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status_code') } } + + + sig { params(message: ::String, status_code: ::Integer).void } + def initialize(message: nil, status_code: nil) + @message = message + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @message == other.message + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations.rb b/lib/open_api_sdk/models/operations.rb index 18ddba7b..4b003f01 100644 --- a/lib/open_api_sdk/models/operations.rb +++ b/lib/open_api_sdk/models/operations.rb @@ -4,163 +4,150 @@ # frozen_string_literal: true module OpenApiSDK - module Operations - autoload :Op, 'open_api_sdk/models/operations/op.rb' - autoload :GetApisRequest, 'open_api_sdk/models/operations/getapis_request.rb' - autoload :GetApisResponse, 'open_api_sdk/models/operations/getapis_response.rb' - autoload :QueryParamOp, 'open_api_sdk/models/operations/queryparam_op.rb' - autoload :GetAllApiVersionsRequest, 'open_api_sdk/models/operations/getallapiversions_request.rb' - autoload :GetAllApiVersionsResponse, 'open_api_sdk/models/operations/getallapiversions_response.rb' - autoload :UpsertApiRequest, 'open_api_sdk/models/operations/upsertapi_request.rb' - autoload :UpsertApiResponse, 'open_api_sdk/models/operations/upsertapi_response.rb' - autoload :DeleteApiRequest, 'open_api_sdk/models/operations/deleteapi_request.rb' - autoload :DeleteApiResponse, 'open_api_sdk/models/operations/deleteapi_response.rb' - autoload :GenerateOpenApiSpecRequest, 'open_api_sdk/models/operations/generateopenapispec_request.rb' - autoload :GenerateOpenApiSpecResponse, 'open_api_sdk/models/operations/generateopenapispec_response.rb' - autoload :GeneratePostmanCollectionRequest, 'open_api_sdk/models/operations/generatepostmancollection_request.rb' - autoload :GeneratePostmanCollectionResponse, 'open_api_sdk/models/operations/generatepostmancollection_response.rb' - autoload :GetAllApiEndpointsRequest, 'open_api_sdk/models/operations/getallapiendpoints_request.rb' - autoload :GetAllApiEndpointsResponse, 'open_api_sdk/models/operations/getallapiendpoints_response.rb' - autoload :GetAllForVersionApiEndpointsRequest, 'open_api_sdk/models/operations/getallforversionapiendpoints_request.rb' - autoload :GetAllForVersionApiEndpointsResponse, 'open_api_sdk/models/operations/getallforversionapiendpoints_response.rb' - autoload :FindApiEndpointRequest, 'open_api_sdk/models/operations/findapiendpoint_request.rb' - autoload :FindApiEndpointResponse, 'open_api_sdk/models/operations/findapiendpoint_response.rb' - autoload :DeleteApiEndpointRequest, 'open_api_sdk/models/operations/deleteapiendpoint_request.rb' - autoload :DeleteApiEndpointResponse, 'open_api_sdk/models/operations/deleteapiendpoint_response.rb' - autoload :GetApiEndpointRequest, 'open_api_sdk/models/operations/getapiendpoint_request.rb' - autoload :GetApiEndpointResponse, 'open_api_sdk/models/operations/getapiendpoint_response.rb' - autoload :UpsertApiEndpointRequest, 'open_api_sdk/models/operations/upsertapiendpoint_request.rb' - autoload :UpsertApiEndpointResponse, 'open_api_sdk/models/operations/upsertapiendpoint_response.rb' - autoload :GenerateOpenApiSpecForApiEndpointRequest, 'open_api_sdk/models/operations/generateopenapispecforapiendpoint_request.rb' - autoload :GenerateOpenApiSpecForApiEndpointResponse, 'open_api_sdk/models/operations/generateopenapispecforapiendpoint_response.rb' - autoload :GeneratePostmanCollectionForApiEndpointRequest, 'open_api_sdk/models/operations/generatepostmancollectionforapiendpoint_request.rb' - autoload :GeneratePostmanCollectionForApiEndpointResponse, 'open_api_sdk/models/operations/generatepostmancollectionforapiendpoint_response.rb' - autoload :GetVersionMetadataRequest, 'open_api_sdk/models/operations/getversionmetadata_request.rb' - autoload :GetVersionMetadataResponse, 'open_api_sdk/models/operations/getversionmetadata_response.rb' - autoload :InsertVersionMetadataRequest, 'open_api_sdk/models/operations/insertversionmetadata_request.rb' - autoload :InsertVersionMetadataResponse, 'open_api_sdk/models/operations/insertversionmetadata_response.rb' - autoload :DeleteVersionMetadataRequest, 'open_api_sdk/models/operations/deleteversionmetadata_request.rb' - autoload :DeleteVersionMetadataResponse, 'open_api_sdk/models/operations/deleteversionmetadata_response.rb' - autoload :GetSchemaRequest, 'open_api_sdk/models/operations/getschema_request.rb' - autoload :GetSchemaResponse, 'open_api_sdk/models/operations/getschema_response.rb' - autoload :File, 'open_api_sdk/models/operations/file.rb' - autoload :RegisterSchemaRequestBody, 'open_api_sdk/models/operations/registerschema_requestbody.rb' - autoload :RegisterSchemaRequest, 'open_api_sdk/models/operations/registerschema_request.rb' - autoload :RegisterSchemaResponse, 'open_api_sdk/models/operations/registerschema_response.rb' - autoload :DownloadSchemaRequest, 'open_api_sdk/models/operations/downloadschema_request.rb' - autoload :DownloadSchemaResponse, 'open_api_sdk/models/operations/downloadschema_response.rb' - autoload :GetSchemaDiffRequest, 'open_api_sdk/models/operations/getschemadiff_request.rb' - autoload :GetSchemaDiffResponse, 'open_api_sdk/models/operations/getschemadiff_response.rb' - autoload :DeleteSchemaRequest, 'open_api_sdk/models/operations/deleteschema_request.rb' - autoload :DeleteSchemaResponse, 'open_api_sdk/models/operations/deleteschema_response.rb' - autoload :GetSchemaRevisionRequest, 'open_api_sdk/models/operations/getschemarevision_request.rb' - autoload :GetSchemaRevisionResponse, 'open_api_sdk/models/operations/getschemarevision_response.rb' - autoload :DownloadSchemaRevisionRequest, 'open_api_sdk/models/operations/downloadschemarevision_request.rb' - autoload :DownloadSchemaRevisionResponse, 'open_api_sdk/models/operations/downloadschemarevision_response.rb' - autoload :GetSchemasRequest, 'open_api_sdk/models/operations/getschemas_request.rb' - autoload :GetSchemasResponse, 'open_api_sdk/models/operations/getschemas_response.rb' - autoload :ValidateApiKeyResponse, 'open_api_sdk/models/operations/validateapikey_response.rb' - autoload :GetUserResponse, 'open_api_sdk/models/operations/getuser_response.rb' - autoload :GetAccessTokenRequest, 'open_api_sdk/models/operations/getaccesstoken_request.rb' - autoload :GetAccessTokenResponse, 'open_api_sdk/models/operations/getaccesstoken_response.rb' - autoload :GetWorkspaceAccessRequest, 'open_api_sdk/models/operations/getworkspaceaccess_request.rb' - autoload :GetWorkspaceAccessResponse, 'open_api_sdk/models/operations/getworkspaceaccess_response.rb' - autoload :QueryEventLogRequest, 'open_api_sdk/models/operations/queryeventlog_request.rb' - autoload :QueryEventLogResponse, 'open_api_sdk/models/operations/queryeventlog_response.rb' - autoload :GetRequestFromEventLogRequest, 'open_api_sdk/models/operations/getrequestfromeventlog_request.rb' - autoload :GetRequestFromEventLogResponse, 'open_api_sdk/models/operations/getrequestfromeventlog_response.rb' - autoload :GenerateRequestPostmanCollectionRequest, 'open_api_sdk/models/operations/generaterequestpostmancollection_request.rb' - autoload :GenerateRequestPostmanCollectionResponse, 'open_api_sdk/models/operations/generaterequestpostmancollection_response.rb' - autoload :CheckGithubAccessRequest, 'open_api_sdk/models/operations/checkgithubaccess_request.rb' - autoload :CheckGithubAccessResponse, 'open_api_sdk/models/operations/checkgithubaccess_response.rb' - autoload :GithubCheckPublishingPRsRequest, 'open_api_sdk/models/operations/githubcheckpublishingprs_request.rb' - autoload :GithubCheckPublishingPRsResponse, 'open_api_sdk/models/operations/githubcheckpublishingprs_response.rb' - autoload :GithubCheckPublishingSecretsRequest, 'open_api_sdk/models/operations/githubcheckpublishingsecrets_request.rb' - autoload :GithubCheckPublishingSecretsResponse, 'open_api_sdk/models/operations/githubcheckpublishingsecrets_response.rb' - autoload :GithubStorePublishingSecretsResponse, 'open_api_sdk/models/operations/githubstorepublishingsecrets_response.rb' - autoload :GithubConfigureCodeSamplesResponse, 'open_api_sdk/models/operations/githubconfigurecodesamples_response.rb' - autoload :GithubConfigureMintlifyRepoResponse, 'open_api_sdk/models/operations/githubconfiguremintlifyrepo_response.rb' - autoload :GithubConfigureTargetResponse, 'open_api_sdk/models/operations/githubconfiguretarget_response.rb' - autoload :GithubTriggerActionResponse, 'open_api_sdk/models/operations/githubtriggeraction_response.rb' - autoload :GetGitHubActionRequest, 'open_api_sdk/models/operations/getgithubaction_request.rb' - autoload :GetGitHubActionResponse, 'open_api_sdk/models/operations/getgithubaction_response.rb' - autoload :GetOrganizationsResponse, 'open_api_sdk/models/operations/getorganizations_response.rb' - autoload :CreateOrganizationResponse, 'open_api_sdk/models/operations/createorganization_response.rb' - autoload :GetOrganizationRequest, 'open_api_sdk/models/operations/getorganization_request.rb' - autoload :GetOrganizationResponse, 'open_api_sdk/models/operations/getorganization_response.rb' - autoload :CreateFreeTrialResponse, 'open_api_sdk/models/operations/createfreetrial_response.rb' - autoload :GetOrganizationUsageResponse, 'open_api_sdk/models/operations/getorganizationusage_response.rb' - autoload :GetEmbedAccessTokenRequest, 'open_api_sdk/models/operations/getembedaccesstoken_request.rb' - autoload :GetEmbedAccessTokenResponse, 'open_api_sdk/models/operations/getembedaccesstoken_response.rb' - autoload :GetValidEmbedAccessTokensResponse, 'open_api_sdk/models/operations/getvalidembedaccesstokens_response.rb' - autoload :RevokeEmbedAccessTokenRequest, 'open_api_sdk/models/operations/revokeembedaccesstoken_request.rb' - autoload :RevokeEmbedAccessTokenResponse, 'open_api_sdk/models/operations/revokeembedaccesstoken_response.rb' - autoload :GetWorkspacesResponse, 'open_api_sdk/models/operations/getworkspaces_response.rb' - autoload :GetWorkspaceByContextResponse, 'open_api_sdk/models/operations/getworkspacebycontext_response.rb' - autoload :CreateWorkspaceResponse, 'open_api_sdk/models/operations/createworkspace_response.rb' - autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb' - autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb' - autoload :UpdateWorkspaceDetailsRequest, 'open_api_sdk/models/operations/updateworkspacedetails_request.rb' - autoload :UpdateWorkspaceDetailsResponse, 'open_api_sdk/models/operations/updateworkspacedetails_response.rb' - autoload :GetWorkspaceSettingsRequest, 'open_api_sdk/models/operations/getworkspacesettings_request.rb' - autoload :GetWorkspaceSettingsResponse, 'open_api_sdk/models/operations/getworkspacesettings_response.rb' - autoload :UpdateWorkspaceSettingsRequest, 'open_api_sdk/models/operations/updateworkspacesettings_request.rb' - autoload :UpdateWorkspaceSettingsResponse, 'open_api_sdk/models/operations/updateworkspacesettings_response.rb' - autoload :GetWorkspaceTeamRequest, 'open_api_sdk/models/operations/getworkspaceteam_request.rb' - autoload :GetWorkspaceTeamResponse, 'open_api_sdk/models/operations/getworkspaceteam_response.rb' - autoload :GrantUserAccessToWorkspaceRequest, 'open_api_sdk/models/operations/grantuseraccesstoworkspace_request.rb' - autoload :GrantUserAccessToWorkspaceResponse, 'open_api_sdk/models/operations/grantuseraccesstoworkspace_response.rb' - autoload :RevokeUserAccessToWorkspaceRequest, 'open_api_sdk/models/operations/revokeuseraccesstoworkspace_request.rb' - autoload :RevokeUserAccessToWorkspaceResponse, 'open_api_sdk/models/operations/revokeuseraccesstoworkspace_response.rb' - autoload :GetWorkspaceTokensRequest, 'open_api_sdk/models/operations/getworkspacetokens_request.rb' - autoload :GetWorkspaceTokensResponse, 'open_api_sdk/models/operations/getworkspacetokens_response.rb' - autoload :CreateWorkspaceTokenRequest, 'open_api_sdk/models/operations/createworkspacetoken_request.rb' - autoload :CreateWorkspaceTokenResponse, 'open_api_sdk/models/operations/createworkspacetoken_response.rb' - autoload :DeleteWorkspaceTokenRequest, 'open_api_sdk/models/operations/deleteworkspacetoken_request.rb' - autoload :DeleteWorkspaceTokenResponse, 'open_api_sdk/models/operations/deleteworkspacetoken_response.rb' - autoload :GetWorkspaceFeatureFlagsRequest, 'open_api_sdk/models/operations/getworkspacefeatureflags_request.rb' - autoload :GetWorkspaceFeatureFlagsResponse, 'open_api_sdk/models/operations/getworkspacefeatureflags_response.rb' - autoload :SearchWorkspaceEventsRequest, 'open_api_sdk/models/operations/searchworkspaceevents_request.rb' - autoload :SearchWorkspaceEventsResponse, 'open_api_sdk/models/operations/searchworkspaceevents_response.rb' - autoload :PostWorkspaceEventsRequest, 'open_api_sdk/models/operations/postworkspaceevents_request.rb' - autoload :PostWorkspaceEventsResponse, 'open_api_sdk/models/operations/postworkspaceevents_response.rb' - autoload :GetWorkspaceEventsByTargetRequest, 'open_api_sdk/models/operations/getworkspaceeventsbytarget_request.rb' - autoload :GetWorkspaceEventsByTargetResponse, 'open_api_sdk/models/operations/getworkspaceeventsbytarget_response.rb' - autoload :GetWorkspaceTargetsRequest, 'open_api_sdk/models/operations/getworkspacetargets_request.rb' - autoload :GetWorkspaceTargetsResponse, 'open_api_sdk/models/operations/getworkspacetargets_response.rb' - autoload :GetWorkspaceTargetsDeprecatedRequest, 'open_api_sdk/models/operations/getworkspacetargetsdeprecated_request.rb' - autoload :GetWorkspaceTargetsDeprecatedResponse, 'open_api_sdk/models/operations/getworkspacetargetsdeprecated_response.rb' - autoload :PreflightResponse, 'open_api_sdk/models/operations/preflight_response.rb' - autoload :GetNamespacesResponse, 'open_api_sdk/models/operations/getnamespaces_response.rb' - autoload :GetRevisionsRequest, 'open_api_sdk/models/operations/getrevisions_request.rb' - autoload :GetRevisionsResponse, 'open_api_sdk/models/operations/getrevisions_response.rb' - autoload :GetTagsRequest, 'open_api_sdk/models/operations/gettags_request.rb' - autoload :GetTagsResponse, 'open_api_sdk/models/operations/gettags_response.rb' - autoload :PostTagsRequest, 'open_api_sdk/models/operations/posttags_request.rb' - autoload :PostTagsResponse, 'open_api_sdk/models/operations/posttags_response.rb' - autoload :GetManifestRequest, 'open_api_sdk/models/operations/getmanifest_request.rb' - autoload :GetManifestResponse, 'open_api_sdk/models/operations/getmanifest_response.rb' - autoload :GetBlobRequest, 'open_api_sdk/models/operations/getblob_request.rb' - autoload :GetBlobResponse, 'open_api_sdk/models/operations/getblob_response.rb' - autoload :UploadReportFile, 'open_api_sdk/models/operations/uploadreport_file.rb' - autoload :UploadReportRequestBody, 'open_api_sdk/models/operations/uploadreport_requestbody.rb' - autoload :UploadReportUploadedReport, 'open_api_sdk/models/operations/uploadreport_uploadedreport.rb' - autoload :UploadReportResponse, 'open_api_sdk/models/operations/uploadreport_response.rb' - autoload :GetLintingReportSignedUrlRequest, 'open_api_sdk/models/operations/getlintingreportsignedurl_request.rb' - autoload :GetLintingReportSignedUrlSignedAccess, 'open_api_sdk/models/operations/getlintingreportsignedurl_signedaccess.rb' - autoload :GetLintingReportSignedUrlResponse, 'open_api_sdk/models/operations/getlintingreportsignedurl_response.rb' - autoload :GetChangesReportSignedUrlRequest, 'open_api_sdk/models/operations/getchangesreportsignedurl_request.rb' - autoload :GetChangesReportSignedUrlSignedAccess, 'open_api_sdk/models/operations/getchangesreportsignedurl_signedaccess.rb' - autoload :GetChangesReportSignedUrlResponse, 'open_api_sdk/models/operations/getchangesreportsignedurl_response.rb' - autoload :Schema, 'open_api_sdk/models/operations/schema.rb' - autoload :SuggestOpenAPIRequestBody, 'open_api_sdk/models/operations/suggestopenapi_requestbody.rb' - autoload :SuggestOpenAPIRequest, 'open_api_sdk/models/operations/suggestopenapi_request.rb' - autoload :SuggestOpenAPIResponse, 'open_api_sdk/models/operations/suggestopenapi_response.rb' - autoload :SuggestRequest, 'open_api_sdk/models/operations/suggest_request.rb' - autoload :SuggestResponse, 'open_api_sdk/models/operations/suggest_response.rb' - autoload :SuggestOpenAPIRegistryRequest, 'open_api_sdk/models/operations/suggestopenapiregistry_request.rb' - autoload :SuggestOpenAPIRegistryResponse, 'open_api_sdk/models/operations/suggestopenapiregistry_response.rb' - autoload :CreateRequestBody, 'open_api_sdk/models/operations/create_requestbody.rb' - autoload :CreateResponse, 'open_api_sdk/models/operations/create_response.rb' + module Models + module Operations + autoload :ActivateSubscriptionNamespaceRequest, 'open_api_sdk/models/operations/activatesubscriptionnamespace_request.rb' + autoload :ActivateSubscriptionNamespaceResponse, 'open_api_sdk/models/operations/activatesubscriptionnamespace_response.rb' + autoload :ArchiveNamespaceRequest, 'open_api_sdk/models/operations/archivenamespace_request.rb' + autoload :ArchiveNamespaceRequestBody, 'open_api_sdk/models/operations/archivenamespace_requestbody.rb' + autoload :ArchiveNamespaceResponse, 'open_api_sdk/models/operations/archivenamespace_response.rb' + autoload :CheckGithubAccessRequest, 'open_api_sdk/models/operations/checkgithubaccess_request.rb' + autoload :CheckGithubAccessResponse, 'open_api_sdk/models/operations/checkgithubaccess_response.rb' + autoload :CreateBillingAddOnsResponse, 'open_api_sdk/models/operations/createbillingaddons_response.rb' + autoload :CreateFreeTrialResponse, 'open_api_sdk/models/operations/createfreetrial_response.rb' + autoload :CreateOrganizationResponse, 'open_api_sdk/models/operations/createorganization_response.rb' + autoload :CreatePublishingTokenRequestBody, 'open_api_sdk/models/operations/createpublishingtoken_requestbody.rb' + autoload :CreatePublishingTokenResponse, 'open_api_sdk/models/operations/createpublishingtoken_response.rb' + autoload :CreateRemoteSourceResponse, 'open_api_sdk/models/operations/createremotesource_response.rb' + autoload :CreateSchemaStoreItemRequestBody, 'open_api_sdk/models/operations/createschemastoreitem_requestbody.rb' + autoload :CreateSchemaStoreItemResponse, 'open_api_sdk/models/operations/createschemastoreitem_response.rb' + autoload :CreateWorkspaceTokenRequest, 'open_api_sdk/models/operations/createworkspacetoken_request.rb' + autoload :CreateWorkspaceTokenResponse, 'open_api_sdk/models/operations/createworkspacetoken_response.rb' + autoload :CreateWorkspaceResponse, 'open_api_sdk/models/operations/createworkspace_response.rb' + autoload :CreateRequestBody, 'open_api_sdk/models/operations/create_requestbody.rb' + autoload :CreateResponse, 'open_api_sdk/models/operations/create_response.rb' + autoload :DeleteBillingAddOnRequest, 'open_api_sdk/models/operations/deletebillingaddon_request.rb' + autoload :DeleteBillingAddOnResponse, 'open_api_sdk/models/operations/deletebillingaddon_response.rb' + autoload :DeletePublishingTokenRequest, 'open_api_sdk/models/operations/deletepublishingtoken_request.rb' + autoload :DeletePublishingTokenResponse, 'open_api_sdk/models/operations/deletepublishingtoken_response.rb' + autoload :DeleteWorkspaceTokenRequest, 'open_api_sdk/models/operations/deleteworkspacetoken_request.rb' + autoload :DeleteWorkspaceTokenResponse, 'open_api_sdk/models/operations/deleteworkspacetoken_response.rb' + autoload :File, 'open_api_sdk/models/operations/file.rb' + autoload :Format, 'open_api_sdk/models/operations/format.rb' + autoload :GenerateCodeSamplePreviewAsyncResponse, 'open_api_sdk/models/operations/generatecodesamplepreviewasync_response.rb' + autoload :GenerateCodeSamplePreviewAsyncResponseBody, 'open_api_sdk/models/operations/generatecodesamplepreviewasync_responsebody.rb' + autoload :GenerateCodeSamplePreviewResponse, 'open_api_sdk/models/operations/generatecodesamplepreview_response.rb' + autoload :GetAccessTokenRequest, 'open_api_sdk/models/operations/getaccesstoken_request.rb' + autoload :GetAccessTokenResponse, 'open_api_sdk/models/operations/getaccesstoken_response.rb' + autoload :GetBillingAddOnsResponse, 'open_api_sdk/models/operations/getbillingaddons_response.rb' + autoload :GetBlobRequest, 'open_api_sdk/models/operations/getblob_request.rb' + autoload :GetBlobResponse, 'open_api_sdk/models/operations/getblob_response.rb' + autoload :GetChangesReportSignedUrlRequest, 'open_api_sdk/models/operations/getchangesreportsignedurl_request.rb' + autoload :GetChangesReportSignedUrlResponse, 'open_api_sdk/models/operations/getchangesreportsignedurl_response.rb' + autoload :GetChangesReportSignedUrlSignedAccess, 'open_api_sdk/models/operations/getchangesreportsignedurl_signedaccess.rb' + autoload :GetCodeSamplePreviewAsyncRequest, 'open_api_sdk/models/operations/getcodesamplepreviewasync_request.rb' + autoload :GetCodeSamplePreviewAsyncResponse, 'open_api_sdk/models/operations/getcodesamplepreviewasync_response.rb' + autoload :GetCodeSamplePreviewAsyncResponseBody, 'open_api_sdk/models/operations/getcodesamplepreviewasync_responsebody.rb' + autoload :GetGitHubActionRequest, 'open_api_sdk/models/operations/getgithubaction_request.rb' + autoload :GetGitHubActionResponse, 'open_api_sdk/models/operations/getgithubaction_response.rb' + autoload :GetGithubSetupStateRequest, 'open_api_sdk/models/operations/getgithubsetupstate_request.rb' + autoload :GetGithubSetupStateResponse, 'open_api_sdk/models/operations/getgithubsetupstate_response.rb' + autoload :GetLintingReportSignedUrlRequest, 'open_api_sdk/models/operations/getlintingreportsignedurl_request.rb' + autoload :GetLintingReportSignedUrlResponse, 'open_api_sdk/models/operations/getlintingreportsignedurl_response.rb' + autoload :GetLintingReportSignedUrlSignedAccess, 'open_api_sdk/models/operations/getlintingreportsignedurl_signedaccess.rb' + autoload :GetManifestRequest, 'open_api_sdk/models/operations/getmanifest_request.rb' + autoload :GetManifestResponse, 'open_api_sdk/models/operations/getmanifest_response.rb' + autoload :GetNamespacesResponse, 'open_api_sdk/models/operations/getnamespaces_response.rb' + autoload :GetOrganizationUsageResponse, 'open_api_sdk/models/operations/getorganizationusage_response.rb' + autoload :GetOrganizationRequest, 'open_api_sdk/models/operations/getorganization_request.rb' + autoload :GetOrganizationResponse, 'open_api_sdk/models/operations/getorganization_response.rb' + autoload :GetOrganizationsResponse, 'open_api_sdk/models/operations/getorganizations_response.rb' + autoload :GetPublishingTokenByIDRequest, 'open_api_sdk/models/operations/getpublishingtokenbyid_request.rb' + autoload :GetPublishingTokenByIDResponse, 'open_api_sdk/models/operations/getpublishingtokenbyid_response.rb' + autoload :GetPublishingTokenPublicMetadataRequest, 'open_api_sdk/models/operations/getpublishingtokenpublicmetadata_request.rb' + autoload :GetPublishingTokenPublicMetadataResponse, 'open_api_sdk/models/operations/getpublishingtokenpublicmetadata_response.rb' + autoload :GetPublishingTokenPublicMetadataResponseBody, 'open_api_sdk/models/operations/getpublishingtokenpublicmetadata_responsebody.rb' + autoload :GetPublishingTokenTargetByIDRequest, 'open_api_sdk/models/operations/getpublishingtokentargetbyid_request.rb' + autoload :GetPublishingTokenTargetByIDResponse, 'open_api_sdk/models/operations/getpublishingtokentargetbyid_response.rb' + autoload :GetPublishingTokenTargetByIDResponseBody, 'open_api_sdk/models/operations/getpublishingtokentargetbyid_responsebody.rb' + autoload :GetPublishingTokenResponse, 'open_api_sdk/models/operations/getpublishingtoken_response.rb' + autoload :GetRevisionsRequest, 'open_api_sdk/models/operations/getrevisions_request.rb' + autoload :GetRevisionsResponse, 'open_api_sdk/models/operations/getrevisions_response.rb' + autoload :GetSchemaStoreItemRequestBody, 'open_api_sdk/models/operations/getschemastoreitem_requestbody.rb' + autoload :GetSchemaStoreItemResponse, 'open_api_sdk/models/operations/getschemastoreitem_response.rb' + autoload :GetTagsRequest, 'open_api_sdk/models/operations/gettags_request.rb' + autoload :GetTagsResponse, 'open_api_sdk/models/operations/gettags_response.rb' + autoload :GetUserResponse, 'open_api_sdk/models/operations/getuser_response.rb' + autoload :GetWorkspaceAccessRequest, 'open_api_sdk/models/operations/getworkspaceaccess_request.rb' + autoload :GetWorkspaceAccessResponse, 'open_api_sdk/models/operations/getworkspaceaccess_response.rb' + autoload :GetWorkspaceByContextResponse, 'open_api_sdk/models/operations/getworkspacebycontext_response.rb' + autoload :GetWorkspaceEventsByTargetRequest, 'open_api_sdk/models/operations/getworkspaceeventsbytarget_request.rb' + autoload :GetWorkspaceEventsByTargetResponse, 'open_api_sdk/models/operations/getworkspaceeventsbytarget_response.rb' + autoload :GetWorkspaceFeatureFlagsRequest, 'open_api_sdk/models/operations/getworkspacefeatureflags_request.rb' + autoload :GetWorkspaceFeatureFlagsResponse, 'open_api_sdk/models/operations/getworkspacefeatureflags_response.rb' + autoload :GetWorkspaceSettingsRequest, 'open_api_sdk/models/operations/getworkspacesettings_request.rb' + autoload :GetWorkspaceSettingsResponse, 'open_api_sdk/models/operations/getworkspacesettings_response.rb' + autoload :GetWorkspaceTargetsDeprecatedRequest, 'open_api_sdk/models/operations/getworkspacetargetsdeprecated_request.rb' + autoload :GetWorkspaceTargetsDeprecatedResponse, 'open_api_sdk/models/operations/getworkspacetargetsdeprecated_response.rb' + autoload :GetWorkspaceTargetsRequest, 'open_api_sdk/models/operations/getworkspacetargets_request.rb' + autoload :GetWorkspaceTargetsResponse, 'open_api_sdk/models/operations/getworkspacetargets_response.rb' + autoload :GetWorkspaceTeamRequest, 'open_api_sdk/models/operations/getworkspaceteam_request.rb' + autoload :GetWorkspaceTeamResponse, 'open_api_sdk/models/operations/getworkspaceteam_response.rb' + autoload :GetWorkspaceTokensRequest, 'open_api_sdk/models/operations/getworkspacetokens_request.rb' + autoload :GetWorkspaceTokensResponse, 'open_api_sdk/models/operations/getworkspacetokens_response.rb' + autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb' + autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb' + autoload :GetWorkspacesResponse, 'open_api_sdk/models/operations/getworkspaces_response.rb' + autoload :GithubCheckPublishingPRsRequest, 'open_api_sdk/models/operations/githubcheckpublishingprs_request.rb' + autoload :GithubCheckPublishingPRsResponse, 'open_api_sdk/models/operations/githubcheckpublishingprs_response.rb' + autoload :GithubCheckPublishingSecretsRequest, 'open_api_sdk/models/operations/githubcheckpublishingsecrets_request.rb' + autoload :GithubCheckPublishingSecretsResponse, 'open_api_sdk/models/operations/githubcheckpublishingsecrets_response.rb' + autoload :GithubConfigureCodeSamplesResponse, 'open_api_sdk/models/operations/githubconfigurecodesamples_response.rb' + autoload :GithubConfigureMintlifyRepoResponse, 'open_api_sdk/models/operations/githubconfiguremintlifyrepo_response.rb' + autoload :GithubConfigureTargetResponse, 'open_api_sdk/models/operations/githubconfiguretarget_response.rb' + autoload :GithubStorePublishingSecretsResponse, 'open_api_sdk/models/operations/githubstorepublishingsecrets_response.rb' + autoload :GithubTriggerActionResponse, 'open_api_sdk/models/operations/githubtriggeraction_response.rb' + autoload :GrantUserAccessToWorkspaceRequest, 'open_api_sdk/models/operations/grantuseraccesstoworkspace_request.rb' + autoload :GrantUserAccessToWorkspaceResponse, 'open_api_sdk/models/operations/grantuseraccesstoworkspace_response.rb' + autoload :IgnoreSubscriptionNamespaceRequest, 'open_api_sdk/models/operations/ignoresubscriptionnamespace_request.rb' + autoload :IgnoreSubscriptionNamespaceResponse, 'open_api_sdk/models/operations/ignoresubscriptionnamespace_response.rb' + autoload :LinkGithubAccessRequest, 'open_api_sdk/models/operations/linkgithubaccess_request.rb' + autoload :LinkGithubAccessResponse, 'open_api_sdk/models/operations/linkgithubaccess_response.rb' + autoload :ListRemoteSourcesRequest, 'open_api_sdk/models/operations/listremotesources_request.rb' + autoload :ListRemoteSourcesResponse, 'open_api_sdk/models/operations/listremotesources_response.rb' + autoload :PostTagsRequest, 'open_api_sdk/models/operations/posttags_request.rb' + autoload :PostTagsResponse, 'open_api_sdk/models/operations/posttags_response.rb' + autoload :PostWorkspaceEventsRequest, 'open_api_sdk/models/operations/postworkspaceevents_request.rb' + autoload :PostWorkspaceEventsResponse, 'open_api_sdk/models/operations/postworkspaceevents_response.rb' + autoload :PreflightResponse, 'open_api_sdk/models/operations/preflight_response.rb' + autoload :RevokeUserAccessToWorkspaceRequest, 'open_api_sdk/models/operations/revokeuseraccesstoworkspace_request.rb' + autoload :RevokeUserAccessToWorkspaceResponse, 'open_api_sdk/models/operations/revokeuseraccesstoworkspace_response.rb' + autoload :Schema, 'open_api_sdk/models/operations/schema.rb' + autoload :SearchWorkspaceEventsRequest, 'open_api_sdk/models/operations/searchworkspaceevents_request.rb' + autoload :SearchWorkspaceEventsResponse, 'open_api_sdk/models/operations/searchworkspaceevents_response.rb' + autoload :SetVisibilityRequest, 'open_api_sdk/models/operations/setvisibility_request.rb' + autoload :SetVisibilityRequestBody, 'open_api_sdk/models/operations/setvisibility_requestbody.rb' + autoload :SetVisibilityResponse, 'open_api_sdk/models/operations/setvisibility_response.rb' + autoload :SetWorkspaceFeatureFlagsResponse, 'open_api_sdk/models/operations/setworkspacefeatureflags_response.rb' + autoload :SuggestItemsResponse, 'open_api_sdk/models/operations/suggestitems_response.rb' + autoload :SuggestOpenAPIRegistryRequest, 'open_api_sdk/models/operations/suggestopenapiregistry_request.rb' + autoload :SuggestOpenAPIRegistryResponse, 'open_api_sdk/models/operations/suggestopenapiregistry_response.rb' + autoload :SuggestOpenAPIRequest, 'open_api_sdk/models/operations/suggestopenapi_request.rb' + autoload :SuggestOpenAPIRequestBody, 'open_api_sdk/models/operations/suggestopenapi_requestbody.rb' + autoload :SuggestOpenAPIResponse, 'open_api_sdk/models/operations/suggestopenapi_response.rb' + autoload :SuggestRequest, 'open_api_sdk/models/operations/suggest_request.rb' + autoload :SuggestResponse, 'open_api_sdk/models/operations/suggest_response.rb' + autoload :UpdatePublishingTokenExpirationRequest, 'open_api_sdk/models/operations/updatepublishingtokenexpiration_request.rb' + autoload :UpdatePublishingTokenExpirationRequestBody, 'open_api_sdk/models/operations/updatepublishingtokenexpiration_requestbody.rb' + autoload :UpdatePublishingTokenExpirationResponse, 'open_api_sdk/models/operations/updatepublishingtokenexpiration_response.rb' + autoload :UpdateWorkspaceDetailsRequest, 'open_api_sdk/models/operations/updateworkspacedetails_request.rb' + autoload :UpdateWorkspaceDetailsResponse, 'open_api_sdk/models/operations/updateworkspacedetails_response.rb' + autoload :UpdateWorkspaceSettingsRequest, 'open_api_sdk/models/operations/updateworkspacesettings_request.rb' + autoload :UpdateWorkspaceSettingsResponse, 'open_api_sdk/models/operations/updateworkspacesettings_response.rb' + autoload :UploadReportRequestBody, 'open_api_sdk/models/operations/uploadreport_requestbody.rb' + autoload :UploadReportResponse, 'open_api_sdk/models/operations/uploadreport_response.rb' + autoload :UploadReportUploadedReport, 'open_api_sdk/models/operations/uploadreport_uploadedreport.rb' + autoload :ValidateApiKeyResponse, 'open_api_sdk/models/operations/validateapikey_response.rb' + end end end diff --git a/lib/open_api_sdk/models/operations/activatesubscriptionnamespace_request.rb b/lib/open_api_sdk/models/operations/activatesubscriptionnamespace_request.rb new file mode 100644 index 00000000..cddf6ef4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/activatesubscriptionnamespace_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ActivateSubscriptionNamespaceRequest + extend T::Sig + include Crystalline::MetadataFields + + # The namespace name + field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespaceName', 'style': 'simple', 'explode': false } } + # The existing subscription ID + field :subscription_id, ::String, { 'path_param': { 'field_name': 'subscriptionID', 'style': 'simple', 'explode': false } } + + + sig { params(namespace_name: ::String, subscription_id: ::String).void } + def initialize(namespace_name: nil, subscription_id: nil) + @namespace_name = namespace_name + @subscription_id = subscription_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + return false unless @subscription_id == other.subscription_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/activatesubscriptionnamespace_response.rb b/lib/open_api_sdk/models/operations/activatesubscriptionnamespace_response.rb new file mode 100644 index 00000000..6bbef303 --- /dev/null +++ b/lib/open_api_sdk/models/operations/activatesubscriptionnamespace_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ActivateSubscriptionNamespaceResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/archivenamespace_request.rb b/lib/open_api_sdk/models/operations/archivenamespace_request.rb new file mode 100644 index 00000000..6d4ad381 --- /dev/null +++ b/lib/open_api_sdk/models/operations/archivenamespace_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ArchiveNamespaceRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } + # Archived status + field :request_body, T.nilable(Models::Operations::ArchiveNamespaceRequestBody), { 'request': { 'media_type': 'application/json' } } + + + sig { params(namespace_name: ::String, request_body: T.nilable(Models::Operations::ArchiveNamespaceRequestBody)).void } + def initialize(namespace_name: nil, request_body: nil) + @namespace_name = namespace_name + @request_body = request_body + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + return false unless @request_body == other.request_body + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/archivenamespace_requestbody.rb b/lib/open_api_sdk/models/operations/archivenamespace_requestbody.rb new file mode 100644 index 00000000..2976b3ca --- /dev/null +++ b/lib/open_api_sdk/models/operations/archivenamespace_requestbody.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Archived status + class ArchiveNamespaceRequestBody + extend T::Sig + include Crystalline::MetadataFields + + + field :archived, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('archived') } } + + + sig { params(archived: T.nilable(T::Boolean)).void } + def initialize(archived: nil) + @archived = archived + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @archived == other.archived + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/archivenamespace_response.rb b/lib/open_api_sdk/models/operations/archivenamespace_response.rb new file mode 100644 index 00000000..4cdcb1b2 --- /dev/null +++ b/lib/open_api_sdk/models/operations/archivenamespace_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ArchiveNamespaceResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkgithubaccess_request.rb b/lib/open_api_sdk/models/operations/checkgithubaccess_request.rb index ff92f966..f5eb5517 100644 --- a/lib/open_api_sdk/models/operations/checkgithubaccess_request.rb +++ b/lib/open_api_sdk/models/operations/checkgithubaccess_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class CheckGithubAccessRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class CheckGithubAccessRequest + extend T::Sig + include Crystalline::MetadataFields - field :org, ::String, { 'query_param': { 'field_name': 'org', 'style': 'form', 'explode': true } } + field :org, ::String, { 'query_param': { 'field_name': 'org', 'style': 'form', 'explode': true } } - field :repo, ::String, { 'query_param': { 'field_name': 'repo', 'style': 'form', 'explode': true } } + field :repo, ::String, { 'query_param': { 'field_name': 'repo', 'style': 'form', 'explode': true } } - sig { params(org: ::String, repo: ::String).void } - def initialize(org: nil, repo: nil) - @org = org - @repo = repo + sig { params(org: ::String, repo: ::String).void } + def initialize(org: nil, repo: nil) + @org = org + @repo = repo + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @org == other.org + return false unless @repo == other.repo + true + end end end end diff --git a/lib/open_api_sdk/models/operations/checkgithubaccess_response.rb b/lib/open_api_sdk/models/operations/checkgithubaccess_response.rb index 36fa82f5..1f00c051 100644 --- a/lib/open_api_sdk/models/operations/checkgithubaccess_response.rb +++ b/lib/open_api_sdk/models/operations/checkgithubaccess_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class CheckGithubAccessResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class CheckGithubAccessResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/create_requestbody.rb b/lib/open_api_sdk/models/operations/create_requestbody.rb index 5aaa70b9..10acd1a6 100644 --- a/lib/open_api_sdk/models/operations/create_requestbody.rb +++ b/lib/open_api_sdk/models/operations/create_requestbody.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class CreateRequestBody < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class CreateRequestBody + extend T::Sig + include Crystalline::MetadataFields - # URL to shorten - field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + # URL to shorten + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } - sig { params(url: ::String).void } - def initialize(url: nil) - @url = url + sig { params(url: ::String).void } + def initialize(url: nil) + @url = url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @url == other.url + true + end end end end diff --git a/lib/open_api_sdk/models/operations/create_response.rb b/lib/open_api_sdk/models/operations/create_response.rb index dc00926a..5c8ae9f9 100644 --- a/lib/open_api_sdk/models/operations/create_response.rb +++ b/lib/open_api_sdk/models/operations/create_response.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - - - class CreateResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :short_url, T.nilable(::OpenApiSDK::Shared::ShortURL) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, short_url: T.nilable(::OpenApiSDK::Shared::ShortURL)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, short_url: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @short_url = short_url + module Models + module Operations + + + class CreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :short_url, T.nilable(Models::Shared::ShortURL) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, short_url: T.nilable(Models::Shared::ShortURL)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, short_url: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @short_url = short_url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @short_url == other.short_url + true + end end end end diff --git a/lib/open_api_sdk/models/operations/createbillingaddons_response.rb b/lib/open_api_sdk/models/operations/createbillingaddons_response.rb new file mode 100644 index 00000000..d49afde7 --- /dev/null +++ b/lib/open_api_sdk/models/operations/createbillingaddons_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CreateBillingAddOnsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Success + field :organization_billing_add_on_response, T.nilable(Models::Shared::OrganizationBillingAddOnResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, organization_billing_add_on_response: T.nilable(Models::Shared::OrganizationBillingAddOnResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, organization_billing_add_on_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @organization_billing_add_on_response = organization_billing_add_on_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @organization_billing_add_on_response == other.organization_billing_add_on_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/createfreetrial_response.rb b/lib/open_api_sdk/models/operations/createfreetrial_response.rb index d66c21a8..b1a1850e 100644 --- a/lib/open_api_sdk/models/operations/createfreetrial_response.rb +++ b/lib/open_api_sdk/models/operations/createfreetrial_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class CreateFreeTrialResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class CreateFreeTrialResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/createorganization_response.rb b/lib/open_api_sdk/models/operations/createorganization_response.rb index 23cbd5d7..720d9cd8 100644 --- a/lib/open_api_sdk/models/operations/createorganization_response.rb +++ b/lib/open_api_sdk/models/operations/createorganization_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class CreateOrganizationResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :organization, T.nilable(::OpenApiSDK::Shared::Organization) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), organization: T.nilable(::OpenApiSDK::Shared::Organization)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, organization: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @organization = organization + module Models + module Operations + + + class CreateOrganizationResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :organization, T.nilable(Models::Shared::Organization) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, organization: T.nilable(Models::Shared::Organization)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, organization: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @organization = organization + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @organization == other.organization + true + end end end end diff --git a/lib/open_api_sdk/models/operations/createpublishingtoken_requestbody.rb b/lib/open_api_sdk/models/operations/createpublishingtoken_requestbody.rb new file mode 100644 index 00000000..eddc7706 --- /dev/null +++ b/lib/open_api_sdk/models/operations/createpublishingtoken_requestbody.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # The publishing token to create + class CreatePublishingTokenRequestBody + extend T::Sig + include Crystalline::MetadataFields + + + field :target_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('target_id') } } + + field :target_resource, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('target_resource') } } + + field :token_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('token_name') } } + + field :valid_until, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('valid_until'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(target_id: ::String, target_resource: ::String, token_name: ::String, valid_until: ::DateTime).void } + def initialize(target_id: nil, target_resource: nil, token_name: nil, valid_until: nil) + @target_id = target_id + @target_resource = target_resource + @token_name = token_name + @valid_until = valid_until + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @target_id == other.target_id + return false unless @target_resource == other.target_resource + return false unless @token_name == other.token_name + return false unless @valid_until == other.valid_until + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/createpublishingtoken_response.rb b/lib/open_api_sdk/models/operations/createpublishingtoken_response.rb new file mode 100644 index 00000000..50c48441 --- /dev/null +++ b/lib/open_api_sdk/models/operations/createpublishingtoken_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CreatePublishingTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :publishing_token, T.nilable(Models::Shared::PublishingToken) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, publishing_token: T.nilable(Models::Shared::PublishingToken)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, publishing_token: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @publishing_token = publishing_token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @publishing_token == other.publishing_token + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/createremotesource_response.rb b/lib/open_api_sdk/models/operations/createremotesource_response.rb new file mode 100644 index 00000000..5a020346 --- /dev/null +++ b/lib/open_api_sdk/models/operations/createremotesource_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CreateRemoteSourceResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/createschemastoreitem_requestbody.rb b/lib/open_api_sdk/models/operations/createschemastoreitem_requestbody.rb new file mode 100644 index 00000000..a25aba44 --- /dev/null +++ b/lib/open_api_sdk/models/operations/createschemastoreitem_requestbody.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CreateSchemaStoreItemRequestBody + extend T::Sig + include Crystalline::MetadataFields + + # The format of the OpenAPI specification. + field :format, Models::Operations::Format, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('format'), 'decoder': Utils.enum_from_string(Models::Operations::Format, false) } } + # The package name to use in code snippets / quickstart. + field :package_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('packageName') } } + # The classname of the SDK to use in code snippets / quickstart. + field :sdk_classname, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sdkClassname') } } + # The OpenAPI specification to store. + field :spec, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('spec') } } + + + sig { params(format: Models::Operations::Format, package_name: ::String, sdk_classname: ::String, spec: ::String).void } + def initialize(format: nil, package_name: nil, sdk_classname: nil, spec: nil) + @format = format + @package_name = package_name + @sdk_classname = sdk_classname + @spec = spec + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @format == other.format + return false unless @package_name == other.package_name + return false unless @sdk_classname == other.sdk_classname + return false unless @spec == other.spec + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/createschemastoreitem_response.rb b/lib/open_api_sdk/models/operations/createschemastoreitem_response.rb new file mode 100644 index 00000000..1ce15117 --- /dev/null +++ b/lib/open_api_sdk/models/operations/createschemastoreitem_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CreateSchemaStoreItemResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :schema_store_item, T.nilable(Models::Shared::SchemaStoreItem) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, schema_store_item: T.nilable(Models::Shared::SchemaStoreItem)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, schema_store_item: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @schema_store_item = schema_store_item + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @schema_store_item == other.schema_store_item + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/createworkspace_response.rb b/lib/open_api_sdk/models/operations/createworkspace_response.rb index 6cd9f25a..446fb478 100644 --- a/lib/open_api_sdk/models/operations/createworkspace_response.rb +++ b/lib/open_api_sdk/models/operations/createworkspace_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class CreateWorkspaceResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :workspace, T.nilable(::OpenApiSDK::Shared::Workspace) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), workspace: T.nilable(::OpenApiSDK::Shared::Workspace)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, workspace: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @workspace = workspace + module Models + module Operations + + + class CreateWorkspaceResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :workspace, T.nilable(Models::Shared::Workspace) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, workspace: T.nilable(Models::Shared::Workspace)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, workspace: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @workspace = workspace + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @workspace == other.workspace + true + end end end end diff --git a/lib/open_api_sdk/models/operations/createworkspacetoken_request.rb b/lib/open_api_sdk/models/operations/createworkspacetoken_request.rb index 27220cff..dc081797 100644 --- a/lib/open_api_sdk/models/operations/createworkspacetoken_request.rb +++ b/lib/open_api_sdk/models/operations/createworkspacetoken_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class CreateWorkspaceTokenRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class CreateWorkspaceTokenRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - field :workspace_token, ::OpenApiSDK::Shared::WorkspaceToken, { 'request': { 'media_type': 'application/json' } } + field :workspace_token, Models::Shared::WorkspaceToken, { 'request': { 'media_type': 'application/json' } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(workspace_id: ::String, workspace_token: ::OpenApiSDK::Shared::WorkspaceToken).void } - def initialize(workspace_id: nil, workspace_token: nil) - @workspace_id = workspace_id - @workspace_token = workspace_token + sig { params(workspace_token: Models::Shared::WorkspaceToken, workspace_id: T.nilable(::String)).void } + def initialize(workspace_token: nil, workspace_id: nil) + @workspace_token = workspace_token + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @workspace_token == other.workspace_token + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/createworkspacetoken_response.rb b/lib/open_api_sdk/models/operations/createworkspacetoken_response.rb index 0b265c4c..6989492b 100644 --- a/lib/open_api_sdk/models/operations/createworkspacetoken_response.rb +++ b/lib/open_api_sdk/models/operations/createworkspacetoken_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class CreateWorkspaceTokenResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class CreateWorkspaceTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/deleteapi_request.rb b/lib/open_api_sdk/models/operations/deleteapi_request.rb deleted file mode 100644 index 3fe4bb3a..00000000 --- a/lib/open_api_sdk/models/operations/deleteapi_request.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DeleteApiRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to delete. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to delete. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, version_id: nil) - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/deleteapi_response.rb b/lib/open_api_sdk/models/operations/deleteapi_response.rb deleted file mode 100644 index c5605079..00000000 --- a/lib/open_api_sdk/models/operations/deleteapi_response.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DeleteApiResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/deleteapiendpoint_request.rb b/lib/open_api_sdk/models/operations/deleteapiendpoint_request.rb deleted file mode 100644 index 1a03cf81..00000000 --- a/lib/open_api_sdk/models/operations/deleteapiendpoint_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DeleteApiEndpointRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the ApiEndpoint to delete. - field :api_endpoint_id, ::String, { 'path_param': { 'field_name': 'apiEndpointID', 'style': 'simple', 'explode': false } } - # The ID of the Api the ApiEndpoint belongs to. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api the ApiEndpoint belongs to. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_endpoint_id: ::String, api_id: ::String, version_id: ::String).void } - def initialize(api_endpoint_id: nil, api_id: nil, version_id: nil) - @api_endpoint_id = api_endpoint_id - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/deleteapiendpoint_response.rb b/lib/open_api_sdk/models/operations/deleteapiendpoint_response.rb deleted file mode 100644 index c6e6cab9..00000000 --- a/lib/open_api_sdk/models/operations/deleteapiendpoint_response.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DeleteApiEndpointResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/deletebillingaddon_request.rb b/lib/open_api_sdk/models/operations/deletebillingaddon_request.rb new file mode 100644 index 00000000..ad457691 --- /dev/null +++ b/lib/open_api_sdk/models/operations/deletebillingaddon_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DeleteBillingAddOnRequest + extend T::Sig + include Crystalline::MetadataFields + + # The specific add-on to delete. + field :add_on, Models::Shared::BillingAddOn, { 'path_param': { 'field_name': 'add_on', 'style': 'simple', 'explode': false } } + + + sig { params(add_on: Models::Shared::BillingAddOn).void } + def initialize(add_on: nil) + @add_on = add_on + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @add_on == other.add_on + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/deletebillingaddon_response.rb b/lib/open_api_sdk/models/operations/deletebillingaddon_response.rb new file mode 100644 index 00000000..4dd43cda --- /dev/null +++ b/lib/open_api_sdk/models/operations/deletebillingaddon_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DeleteBillingAddOnResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/deletepublishingtoken_request.rb b/lib/open_api_sdk/models/operations/deletepublishingtoken_request.rb new file mode 100644 index 00000000..e19328e5 --- /dev/null +++ b/lib/open_api_sdk/models/operations/deletepublishingtoken_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DeletePublishingTokenRequest + extend T::Sig + include Crystalline::MetadataFields + + # Unique identifier of the publishing token. + field :token_id, ::String, { 'path_param': { 'field_name': 'tokenID', 'style': 'simple', 'explode': false } } + + + sig { params(token_id: ::String).void } + def initialize(token_id: nil) + @token_id = token_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @token_id == other.token_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/deletepublishingtoken_response.rb b/lib/open_api_sdk/models/operations/deletepublishingtoken_response.rb new file mode 100644 index 00000000..6ea9217a --- /dev/null +++ b/lib/open_api_sdk/models/operations/deletepublishingtoken_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DeletePublishingTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/deleteschema_request.rb b/lib/open_api_sdk/models/operations/deleteschema_request.rb deleted file mode 100644 index bdfb28fc..00000000 --- a/lib/open_api_sdk/models/operations/deleteschema_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DeleteSchemaRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to delete schemas for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The revision ID of the schema to delete. - field :revision_id, ::String, { 'path_param': { 'field_name': 'revisionID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to delete metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, revision_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, revision_id: nil, version_id: nil) - @api_id = api_id - @revision_id = revision_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/deleteschema_response.rb b/lib/open_api_sdk/models/operations/deleteschema_response.rb deleted file mode 100644 index a7805ed7..00000000 --- a/lib/open_api_sdk/models/operations/deleteschema_response.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DeleteSchemaResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/deleteversionmetadata_request.rb b/lib/open_api_sdk/models/operations/deleteversionmetadata_request.rb deleted file mode 100644 index bc3577a5..00000000 --- a/lib/open_api_sdk/models/operations/deleteversionmetadata_request.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DeleteVersionMetadataRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to delete metadata for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The key of the metadata to delete. - field :meta_key, ::String, { 'path_param': { 'field_name': 'metaKey', 'style': 'simple', 'explode': false } } - # The value of the metadata to delete. - field :meta_value, ::String, { 'path_param': { 'field_name': 'metaValue', 'style': 'simple', 'explode': false } } - # The version ID of the Api to delete metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, meta_key: ::String, meta_value: ::String, version_id: ::String).void } - def initialize(api_id: nil, meta_key: nil, meta_value: nil, version_id: nil) - @api_id = api_id - @meta_key = meta_key - @meta_value = meta_value - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/deleteversionmetadata_response.rb b/lib/open_api_sdk/models/operations/deleteversionmetadata_response.rb deleted file mode 100644 index 3dfe15be..00000000 --- a/lib/open_api_sdk/models/operations/deleteversionmetadata_response.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DeleteVersionMetadataResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/deleteworkspacetoken_request.rb b/lib/open_api_sdk/models/operations/deleteworkspacetoken_request.rb index 2599661d..9951a4a1 100644 --- a/lib/open_api_sdk/models/operations/deleteworkspacetoken_request.rb +++ b/lib/open_api_sdk/models/operations/deleteworkspacetoken_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class DeleteWorkspaceTokenRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class DeleteWorkspaceTokenRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the token. - field :token_id, ::String, { 'path_param': { 'field_name': 'tokenID', 'style': 'simple', 'explode': false } } - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + # Unique identifier of the token. + field :token_id, ::String, { 'path_param': { 'field_name': 'tokenID', 'style': 'simple', 'explode': false } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(token_id: ::String, workspace_id: ::String).void } - def initialize(token_id: nil, workspace_id: nil) - @token_id = token_id - @workspace_id = workspace_id + sig { params(token_id: ::String, workspace_id: T.nilable(::String)).void } + def initialize(token_id: nil, workspace_id: nil) + @token_id = token_id + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @token_id == other.token_id + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/deleteworkspacetoken_response.rb b/lib/open_api_sdk/models/operations/deleteworkspacetoken_response.rb index cc3db684..9fbe513c 100644 --- a/lib/open_api_sdk/models/operations/deleteworkspacetoken_response.rb +++ b/lib/open_api_sdk/models/operations/deleteworkspacetoken_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class DeleteWorkspaceTokenResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class DeleteWorkspaceTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/downloadschema_request.rb b/lib/open_api_sdk/models/operations/downloadschema_request.rb deleted file mode 100644 index 0152e90c..00000000 --- a/lib/open_api_sdk/models/operations/downloadschema_request.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DownloadSchemaRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to download the schema for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to delete metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, version_id: nil) - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/downloadschema_response.rb b/lib/open_api_sdk/models/operations/downloadschema_response.rb deleted file mode 100644 index 9afe56fa..00000000 --- a/lib/open_api_sdk/models/operations/downloadschema_response.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DownloadSchemaResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :two_xx_application_json_schema, T.nilable(::String) - # OK - field :two_xx_application_x_yaml_schema, T.nilable(::String) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, two_xx_application_json_schema: T.nilable(::String), two_xx_application_x_yaml_schema: T.nilable(::String), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, two_xx_application_json_schema: nil, two_xx_application_x_yaml_schema: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @two_xx_application_json_schema = two_xx_application_json_schema - @two_xx_application_x_yaml_schema = two_xx_application_x_yaml_schema - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/downloadschemarevision_request.rb b/lib/open_api_sdk/models/operations/downloadschemarevision_request.rb deleted file mode 100644 index e8c05143..00000000 --- a/lib/open_api_sdk/models/operations/downloadschemarevision_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DownloadSchemaRevisionRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to retrieve schemas for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The revision ID of the schema to retrieve. - field :revision_id, ::String, { 'path_param': { 'field_name': 'revisionID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to delete metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, revision_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, revision_id: nil, version_id: nil) - @api_id = api_id - @revision_id = revision_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/downloadschemarevision_response.rb b/lib/open_api_sdk/models/operations/downloadschemarevision_response.rb deleted file mode 100644 index b5d24c54..00000000 --- a/lib/open_api_sdk/models/operations/downloadschemarevision_response.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class DownloadSchemaRevisionResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :two_xx_application_json_schema, T.nilable(::String) - # OK - field :two_xx_application_x_yaml_schema, T.nilable(::String) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, two_xx_application_json_schema: T.nilable(::String), two_xx_application_x_yaml_schema: T.nilable(::String), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, two_xx_application_json_schema: nil, two_xx_application_x_yaml_schema: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @two_xx_application_json_schema = two_xx_application_json_schema - @two_xx_application_x_yaml_schema = two_xx_application_x_yaml_schema - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/file.rb b/lib/open_api_sdk/models/operations/file.rb index 3c198249..7f8e53d4 100644 --- a/lib/open_api_sdk/models/operations/file.rb +++ b/lib/open_api_sdk/models/operations/file.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class File < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class File + extend T::Sig + include Crystalline::MetadataFields - field :content, ::String, { 'multipart_form': { 'content': true } } + field :content, ::String, { 'multipart_form': { 'content': true } } - field :file_name, ::String, { 'multipart_form': { 'field_name': 'file' } } + field :file_name, ::String, { 'multipart_form': { 'field_name': 'fileName' } } - sig { params(content: ::String, file_name: ::String).void } - def initialize(content: nil, file_name: nil) - @content = content - @file_name = file_name + sig { params(content: ::String, file_name: ::String).void } + def initialize(content: nil, file_name: nil) + @content = content + @file_name = file_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content == other.content + return false unless @file_name == other.file_name + true + end end end end diff --git a/lib/open_api_sdk/models/operations/findapiendpoint_request.rb b/lib/open_api_sdk/models/operations/findapiendpoint_request.rb deleted file mode 100644 index 7885ba2a..00000000 --- a/lib/open_api_sdk/models/operations/findapiendpoint_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class FindApiEndpointRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api the ApiEndpoint belongs to. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The displayName of the ApiEndpoint to find (set by operationId from OpenAPI schema). - field :display_name, ::String, { 'path_param': { 'field_name': 'displayName', 'style': 'simple', 'explode': false } } - # The version ID of the Api the ApiEndpoint belongs to. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, display_name: ::String, version_id: ::String).void } - def initialize(api_id: nil, display_name: nil, version_id: nil) - @api_id = api_id - @display_name = display_name - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/findapiendpoint_response.rb b/lib/open_api_sdk/models/operations/findapiendpoint_response.rb deleted file mode 100644 index e7b3382e..00000000 --- a/lib/open_api_sdk/models/operations/findapiendpoint_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class FindApiEndpointResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :api_endpoint, T.nilable(::OpenApiSDK::Shared::ApiEndpoint) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, api_endpoint: T.nilable(::OpenApiSDK::Shared::ApiEndpoint), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, api_endpoint: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @api_endpoint = api_endpoint - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/format.rb b/lib/open_api_sdk/models/operations/format.rb new file mode 100644 index 00000000..1c75be51 --- /dev/null +++ b/lib/open_api_sdk/models/operations/format.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Format - The format of the OpenAPI specification. + class Format < T::Enum + enums do + JSON = new('json') + YAML = new('yaml') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/generatecodesamplepreview_response.rb b/lib/open_api_sdk/models/operations/generatecodesamplepreview_response.rb new file mode 100644 index 00000000..ca2ba66e --- /dev/null +++ b/lib/open_api_sdk/models/operations/generatecodesamplepreview_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GenerateCodeSamplePreviewResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :usage_snippets, T.nilable(Models::Shared::UsageSnippets) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, usage_snippets: T.nilable(Models::Shared::UsageSnippets)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, usage_snippets: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @usage_snippets = usage_snippets + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @usage_snippets == other.usage_snippets + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/generatecodesamplepreviewasync_response.rb b/lib/open_api_sdk/models/operations/generatecodesamplepreviewasync_response.rb new file mode 100644 index 00000000..285e264f --- /dev/null +++ b/lib/open_api_sdk/models/operations/generatecodesamplepreviewasync_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GenerateCodeSamplePreviewAsyncResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Job accepted, returns a job ID to poll for status and result + field :object, T.nilable(Models::Operations::GenerateCodeSamplePreviewAsyncResponseBody) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, object: T.nilable(Models::Operations::GenerateCodeSamplePreviewAsyncResponseBody)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, object: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @object = object + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/generatecodesamplepreviewasync_responsebody.rb b/lib/open_api_sdk/models/operations/generatecodesamplepreviewasync_responsebody.rb new file mode 100644 index 00000000..7e5bee68 --- /dev/null +++ b/lib/open_api_sdk/models/operations/generatecodesamplepreviewasync_responsebody.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Job accepted, returns a job ID to poll for status and result + class GenerateCodeSamplePreviewAsyncResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # The job ID for polling + field :job_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('job_id') } } + # The current status of the job. Possible values are `pending` or `running`. + field :status, Models::Shared::CodeSamplesJobStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::CodeSamplesJobStatus, false) } } + + + sig { params(job_id: ::String, status: Models::Shared::CodeSamplesJobStatus).void } + def initialize(job_id: nil, status: nil) + @job_id = job_id + @status = status + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @job_id == other.job_id + return false unless @status == other.status + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/generateopenapispec_request.rb b/lib/open_api_sdk/models/operations/generateopenapispec_request.rb deleted file mode 100644 index 9a8ea3cb..00000000 --- a/lib/open_api_sdk/models/operations/generateopenapispec_request.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GenerateOpenApiSpecRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to generate an OpenAPI specification for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to generate an OpenAPI specification for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, version_id: nil) - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/generateopenapispec_response.rb b/lib/open_api_sdk/models/operations/generateopenapispec_response.rb deleted file mode 100644 index ac30bec5..00000000 --- a/lib/open_api_sdk/models/operations/generateopenapispec_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GenerateOpenApiSpecResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :generate_open_api_spec_diff, T.nilable(::OpenApiSDK::Shared::GenerateOpenApiSpecDiff) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), generate_open_api_spec_diff: T.nilable(::OpenApiSDK::Shared::GenerateOpenApiSpecDiff)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, generate_open_api_spec_diff: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @generate_open_api_spec_diff = generate_open_api_spec_diff - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/generateopenapispecforapiendpoint_request.rb b/lib/open_api_sdk/models/operations/generateopenapispecforapiendpoint_request.rb deleted file mode 100644 index ce7d34e3..00000000 --- a/lib/open_api_sdk/models/operations/generateopenapispecforapiendpoint_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GenerateOpenApiSpecForApiEndpointRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the ApiEndpoint to generate an OpenAPI specification for. - field :api_endpoint_id, ::String, { 'path_param': { 'field_name': 'apiEndpointID', 'style': 'simple', 'explode': false } } - # The ID of the Api to generate an OpenAPI specification for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to generate an OpenAPI specification for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_endpoint_id: ::String, api_id: ::String, version_id: ::String).void } - def initialize(api_endpoint_id: nil, api_id: nil, version_id: nil) - @api_endpoint_id = api_endpoint_id - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/generateopenapispecforapiendpoint_response.rb b/lib/open_api_sdk/models/operations/generateopenapispecforapiendpoint_response.rb deleted file mode 100644 index d9e921ed..00000000 --- a/lib/open_api_sdk/models/operations/generateopenapispecforapiendpoint_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GenerateOpenApiSpecForApiEndpointResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :generate_open_api_spec_diff, T.nilable(::OpenApiSDK::Shared::GenerateOpenApiSpecDiff) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), generate_open_api_spec_diff: T.nilable(::OpenApiSDK::Shared::GenerateOpenApiSpecDiff)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, generate_open_api_spec_diff: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @generate_open_api_spec_diff = generate_open_api_spec_diff - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/generatepostmancollection_request.rb b/lib/open_api_sdk/models/operations/generatepostmancollection_request.rb deleted file mode 100644 index 29a4bddc..00000000 --- a/lib/open_api_sdk/models/operations/generatepostmancollection_request.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GeneratePostmanCollectionRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to generate a Postman collection for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to generate a Postman collection for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, version_id: nil) - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/generatepostmancollection_response.rb b/lib/open_api_sdk/models/operations/generatepostmancollection_response.rb deleted file mode 100644 index 48699783..00000000 --- a/lib/open_api_sdk/models/operations/generatepostmancollection_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GeneratePostmanCollectionResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :postman_collection, T.nilable(::String) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), postman_collection: T.nilable(::String)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, postman_collection: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @postman_collection = postman_collection - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/generatepostmancollectionforapiendpoint_request.rb b/lib/open_api_sdk/models/operations/generatepostmancollectionforapiendpoint_request.rb deleted file mode 100644 index 005e8a4f..00000000 --- a/lib/open_api_sdk/models/operations/generatepostmancollectionforapiendpoint_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GeneratePostmanCollectionForApiEndpointRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the ApiEndpoint to generate a Postman collection for. - field :api_endpoint_id, ::String, { 'path_param': { 'field_name': 'apiEndpointID', 'style': 'simple', 'explode': false } } - # The ID of the Api to generate a Postman collection for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to generate a Postman collection for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_endpoint_id: ::String, api_id: ::String, version_id: ::String).void } - def initialize(api_endpoint_id: nil, api_id: nil, version_id: nil) - @api_endpoint_id = api_endpoint_id - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/generatepostmancollectionforapiendpoint_response.rb b/lib/open_api_sdk/models/operations/generatepostmancollectionforapiendpoint_response.rb deleted file mode 100644 index acc41406..00000000 --- a/lib/open_api_sdk/models/operations/generatepostmancollectionforapiendpoint_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GeneratePostmanCollectionForApiEndpointResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :postman_collection, T.nilable(::String) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), postman_collection: T.nilable(::String)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, postman_collection: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @postman_collection = postman_collection - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/generaterequestpostmancollection_request.rb b/lib/open_api_sdk/models/operations/generaterequestpostmancollection_request.rb deleted file mode 100644 index fb58ae9d..00000000 --- a/lib/open_api_sdk/models/operations/generaterequestpostmancollection_request.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GenerateRequestPostmanCollectionRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the request to retrieve. - field :request_id, ::String, { 'path_param': { 'field_name': 'requestID', 'style': 'simple', 'explode': false } } - - - sig { params(request_id: ::String).void } - def initialize(request_id: nil) - @request_id = request_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/generaterequestpostmancollection_response.rb b/lib/open_api_sdk/models/operations/generaterequestpostmancollection_response.rb deleted file mode 100644 index ed84b9ba..00000000 --- a/lib/open_api_sdk/models/operations/generaterequestpostmancollection_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GenerateRequestPostmanCollectionResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :postman_collection, T.nilable(::String) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), postman_collection: T.nilable(::String)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, postman_collection: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @postman_collection = postman_collection - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getaccesstoken_request.rb b/lib/open_api_sdk/models/operations/getaccesstoken_request.rb index 29316b19..b8d0eaa9 100644 --- a/lib/open_api_sdk/models/operations/getaccesstoken_request.rb +++ b/lib/open_api_sdk/models/operations/getaccesstoken_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetAccessTokenRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetAccessTokenRequest + extend T::Sig + include Crystalline::MetadataFields - # The workspace ID - field :workspace_id, ::String, { 'query_param': { 'field_name': 'workspace_id', 'style': 'form', 'explode': true } } + # The workspace ID + field :workspace_id, ::String, { 'query_param': { 'field_name': 'workspace_id', 'style': 'form', 'explode': true } } - sig { params(workspace_id: ::String).void } - def initialize(workspace_id: nil) - @workspace_id = workspace_id + sig { params(workspace_id: ::String).void } + def initialize(workspace_id: nil) + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getaccesstoken_response.rb b/lib/open_api_sdk/models/operations/getaccesstoken_response.rb index 98947041..f5401be0 100644 --- a/lib/open_api_sdk/models/operations/getaccesstoken_response.rb +++ b/lib/open_api_sdk/models/operations/getaccesstoken_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetAccessTokenResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :access_token, T.nilable(::OpenApiSDK::Shared::AccessToken) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, access_token: T.nilable(::OpenApiSDK::Shared::AccessToken), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, access_token: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @access_token = access_token - @error = error + module Models + module Operations + + + class GetAccessTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :access_token, T.nilable(Models::Shared::AccessToken) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, access_token: T.nilable(Models::Shared::AccessToken)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, access_token: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @access_token = access_token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @access_token == other.access_token + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getallapiendpoints_request.rb b/lib/open_api_sdk/models/operations/getallapiendpoints_request.rb deleted file mode 100644 index 087824f6..00000000 --- a/lib/open_api_sdk/models/operations/getallapiendpoints_request.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetAllApiEndpointsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to retrieve ApiEndpoints for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String).void } - def initialize(api_id: nil) - @api_id = api_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getallapiendpoints_response.rb b/lib/open_api_sdk/models/operations/getallapiendpoints_response.rb deleted file mode 100644 index bdf11be5..00000000 --- a/lib/open_api_sdk/models/operations/getallapiendpoints_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetAllApiEndpointsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :api_endpoints, T.nilable(T::Array[::OpenApiSDK::Shared::ApiEndpoint]) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, api_endpoints: T.nilable(T::Array[::OpenApiSDK::Shared::ApiEndpoint]), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, api_endpoints: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @api_endpoints = api_endpoints - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getallapiversions_request.rb b/lib/open_api_sdk/models/operations/getallapiversions_request.rb deleted file mode 100644 index fece884f..00000000 --- a/lib/open_api_sdk/models/operations/getallapiversions_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetAllApiVersionsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to retrieve. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # Metadata to filter Apis on - field :metadata, T.nilable(T::Hash[Symbol, T::Array[::String]]), { 'query_param': { 'field_name': 'metadata', 'style': 'deepObject', 'explode': true } } - # Configuration for filter operations - field :op, T.nilable(::OpenApiSDK::Operations::QueryParamOp), { 'query_param': { 'field_name': 'op', 'style': 'deepObject', 'explode': true } } - - - sig { params(api_id: ::String, metadata: T.nilable(T::Hash[Symbol, T::Array[::String]]), op: T.nilable(::OpenApiSDK::Operations::QueryParamOp)).void } - def initialize(api_id: nil, metadata: nil, op: nil) - @api_id = api_id - @metadata = metadata - @op = op - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getallapiversions_response.rb b/lib/open_api_sdk/models/operations/getallapiversions_response.rb deleted file mode 100644 index cc23e4ea..00000000 --- a/lib/open_api_sdk/models/operations/getallapiversions_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetAllApiVersionsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :apis, T.nilable(T::Array[::OpenApiSDK::Shared::Api]) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, apis: T.nilable(T::Array[::OpenApiSDK::Shared::Api]), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, apis: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @apis = apis - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getallforversionapiendpoints_request.rb b/lib/open_api_sdk/models/operations/getallforversionapiendpoints_request.rb deleted file mode 100644 index 39ec48b6..00000000 --- a/lib/open_api_sdk/models/operations/getallforversionapiendpoints_request.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetAllForVersionApiEndpointsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to retrieve ApiEndpoints for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to retrieve ApiEndpoints for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, version_id: nil) - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getallforversionapiendpoints_response.rb b/lib/open_api_sdk/models/operations/getallforversionapiendpoints_response.rb deleted file mode 100644 index a6f54faf..00000000 --- a/lib/open_api_sdk/models/operations/getallforversionapiendpoints_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetAllForVersionApiEndpointsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :api_endpoints, T.nilable(T::Array[::OpenApiSDK::Shared::ApiEndpoint]) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, api_endpoints: T.nilable(T::Array[::OpenApiSDK::Shared::ApiEndpoint]), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, api_endpoints: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @api_endpoints = api_endpoints - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getapiendpoint_request.rb b/lib/open_api_sdk/models/operations/getapiendpoint_request.rb deleted file mode 100644 index ff8572ff..00000000 --- a/lib/open_api_sdk/models/operations/getapiendpoint_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetApiEndpointRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the ApiEndpoint to retrieve. - field :api_endpoint_id, ::String, { 'path_param': { 'field_name': 'apiEndpointID', 'style': 'simple', 'explode': false } } - # The ID of the Api the ApiEndpoint belongs to. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api the ApiEndpoint belongs to. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_endpoint_id: ::String, api_id: ::String, version_id: ::String).void } - def initialize(api_endpoint_id: nil, api_id: nil, version_id: nil) - @api_endpoint_id = api_endpoint_id - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getapiendpoint_response.rb b/lib/open_api_sdk/models/operations/getapiendpoint_response.rb deleted file mode 100644 index 1c340a6d..00000000 --- a/lib/open_api_sdk/models/operations/getapiendpoint_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetApiEndpointResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :api_endpoint, T.nilable(::OpenApiSDK::Shared::ApiEndpoint) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, api_endpoint: T.nilable(::OpenApiSDK::Shared::ApiEndpoint), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, api_endpoint: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @api_endpoint = api_endpoint - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getapis_request.rb b/lib/open_api_sdk/models/operations/getapis_request.rb deleted file mode 100644 index ffe0e1fa..00000000 --- a/lib/open_api_sdk/models/operations/getapis_request.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetApisRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Metadata to filter Apis on - field :metadata, T.nilable(T::Hash[Symbol, T::Array[::String]]), { 'query_param': { 'field_name': 'metadata', 'style': 'deepObject', 'explode': true } } - # Configuration for filter operations - field :op, T.nilable(::OpenApiSDK::Operations::Op), { 'query_param': { 'field_name': 'op', 'style': 'deepObject', 'explode': true } } - - - sig { params(metadata: T.nilable(T::Hash[Symbol, T::Array[::String]]), op: T.nilable(::OpenApiSDK::Operations::Op)).void } - def initialize(metadata: nil, op: nil) - @metadata = metadata - @op = op - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getapis_response.rb b/lib/open_api_sdk/models/operations/getapis_response.rb deleted file mode 100644 index 4d8ef5b1..00000000 --- a/lib/open_api_sdk/models/operations/getapis_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetApisResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :apis, T.nilable(T::Array[::OpenApiSDK::Shared::Api]) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, apis: T.nilable(T::Array[::OpenApiSDK::Shared::Api]), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, apis: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @apis = apis - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getbillingaddons_response.rb b/lib/open_api_sdk/models/operations/getbillingaddons_response.rb new file mode 100644 index 00000000..a81f9ca1 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getbillingaddons_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetBillingAddOnsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Success + field :organization_billing_add_on_response, T.nilable(Models::Shared::OrganizationBillingAddOnResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, organization_billing_add_on_response: T.nilable(Models::Shared::OrganizationBillingAddOnResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, organization_billing_add_on_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @organization_billing_add_on_response = organization_billing_add_on_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @organization_billing_add_on_response == other.organization_billing_add_on_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getblob_request.rb b/lib/open_api_sdk/models/operations/getblob_request.rb index cdfff445..eafa2756 100644 --- a/lib/open_api_sdk/models/operations/getblob_request.rb +++ b/lib/open_api_sdk/models/operations/getblob_request.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetBlobRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetBlobRequest + extend T::Sig + include Crystalline::MetadataFields - field :digest, ::String, { 'path_param': { 'field_name': 'digest', 'style': 'simple', 'explode': false } } + field :digest, ::String, { 'path_param': { 'field_name': 'digest', 'style': 'simple', 'explode': false } } - field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } + field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } - field :organization_slug, ::String, { 'path_param': { 'field_name': 'organization_slug', 'style': 'simple', 'explode': false } } + field :organization_slug, ::String, { 'path_param': { 'field_name': 'organization_slug', 'style': 'simple', 'explode': false } } - field :workspace_slug, ::String, { 'path_param': { 'field_name': 'workspace_slug', 'style': 'simple', 'explode': false } } + field :workspace_slug, ::String, { 'path_param': { 'field_name': 'workspace_slug', 'style': 'simple', 'explode': false } } - sig { params(digest: ::String, namespace_name: ::String, organization_slug: ::String, workspace_slug: ::String).void } - def initialize(digest: nil, namespace_name: nil, organization_slug: nil, workspace_slug: nil) - @digest = digest - @namespace_name = namespace_name - @organization_slug = organization_slug - @workspace_slug = workspace_slug + sig { params(digest: ::String, namespace_name: ::String, organization_slug: ::String, workspace_slug: ::String).void } + def initialize(digest: nil, namespace_name: nil, organization_slug: nil, workspace_slug: nil) + @digest = digest + @namespace_name = namespace_name + @organization_slug = organization_slug + @workspace_slug = workspace_slug + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @digest == other.digest + return false unless @namespace_name == other.namespace_name + return false unless @organization_slug == other.organization_slug + return false unless @workspace_slug == other.workspace_slug + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getblob_response.rb b/lib/open_api_sdk/models/operations/getblob_response.rb index 2d58c1fd..1ac5b4e0 100644 --- a/lib/open_api_sdk/models/operations/getblob_response.rb +++ b/lib/open_api_sdk/models/operations/getblob_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetBlobResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :blob, T.nilable(::String) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, blob: T.nilable(::String), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, blob: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @blob = blob - @error = error + module Models + module Operations + + + class GetBlobResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :blob, T.nilable(::String) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, blob: T.nilable(::String)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, blob: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @blob = blob + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @blob == other.blob + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getchangesreportsignedurl_request.rb b/lib/open_api_sdk/models/operations/getchangesreportsignedurl_request.rb index 44a6628f..b4f8de74 100644 --- a/lib/open_api_sdk/models/operations/getchangesreportsignedurl_request.rb +++ b/lib/open_api_sdk/models/operations/getchangesreportsignedurl_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetChangesReportSignedUrlRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetChangesReportSignedUrlRequest + extend T::Sig + include Crystalline::MetadataFields - # The checksum of the document to retrieve the signed access url for. - field :document_checksum, ::String, { 'path_param': { 'field_name': 'documentChecksum', 'style': 'simple', 'explode': false } } + # The checksum of the document to retrieve the signed access url for. + field :document_checksum, ::String, { 'path_param': { 'field_name': 'documentChecksum', 'style': 'simple', 'explode': false } } - sig { params(document_checksum: ::String).void } - def initialize(document_checksum: nil) - @document_checksum = document_checksum + sig { params(document_checksum: ::String).void } + def initialize(document_checksum: nil) + @document_checksum = document_checksum + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @document_checksum == other.document_checksum + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getchangesreportsignedurl_response.rb b/lib/open_api_sdk/models/operations/getchangesreportsignedurl_response.rb index f7503560..e61f61ca 100644 --- a/lib/open_api_sdk/models/operations/getchangesreportsignedurl_response.rb +++ b/lib/open_api_sdk/models/operations/getchangesreportsignedurl_response.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - - - class GetChangesReportSignedUrlResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :signed_access, T.nilable(::OpenApiSDK::Operations::GetChangesReportSignedUrlSignedAccess) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, signed_access: T.nilable(::OpenApiSDK::Operations::GetChangesReportSignedUrlSignedAccess)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, signed_access: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @signed_access = signed_access + module Models + module Operations + + + class GetChangesReportSignedUrlResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :signed_access, T.nilable(Models::Operations::GetChangesReportSignedUrlSignedAccess) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, signed_access: T.nilable(Models::Operations::GetChangesReportSignedUrlSignedAccess)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, signed_access: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @signed_access = signed_access + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @signed_access == other.signed_access + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getchangesreportsignedurl_signedaccess.rb b/lib/open_api_sdk/models/operations/getchangesreportsignedurl_signedaccess.rb index e478eea5..79a2ae1b 100644 --- a/lib/open_api_sdk/models/operations/getchangesreportsignedurl_signedaccess.rb +++ b/lib/open_api_sdk/models/operations/getchangesreportsignedurl_signedaccess.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - - # OK - class GetChangesReportSignedUrlSignedAccess < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Operations + + # OK + class GetChangesReportSignedUrlSignedAccess + extend T::Sig + include Crystalline::MetadataFields - field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } - sig { params(url: ::String).void } - def initialize(url: nil) - @url = url + sig { params(url: ::String).void } + def initialize(url: nil) + @url = url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @url == other.url + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getcodesamplepreviewasync_request.rb b/lib/open_api_sdk/models/operations/getcodesamplepreviewasync_request.rb new file mode 100644 index 00000000..a2788812 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getcodesamplepreviewasync_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetCodeSamplePreviewAsyncRequest + extend T::Sig + include Crystalline::MetadataFields + + # The ID of the job to check the status and retrieve results + field :job_id, ::String, { 'path_param': { 'field_name': 'jobID', 'style': 'simple', 'explode': false } } + + + sig { params(job_id: ::String).void } + def initialize(job_id: nil) + @job_id = job_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @job_id == other.job_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getcodesamplepreviewasync_response.rb b/lib/open_api_sdk/models/operations/getcodesamplepreviewasync_response.rb new file mode 100644 index 00000000..a94733a4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getcodesamplepreviewasync_response.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetCodeSamplePreviewAsyncResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Job is still in progress + field :object, T.nilable(Models::Operations::GetCodeSamplePreviewAsyncResponseBody) + # OK + field :usage_snippets, T.nilable(Models::Shared::UsageSnippets) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, object: T.nilable(Models::Operations::GetCodeSamplePreviewAsyncResponseBody), usage_snippets: T.nilable(Models::Shared::UsageSnippets)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, object: nil, usage_snippets: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @object = object + @usage_snippets = usage_snippets + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @object == other.object + return false unless @usage_snippets == other.usage_snippets + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getcodesamplepreviewasync_responsebody.rb b/lib/open_api_sdk/models/operations/getcodesamplepreviewasync_responsebody.rb new file mode 100644 index 00000000..8e818e20 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getcodesamplepreviewasync_responsebody.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Job is still in progress + class GetCodeSamplePreviewAsyncResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # The current status of the job. Possible values are `pending` or `running`. + field :status, Models::Shared::CodeSamplesJobStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::CodeSamplesJobStatus, false) } } + + + sig { params(status: Models::Shared::CodeSamplesJobStatus).void } + def initialize(status: nil) + @status = status + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @status == other.status + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getembedaccesstoken_request.rb b/lib/open_api_sdk/models/operations/getembedaccesstoken_request.rb deleted file mode 100644 index e2c24632..00000000 --- a/lib/open_api_sdk/models/operations/getembedaccesstoken_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetEmbedAccessTokenRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The description of the embed access token. - field :description, T.nilable(::String), { 'query_param': { 'field_name': 'description', 'style': 'form', 'explode': true } } - # The duration (in minutes) of the embed access token. - field :duration, T.nilable(::Integer), { 'query_param': { 'field_name': 'duration', 'style': 'form', 'explode': true } } - # The filter to apply to the query. - field :filters, T.nilable(::OpenApiSDK::Shared::Filters), { 'query_param': { 'field_name': 'filters', 'serialization': 'json' } } - - - sig { params(description: T.nilable(::String), duration: T.nilable(::Integer), filters: T.nilable(::OpenApiSDK::Shared::Filters)).void } - def initialize(description: nil, duration: nil, filters: nil) - @description = description - @duration = duration - @filters = filters - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getembedaccesstoken_response.rb b/lib/open_api_sdk/models/operations/getembedaccesstoken_response.rb deleted file mode 100644 index e066e369..00000000 --- a/lib/open_api_sdk/models/operations/getembedaccesstoken_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetEmbedAccessTokenResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :embed_access_token_response, T.nilable(::OpenApiSDK::Shared::EmbedAccessTokenResponse) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, embed_access_token_response: T.nilable(::OpenApiSDK::Shared::EmbedAccessTokenResponse), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, embed_access_token_response: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @embed_access_token_response = embed_access_token_response - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getgithubaction_request.rb b/lib/open_api_sdk/models/operations/getgithubaction_request.rb index 1306404a..6b6cf5e9 100644 --- a/lib/open_api_sdk/models/operations/getgithubaction_request.rb +++ b/lib/open_api_sdk/models/operations/getgithubaction_request.rb @@ -5,25 +5,36 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetGitHubActionRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetGitHubActionRequest + extend T::Sig + include Crystalline::MetadataFields - field :org, ::String, { 'query_param': { 'field_name': 'org', 'style': 'form', 'explode': true } } + field :org, ::String, { 'query_param': { 'field_name': 'org', 'style': 'form', 'explode': true } } - field :repo, ::String, { 'query_param': { 'field_name': 'repo', 'style': 'form', 'explode': true } } - # The targetName of the workflow target. - field :target_name, T.nilable(::String), { 'query_param': { 'field_name': 'targetName', 'style': 'form', 'explode': true } } + field :repo, ::String, { 'query_param': { 'field_name': 'repo', 'style': 'form', 'explode': true } } + # The targetName of the workflow target. + field :target_name, T.nilable(::String), { 'query_param': { 'field_name': 'targetName', 'style': 'form', 'explode': true } } - sig { params(org: ::String, repo: ::String, target_name: T.nilable(::String)).void } - def initialize(org: nil, repo: nil, target_name: nil) - @org = org - @repo = repo - @target_name = target_name + sig { params(org: ::String, repo: ::String, target_name: T.nilable(::String)).void } + def initialize(org: nil, repo: nil, target_name: nil) + @org = org + @repo = repo + @target_name = target_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @org == other.org + return false unless @repo == other.repo + return false unless @target_name == other.target_name + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getgithubaction_response.rb b/lib/open_api_sdk/models/operations/getgithubaction_response.rb index 8348ff75..ca8ad21d 100644 --- a/lib/open_api_sdk/models/operations/getgithubaction_response.rb +++ b/lib/open_api_sdk/models/operations/getgithubaction_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetGitHubActionResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :github_get_action_response, T.nilable(::OpenApiSDK::Shared::GithubGetActionResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), github_get_action_response: T.nilable(::OpenApiSDK::Shared::GithubGetActionResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, github_get_action_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @github_get_action_response = github_get_action_response + module Models + module Operations + + + class GetGitHubActionResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :github_get_action_response, T.nilable(Models::Shared::GithubGetActionResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, github_get_action_response: T.nilable(Models::Shared::GithubGetActionResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, github_get_action_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @github_get_action_response = github_get_action_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @github_get_action_response == other.github_get_action_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getgithubsetupstate_request.rb b/lib/open_api_sdk/models/operations/getgithubsetupstate_request.rb new file mode 100644 index 00000000..b73ca914 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getgithubsetupstate_request.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetGithubSetupStateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :generate_gen_lock_id, ::String, { 'query_param': { 'field_name': 'generate_gen_lock_id', 'style': 'form', 'explode': true } } + + field :org, ::String, { 'query_param': { 'field_name': 'org', 'style': 'form', 'explode': true } } + + field :repo, ::String, { 'query_param': { 'field_name': 'repo', 'style': 'form', 'explode': true } } + + + sig { params(generate_gen_lock_id: ::String, org: ::String, repo: ::String).void } + def initialize(generate_gen_lock_id: nil, org: nil, repo: nil) + @generate_gen_lock_id = generate_gen_lock_id + @org = org + @repo = repo + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @generate_gen_lock_id == other.generate_gen_lock_id + return false unless @org == other.org + return false unless @repo == other.repo + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getgithubsetupstate_response.rb b/lib/open_api_sdk/models/operations/getgithubsetupstate_response.rb new file mode 100644 index 00000000..3c2ff2ac --- /dev/null +++ b/lib/open_api_sdk/models/operations/getgithubsetupstate_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetGithubSetupStateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # github setup state response + field :github_setup_state_response, T.nilable(Models::Shared::GithubSetupStateResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, github_setup_state_response: T.nilable(Models::Shared::GithubSetupStateResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, github_setup_state_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @github_setup_state_response = github_setup_state_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @github_setup_state_response == other.github_setup_state_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getlintingreportsignedurl_request.rb b/lib/open_api_sdk/models/operations/getlintingreportsignedurl_request.rb index e342774b..5f3a8555 100644 --- a/lib/open_api_sdk/models/operations/getlintingreportsignedurl_request.rb +++ b/lib/open_api_sdk/models/operations/getlintingreportsignedurl_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetLintingReportSignedUrlRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetLintingReportSignedUrlRequest + extend T::Sig + include Crystalline::MetadataFields - # The checksum of the document to retrieve the signed access url for. - field :document_checksum, ::String, { 'path_param': { 'field_name': 'documentChecksum', 'style': 'simple', 'explode': false } } + # The checksum of the document to retrieve the signed access url for. + field :document_checksum, ::String, { 'path_param': { 'field_name': 'documentChecksum', 'style': 'simple', 'explode': false } } - sig { params(document_checksum: ::String).void } - def initialize(document_checksum: nil) - @document_checksum = document_checksum + sig { params(document_checksum: ::String).void } + def initialize(document_checksum: nil) + @document_checksum = document_checksum + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @document_checksum == other.document_checksum + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getlintingreportsignedurl_response.rb b/lib/open_api_sdk/models/operations/getlintingreportsignedurl_response.rb index 39a895af..f84d6766 100644 --- a/lib/open_api_sdk/models/operations/getlintingreportsignedurl_response.rb +++ b/lib/open_api_sdk/models/operations/getlintingreportsignedurl_response.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - - - class GetLintingReportSignedUrlResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :signed_access, T.nilable(::OpenApiSDK::Operations::GetLintingReportSignedUrlSignedAccess) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, signed_access: T.nilable(::OpenApiSDK::Operations::GetLintingReportSignedUrlSignedAccess)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, signed_access: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @signed_access = signed_access + module Models + module Operations + + + class GetLintingReportSignedUrlResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :signed_access, T.nilable(Models::Operations::GetLintingReportSignedUrlSignedAccess) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, signed_access: T.nilable(Models::Operations::GetLintingReportSignedUrlSignedAccess)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, signed_access: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @signed_access = signed_access + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @signed_access == other.signed_access + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getlintingreportsignedurl_signedaccess.rb b/lib/open_api_sdk/models/operations/getlintingreportsignedurl_signedaccess.rb index c7630d17..84b4144e 100644 --- a/lib/open_api_sdk/models/operations/getlintingreportsignedurl_signedaccess.rb +++ b/lib/open_api_sdk/models/operations/getlintingreportsignedurl_signedaccess.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - - # OK - class GetLintingReportSignedUrlSignedAccess < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Operations + + # OK + class GetLintingReportSignedUrlSignedAccess + extend T::Sig + include Crystalline::MetadataFields - field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } - sig { params(url: ::String).void } - def initialize(url: nil) - @url = url + sig { params(url: ::String).void } + def initialize(url: nil) + @url = url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @url == other.url + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getmanifest_request.rb b/lib/open_api_sdk/models/operations/getmanifest_request.rb index 1b9029df..ccb0a050 100644 --- a/lib/open_api_sdk/models/operations/getmanifest_request.rb +++ b/lib/open_api_sdk/models/operations/getmanifest_request.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetManifestRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetManifestRequest + extend T::Sig + include Crystalline::MetadataFields - field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } + field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } - field :organization_slug, ::String, { 'path_param': { 'field_name': 'organization_slug', 'style': 'simple', 'explode': false } } - # Tag or digest - field :revision_reference, ::String, { 'path_param': { 'field_name': 'revision_reference', 'style': 'simple', 'explode': false } } + field :organization_slug, ::String, { 'path_param': { 'field_name': 'organization_slug', 'style': 'simple', 'explode': false } } + # Tag or digest + field :revision_reference, ::String, { 'path_param': { 'field_name': 'revision_reference', 'style': 'simple', 'explode': false } } - field :workspace_slug, ::String, { 'path_param': { 'field_name': 'workspace_slug', 'style': 'simple', 'explode': false } } + field :workspace_slug, ::String, { 'path_param': { 'field_name': 'workspace_slug', 'style': 'simple', 'explode': false } } - sig { params(namespace_name: ::String, organization_slug: ::String, revision_reference: ::String, workspace_slug: ::String).void } - def initialize(namespace_name: nil, organization_slug: nil, revision_reference: nil, workspace_slug: nil) - @namespace_name = namespace_name - @organization_slug = organization_slug - @revision_reference = revision_reference - @workspace_slug = workspace_slug + sig { params(namespace_name: ::String, organization_slug: ::String, revision_reference: ::String, workspace_slug: ::String).void } + def initialize(namespace_name: nil, organization_slug: nil, revision_reference: nil, workspace_slug: nil) + @namespace_name = namespace_name + @organization_slug = organization_slug + @revision_reference = revision_reference + @workspace_slug = workspace_slug + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + return false unless @organization_slug == other.organization_slug + return false unless @revision_reference == other.revision_reference + return false unless @workspace_slug == other.workspace_slug + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getmanifest_response.rb b/lib/open_api_sdk/models/operations/getmanifest_response.rb index 1e501e8b..d2138073 100644 --- a/lib/open_api_sdk/models/operations/getmanifest_response.rb +++ b/lib/open_api_sdk/models/operations/getmanifest_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetManifestResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :manifest, T.nilable(::OpenApiSDK::Shared::Manifest) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), manifest: T.nilable(::OpenApiSDK::Shared::Manifest)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, manifest: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @manifest = manifest + module Models + module Operations + + + class GetManifestResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :manifest, T.nilable(Models::Shared::Manifest) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, manifest: T.nilable(Models::Shared::Manifest)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, manifest: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @manifest = manifest + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @manifest == other.manifest + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getnamespaces_response.rb b/lib/open_api_sdk/models/operations/getnamespaces_response.rb index 3daced05..4e64f993 100644 --- a/lib/open_api_sdk/models/operations/getnamespaces_response.rb +++ b/lib/open_api_sdk/models/operations/getnamespaces_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetNamespacesResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :get_namespaces_response, T.nilable(::OpenApiSDK::Shared::GetNamespacesResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), get_namespaces_response: T.nilable(::OpenApiSDK::Shared::GetNamespacesResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, get_namespaces_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @get_namespaces_response = get_namespaces_response + module Models + module Operations + + + class GetNamespacesResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :get_namespaces_response, T.nilable(Models::Shared::GetNamespacesResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, get_namespaces_response: T.nilable(Models::Shared::GetNamespacesResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, get_namespaces_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @get_namespaces_response = get_namespaces_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @get_namespaces_response == other.get_namespaces_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getorganization_request.rb b/lib/open_api_sdk/models/operations/getorganization_request.rb index 4f2baecc..653cfc5c 100644 --- a/lib/open_api_sdk/models/operations/getorganization_request.rb +++ b/lib/open_api_sdk/models/operations/getorganization_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetOrganizationRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetOrganizationRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the organization. - field :organization_id, ::String, { 'path_param': { 'field_name': 'organizationID', 'style': 'simple', 'explode': false } } + # Unique identifier of the organization. + field :organization_id, ::String, { 'path_param': { 'field_name': 'organizationID', 'style': 'simple', 'explode': false } } - sig { params(organization_id: ::String).void } - def initialize(organization_id: nil) - @organization_id = organization_id + sig { params(organization_id: ::String).void } + def initialize(organization_id: nil) + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @organization_id == other.organization_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getorganization_response.rb b/lib/open_api_sdk/models/operations/getorganization_response.rb index bb501600..a2dcd48f 100644 --- a/lib/open_api_sdk/models/operations/getorganization_response.rb +++ b/lib/open_api_sdk/models/operations/getorganization_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetOrganizationResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :organization, T.nilable(::OpenApiSDK::Shared::Organization) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), organization: T.nilable(::OpenApiSDK::Shared::Organization)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, organization: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @organization = organization + module Models + module Operations + + + class GetOrganizationResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :organization, T.nilable(Models::Shared::Organization) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, organization: T.nilable(Models::Shared::Organization)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, organization: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @organization = organization + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @organization == other.organization + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getorganizations_response.rb b/lib/open_api_sdk/models/operations/getorganizations_response.rb index d77078d0..7f5d156f 100644 --- a/lib/open_api_sdk/models/operations/getorganizations_response.rb +++ b/lib/open_api_sdk/models/operations/getorganizations_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetOrganizationsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :organizations, T.nilable(T::Array[::OpenApiSDK::Shared::Organization]) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), organizations: T.nilable(T::Array[::OpenApiSDK::Shared::Organization])).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, organizations: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @organizations = organizations + module Models + module Operations + + + class GetOrganizationsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :organizations, T.nilable(T::Array[Models::Shared::Organization]) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, organizations: T.nilable(T::Array[Models::Shared::Organization])).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, organizations: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @organizations = organizations + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @organizations == other.organizations + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getorganizationusage_response.rb b/lib/open_api_sdk/models/operations/getorganizationusage_response.rb index be4c59ba..0b0b7659 100644 --- a/lib/open_api_sdk/models/operations/getorganizationusage_response.rb +++ b/lib/open_api_sdk/models/operations/getorganizationusage_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetOrganizationUsageResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :organization_usage_response, T.nilable(::OpenApiSDK::Shared::OrganizationUsageResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), organization_usage_response: T.nilable(::OpenApiSDK::Shared::OrganizationUsageResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, organization_usage_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @organization_usage_response = organization_usage_response + module Models + module Operations + + + class GetOrganizationUsageResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :organization_usage_response, T.nilable(Models::Shared::OrganizationUsageResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, organization_usage_response: T.nilable(Models::Shared::OrganizationUsageResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, organization_usage_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @organization_usage_response = organization_usage_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @organization_usage_response == other.organization_usage_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getpublishingtoken_response.rb b/lib/open_api_sdk/models/operations/getpublishingtoken_response.rb new file mode 100644 index 00000000..611e757e --- /dev/null +++ b/lib/open_api_sdk/models/operations/getpublishingtoken_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetPublishingTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :publishing_tokens, T.nilable(T::Array[Models::Shared::PublishingToken]) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, publishing_tokens: T.nilable(T::Array[Models::Shared::PublishingToken])).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, publishing_tokens: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @publishing_tokens = publishing_tokens + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @publishing_tokens == other.publishing_tokens + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getpublishingtokenbyid_request.rb b/lib/open_api_sdk/models/operations/getpublishingtokenbyid_request.rb new file mode 100644 index 00000000..b7e57eff --- /dev/null +++ b/lib/open_api_sdk/models/operations/getpublishingtokenbyid_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetPublishingTokenByIDRequest + extend T::Sig + include Crystalline::MetadataFields + + # Unique identifier of the publishing token. + field :token_id, ::String, { 'path_param': { 'field_name': 'tokenID', 'style': 'simple', 'explode': false } } + + + sig { params(token_id: ::String).void } + def initialize(token_id: nil) + @token_id = token_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @token_id == other.token_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getpublishingtokenbyid_response.rb b/lib/open_api_sdk/models/operations/getpublishingtokenbyid_response.rb new file mode 100644 index 00000000..e435c29b --- /dev/null +++ b/lib/open_api_sdk/models/operations/getpublishingtokenbyid_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetPublishingTokenByIDResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :publishing_token, T.nilable(Models::Shared::PublishingToken) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, publishing_token: T.nilable(Models::Shared::PublishingToken)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, publishing_token: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @publishing_token = publishing_token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @publishing_token == other.publishing_token + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_request.rb b/lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_request.rb new file mode 100644 index 00000000..92d3f6ec --- /dev/null +++ b/lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetPublishingTokenPublicMetadataRequest + extend T::Sig + include Crystalline::MetadataFields + + # Unique identifier of the publishing token. + field :token_id, ::String, { 'path_param': { 'field_name': 'tokenID', 'style': 'simple', 'explode': false } } + + + sig { params(token_id: ::String).void } + def initialize(token_id: nil) + @token_id = token_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @token_id == other.token_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_response.rb b/lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_response.rb new file mode 100644 index 00000000..3fdd2d48 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetPublishingTokenPublicMetadataResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :object, T.nilable(Models::Operations::GetPublishingTokenPublicMetadataResponseBody) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, object: T.nilable(Models::Operations::GetPublishingTokenPublicMetadataResponseBody)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, object: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @object = object + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_responsebody.rb b/lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_responsebody.rb new file mode 100644 index 00000000..f2c808fc --- /dev/null +++ b/lib/open_api_sdk/models/operations/getpublishingtokenpublicmetadata_responsebody.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # OK + class GetPublishingTokenPublicMetadataResponseBody + extend T::Sig + include Crystalline::MetadataFields + + + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :target_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('target_id') } } + + field :target_resource, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('target_resource') } } + + field :valid_until, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('valid_until'), 'decoder': Utils.datetime_from_iso_format(true) } } + + field :workspace_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } + + + sig { params(organization_id: T.nilable(::String), target_id: T.nilable(::String), target_resource: T.nilable(::String), valid_until: T.nilable(::DateTime), workspace_id: T.nilable(::String)).void } + def initialize(organization_id: nil, target_id: nil, target_resource: nil, valid_until: nil, workspace_id: nil) + @organization_id = organization_id + @target_id = target_id + @target_resource = target_resource + @valid_until = valid_until + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @organization_id == other.organization_id + return false unless @target_id == other.target_id + return false unless @target_resource == other.target_resource + return false unless @valid_until == other.valid_until + return false unless @workspace_id == other.workspace_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_request.rb b/lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_request.rb new file mode 100644 index 00000000..cce4bc3c --- /dev/null +++ b/lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetPublishingTokenTargetByIDRequest + extend T::Sig + include Crystalline::MetadataFields + + # Unique identifier of the publishing token. + field :token_id, ::String, { 'path_param': { 'field_name': 'tokenID', 'style': 'simple', 'explode': false } } + + + sig { params(token_id: ::String).void } + def initialize(token_id: nil) + @token_id = token_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @token_id == other.token_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_response.rb b/lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_response.rb new file mode 100644 index 00000000..7219f9b5 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetPublishingTokenTargetByIDResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + field :body, T.nilable(::String) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, body: T.nilable(::String)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, body: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @body = body + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @body == other.body + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_responsebody.rb b/lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_responsebody.rb new file mode 100644 index 00000000..a70d09df --- /dev/null +++ b/lib/open_api_sdk/models/operations/getpublishingtokentargetbyid_responsebody.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # OK + class GetPublishingTokenTargetByIDResponseBody + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getrequestfromeventlog_request.rb b/lib/open_api_sdk/models/operations/getrequestfromeventlog_request.rb deleted file mode 100644 index 7f2ac694..00000000 --- a/lib/open_api_sdk/models/operations/getrequestfromeventlog_request.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetRequestFromEventLogRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the request to retrieve. - field :request_id, ::String, { 'path_param': { 'field_name': 'requestID', 'style': 'simple', 'explode': false } } - - - sig { params(request_id: ::String).void } - def initialize(request_id: nil) - @request_id = request_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getrequestfromeventlog_response.rb b/lib/open_api_sdk/models/operations/getrequestfromeventlog_response.rb deleted file mode 100644 index c55ab2e6..00000000 --- a/lib/open_api_sdk/models/operations/getrequestfromeventlog_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetRequestFromEventLogResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :unbounded_request, T.nilable(::OpenApiSDK::Shared::UnboundedRequest) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), unbounded_request: T.nilable(::OpenApiSDK::Shared::UnboundedRequest)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, unbounded_request: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @unbounded_request = unbounded_request - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getrevisions_request.rb b/lib/open_api_sdk/models/operations/getrevisions_request.rb index 9c7ea3cd..f11f7a5b 100644 --- a/lib/open_api_sdk/models/operations/getrevisions_request.rb +++ b/lib/open_api_sdk/models/operations/getrevisions_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetRevisionsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetRevisionsRequest + extend T::Sig + include Crystalline::MetadataFields - field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } - # Token to retrieve the next page of results - field :next_page_token, T.nilable(::String), { 'query_param': { 'field_name': 'next_page_token', 'style': 'form', 'explode': true } } + field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } + # Token to retrieve the next page of results + field :next_page_token, T.nilable(::String), { 'query_param': { 'field_name': 'next_page_token', 'style': 'form', 'explode': true } } - sig { params(namespace_name: ::String, next_page_token: T.nilable(::String)).void } - def initialize(namespace_name: nil, next_page_token: nil) - @namespace_name = namespace_name - @next_page_token = next_page_token + sig { params(namespace_name: ::String, next_page_token: T.nilable(::String)).void } + def initialize(namespace_name: nil, next_page_token: nil) + @namespace_name = namespace_name + @next_page_token = next_page_token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + return false unless @next_page_token == other.next_page_token + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getrevisions_response.rb b/lib/open_api_sdk/models/operations/getrevisions_response.rb index 51c3cb42..1ff1a0f3 100644 --- a/lib/open_api_sdk/models/operations/getrevisions_response.rb +++ b/lib/open_api_sdk/models/operations/getrevisions_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetRevisionsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :get_revisions_response, T.nilable(::OpenApiSDK::Shared::GetRevisionsResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), get_revisions_response: T.nilable(::OpenApiSDK::Shared::GetRevisionsResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, get_revisions_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @get_revisions_response = get_revisions_response + module Models + module Operations + + + class GetRevisionsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :get_revisions_response, T.nilable(Models::Shared::GetRevisionsResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, get_revisions_response: T.nilable(Models::Shared::GetRevisionsResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, get_revisions_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @get_revisions_response = get_revisions_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @get_revisions_response == other.get_revisions_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getschema_request.rb b/lib/open_api_sdk/models/operations/getschema_request.rb deleted file mode 100644 index ace8882a..00000000 --- a/lib/open_api_sdk/models/operations/getschema_request.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetSchemaRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to get the schema for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to delete metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, version_id: nil) - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getschema_response.rb b/lib/open_api_sdk/models/operations/getschema_response.rb deleted file mode 100644 index 29ff7504..00000000 --- a/lib/open_api_sdk/models/operations/getschema_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetSchemaResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :schema, T.nilable(::OpenApiSDK::Shared::Schema) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), schema: T.nilable(::OpenApiSDK::Shared::Schema)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, schema: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @schema = schema - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getschemadiff_request.rb b/lib/open_api_sdk/models/operations/getschemadiff_request.rb deleted file mode 100644 index 2ee6aaf9..00000000 --- a/lib/open_api_sdk/models/operations/getschemadiff_request.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetSchemaDiffRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to retrieve schemas for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The base revision ID of the schema to retrieve. - field :base_revision_id, ::String, { 'path_param': { 'field_name': 'baseRevisionID', 'style': 'simple', 'explode': false } } - # The target revision ID of the schema to retrieve. - field :target_revision_id, ::String, { 'path_param': { 'field_name': 'targetRevisionID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to delete metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, base_revision_id: ::String, target_revision_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, base_revision_id: nil, target_revision_id: nil, version_id: nil) - @api_id = api_id - @base_revision_id = base_revision_id - @target_revision_id = target_revision_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getschemadiff_response.rb b/lib/open_api_sdk/models/operations/getschemadiff_response.rb deleted file mode 100644 index bf9f2edb..00000000 --- a/lib/open_api_sdk/models/operations/getschemadiff_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetSchemaDiffResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :schema_diff, T.nilable(::OpenApiSDK::Shared::SchemaDiff) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), schema_diff: T.nilable(::OpenApiSDK::Shared::SchemaDiff)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, schema_diff: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @schema_diff = schema_diff - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getschemarevision_request.rb b/lib/open_api_sdk/models/operations/getschemarevision_request.rb deleted file mode 100644 index c2d4d287..00000000 --- a/lib/open_api_sdk/models/operations/getschemarevision_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetSchemaRevisionRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to retrieve schemas for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The revision ID of the schema to retrieve. - field :revision_id, ::String, { 'path_param': { 'field_name': 'revisionID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to delete metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, revision_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, revision_id: nil, version_id: nil) - @api_id = api_id - @revision_id = revision_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getschemarevision_response.rb b/lib/open_api_sdk/models/operations/getschemarevision_response.rb deleted file mode 100644 index d599191b..00000000 --- a/lib/open_api_sdk/models/operations/getschemarevision_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetSchemaRevisionResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :schema, T.nilable(::OpenApiSDK::Shared::Schema) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), schema: T.nilable(::OpenApiSDK::Shared::Schema)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, schema: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @schema = schema - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getschemas_request.rb b/lib/open_api_sdk/models/operations/getschemas_request.rb deleted file mode 100644 index 14689c75..00000000 --- a/lib/open_api_sdk/models/operations/getschemas_request.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetSchemasRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to retrieve schemas for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to delete metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, version_id: nil) - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getschemas_response.rb b/lib/open_api_sdk/models/operations/getschemas_response.rb deleted file mode 100644 index 742eb278..00000000 --- a/lib/open_api_sdk/models/operations/getschemas_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetSchemasResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :schemata, T.nilable(T::Array[::OpenApiSDK::Shared::Schema]) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), schemata: T.nilable(T::Array[::OpenApiSDK::Shared::Schema])).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, schemata: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @schemata = schemata - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getschemastoreitem_requestbody.rb b/lib/open_api_sdk/models/operations/getschemastoreitem_requestbody.rb new file mode 100644 index 00000000..0cda4816 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getschemastoreitem_requestbody.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetSchemaStoreItemRequestBody + extend T::Sig + include Crystalline::MetadataFields + + + field :id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + + sig { params(id: T.nilable(::String)).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getschemastoreitem_response.rb b/lib/open_api_sdk/models/operations/getschemastoreitem_response.rb new file mode 100644 index 00000000..b09056fa --- /dev/null +++ b/lib/open_api_sdk/models/operations/getschemastoreitem_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class GetSchemaStoreItemResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :schema_store_item, T.nilable(Models::Shared::SchemaStoreItem) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, schema_store_item: T.nilable(Models::Shared::SchemaStoreItem)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, schema_store_item: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @schema_store_item = schema_store_item + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @schema_store_item == other.schema_store_item + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/gettags_request.rb b/lib/open_api_sdk/models/operations/gettags_request.rb index 03bec1d7..4f98528c 100644 --- a/lib/open_api_sdk/models/operations/gettags_request.rb +++ b/lib/open_api_sdk/models/operations/gettags_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetTagsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetTagsRequest + extend T::Sig + include Crystalline::MetadataFields - field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } + field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } - sig { params(namespace_name: ::String).void } - def initialize(namespace_name: nil) - @namespace_name = namespace_name + sig { params(namespace_name: ::String).void } + def initialize(namespace_name: nil) + @namespace_name = namespace_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + true + end end end end diff --git a/lib/open_api_sdk/models/operations/gettags_response.rb b/lib/open_api_sdk/models/operations/gettags_response.rb index 57e14753..542a5b9e 100644 --- a/lib/open_api_sdk/models/operations/gettags_response.rb +++ b/lib/open_api_sdk/models/operations/gettags_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetTagsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :get_tags_response, T.nilable(::OpenApiSDK::Shared::GetTagsResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), get_tags_response: T.nilable(::OpenApiSDK::Shared::GetTagsResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, get_tags_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @get_tags_response = get_tags_response + module Models + module Operations + + + class GetTagsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :get_tags_response, T.nilable(Models::Shared::GetTagsResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, get_tags_response: T.nilable(Models::Shared::GetTagsResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, get_tags_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @get_tags_response = get_tags_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @get_tags_response == other.get_tags_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getuser_response.rb b/lib/open_api_sdk/models/operations/getuser_response.rb index 8f7f3c58..63c85d26 100644 --- a/lib/open_api_sdk/models/operations/getuser_response.rb +++ b/lib/open_api_sdk/models/operations/getuser_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetUserResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :user, T.nilable(::OpenApiSDK::Shared::User) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), user: T.nilable(::OpenApiSDK::Shared::User)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, user: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @user = user + module Models + module Operations + + + class GetUserResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :user, T.nilable(Models::Shared::User) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, user: T.nilable(Models::Shared::User)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, user: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @user = user + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @user == other.user + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getvalidembedaccesstokens_response.rb b/lib/open_api_sdk/models/operations/getvalidembedaccesstokens_response.rb deleted file mode 100644 index c897fc31..00000000 --- a/lib/open_api_sdk/models/operations/getvalidembedaccesstokens_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetValidEmbedAccessTokensResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :embed_tokens, T.nilable(T::Array[::OpenApiSDK::Shared::EmbedToken]) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, embed_tokens: T.nilable(T::Array[::OpenApiSDK::Shared::EmbedToken]), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, embed_tokens: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @embed_tokens = embed_tokens - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getversionmetadata_request.rb b/lib/open_api_sdk/models/operations/getversionmetadata_request.rb deleted file mode 100644 index 22e1eba0..00000000 --- a/lib/open_api_sdk/models/operations/getversionmetadata_request.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetVersionMetadataRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to retrieve metadata for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to retrieve metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, version_id: ::String).void } - def initialize(api_id: nil, version_id: nil) - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getversionmetadata_response.rb b/lib/open_api_sdk/models/operations/getversionmetadata_response.rb deleted file mode 100644 index d51f5e45..00000000 --- a/lib/open_api_sdk/models/operations/getversionmetadata_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class GetVersionMetadataResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :version_metadata, T.nilable(T::Array[::OpenApiSDK::Shared::VersionMetadata]) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), version_metadata: T.nilable(T::Array[::OpenApiSDK::Shared::VersionMetadata])).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, version_metadata: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @version_metadata = version_metadata - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/getworkspace_request.rb b/lib/open_api_sdk/models/operations/getworkspace_request.rb index c6516f43..fe3c1069 100644 --- a/lib/open_api_sdk/models/operations/getworkspace_request.rb +++ b/lib/open_api_sdk/models/operations/getworkspace_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetWorkspaceRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetWorkspaceRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(workspace_id: ::String).void } - def initialize(workspace_id: nil) - @workspace_id = workspace_id + sig { params(workspace_id: T.nilable(::String)).void } + def initialize(workspace_id: nil) + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspace_response.rb b/lib/open_api_sdk/models/operations/getworkspace_response.rb index 68e33319..b76b9b2b 100644 --- a/lib/open_api_sdk/models/operations/getworkspace_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspace_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspaceResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :workspace, T.nilable(::OpenApiSDK::Shared::Workspace) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), workspace: T.nilable(::OpenApiSDK::Shared::Workspace)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, workspace: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @workspace = workspace + module Models + module Operations + + + class GetWorkspaceResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :workspace, T.nilable(Models::Shared::Workspace) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, workspace: T.nilable(Models::Shared::Workspace)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, workspace: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @workspace = workspace + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @workspace == other.workspace + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspaceaccess_request.rb b/lib/open_api_sdk/models/operations/getworkspaceaccess_request.rb index efda8328..0add81ea 100644 --- a/lib/open_api_sdk/models/operations/getworkspaceaccess_request.rb +++ b/lib/open_api_sdk/models/operations/getworkspaceaccess_request.rb @@ -5,25 +5,36 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetWorkspaceAccessRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetWorkspaceAccessRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the generation target. - field :gen_lock_id, T.nilable(::String), { 'query_param': { 'field_name': 'genLockId', 'style': 'form', 'explode': true } } - # Skip side-effects like incrementing metrics. - field :passive, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'passive', 'style': 'form', 'explode': true } } - # The type of the generated target. - field :target_type, T.nilable(::String), { 'query_param': { 'field_name': 'targetType', 'style': 'form', 'explode': true } } + # Unique identifier of the generation target. + field :gen_lock_id, T.nilable(::String), { 'query_param': { 'field_name': 'genLockId', 'style': 'form', 'explode': true } } + # Skip side-effects like incrementing metrics. + field :passive, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'passive', 'style': 'form', 'explode': true } } + # The type of the generated target. + field :target_type, T.nilable(::String), { 'query_param': { 'field_name': 'targetType', 'style': 'form', 'explode': true } } - sig { params(gen_lock_id: T.nilable(::String), passive: T.nilable(T::Boolean), target_type: T.nilable(::String)).void } - def initialize(gen_lock_id: nil, passive: nil, target_type: nil) - @gen_lock_id = gen_lock_id - @passive = passive - @target_type = target_type + sig { params(gen_lock_id: T.nilable(::String), passive: T.nilable(T::Boolean), target_type: T.nilable(::String)).void } + def initialize(gen_lock_id: nil, passive: nil, target_type: nil) + @gen_lock_id = gen_lock_id + @passive = passive + @target_type = target_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @gen_lock_id == other.gen_lock_id + return false unless @passive == other.passive + return false unless @target_type == other.target_type + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspaceaccess_response.rb b/lib/open_api_sdk/models/operations/getworkspaceaccess_response.rb index 5fb88f8e..1c23cbf0 100644 --- a/lib/open_api_sdk/models/operations/getworkspaceaccess_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspaceaccess_response.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspaceAccessResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :access_details, T.nilable(::OpenApiSDK::Shared::AccessDetails) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, access_details: T.nilable(::OpenApiSDK::Shared::AccessDetails)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, access_details: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @access_details = access_details + module Models + module Operations + + + class GetWorkspaceAccessResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :access_details, T.nilable(Models::Shared::AccessDetails) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, access_details: T.nilable(Models::Shared::AccessDetails)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, access_details: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @access_details = access_details + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @access_details == other.access_details + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacebycontext_response.rb b/lib/open_api_sdk/models/operations/getworkspacebycontext_response.rb index 16c150cd..e5155723 100644 --- a/lib/open_api_sdk/models/operations/getworkspacebycontext_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspacebycontext_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspaceByContextResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :workspace_and_organization, T.nilable(::OpenApiSDK::Shared::WorkspaceAndOrganization) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), workspace_and_organization: T.nilable(::OpenApiSDK::Shared::WorkspaceAndOrganization)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, workspace_and_organization: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @workspace_and_organization = workspace_and_organization + module Models + module Operations + + + class GetWorkspaceByContextResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :workspace_and_organization, T.nilable(Models::Shared::WorkspaceAndOrganization) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, workspace_and_organization: T.nilable(Models::Shared::WorkspaceAndOrganization)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, workspace_and_organization: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @workspace_and_organization = workspace_and_organization + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @workspace_and_organization == other.workspace_and_organization + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspaceeventsbytarget_request.rb b/lib/open_api_sdk/models/operations/getworkspaceeventsbytarget_request.rb index 9b9ca795..60cecaa1 100644 --- a/lib/open_api_sdk/models/operations/getworkspaceeventsbytarget_request.rb +++ b/lib/open_api_sdk/models/operations/getworkspaceeventsbytarget_request.rb @@ -5,25 +5,36 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetWorkspaceEventsByTargetRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetWorkspaceEventsByTargetRequest + extend T::Sig + include Crystalline::MetadataFields - # Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) - field :target_id, ::String, { 'path_param': { 'field_name': 'target_id', 'style': 'simple', 'explode': false } } - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - # Filter to only return events created after this timestamp - field :after_created_at, T.nilable(::DateTime), { 'query_param': { 'field_name': 'after_created_at', 'style': 'form', 'explode': true } } + # Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) + field :target_id, ::String, { 'path_param': { 'field_name': 'target_id', 'style': 'simple', 'explode': false } } + # Filter to only return events created after this timestamp + field :after_created_at, T.nilable(::DateTime), { 'query_param': { 'field_name': 'after_created_at', 'style': 'form', 'explode': true } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(target_id: ::String, workspace_id: ::String, after_created_at: T.nilable(::DateTime)).void } - def initialize(target_id: nil, workspace_id: nil, after_created_at: nil) - @target_id = target_id - @workspace_id = workspace_id - @after_created_at = after_created_at + sig { params(target_id: ::String, after_created_at: T.nilable(::DateTime), workspace_id: T.nilable(::String)).void } + def initialize(target_id: nil, after_created_at: nil, workspace_id: nil) + @target_id = target_id + @after_created_at = after_created_at + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @target_id == other.target_id + return false unless @after_created_at == other.after_created_at + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspaceeventsbytarget_response.rb b/lib/open_api_sdk/models/operations/getworkspaceeventsbytarget_response.rb index 151d16e9..d9af3698 100644 --- a/lib/open_api_sdk/models/operations/getworkspaceeventsbytarget_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspaceeventsbytarget_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspaceEventsByTargetResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Success - field :cli_event_batch, T.nilable(T::Array[::OpenApiSDK::Shared::CliEvent]) - # Error - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, cli_event_batch: T.nilable(T::Array[::OpenApiSDK::Shared::CliEvent]), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, cli_event_batch: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @cli_event_batch = cli_event_batch - @error = error + module Models + module Operations + + + class GetWorkspaceEventsByTargetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Success + field :cli_event_batch, T.nilable(T::Array[Models::Shared::CliEvent]) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, cli_event_batch: T.nilable(T::Array[Models::Shared::CliEvent])).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, cli_event_batch: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @cli_event_batch = cli_event_batch + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @cli_event_batch == other.cli_event_batch + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacefeatureflags_request.rb b/lib/open_api_sdk/models/operations/getworkspacefeatureflags_request.rb index 75ce99f2..60df637b 100644 --- a/lib/open_api_sdk/models/operations/getworkspacefeatureflags_request.rb +++ b/lib/open_api_sdk/models/operations/getworkspacefeatureflags_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetWorkspaceFeatureFlagsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetWorkspaceFeatureFlagsRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(workspace_id: ::String).void } - def initialize(workspace_id: nil) - @workspace_id = workspace_id + sig { params(workspace_id: T.nilable(::String)).void } + def initialize(workspace_id: nil) + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacefeatureflags_response.rb b/lib/open_api_sdk/models/operations/getworkspacefeatureflags_response.rb index c9492e76..95b743aa 100644 --- a/lib/open_api_sdk/models/operations/getworkspacefeatureflags_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspacefeatureflags_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspaceFeatureFlagsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Error - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # Success - field :workspace_feature_flag_response, T.nilable(::OpenApiSDK::Shared::WorkspaceFeatureFlagResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), workspace_feature_flag_response: T.nilable(::OpenApiSDK::Shared::WorkspaceFeatureFlagResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, workspace_feature_flag_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @workspace_feature_flag_response = workspace_feature_flag_response + module Models + module Operations + + + class GetWorkspaceFeatureFlagsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Success + field :workspace_feature_flag_response, T.nilable(Models::Shared::WorkspaceFeatureFlagResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, workspace_feature_flag_response: T.nilable(Models::Shared::WorkspaceFeatureFlagResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, workspace_feature_flag_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @workspace_feature_flag_response = workspace_feature_flag_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @workspace_feature_flag_response == other.workspace_feature_flag_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspaces_response.rb b/lib/open_api_sdk/models/operations/getworkspaces_response.rb index d2c003fa..4c37cd15 100644 --- a/lib/open_api_sdk/models/operations/getworkspaces_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspaces_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspacesResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :workspaces, T.nilable(T::Array[::OpenApiSDK::Shared::Workspace]) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), workspaces: T.nilable(T::Array[::OpenApiSDK::Shared::Workspace])).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, workspaces: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @workspaces = workspaces + module Models + module Operations + + + class GetWorkspacesResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :workspaces, T.nilable(T::Array[Models::Shared::Workspace]) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, workspaces: T.nilable(T::Array[Models::Shared::Workspace])).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, workspaces: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @workspaces = workspaces + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @workspaces == other.workspaces + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacesettings_request.rb b/lib/open_api_sdk/models/operations/getworkspacesettings_request.rb index d02917e5..9862ddd0 100644 --- a/lib/open_api_sdk/models/operations/getworkspacesettings_request.rb +++ b/lib/open_api_sdk/models/operations/getworkspacesettings_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetWorkspaceSettingsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetWorkspaceSettingsRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(workspace_id: ::String).void } - def initialize(workspace_id: nil) - @workspace_id = workspace_id + sig { params(workspace_id: T.nilable(::String)).void } + def initialize(workspace_id: nil) + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacesettings_response.rb b/lib/open_api_sdk/models/operations/getworkspacesettings_response.rb index f3bdccf5..f5709c41 100644 --- a/lib/open_api_sdk/models/operations/getworkspacesettings_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspacesettings_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspaceSettingsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :workspace_settings, T.nilable(::OpenApiSDK::Shared::WorkspaceSettings) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), workspace_settings: T.nilable(::OpenApiSDK::Shared::WorkspaceSettings)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, workspace_settings: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @workspace_settings = workspace_settings + module Models + module Operations + + + class GetWorkspaceSettingsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :workspace_settings, T.nilable(Models::Shared::WorkspaceSettings) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, workspace_settings: T.nilable(Models::Shared::WorkspaceSettings)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, workspace_settings: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @workspace_settings = workspace_settings + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @workspace_settings == other.workspace_settings + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacetargets_request.rb b/lib/open_api_sdk/models/operations/getworkspacetargets_request.rb index 154f36be..db327719 100644 --- a/lib/open_api_sdk/models/operations/getworkspacetargets_request.rb +++ b/lib/open_api_sdk/models/operations/getworkspacetargets_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetWorkspaceTargetsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetWorkspaceTargetsRequest + extend T::Sig + include Crystalline::MetadataFields - # Filter to only return targets with events created after this timestamp - field :after_last_event_created_at, T.nilable(::DateTime), { 'query_param': { 'field_name': 'after_last_event_created_at', 'style': 'form', 'explode': true } } + # Filter to only return targets with events created after this timestamp + field :after_last_event_created_at, T.nilable(::DateTime), { 'query_param': { 'field_name': 'after_last_event_created_at', 'style': 'form', 'explode': true } } - sig { params(after_last_event_created_at: T.nilable(::DateTime)).void } - def initialize(after_last_event_created_at: nil) - @after_last_event_created_at = after_last_event_created_at + sig { params(after_last_event_created_at: T.nilable(::DateTime)).void } + def initialize(after_last_event_created_at: nil) + @after_last_event_created_at = after_last_event_created_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @after_last_event_created_at == other.after_last_event_created_at + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacetargets_response.rb b/lib/open_api_sdk/models/operations/getworkspacetargets_response.rb index e7494fa0..4f4c8fa5 100644 --- a/lib/open_api_sdk/models/operations/getworkspacetargets_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspacetargets_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspaceTargetsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Error - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # Success - field :target_sdk_list, T.nilable(T::Array[::OpenApiSDK::Shared::TargetSDK]) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), target_sdk_list: T.nilable(T::Array[::OpenApiSDK::Shared::TargetSDK])).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, target_sdk_list: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @target_sdk_list = target_sdk_list + module Models + module Operations + + + class GetWorkspaceTargetsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Success + field :target_sdk_list, T.nilable(T::Array[Models::Shared::TargetSDK]) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, target_sdk_list: T.nilable(T::Array[Models::Shared::TargetSDK])).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, target_sdk_list: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @target_sdk_list = target_sdk_list + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @target_sdk_list == other.target_sdk_list + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacetargetsdeprecated_request.rb b/lib/open_api_sdk/models/operations/getworkspacetargetsdeprecated_request.rb index fe1c96a7..09fd5b4b 100644 --- a/lib/open_api_sdk/models/operations/getworkspacetargetsdeprecated_request.rb +++ b/lib/open_api_sdk/models/operations/getworkspacetargetsdeprecated_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetWorkspaceTargetsDeprecatedRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetWorkspaceTargetsDeprecatedRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - # Filter to only return targets with events created after this timestamp - field :after_last_event_created_at, T.nilable(::DateTime), { 'query_param': { 'field_name': 'after_last_event_created_at', 'style': 'form', 'explode': true } } + # Filter to only return targets with events created after this timestamp + field :after_last_event_created_at, T.nilable(::DateTime), { 'query_param': { 'field_name': 'after_last_event_created_at', 'style': 'form', 'explode': true } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(workspace_id: ::String, after_last_event_created_at: T.nilable(::DateTime)).void } - def initialize(workspace_id: nil, after_last_event_created_at: nil) - @workspace_id = workspace_id - @after_last_event_created_at = after_last_event_created_at + sig { params(after_last_event_created_at: T.nilable(::DateTime), workspace_id: T.nilable(::String)).void } + def initialize(after_last_event_created_at: nil, workspace_id: nil) + @after_last_event_created_at = after_last_event_created_at + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @after_last_event_created_at == other.after_last_event_created_at + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacetargetsdeprecated_response.rb b/lib/open_api_sdk/models/operations/getworkspacetargetsdeprecated_response.rb index 5b79a574..ee4b014f 100644 --- a/lib/open_api_sdk/models/operations/getworkspacetargetsdeprecated_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspacetargetsdeprecated_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspaceTargetsDeprecatedResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Error - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # Success - field :target_sdk_list, T.nilable(T::Array[::OpenApiSDK::Shared::TargetSDK]) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), target_sdk_list: T.nilable(T::Array[::OpenApiSDK::Shared::TargetSDK])).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, target_sdk_list: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @target_sdk_list = target_sdk_list + module Models + module Operations + + + class GetWorkspaceTargetsDeprecatedResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Success + field :target_sdk_list, T.nilable(T::Array[Models::Shared::TargetSDK]) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, target_sdk_list: T.nilable(T::Array[Models::Shared::TargetSDK])).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, target_sdk_list: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @target_sdk_list = target_sdk_list + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @target_sdk_list == other.target_sdk_list + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspaceteam_request.rb b/lib/open_api_sdk/models/operations/getworkspaceteam_request.rb index 8371a5d1..3fe84ba1 100644 --- a/lib/open_api_sdk/models/operations/getworkspaceteam_request.rb +++ b/lib/open_api_sdk/models/operations/getworkspaceteam_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetWorkspaceTeamRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetWorkspaceTeamRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(workspace_id: ::String).void } - def initialize(workspace_id: nil) - @workspace_id = workspace_id + sig { params(workspace_id: T.nilable(::String)).void } + def initialize(workspace_id: nil) + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspaceteam_response.rb b/lib/open_api_sdk/models/operations/getworkspaceteam_response.rb index 8326cd1f..87a02987 100644 --- a/lib/open_api_sdk/models/operations/getworkspaceteam_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspaceteam_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspaceTeamResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :workspace_team_response, T.nilable(::OpenApiSDK::Shared::WorkspaceTeamResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), workspace_team_response: T.nilable(::OpenApiSDK::Shared::WorkspaceTeamResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, workspace_team_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @workspace_team_response = workspace_team_response + module Models + module Operations + + + class GetWorkspaceTeamResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :workspace_team_response, T.nilable(Models::Shared::WorkspaceTeamResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, workspace_team_response: T.nilable(Models::Shared::WorkspaceTeamResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, workspace_team_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @workspace_team_response = workspace_team_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @workspace_team_response == other.workspace_team_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacetokens_request.rb b/lib/open_api_sdk/models/operations/getworkspacetokens_request.rb index 332ae0ee..86a42e7f 100644 --- a/lib/open_api_sdk/models/operations/getworkspacetokens_request.rb +++ b/lib/open_api_sdk/models/operations/getworkspacetokens_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GetWorkspaceTokensRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetWorkspaceTokensRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(workspace_id: ::String).void } - def initialize(workspace_id: nil) - @workspace_id = workspace_id + sig { params(workspace_id: T.nilable(::String)).void } + def initialize(workspace_id: nil) + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/getworkspacetokens_response.rb b/lib/open_api_sdk/models/operations/getworkspacetokens_response.rb index bc9c00f7..85863ef8 100644 --- a/lib/open_api_sdk/models/operations/getworkspacetokens_response.rb +++ b/lib/open_api_sdk/models/operations/getworkspacetokens_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GetWorkspaceTokensResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :workspace_tokens, T.nilable(T::Array[::OpenApiSDK::Shared::WorkspaceToken]) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), workspace_tokens: T.nilable(T::Array[::OpenApiSDK::Shared::WorkspaceToken])).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, workspace_tokens: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @workspace_tokens = workspace_tokens + module Models + module Operations + + + class GetWorkspaceTokensResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :workspace_tokens, T.nilable(T::Array[Models::Shared::WorkspaceToken]) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, workspace_tokens: T.nilable(T::Array[Models::Shared::WorkspaceToken])).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, workspace_tokens: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @workspace_tokens = workspace_tokens + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @workspace_tokens == other.workspace_tokens + true + end end end end diff --git a/lib/open_api_sdk/models/operations/githubcheckpublishingprs_request.rb b/lib/open_api_sdk/models/operations/githubcheckpublishingprs_request.rb index d94e6686..cbebcb3b 100644 --- a/lib/open_api_sdk/models/operations/githubcheckpublishingprs_request.rb +++ b/lib/open_api_sdk/models/operations/githubcheckpublishingprs_request.rb @@ -5,25 +5,36 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GithubCheckPublishingPRsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GithubCheckPublishingPRsRequest + extend T::Sig + include Crystalline::MetadataFields - field :generate_gen_lock_id, ::String, { 'query_param': { 'field_name': 'generate_gen_lock_id', 'style': 'form', 'explode': true } } + field :generate_gen_lock_id, ::String, { 'query_param': { 'field_name': 'generate_gen_lock_id', 'style': 'form', 'explode': true } } - field :org, ::String, { 'query_param': { 'field_name': 'org', 'style': 'form', 'explode': true } } + field :org, ::String, { 'query_param': { 'field_name': 'org', 'style': 'form', 'explode': true } } - field :repo, ::String, { 'query_param': { 'field_name': 'repo', 'style': 'form', 'explode': true } } + field :repo, ::String, { 'query_param': { 'field_name': 'repo', 'style': 'form', 'explode': true } } - sig { params(generate_gen_lock_id: ::String, org: ::String, repo: ::String).void } - def initialize(generate_gen_lock_id: nil, org: nil, repo: nil) - @generate_gen_lock_id = generate_gen_lock_id - @org = org - @repo = repo + sig { params(generate_gen_lock_id: ::String, org: ::String, repo: ::String).void } + def initialize(generate_gen_lock_id: nil, org: nil, repo: nil) + @generate_gen_lock_id = generate_gen_lock_id + @org = org + @repo = repo + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @generate_gen_lock_id == other.generate_gen_lock_id + return false unless @org == other.org + return false unless @repo == other.repo + true + end end end end diff --git a/lib/open_api_sdk/models/operations/githubcheckpublishingprs_response.rb b/lib/open_api_sdk/models/operations/githubcheckpublishingprs_response.rb index dd72e67b..bca2c3ec 100644 --- a/lib/open_api_sdk/models/operations/githubcheckpublishingprs_response.rb +++ b/lib/open_api_sdk/models/operations/githubcheckpublishingprs_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GithubCheckPublishingPRsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :github_publishing_pr_response, T.nilable(::OpenApiSDK::Shared::GithubPublishingPRResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), github_publishing_pr_response: T.nilable(::OpenApiSDK::Shared::GithubPublishingPRResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, github_publishing_pr_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @github_publishing_pr_response = github_publishing_pr_response + module Models + module Operations + + + class GithubCheckPublishingPRsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :github_publishing_pr_response, T.nilable(Models::Shared::GithubPublishingPRResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, github_publishing_pr_response: T.nilable(Models::Shared::GithubPublishingPRResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, github_publishing_pr_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @github_publishing_pr_response = github_publishing_pr_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @github_publishing_pr_response == other.github_publishing_pr_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/githubcheckpublishingsecrets_request.rb b/lib/open_api_sdk/models/operations/githubcheckpublishingsecrets_request.rb index aaa67990..b32a4aa2 100644 --- a/lib/open_api_sdk/models/operations/githubcheckpublishingsecrets_request.rb +++ b/lib/open_api_sdk/models/operations/githubcheckpublishingsecrets_request.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GithubCheckPublishingSecretsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GithubCheckPublishingSecretsRequest + extend T::Sig + include Crystalline::MetadataFields - field :generate_gen_lock_id, ::String, { 'query_param': { 'field_name': 'generate_gen_lock_id', 'style': 'form', 'explode': true } } + field :generate_gen_lock_id, ::String, { 'query_param': { 'field_name': 'generate_gen_lock_id', 'style': 'form', 'explode': true } } - sig { params(generate_gen_lock_id: ::String).void } - def initialize(generate_gen_lock_id: nil) - @generate_gen_lock_id = generate_gen_lock_id + sig { params(generate_gen_lock_id: ::String).void } + def initialize(generate_gen_lock_id: nil) + @generate_gen_lock_id = generate_gen_lock_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @generate_gen_lock_id == other.generate_gen_lock_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/githubcheckpublishingsecrets_response.rb b/lib/open_api_sdk/models/operations/githubcheckpublishingsecrets_response.rb index 986ec9da..6632bc30 100644 --- a/lib/open_api_sdk/models/operations/githubcheckpublishingsecrets_response.rb +++ b/lib/open_api_sdk/models/operations/githubcheckpublishingsecrets_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GithubCheckPublishingSecretsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :github_missing_publishing_secrets_response, T.nilable(::OpenApiSDK::Shared::GithubMissingPublishingSecretsResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), github_missing_publishing_secrets_response: T.nilable(::OpenApiSDK::Shared::GithubMissingPublishingSecretsResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, github_missing_publishing_secrets_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @github_missing_publishing_secrets_response = github_missing_publishing_secrets_response + module Models + module Operations + + + class GithubCheckPublishingSecretsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :github_missing_publishing_secrets_response, T.nilable(Models::Shared::GithubMissingPublishingSecretsResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, github_missing_publishing_secrets_response: T.nilable(Models::Shared::GithubMissingPublishingSecretsResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, github_missing_publishing_secrets_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @github_missing_publishing_secrets_response = github_missing_publishing_secrets_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @github_missing_publishing_secrets_response == other.github_missing_publishing_secrets_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/githubconfigurecodesamples_response.rb b/lib/open_api_sdk/models/operations/githubconfigurecodesamples_response.rb index bccc4602..efccd618 100644 --- a/lib/open_api_sdk/models/operations/githubconfigurecodesamples_response.rb +++ b/lib/open_api_sdk/models/operations/githubconfigurecodesamples_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GithubConfigureCodeSamplesResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :github_configure_code_samples_response, T.nilable(::OpenApiSDK::Shared::GithubConfigureCodeSamplesResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), github_configure_code_samples_response: T.nilable(::OpenApiSDK::Shared::GithubConfigureCodeSamplesResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, github_configure_code_samples_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @github_configure_code_samples_response = github_configure_code_samples_response + module Models + module Operations + + + class GithubConfigureCodeSamplesResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :github_configure_code_samples_response, T.nilable(Models::Shared::GithubConfigureCodeSamplesResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, github_configure_code_samples_response: T.nilable(Models::Shared::GithubConfigureCodeSamplesResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, github_configure_code_samples_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @github_configure_code_samples_response = github_configure_code_samples_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @github_configure_code_samples_response == other.github_configure_code_samples_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/githubconfiguremintlifyrepo_response.rb b/lib/open_api_sdk/models/operations/githubconfiguremintlifyrepo_response.rb index 2d6adc51..68d84302 100644 --- a/lib/open_api_sdk/models/operations/githubconfiguremintlifyrepo_response.rb +++ b/lib/open_api_sdk/models/operations/githubconfiguremintlifyrepo_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class GithubConfigureMintlifyRepoResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class GithubConfigureMintlifyRepoResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/githubconfiguretarget_response.rb b/lib/open_api_sdk/models/operations/githubconfiguretarget_response.rb index 5782306b..a542e3e7 100644 --- a/lib/open_api_sdk/models/operations/githubconfiguretarget_response.rb +++ b/lib/open_api_sdk/models/operations/githubconfiguretarget_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class GithubConfigureTargetResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class GithubConfigureTargetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/githubstorepublishingsecrets_response.rb b/lib/open_api_sdk/models/operations/githubstorepublishingsecrets_response.rb index 994c0d96..0fccc801 100644 --- a/lib/open_api_sdk/models/operations/githubstorepublishingsecrets_response.rb +++ b/lib/open_api_sdk/models/operations/githubstorepublishingsecrets_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class GithubStorePublishingSecretsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class GithubStorePublishingSecretsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/githubtriggeraction_response.rb b/lib/open_api_sdk/models/operations/githubtriggeraction_response.rb index e441593f..528d6a7b 100644 --- a/lib/open_api_sdk/models/operations/githubtriggeraction_response.rb +++ b/lib/open_api_sdk/models/operations/githubtriggeraction_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class GithubTriggerActionResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class GithubTriggerActionResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_request.rb b/lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_request.rb index b72765ba..286bb009 100644 --- a/lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_request.rb +++ b/lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class GrantUserAccessToWorkspaceRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GrantUserAccessToWorkspaceRequest + extend T::Sig + include Crystalline::MetadataFields - # Email of the user to grant access to. - field :email, ::String, { 'path_param': { 'field_name': 'email', 'style': 'simple', 'explode': false } } - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + # Email of the user to grant access to. + field :email, ::String, { 'path_param': { 'field_name': 'email', 'style': 'simple', 'explode': false } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(email: ::String, workspace_id: ::String).void } - def initialize(email: nil, workspace_id: nil) - @email = email - @workspace_id = workspace_id + sig { params(email: ::String, workspace_id: T.nilable(::String)).void } + def initialize(email: nil, workspace_id: nil) + @email = email + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @email == other.email + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_response.rb b/lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_response.rb index 7c49fac5..09355c24 100644 --- a/lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_response.rb +++ b/lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class GrantUserAccessToWorkspaceResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # Success - field :workspace_invite_response, T.nilable(::OpenApiSDK::Shared::WorkspaceInviteResponse) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), workspace_invite_response: T.nilable(::OpenApiSDK::Shared::WorkspaceInviteResponse)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, workspace_invite_response: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @workspace_invite_response = workspace_invite_response + module Models + module Operations + + + class GrantUserAccessToWorkspaceResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Success + field :workspace_invite_response, T.nilable(Models::Shared::WorkspaceInviteResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, workspace_invite_response: T.nilable(Models::Shared::WorkspaceInviteResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, workspace_invite_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @workspace_invite_response = workspace_invite_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @workspace_invite_response == other.workspace_invite_response + true + end end end end diff --git a/lib/open_api_sdk/models/operations/ignoresubscriptionnamespace_request.rb b/lib/open_api_sdk/models/operations/ignoresubscriptionnamespace_request.rb new file mode 100644 index 00000000..2ac8f8f9 --- /dev/null +++ b/lib/open_api_sdk/models/operations/ignoresubscriptionnamespace_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class IgnoreSubscriptionNamespaceRequest + extend T::Sig + include Crystalline::MetadataFields + + # The namespace name + field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespaceName', 'style': 'simple', 'explode': false } } + # The existing subscription ID + field :subscription_id, ::String, { 'path_param': { 'field_name': 'subscriptionID', 'style': 'simple', 'explode': false } } + + + sig { params(namespace_name: ::String, subscription_id: ::String).void } + def initialize(namespace_name: nil, subscription_id: nil) + @namespace_name = namespace_name + @subscription_id = subscription_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + return false unless @subscription_id == other.subscription_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/ignoresubscriptionnamespace_response.rb b/lib/open_api_sdk/models/operations/ignoresubscriptionnamespace_response.rb new file mode 100644 index 00000000..26dc72c0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/ignoresubscriptionnamespace_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class IgnoreSubscriptionNamespaceResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/insertversionmetadata_request.rb b/lib/open_api_sdk/models/operations/insertversionmetadata_request.rb deleted file mode 100644 index b313ad98..00000000 --- a/lib/open_api_sdk/models/operations/insertversionmetadata_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class InsertVersionMetadataRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to insert metadata for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api to insert metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - # A JSON representation of the metadata to insert. - field :version_metadata, ::OpenApiSDK::Shared::VersionMetadataInput, { 'request': { 'media_type': 'application/json' } } - - - sig { params(api_id: ::String, version_id: ::String, version_metadata: ::OpenApiSDK::Shared::VersionMetadataInput).void } - def initialize(api_id: nil, version_id: nil, version_metadata: nil) - @api_id = api_id - @version_id = version_id - @version_metadata = version_metadata - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/insertversionmetadata_response.rb b/lib/open_api_sdk/models/operations/insertversionmetadata_response.rb deleted file mode 100644 index 89c9ade7..00000000 --- a/lib/open_api_sdk/models/operations/insertversionmetadata_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class InsertVersionMetadataResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :version_metadata, T.nilable(::OpenApiSDK::Shared::VersionMetadata) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), version_metadata: T.nilable(::OpenApiSDK::Shared::VersionMetadata)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, version_metadata: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @version_metadata = version_metadata - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/linkgithubaccess_request.rb b/lib/open_api_sdk/models/operations/linkgithubaccess_request.rb new file mode 100644 index 00000000..7b1d8731 --- /dev/null +++ b/lib/open_api_sdk/models/operations/linkgithubaccess_request.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class LinkGithubAccessRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :github_oidc_token, T.nilable(::String), { 'query_param': { 'field_name': 'github_oidc_token', 'style': 'form', 'explode': true } } + + field :github_org, T.nilable(::String), { 'query_param': { 'field_name': 'github_org', 'style': 'form', 'explode': true } } + + field :installation_id, T.nilable(::String), { 'query_param': { 'field_name': 'installation_id', 'style': 'form', 'explode': true } } + + + sig { params(github_oidc_token: T.nilable(::String), github_org: T.nilable(::String), installation_id: T.nilable(::String)).void } + def initialize(github_oidc_token: nil, github_org: nil, installation_id: nil) + @github_oidc_token = github_oidc_token + @github_org = github_org + @installation_id = installation_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @github_oidc_token == other.github_oidc_token + return false unless @github_org == other.github_org + return false unless @installation_id == other.installation_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/linkgithubaccess_response.rb b/lib/open_api_sdk/models/operations/linkgithubaccess_response.rb new file mode 100644 index 00000000..eb7d9fde --- /dev/null +++ b/lib/open_api_sdk/models/operations/linkgithubaccess_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class LinkGithubAccessResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/listremotesources_request.rb b/lib/open_api_sdk/models/operations/listremotesources_request.rb new file mode 100644 index 00000000..14ec80e9 --- /dev/null +++ b/lib/open_api_sdk/models/operations/listremotesources_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ListRemoteSourcesRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :namespace_name, ::String, { 'query_param': { 'field_name': 'namespace_name', 'style': 'form', 'explode': true } } + + + sig { params(namespace_name: ::String).void } + def initialize(namespace_name: nil) + @namespace_name = namespace_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/listremotesources_response.rb b/lib/open_api_sdk/models/operations/listremotesources_response.rb new file mode 100644 index 00000000..cc6970f1 --- /dev/null +++ b/lib/open_api_sdk/models/operations/listremotesources_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ListRemoteSourcesResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :remote_source, T.nilable(Models::Shared::RemoteSource) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, remote_source: T.nilable(Models::Shared::RemoteSource)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, remote_source: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @remote_source = remote_source + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @remote_source == other.remote_source + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/op.rb b/lib/open_api_sdk/models/operations/op.rb deleted file mode 100644 index 21326486..00000000 --- a/lib/open_api_sdk/models/operations/op.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - # Configuration for filter operations - class Op < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Whether to AND or OR the filters - field :and_, T::Boolean, { 'query_param': { 'field_name': 'and' } } - - - sig { params(and_: T::Boolean).void } - def initialize(and_: nil) - @and_ = and_ - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/posttags_request.rb b/lib/open_api_sdk/models/operations/posttags_request.rb index dcefaca4..cf3c00b0 100644 --- a/lib/open_api_sdk/models/operations/posttags_request.rb +++ b/lib/open_api_sdk/models/operations/posttags_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class PostTagsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class PostTagsRequest + extend T::Sig + include Crystalline::MetadataFields - field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } - # A JSON representation of the tags to add - field :add_tags, T.nilable(::OpenApiSDK::Shared::AddTags), { 'request': { 'media_type': 'application/json' } } + field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } + # A JSON representation of the tags to add + field :add_tags, T.nilable(Models::Shared::AddTags), { 'request': { 'media_type': 'application/json' } } - sig { params(namespace_name: ::String, add_tags: T.nilable(::OpenApiSDK::Shared::AddTags)).void } - def initialize(namespace_name: nil, add_tags: nil) - @namespace_name = namespace_name - @add_tags = add_tags + sig { params(namespace_name: ::String, add_tags: T.nilable(Models::Shared::AddTags)).void } + def initialize(namespace_name: nil, add_tags: nil) + @namespace_name = namespace_name + @add_tags = add_tags + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + return false unless @add_tags == other.add_tags + true + end end end end diff --git a/lib/open_api_sdk/models/operations/posttags_response.rb b/lib/open_api_sdk/models/operations/posttags_response.rb index bd1fe1f1..8b892d6f 100644 --- a/lib/open_api_sdk/models/operations/posttags_response.rb +++ b/lib/open_api_sdk/models/operations/posttags_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class PostTagsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class PostTagsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/postworkspaceevents_request.rb b/lib/open_api_sdk/models/operations/postworkspaceevents_request.rb index 42f71ff3..fd398042 100644 --- a/lib/open_api_sdk/models/operations/postworkspaceevents_request.rb +++ b/lib/open_api_sdk/models/operations/postworkspaceevents_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class PostWorkspaceEventsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class PostWorkspaceEventsRequest + extend T::Sig + include Crystalline::MetadataFields - field :request_body, T::Array[::OpenApiSDK::Shared::CliEvent], { 'request': { 'media_type': 'application/json' } } - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + field :request_body, T::Array[Models::Shared::CliEvent], { 'request': { 'media_type': 'application/json' } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(request_body: T::Array[::OpenApiSDK::Shared::CliEvent], workspace_id: ::String).void } - def initialize(request_body: nil, workspace_id: nil) - @request_body = request_body - @workspace_id = workspace_id + sig { params(request_body: T::Array[Models::Shared::CliEvent], workspace_id: T.nilable(::String)).void } + def initialize(request_body: nil, workspace_id: nil) + @request_body = request_body + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @request_body == other.request_body + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/postworkspaceevents_response.rb b/lib/open_api_sdk/models/operations/postworkspaceevents_response.rb index 76b58d36..786cf464 100644 --- a/lib/open_api_sdk/models/operations/postworkspaceevents_response.rb +++ b/lib/open_api_sdk/models/operations/postworkspaceevents_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class PostWorkspaceEventsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Error - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class PostWorkspaceEventsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/preflight_response.rb b/lib/open_api_sdk/models/operations/preflight_response.rb index 552cdcc2..5f974413 100644 --- a/lib/open_api_sdk/models/operations/preflight_response.rb +++ b/lib/open_api_sdk/models/operations/preflight_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class PreflightResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - # OK - field :preflight_token, T.nilable(::OpenApiSDK::Shared::PreflightToken) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error), preflight_token: T.nilable(::OpenApiSDK::Shared::PreflightToken)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, preflight_token: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - @preflight_token = preflight_token + module Models + module Operations + + + class PreflightResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :preflight_token, T.nilable(Models::Shared::PreflightToken) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, preflight_token: T.nilable(Models::Shared::PreflightToken)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, preflight_token: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @preflight_token = preflight_token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @preflight_token == other.preflight_token + true + end end end end diff --git a/lib/open_api_sdk/models/operations/queryeventlog_request.rb b/lib/open_api_sdk/models/operations/queryeventlog_request.rb deleted file mode 100644 index 70573345..00000000 --- a/lib/open_api_sdk/models/operations/queryeventlog_request.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class QueryEventLogRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The filter to apply to the query. - field :filters, T.nilable(::OpenApiSDK::Shared::Filters), { 'query_param': { 'field_name': 'filters', 'serialization': 'json' } } - - - sig { params(filters: T.nilable(::OpenApiSDK::Shared::Filters)).void } - def initialize(filters: nil) - @filters = filters - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/queryeventlog_response.rb b/lib/open_api_sdk/models/operations/queryeventlog_response.rb deleted file mode 100644 index f3a8d1f3..00000000 --- a/lib/open_api_sdk/models/operations/queryeventlog_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class QueryEventLogResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :bounded_requests, T.nilable(T::Array[::OpenApiSDK::Shared::BoundedRequest]) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bounded_requests: T.nilable(T::Array[::OpenApiSDK::Shared::BoundedRequest]), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, bounded_requests: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @bounded_requests = bounded_requests - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/queryparam_op.rb b/lib/open_api_sdk/models/operations/queryparam_op.rb deleted file mode 100644 index 1c383d1a..00000000 --- a/lib/open_api_sdk/models/operations/queryparam_op.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - # Configuration for filter operations - class QueryParamOp < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Whether to AND or OR the filters - field :and_, T::Boolean, { 'query_param': { 'field_name': 'and' } } - - - sig { params(and_: T::Boolean).void } - def initialize(and_: nil) - @and_ = and_ - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/registerschema_request.rb b/lib/open_api_sdk/models/operations/registerschema_request.rb deleted file mode 100644 index eb293b3e..00000000 --- a/lib/open_api_sdk/models/operations/registerschema_request.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class RegisterSchemaRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api to get the schema for. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The schema file to upload provided as a multipart/form-data file segment. - field :request_body, ::OpenApiSDK::Operations::RegisterSchemaRequestBody, { 'request': { 'media_type': 'multipart/form-data' } } - # The version ID of the Api to delete metadata for. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_id: ::String, request_body: ::OpenApiSDK::Operations::RegisterSchemaRequestBody, version_id: ::String).void } - def initialize(api_id: nil, request_body: nil, version_id: nil) - @api_id = api_id - @request_body = request_body - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/registerschema_requestbody.rb b/lib/open_api_sdk/models/operations/registerschema_requestbody.rb deleted file mode 100644 index 350f2119..00000000 --- a/lib/open_api_sdk/models/operations/registerschema_requestbody.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - # The schema file to upload provided as a multipart/form-data file segment. - class RegisterSchemaRequestBody < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :file, ::OpenApiSDK::Operations::File, { 'multipart_form': { 'file': true } } - - - sig { params(file: ::OpenApiSDK::Operations::File).void } - def initialize(file: nil) - @file = file - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/registerschema_response.rb b/lib/open_api_sdk/models/operations/registerschema_response.rb deleted file mode 100644 index 6a5c8076..00000000 --- a/lib/open_api_sdk/models/operations/registerschema_response.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class RegisterSchemaResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/revokeembedaccesstoken_request.rb b/lib/open_api_sdk/models/operations/revokeembedaccesstoken_request.rb deleted file mode 100644 index ad9a50f8..00000000 --- a/lib/open_api_sdk/models/operations/revokeembedaccesstoken_request.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class RevokeEmbedAccessTokenRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the EmbedToken to revoke. - field :token_id, ::String, { 'path_param': { 'field_name': 'tokenID', 'style': 'simple', 'explode': false } } - - - sig { params(token_id: ::String).void } - def initialize(token_id: nil) - @token_id = token_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/revokeembedaccesstoken_response.rb b/lib/open_api_sdk/models/operations/revokeembedaccesstoken_response.rb deleted file mode 100644 index 3a74b156..00000000 --- a/lib/open_api_sdk/models/operations/revokeembedaccesstoken_response.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class RevokeEmbedAccessTokenResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_request.rb b/lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_request.rb index 86fa0985..dc05257e 100644 --- a/lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_request.rb +++ b/lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class RevokeUserAccessToWorkspaceRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class RevokeUserAccessToWorkspaceRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the user. - field :user_id, ::String, { 'path_param': { 'field_name': 'userId', 'style': 'simple', 'explode': false } } - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + # Unique identifier of the user. + field :user_id, ::String, { 'path_param': { 'field_name': 'userId', 'style': 'simple', 'explode': false } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(user_id: ::String, workspace_id: ::String).void } - def initialize(user_id: nil, workspace_id: nil) - @user_id = user_id - @workspace_id = workspace_id + sig { params(user_id: ::String, workspace_id: T.nilable(::String)).void } + def initialize(user_id: nil, workspace_id: nil) + @user_id = user_id + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @user_id == other.user_id + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_response.rb b/lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_response.rb index 62b244dd..385eae3c 100644 --- a/lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_response.rb +++ b/lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class RevokeUserAccessToWorkspaceResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class RevokeUserAccessToWorkspaceResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/schema.rb b/lib/open_api_sdk/models/operations/schema.rb index d9c28b78..6e300d43 100644 --- a/lib/open_api_sdk/models/operations/schema.rb +++ b/lib/open_api_sdk/models/operations/schema.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class Schema < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class Schema + extend T::Sig + include Crystalline::MetadataFields - field :content, ::String, { 'multipart_form': { 'content': true } } + field :content, ::String, { 'multipart_form': { 'content': true } } - field :file_name, ::String, { 'multipart_form': { 'field_name': 'schema' } } + field :file_name, ::String, { 'multipart_form': { 'field_name': 'fileName' } } - sig { params(content: ::String, file_name: ::String).void } - def initialize(content: nil, file_name: nil) - @content = content - @file_name = file_name + sig { params(content: ::String, file_name: ::String).void } + def initialize(content: nil, file_name: nil) + @content = content + @file_name = file_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content == other.content + return false unless @file_name == other.file_name + true + end end end end diff --git a/lib/open_api_sdk/models/operations/searchworkspaceevents_request.rb b/lib/open_api_sdk/models/operations/searchworkspaceevents_request.rb index d0327f5e..96b11e57 100644 --- a/lib/open_api_sdk/models/operations/searchworkspaceevents_request.rb +++ b/lib/open_api_sdk/models/operations/searchworkspaceevents_request.rb @@ -5,34 +5,60 @@ module OpenApiSDK - module Operations - - - class SearchWorkspaceEventsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - # A specific gen lock ID for the events. - field :generate_gen_lock_id, T.nilable(::String), { 'query_param': { 'field_name': 'generate_gen_lock_id', 'style': 'form', 'explode': true } } - # Specified interaction type for events. - field :interaction_type, T.nilable(::OpenApiSDK::Shared::InteractionType), { 'query_param': { 'field_name': 'interaction_type', 'style': 'form', 'explode': true } } - # Unique identifier of the lint report digest. - field :lint_report_digest, T.nilable(::String), { 'query_param': { 'field_name': 'lint_report_digest', 'style': 'form', 'explode': true } } - # Unique identifier of the openapi diff report digest. - field :openapi_diff_report_digest, T.nilable(::String), { 'query_param': { 'field_name': 'openapi_diff_report_digest', 'style': 'form', 'explode': true } } - # Unique identifier of the source revision digest. - field :source_revision_digest, T.nilable(::String), { 'query_param': { 'field_name': 'source_revision_digest', 'style': 'form', 'explode': true } } - - - sig { params(workspace_id: ::String, generate_gen_lock_id: T.nilable(::String), interaction_type: T.nilable(::OpenApiSDK::Shared::InteractionType), lint_report_digest: T.nilable(::String), openapi_diff_report_digest: T.nilable(::String), source_revision_digest: T.nilable(::String)).void } - def initialize(workspace_id: nil, generate_gen_lock_id: nil, interaction_type: nil, lint_report_digest: nil, openapi_diff_report_digest: nil, source_revision_digest: nil) - @workspace_id = workspace_id - @generate_gen_lock_id = generate_gen_lock_id - @interaction_type = interaction_type - @lint_report_digest = lint_report_digest - @openapi_diff_report_digest = openapi_diff_report_digest - @source_revision_digest = source_revision_digest + module Models + module Operations + + + class SearchWorkspaceEventsRequest + extend T::Sig + include Crystalline::MetadataFields + + # Shared execution ID for cli events across a single action. + field :execution_id, T.nilable(::String), { 'query_param': { 'field_name': 'execution_id', 'style': 'form', 'explode': true } } + # A specific gen lock ID for the events. + field :generate_gen_lock_id, T.nilable(::String), { 'query_param': { 'field_name': 'generate_gen_lock_id', 'style': 'form', 'explode': true } } + # Specified interaction type for events. + field :interaction_type, T.nilable(Models::Shared::InteractionType), { 'query_param': { 'field_name': 'interaction_type', 'style': 'form', 'explode': true } } + # Number of results to return. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Unique identifier of the lint report digest. + field :lint_report_digest, T.nilable(::String), { 'query_param': { 'field_name': 'lint_report_digest', 'style': 'form', 'explode': true } } + # Unique identifier of the openapi diff report digest. + field :openapi_diff_report_digest, T.nilable(::String), { 'query_param': { 'field_name': 'openapi_diff_report_digest', 'style': 'form', 'explode': true } } + # Unique identifier of the source revision digest. + field :source_revision_digest, T.nilable(::String), { 'query_param': { 'field_name': 'source_revision_digest', 'style': 'form', 'explode': true } } + # Whether the event was successful or not. + field :success, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'success', 'style': 'form', 'explode': true } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + + + sig { params(execution_id: T.nilable(::String), generate_gen_lock_id: T.nilable(::String), interaction_type: T.nilable(Models::Shared::InteractionType), limit: T.nilable(::Integer), lint_report_digest: T.nilable(::String), openapi_diff_report_digest: T.nilable(::String), source_revision_digest: T.nilable(::String), success: T.nilable(T::Boolean), workspace_id: T.nilable(::String)).void } + def initialize(execution_id: nil, generate_gen_lock_id: nil, interaction_type: nil, limit: nil, lint_report_digest: nil, openapi_diff_report_digest: nil, source_revision_digest: nil, success: nil, workspace_id: nil) + @execution_id = execution_id + @generate_gen_lock_id = generate_gen_lock_id + @interaction_type = interaction_type + @limit = limit + @lint_report_digest = lint_report_digest + @openapi_diff_report_digest = openapi_diff_report_digest + @source_revision_digest = source_revision_digest + @success = success + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @execution_id == other.execution_id + return false unless @generate_gen_lock_id == other.generate_gen_lock_id + return false unless @interaction_type == other.interaction_type + return false unless @limit == other.limit + return false unless @lint_report_digest == other.lint_report_digest + return false unless @openapi_diff_report_digest == other.openapi_diff_report_digest + return false unless @source_revision_digest == other.source_revision_digest + return false unless @success == other.success + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/searchworkspaceevents_response.rb b/lib/open_api_sdk/models/operations/searchworkspaceevents_response.rb index c70de7a5..7d38a49c 100644 --- a/lib/open_api_sdk/models/operations/searchworkspaceevents_response.rb +++ b/lib/open_api_sdk/models/operations/searchworkspaceevents_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class SearchWorkspaceEventsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Success - field :cli_event_batch, T.nilable(T::Array[::OpenApiSDK::Shared::CliEvent]) - # Error - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, cli_event_batch: T.nilable(T::Array[::OpenApiSDK::Shared::CliEvent]), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, cli_event_batch: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @cli_event_batch = cli_event_batch - @error = error + module Models + module Operations + + + class SearchWorkspaceEventsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Success + field :cli_event_batch, T.nilable(T::Array[Models::Shared::CliEvent]) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, cli_event_batch: T.nilable(T::Array[Models::Shared::CliEvent])).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, cli_event_batch: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @cli_event_batch = cli_event_batch + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @cli_event_batch == other.cli_event_batch + true + end end end end diff --git a/lib/open_api_sdk/models/operations/setvisibility_request.rb b/lib/open_api_sdk/models/operations/setvisibility_request.rb new file mode 100644 index 00000000..0b2d57dc --- /dev/null +++ b/lib/open_api_sdk/models/operations/setvisibility_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SetVisibilityRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } + # Namespace visibility + field :request_body, T.nilable(Models::Operations::SetVisibilityRequestBody), { 'request': { 'media_type': 'application/json' } } + + + sig { params(namespace_name: ::String, request_body: T.nilable(Models::Operations::SetVisibilityRequestBody)).void } + def initialize(namespace_name: nil, request_body: nil) + @namespace_name = namespace_name + @request_body = request_body + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + return false unless @request_body == other.request_body + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/setvisibility_requestbody.rb b/lib/open_api_sdk/models/operations/setvisibility_requestbody.rb new file mode 100644 index 00000000..50c1ece4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/setvisibility_requestbody.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Namespace visibility + class SetVisibilityRequestBody + extend T::Sig + include Crystalline::MetadataFields + + + field :public, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('public') } } + + + sig { params(public: T::Boolean).void } + def initialize(public: nil) + @public = public + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @public == other.public + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/setvisibility_response.rb b/lib/open_api_sdk/models/operations/setvisibility_response.rb new file mode 100644 index 00000000..6ef6f753 --- /dev/null +++ b/lib/open_api_sdk/models/operations/setvisibility_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SetVisibilityResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/setworkspacefeatureflags_response.rb b/lib/open_api_sdk/models/operations/setworkspacefeatureflags_response.rb new file mode 100644 index 00000000..de652a68 --- /dev/null +++ b/lib/open_api_sdk/models/operations/setworkspacefeatureflags_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SetWorkspaceFeatureFlagsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Success + field :workspace_feature_flag_response, T.nilable(Models::Shared::WorkspaceFeatureFlagResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, workspace_feature_flag_response: T.nilable(Models::Shared::WorkspaceFeatureFlagResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, workspace_feature_flag_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @workspace_feature_flag_response = workspace_feature_flag_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @workspace_feature_flag_response == other.workspace_feature_flag_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/suggest_request.rb b/lib/open_api_sdk/models/operations/suggest_request.rb index e0bf55f7..47f3bcfd 100644 --- a/lib/open_api_sdk/models/operations/suggest_request.rb +++ b/lib/open_api_sdk/models/operations/suggest_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class SuggestRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class SuggestRequest + extend T::Sig + include Crystalline::MetadataFields - # The OAS summary and diagnostics to use for the suggestion. - field :suggest_request_body, ::OpenApiSDK::Shared::SuggestRequestBody, { 'request': { 'media_type': 'application/json' } } + # The OAS summary and diagnostics to use for the suggestion. + field :suggest_request_body, Models::Shared::SuggestRequestBody, { 'request': { 'media_type': 'application/json' } } - field :x_session_id, ::String, { 'header': { 'field_name': 'x-session-id', 'style': 'simple', 'explode': false } } + field :x_session_id, ::String, { 'header': { 'field_name': 'x-session-id', 'style': 'simple', 'explode': false } } - sig { params(suggest_request_body: ::OpenApiSDK::Shared::SuggestRequestBody, x_session_id: ::String).void } - def initialize(suggest_request_body: nil, x_session_id: nil) - @suggest_request_body = suggest_request_body - @x_session_id = x_session_id + sig { params(suggest_request_body: Models::Shared::SuggestRequestBody, x_session_id: ::String).void } + def initialize(suggest_request_body: nil, x_session_id: nil) + @suggest_request_body = suggest_request_body + @x_session_id = x_session_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @suggest_request_body == other.suggest_request_body + return false unless @x_session_id == other.x_session_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/suggest_response.rb b/lib/open_api_sdk/models/operations/suggest_response.rb index d9fb81c7..106bfa8f 100644 --- a/lib/open_api_sdk/models/operations/suggest_response.rb +++ b/lib/open_api_sdk/models/operations/suggest_response.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - - - class SuggestResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # An overlay containing the suggested spec modifications. - field :schema, T.nilable(::String) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, schema: T.nilable(::String)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, schema: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @schema = schema + module Models + module Operations + + + class SuggestResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # An overlay containing the suggested spec modifications. + field :schema, T.nilable(::String) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, schema: T.nilable(::String)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, schema: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @schema = schema + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @schema == other.schema + true + end end end end diff --git a/lib/open_api_sdk/models/operations/suggestitems_response.rb b/lib/open_api_sdk/models/operations/suggestitems_response.rb new file mode 100644 index 00000000..eafe1973 --- /dev/null +++ b/lib/open_api_sdk/models/operations/suggestitems_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SuggestItemsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # One suggestion per item. Guaranteed to be the same length as the input items. + field :strings, T.nilable(T::Array[::String]) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, strings: T.nilable(T::Array[::String])).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, strings: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @strings = strings + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @strings == other.strings + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/suggestopenapi_request.rb b/lib/open_api_sdk/models/operations/suggestopenapi_request.rb index f2b0939d..5a6fed74 100644 --- a/lib/open_api_sdk/models/operations/suggestopenapi_request.rb +++ b/lib/open_api_sdk/models/operations/suggestopenapi_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class SuggestOpenAPIRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class SuggestOpenAPIRequest + extend T::Sig + include Crystalline::MetadataFields - # The schema file to upload provided as a multipart/form-data file segment. - field :request_body, ::OpenApiSDK::Operations::SuggestOpenAPIRequestBody, { 'request': { 'media_type': 'multipart/form-data' } } + # The schema file to upload provided as a multipart/form-data file segment. + field :request_body, Models::Operations::SuggestOpenAPIRequestBody, { 'request': { 'media_type': 'multipart/form-data' } } - field :x_session_id, ::String, { 'header': { 'field_name': 'x-session-id', 'style': 'simple', 'explode': false } } + field :x_session_id, ::String, { 'header': { 'field_name': 'x-session-id', 'style': 'simple', 'explode': false } } - sig { params(request_body: ::OpenApiSDK::Operations::SuggestOpenAPIRequestBody, x_session_id: ::String).void } - def initialize(request_body: nil, x_session_id: nil) - @request_body = request_body - @x_session_id = x_session_id + sig { params(request_body: Models::Operations::SuggestOpenAPIRequestBody, x_session_id: ::String).void } + def initialize(request_body: nil, x_session_id: nil) + @request_body = request_body + @x_session_id = x_session_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @request_body == other.request_body + return false unless @x_session_id == other.x_session_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/suggestopenapi_requestbody.rb b/lib/open_api_sdk/models/operations/suggestopenapi_requestbody.rb index 0f68569e..6f96688b 100644 --- a/lib/open_api_sdk/models/operations/suggestopenapi_requestbody.rb +++ b/lib/open_api_sdk/models/operations/suggestopenapi_requestbody.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - - # The schema file to upload provided as a multipart/form-data file segment. - class SuggestOpenAPIRequestBody < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Operations + + # The schema file to upload provided as a multipart/form-data file segment. + class SuggestOpenAPIRequestBody + extend T::Sig + include Crystalline::MetadataFields - field :schema, ::OpenApiSDK::Operations::Schema, { 'multipart_form': { 'file': true } } + field :schema, Models::Operations::Schema, { 'multipart_form': { 'file': true, 'field_name': 'schema' } } - field :opts, T.nilable(::OpenApiSDK::Shared::SuggestOptsOld), { 'multipart_form': { 'field_name': 'opts', 'json': true } } + field :opts, T.nilable(Models::Shared::SuggestOptsOld), { 'multipart_form': { 'field_name': 'opts', 'json': true } } - sig { params(schema: ::OpenApiSDK::Operations::Schema, opts: T.nilable(::OpenApiSDK::Shared::SuggestOptsOld)).void } - def initialize(schema: nil, opts: nil) - @schema = schema - @opts = opts + sig { params(schema: Models::Operations::Schema, opts: T.nilable(Models::Shared::SuggestOptsOld)).void } + def initialize(schema: nil, opts: nil) + @schema = schema + @opts = opts + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @schema == other.schema + return false unless @opts == other.opts + true + end end end end diff --git a/lib/open_api_sdk/models/operations/suggestopenapi_response.rb b/lib/open_api_sdk/models/operations/suggestopenapi_response.rb index ef9ef348..c897acdf 100644 --- a/lib/open_api_sdk/models/operations/suggestopenapi_response.rb +++ b/lib/open_api_sdk/models/operations/suggestopenapi_response.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - - - class SuggestOpenAPIResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # An overlay containing the suggested spec modifications. - field :schema, T.nilable(::String) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, schema: T.nilable(::String)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, schema: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @schema = schema + module Models + module Operations + + + class SuggestOpenAPIResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # An overlay containing the suggested spec modifications. + field :schema, T.nilable(::String) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, schema: T.nilable(::String)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, schema: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @schema = schema + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @schema == other.schema + true + end end end end diff --git a/lib/open_api_sdk/models/operations/suggestopenapiregistry_request.rb b/lib/open_api_sdk/models/operations/suggestopenapiregistry_request.rb index a000ca6c..8d368f47 100644 --- a/lib/open_api_sdk/models/operations/suggestopenapiregistry_request.rb +++ b/lib/open_api_sdk/models/operations/suggestopenapiregistry_request.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - - - class SuggestOpenAPIRegistryRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } - # Tag or digest - field :revision_reference, ::String, { 'path_param': { 'field_name': 'revision_reference', 'style': 'simple', 'explode': false } } - - field :x_session_id, ::String, { 'header': { 'field_name': 'x-session-id', 'style': 'simple', 'explode': false } } - # Suggest options - field :suggest_request_body, T.nilable(::OpenApiSDK::Shared::SuggestRequestBody), { 'request': { 'media_type': 'application/json' } } - - - sig { params(namespace_name: ::String, revision_reference: ::String, x_session_id: ::String, suggest_request_body: T.nilable(::OpenApiSDK::Shared::SuggestRequestBody)).void } - def initialize(namespace_name: nil, revision_reference: nil, x_session_id: nil, suggest_request_body: nil) - @namespace_name = namespace_name - @revision_reference = revision_reference - @x_session_id = x_session_id - @suggest_request_body = suggest_request_body + module Models + module Operations + + + class SuggestOpenAPIRegistryRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :namespace_name, ::String, { 'path_param': { 'field_name': 'namespace_name', 'style': 'simple', 'explode': false } } + # Tag or digest + field :revision_reference, ::String, { 'path_param': { 'field_name': 'revision_reference', 'style': 'simple', 'explode': false } } + + field :x_session_id, ::String, { 'header': { 'field_name': 'x-session-id', 'style': 'simple', 'explode': false } } + # Suggest options + field :suggest_request_body, T.nilable(Models::Shared::SuggestRequestBody), { 'request': { 'media_type': 'application/json' } } + + + sig { params(namespace_name: ::String, revision_reference: ::String, x_session_id: ::String, suggest_request_body: T.nilable(Models::Shared::SuggestRequestBody)).void } + def initialize(namespace_name: nil, revision_reference: nil, x_session_id: nil, suggest_request_body: nil) + @namespace_name = namespace_name + @revision_reference = revision_reference + @x_session_id = x_session_id + @suggest_request_body = suggest_request_body + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + return false unless @revision_reference == other.revision_reference + return false unless @x_session_id == other.x_session_id + return false unless @suggest_request_body == other.suggest_request_body + true + end end end end diff --git a/lib/open_api_sdk/models/operations/suggestopenapiregistry_response.rb b/lib/open_api_sdk/models/operations/suggestopenapiregistry_response.rb index acf92d80..090f3b06 100644 --- a/lib/open_api_sdk/models/operations/suggestopenapiregistry_response.rb +++ b/lib/open_api_sdk/models/operations/suggestopenapiregistry_response.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - - - class SuggestOpenAPIRegistryResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # An overlay containing the suggested spec modifications. - field :schema, T.nilable(::String) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, schema: T.nilable(::String)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, schema: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @schema = schema + module Models + module Operations + + + class SuggestOpenAPIRegistryResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # An overlay containing the suggested spec modifications. + field :schema, T.nilable(::String) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, schema: T.nilable(::String)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, schema: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @schema = schema + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @schema == other.schema + true + end end end end diff --git a/lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_request.rb b/lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_request.rb new file mode 100644 index 00000000..752b56c1 --- /dev/null +++ b/lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class UpdatePublishingTokenExpirationRequest + extend T::Sig + include Crystalline::MetadataFields + + # Unique identifier of the publishing token. + field :token_id, ::String, { 'path_param': { 'field_name': 'tokenID', 'style': 'simple', 'explode': false } } + # The publishing token to update + field :request_body, T.nilable(Models::Operations::UpdatePublishingTokenExpirationRequestBody), { 'request': { 'media_type': 'application/json' } } + + + sig { params(token_id: ::String, request_body: T.nilable(Models::Operations::UpdatePublishingTokenExpirationRequestBody)).void } + def initialize(token_id: nil, request_body: nil) + @token_id = token_id + @request_body = request_body + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @token_id == other.token_id + return false unless @request_body == other.request_body + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_requestbody.rb b/lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_requestbody.rb new file mode 100644 index 00000000..f96ee281 --- /dev/null +++ b/lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_requestbody.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # The publishing token to update + class UpdatePublishingTokenExpirationRequestBody + extend T::Sig + include Crystalline::MetadataFields + + # The new expiration date for the publishing token. + field :valid_until, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('valid_until'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The new name for the publishing token. + field :token_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('token_name') } } + + + sig { params(valid_until: ::DateTime, token_name: T.nilable(::String)).void } + def initialize(valid_until: nil, token_name: nil) + @valid_until = valid_until + @token_name = token_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @valid_until == other.valid_until + return false unless @token_name == other.token_name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_response.rb b/lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_response.rb new file mode 100644 index 00000000..aae5a6ee --- /dev/null +++ b/lib/open_api_sdk/models/operations/updatepublishingtokenexpiration_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class UpdatePublishingTokenExpirationResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/updateworkspacedetails_request.rb b/lib/open_api_sdk/models/operations/updateworkspacedetails_request.rb index f9b3fd16..68fee41a 100644 --- a/lib/open_api_sdk/models/operations/updateworkspacedetails_request.rb +++ b/lib/open_api_sdk/models/operations/updateworkspacedetails_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class UpdateWorkspaceDetailsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class UpdateWorkspaceDetailsRequest + extend T::Sig + include Crystalline::MetadataFields - # The workspace details to update. - field :workspace, ::OpenApiSDK::Shared::Workspace, { 'request': { 'media_type': 'application/json' } } - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } + # The workspace details to update. + field :workspace, Models::Shared::Workspace, { 'request': { 'media_type': 'application/json' } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(workspace: ::OpenApiSDK::Shared::Workspace, workspace_id: ::String).void } - def initialize(workspace: nil, workspace_id: nil) - @workspace = workspace - @workspace_id = workspace_id + sig { params(workspace: Models::Shared::Workspace, workspace_id: T.nilable(::String)).void } + def initialize(workspace: nil, workspace_id: nil) + @workspace = workspace + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @workspace == other.workspace + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/updateworkspacedetails_response.rb b/lib/open_api_sdk/models/operations/updateworkspacedetails_response.rb index 43a496b5..2b01aa66 100644 --- a/lib/open_api_sdk/models/operations/updateworkspacedetails_response.rb +++ b/lib/open_api_sdk/models/operations/updateworkspacedetails_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class UpdateWorkspaceDetailsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class UpdateWorkspaceDetailsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/updateworkspacesettings_request.rb b/lib/open_api_sdk/models/operations/updateworkspacesettings_request.rb index 6b1129c1..aee94a72 100644 --- a/lib/open_api_sdk/models/operations/updateworkspacesettings_request.rb +++ b/lib/open_api_sdk/models/operations/updateworkspacesettings_request.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - + module Models + module Operations + - class UpdateWorkspaceSettingsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class UpdateWorkspaceSettingsRequest + extend T::Sig + include Crystalline::MetadataFields - # Unique identifier of the workspace. - field :workspace_id, ::String, { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - # The workspace settings to update. - field :workspace_settings, ::OpenApiSDK::Shared::WorkspaceSettings, { 'request': { 'media_type': 'application/json' } } + # The workspace settings to update. + field :workspace_settings, Models::Shared::WorkspaceSettings, { 'request': { 'media_type': 'application/json' } } + # Unique identifier of the workspace. + field :workspace_id, T.nilable(::String), { 'path_param': { 'field_name': 'workspace_id', 'style': 'simple', 'explode': false } } - sig { params(workspace_id: ::String, workspace_settings: ::OpenApiSDK::Shared::WorkspaceSettings).void } - def initialize(workspace_id: nil, workspace_settings: nil) - @workspace_id = workspace_id - @workspace_settings = workspace_settings + sig { params(workspace_settings: Models::Shared::WorkspaceSettings, workspace_id: T.nilable(::String)).void } + def initialize(workspace_settings: nil, workspace_id: nil) + @workspace_settings = workspace_settings + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @workspace_settings == other.workspace_settings + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/operations/updateworkspacesettings_response.rb b/lib/open_api_sdk/models/operations/updateworkspacesettings_response.rb index 4033d5cd..589905a4 100644 --- a/lib/open_api_sdk/models/operations/updateworkspacesettings_response.rb +++ b/lib/open_api_sdk/models/operations/updateworkspacesettings_response.rb @@ -5,28 +5,36 @@ module OpenApiSDK - module Operations - - - class UpdateWorkspaceSettingsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @error = error + module Models + module Operations + + + class UpdateWorkspaceSettingsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end end end end diff --git a/lib/open_api_sdk/models/operations/uploadreport_file.rb b/lib/open_api_sdk/models/operations/uploadreport_file.rb deleted file mode 100644 index fe760a61..00000000 --- a/lib/open_api_sdk/models/operations/uploadreport_file.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class UploadReportFile < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :content, ::String, { 'multipart_form': { 'content': true } } - - field :file_name, ::String, { 'multipart_form': { 'field_name': 'file' } } - - - sig { params(content: ::String, file_name: ::String).void } - def initialize(content: nil, file_name: nil) - @content = content - @file_name = file_name - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/uploadreport_requestbody.rb b/lib/open_api_sdk/models/operations/uploadreport_requestbody.rb index d32f63f8..478711cf 100644 --- a/lib/open_api_sdk/models/operations/uploadreport_requestbody.rb +++ b/lib/open_api_sdk/models/operations/uploadreport_requestbody.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Operations - - # The report file to upload provided as a multipart/form-data file segment. - class UploadReportRequestBody < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Operations + + # The report file to upload provided as a multipart/form-data file segment. + class UploadReportRequestBody + extend T::Sig + include Crystalline::MetadataFields - field :data, ::OpenApiSDK::Shared::Report, { 'multipart_form': { 'field_name': 'data', 'json': true } } + field :data, Models::Shared::Report, { 'multipart_form': { 'field_name': 'data', 'json': true } } - field :file, ::OpenApiSDK::Operations::UploadReportFile, { 'multipart_form': { 'file': true } } + field :file, Models::Operations::File, { 'multipart_form': { 'file': true, 'field_name': 'file' } } - sig { params(data: ::OpenApiSDK::Shared::Report, file: ::OpenApiSDK::Operations::UploadReportFile).void } - def initialize(data: nil, file: nil) - @data = data - @file = file + sig { params(data: Models::Shared::Report, file: Models::Operations::File).void } + def initialize(data: nil, file: nil) + @data = data + @file = file + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @file == other.file + true + end end end end diff --git a/lib/open_api_sdk/models/operations/uploadreport_response.rb b/lib/open_api_sdk/models/operations/uploadreport_response.rb index ec86303c..80a06dee 100644 --- a/lib/open_api_sdk/models/operations/uploadreport_response.rb +++ b/lib/open_api_sdk/models/operations/uploadreport_response.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Operations - - - class UploadReportResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :uploaded_report, T.nilable(::OpenApiSDK::Operations::UploadReportUploadedReport) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, uploaded_report: T.nilable(::OpenApiSDK::Operations::UploadReportUploadedReport)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, uploaded_report: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @uploaded_report = uploaded_report + module Models + module Operations + + + class UploadReportResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :uploaded_report, T.nilable(Models::Operations::UploadReportUploadedReport) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, uploaded_report: T.nilable(Models::Operations::UploadReportUploadedReport)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, uploaded_report: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @uploaded_report = uploaded_report + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @uploaded_report == other.uploaded_report + true + end end end end diff --git a/lib/open_api_sdk/models/operations/uploadreport_uploadedreport.rb b/lib/open_api_sdk/models/operations/uploadreport_uploadedreport.rb index b35f2d8e..c3ea181a 100644 --- a/lib/open_api_sdk/models/operations/uploadreport_uploadedreport.rb +++ b/lib/open_api_sdk/models/operations/uploadreport_uploadedreport.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Operations - - # OK - class UploadReportUploadedReport < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Operations + + # OK + class UploadReportUploadedReport + extend T::Sig + include Crystalline::MetadataFields - field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } - sig { params(url: ::String).void } - def initialize(url: nil) - @url = url + sig { params(url: ::String).void } + def initialize(url: nil) + @url = url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @url == other.url + true + end end end end diff --git a/lib/open_api_sdk/models/operations/upsertapi_request.rb b/lib/open_api_sdk/models/operations/upsertapi_request.rb deleted file mode 100644 index 1696f34a..00000000 --- a/lib/open_api_sdk/models/operations/upsertapi_request.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class UpsertApiRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # A JSON representation of the Api to upsert - field :api, ::OpenApiSDK::Shared::ApiInput, { 'request': { 'media_type': 'application/json' } } - # The ID of the Api to upsert. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - - - sig { params(api: ::OpenApiSDK::Shared::ApiInput, api_id: ::String).void } - def initialize(api: nil, api_id: nil) - @api = api - @api_id = api_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/upsertapi_response.rb b/lib/open_api_sdk/models/operations/upsertapi_response.rb deleted file mode 100644 index 0c4352e8..00000000 --- a/lib/open_api_sdk/models/operations/upsertapi_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class UpsertApiResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :api, T.nilable(::OpenApiSDK::Shared::Api) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, api: T.nilable(::OpenApiSDK::Shared::Api), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, api: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @api = api - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/upsertapiendpoint_request.rb b/lib/open_api_sdk/models/operations/upsertapiendpoint_request.rb deleted file mode 100644 index 2c9fa563..00000000 --- a/lib/open_api_sdk/models/operations/upsertapiendpoint_request.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class UpsertApiEndpointRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # A JSON representation of the ApiEndpoint to upsert. - field :api_endpoint, ::OpenApiSDK::Shared::ApiEndpointInput, { 'request': { 'media_type': 'application/json' } } - # The ID of the ApiEndpoint to upsert. - field :api_endpoint_id, ::String, { 'path_param': { 'field_name': 'apiEndpointID', 'style': 'simple', 'explode': false } } - # The ID of the Api the ApiEndpoint belongs to. - field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } } - # The version ID of the Api the ApiEndpoint belongs to. - field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } } - - - sig { params(api_endpoint: ::OpenApiSDK::Shared::ApiEndpointInput, api_endpoint_id: ::String, api_id: ::String, version_id: ::String).void } - def initialize(api_endpoint: nil, api_endpoint_id: nil, api_id: nil, version_id: nil) - @api_endpoint = api_endpoint - @api_endpoint_id = api_endpoint_id - @api_id = api_id - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/upsertapiendpoint_response.rb b/lib/open_api_sdk/models/operations/upsertapiendpoint_response.rb deleted file mode 100644 index 7df5b068..00000000 --- a/lib/open_api_sdk/models/operations/upsertapiendpoint_response.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Operations - - - class UpsertApiEndpointResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :api_endpoint, T.nilable(::OpenApiSDK::Shared::ApiEndpoint) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, api_endpoint: T.nilable(::OpenApiSDK::Shared::ApiEndpoint), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, api_endpoint: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @api_endpoint = api_endpoint - @error = error - end - end - end -end diff --git a/lib/open_api_sdk/models/operations/validateapikey_response.rb b/lib/open_api_sdk/models/operations/validateapikey_response.rb index 67966d7b..e1d3e13a 100644 --- a/lib/open_api_sdk/models/operations/validateapikey_response.rb +++ b/lib/open_api_sdk/models/operations/validateapikey_response.rb @@ -5,31 +5,40 @@ module OpenApiSDK - module Operations - - - class ValidateApiKeyResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # HTTP response content type for this operation - field :content_type, ::String - # Raw HTTP response; suitable for custom response parsing - field :raw_response, ::Faraday::Response - # HTTP response status code for this operation - field :status_code, ::Integer - # OK - field :api_key_details, T.nilable(::OpenApiSDK::Shared::ApiKeyDetails) - # Default error response - field :error, T.nilable(::OpenApiSDK::Shared::Error) - - - sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, api_key_details: T.nilable(::OpenApiSDK::Shared::ApiKeyDetails), error: T.nilable(::OpenApiSDK::Shared::Error)).void } - def initialize(content_type: nil, raw_response: nil, status_code: nil, api_key_details: nil, error: nil) - @content_type = content_type - @raw_response = raw_response - @status_code = status_code - @api_key_details = api_key_details - @error = error + module Models + module Operations + + + class ValidateApiKeyResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # OK + field :api_key_details, T.nilable(Models::Shared::ApiKeyDetails) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, api_key_details: T.nilable(Models::Shared::ApiKeyDetails)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, api_key_details: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @api_key_details = api_key_details + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @api_key_details == other.api_key_details + true + end end end end diff --git a/lib/open_api_sdk/models/shared.rb b/lib/open_api_sdk/models/shared.rb index c4e8c880..2052c980 100644 --- a/lib/open_api_sdk/models/shared.rb +++ b/lib/open_api_sdk/models/shared.rb @@ -4,87 +4,96 @@ # frozen_string_literal: true module OpenApiSDK - module Shared - autoload :Error, 'open_api_sdk/models/shared/error.rb' - autoload :Api, 'open_api_sdk/models/shared/api.rb' - autoload :ApiInput, 'open_api_sdk/models/shared/api_input.rb' - autoload :GenerateOpenApiSpecDiff, 'open_api_sdk/models/shared/generateopenapispecdiff.rb' - autoload :ApiEndpoint, 'open_api_sdk/models/shared/apiendpoint.rb' - autoload :ApiEndpointInput, 'open_api_sdk/models/shared/apiendpoint_input.rb' - autoload :VersionMetadata, 'open_api_sdk/models/shared/versionmetadata.rb' - autoload :VersionMetadataInput, 'open_api_sdk/models/shared/versionmetadata_input.rb' - autoload :Schema, 'open_api_sdk/models/shared/schema.rb' - autoload :ValueChange, 'open_api_sdk/models/shared/valuechange.rb' - autoload :SchemaDiff, 'open_api_sdk/models/shared/schemadiff.rb' - autoload :ApiKeyDetails, 'open_api_sdk/models/shared/apikeydetails.rb' - autoload :AccountType, 'open_api_sdk/models/shared/accounttype.rb' - autoload :User, 'open_api_sdk/models/shared/user.rb' - autoload :Claims, 'open_api_sdk/models/shared/claims.rb' - autoload :AccessTokenUser, 'open_api_sdk/models/shared/accesstoken_user.rb' - autoload :Workspaces, 'open_api_sdk/models/shared/workspaces.rb' - autoload :AccessToken, 'open_api_sdk/models/shared/accesstoken.rb' - autoload :FeatureFlag, 'open_api_sdk/models/shared/featureflag.rb' - autoload :Level, 'open_api_sdk/models/shared/level.rb' - autoload :AccessDetails, 'open_api_sdk/models/shared/accessdetails.rb' - autoload :BoundedRequest, 'open_api_sdk/models/shared/boundedrequest.rb' - autoload :RequestMetadata, 'open_api_sdk/models/shared/requestmetadata.rb' - autoload :Filters, 'open_api_sdk/models/shared/filters.rb' - autoload :Filter, 'open_api_sdk/models/shared/filter.rb' - autoload :UnboundedRequest, 'open_api_sdk/models/shared/unboundedrequest.rb' - autoload :GithubPublishingPRResponse, 'open_api_sdk/models/shared/githubpublishingprresponse.rb' - autoload :GithubMissingPublishingSecretsResponse, 'open_api_sdk/models/shared/githubmissingpublishingsecretsresponse.rb' - autoload :GithubStorePublishingSecretsRequest, 'open_api_sdk/models/shared/githubstorepublishingsecretsrequest.rb' - autoload :GithubConfigureCodeSamplesResponse, 'open_api_sdk/models/shared/githubconfigurecodesamplesresponse.rb' - autoload :Auth, 'open_api_sdk/models/shared/auth.rb' - autoload :WorkflowDocument, 'open_api_sdk/models/shared/workflowdocument.rb' - autoload :GithubConfigureCodeSamplesRequest, 'open_api_sdk/models/shared/githubconfigurecodesamplesrequest.rb' - autoload :GithubConfigureMintlifyRepoRequest, 'open_api_sdk/models/shared/githubconfiguremintlifyreporequest.rb' - autoload :GithubConfigureTargetRequest, 'open_api_sdk/models/shared/githubconfiguretargetrequest.rb' - autoload :GithubTriggerActionRequest, 'open_api_sdk/models/shared/githubtriggeractionrequest.rb' - autoload :GithubGetActionResponse, 'open_api_sdk/models/shared/githubgetactionresponse.rb' - autoload :Organization, 'open_api_sdk/models/shared/organization.rb' - autoload :OrganizationUsageResponse, 'open_api_sdk/models/shared/organizationusageresponse.rb' - autoload :OrganizationUsage, 'open_api_sdk/models/shared/organizationusage.rb' - autoload :EmbedAccessTokenResponse, 'open_api_sdk/models/shared/embedaccesstokenresponse.rb' - autoload :EmbedToken, 'open_api_sdk/models/shared/embedtoken.rb' - autoload :Workspace, 'open_api_sdk/models/shared/workspace.rb' - autoload :WorkspaceAndOrganization, 'open_api_sdk/models/shared/workspaceandorganization.rb' - autoload :WorkspaceSettings, 'open_api_sdk/models/shared/workspacesettings.rb' - autoload :WorkspaceTeamResponse, 'open_api_sdk/models/shared/workspaceteamresponse.rb' - autoload :SSOMetadata, 'open_api_sdk/models/shared/ssometadata.rb' - autoload :Relationship, 'open_api_sdk/models/shared/relationship.rb' - autoload :WorkspaceInviteResponse, 'open_api_sdk/models/shared/workspaceinviteresponse.rb' - autoload :WorkspaceToken, 'open_api_sdk/models/shared/workspacetoken.rb' - autoload :WorkspaceFeatureFlagResponse, 'open_api_sdk/models/shared/workspacefeatureflagresponse.rb' - autoload :GenerateBumpType, 'open_api_sdk/models/shared/generate_bump_type.rb' - autoload :OpenapiDiffBumpType, 'open_api_sdk/models/shared/openapi_diff_bump_type.rb' - autoload :CliEvent, 'open_api_sdk/models/shared/clievent.rb' - autoload :InteractionType, 'open_api_sdk/models/shared/interactiontype.rb' - autoload :TargetSDK, 'open_api_sdk/models/shared/targetsdk.rb' - autoload :PreflightToken, 'open_api_sdk/models/shared/preflighttoken.rb' - autoload :PreflightRequest, 'open_api_sdk/models/shared/preflightrequest.rb' - autoload :GetNamespacesResponse, 'open_api_sdk/models/shared/getnamespacesresponse.rb' - autoload :Namespace, 'open_api_sdk/models/shared/namespace.rb' - autoload :GetRevisionsResponse, 'open_api_sdk/models/shared/getrevisionsresponse.rb' - autoload :Revision, 'open_api_sdk/models/shared/revision.rb' - autoload :GetTagsResponse, 'open_api_sdk/models/shared/gettagsresponse.rb' - autoload :Tag, 'open_api_sdk/models/shared/tag.rb' - autoload :AddTags, 'open_api_sdk/models/shared/addtags.rb' - autoload :Manifest, 'open_api_sdk/models/shared/manifest.rb' - autoload :V2Descriptor, 'open_api_sdk/models/shared/v2descriptor.rb' - autoload :Annotations, 'open_api_sdk/models/shared/annotations.rb' - autoload :Type, 'open_api_sdk/models/shared/type.rb' - autoload :Report, 'open_api_sdk/models/shared/report.rb' - autoload :SuggestionType, 'open_api_sdk/models/shared/suggestion_type.rb' - autoload :SuggestOptsOld, 'open_api_sdk/models/shared/suggestoptsold.rb' - autoload :Diagnostic, 'open_api_sdk/models/shared/diagnostic.rb' - autoload :SuggestRequestBodySuggestionType, 'open_api_sdk/models/shared/suggestrequestbody_suggestion_type.rb' - autoload :SuggestRequestBody, 'open_api_sdk/models/shared/suggestrequestbody.rb' - autoload :OASSummary, 'open_api_sdk/models/shared/oassummary.rb' - autoload :OASOperation, 'open_api_sdk/models/shared/oasoperation.rb' - autoload :License, 'open_api_sdk/models/shared/license.rb' - autoload :OASInfo, 'open_api_sdk/models/shared/oasinfo.rb' - autoload :ShortURL, 'open_api_sdk/models/shared/shorturl.rb' - autoload :Security, 'open_api_sdk/models/shared/security.rb' + module Models + module Shared + autoload :AccessDetails, 'open_api_sdk/models/shared/accessdetails.rb' + autoload :AccessToken, 'open_api_sdk/models/shared/accesstoken.rb' + autoload :AccessTokenUser, 'open_api_sdk/models/shared/accesstoken_user.rb' + autoload :AccountType, 'open_api_sdk/models/shared/accounttype.rb' + autoload :AddTags, 'open_api_sdk/models/shared/addtags.rb' + autoload :Annotations, 'open_api_sdk/models/shared/annotations.rb' + autoload :ApiKeyDetails, 'open_api_sdk/models/shared/apikeydetails.rb' + autoload :BillingAddOn, 'open_api_sdk/models/shared/billingaddon.rb' + autoload :CliEvent, 'open_api_sdk/models/shared/clievent.rb' + autoload :CodeSampleSchemaInput, 'open_api_sdk/models/shared/codesampleschemainput.rb' + autoload :CodeSamplesJobStatus, 'open_api_sdk/models/shared/codesamplesjobstatus.rb' + autoload :Diagnostic, 'open_api_sdk/models/shared/diagnostic.rb' + autoload :FeatureFlag, 'open_api_sdk/models/shared/featureflag.rb' + autoload :GetNamespacesResponse, 'open_api_sdk/models/shared/getnamespacesresponse.rb' + autoload :GetRevisionsResponse, 'open_api_sdk/models/shared/getrevisionsresponse.rb' + autoload :GetTagsResponse, 'open_api_sdk/models/shared/gettagsresponse.rb' + autoload :GithubConfigureCodeSamplesRequest, 'open_api_sdk/models/shared/githubconfigurecodesamplesrequest.rb' + autoload :GithubConfigureCodeSamplesResponse, 'open_api_sdk/models/shared/githubconfigurecodesamplesresponse.rb' + autoload :GithubConfigureMintlifyRepoRequest, 'open_api_sdk/models/shared/githubconfiguremintlifyreporequest.rb' + autoload :GithubConfigureTargetRequest, 'open_api_sdk/models/shared/githubconfiguretargetrequest.rb' + autoload :GithubGetActionResponse, 'open_api_sdk/models/shared/githubgetactionresponse.rb' + autoload :GithubMissingPublishingSecretsResponse, 'open_api_sdk/models/shared/githubmissingpublishingsecretsresponse.rb' + autoload :GithubPublishingPRResponse, 'open_api_sdk/models/shared/githubpublishingprresponse.rb' + autoload :GithubSetupStateResponse, 'open_api_sdk/models/shared/githubsetupstateresponse.rb' + autoload :GithubStorePublishingSecretsRequest, 'open_api_sdk/models/shared/githubstorepublishingsecretsrequest.rb' + autoload :GithubTriggerActionRequest, 'open_api_sdk/models/shared/githubtriggeractionrequest.rb' + autoload :InteractionType, 'open_api_sdk/models/shared/interactiontype.rb' + autoload :Manifest, 'open_api_sdk/models/shared/manifest.rb' + autoload :Namespace, 'open_api_sdk/models/shared/namespace.rb' + autoload :OASInfo, 'open_api_sdk/models/shared/oasinfo.rb' + autoload :OASOperation, 'open_api_sdk/models/shared/oasoperation.rb' + autoload :OASSummary, 'open_api_sdk/models/shared/oassummary.rb' + autoload :Organization, 'open_api_sdk/models/shared/organization.rb' + autoload :OrganizationBillingAddOnRequest, 'open_api_sdk/models/shared/organizationbillingaddonrequest.rb' + autoload :OrganizationBillingAddOnResponse, 'open_api_sdk/models/shared/organizationbillingaddonresponse.rb' + autoload :OrganizationUsage, 'open_api_sdk/models/shared/organizationusage.rb' + autoload :OrganizationUsageResponse, 'open_api_sdk/models/shared/organizationusageresponse.rb' + autoload :PreflightRequest, 'open_api_sdk/models/shared/preflightrequest.rb' + autoload :PreflightToken, 'open_api_sdk/models/shared/preflighttoken.rb' + autoload :PublishingToken, 'open_api_sdk/models/shared/publishingtoken.rb' + autoload :RemoteDocument, 'open_api_sdk/models/shared/remotedocument.rb' + autoload :RemoteSource, 'open_api_sdk/models/shared/remotesource.rb' + autoload :RemoteSourceSubscriptionSettings, 'open_api_sdk/models/shared/remotesourcesubscriptionsettings.rb' + autoload :Report, 'open_api_sdk/models/shared/report.rb' + autoload :Revision, 'open_api_sdk/models/shared/revision.rb' + autoload :RevisionContentsMetadata, 'open_api_sdk/models/shared/revisioncontentsmetadata.rb' + autoload :RevisionContentsMetadataType, 'open_api_sdk/models/shared/revisioncontentsmetadata_type.rb' + autoload :SSOMetadata, 'open_api_sdk/models/shared/ssometadata.rb' + autoload :SchemaStoreItem, 'open_api_sdk/models/shared/schemastoreitem.rb' + autoload :Security, 'open_api_sdk/models/shared/security.rb' + autoload :ShortURL, 'open_api_sdk/models/shared/shorturl.rb' + autoload :SuggestItemsRequestBody, 'open_api_sdk/models/shared/suggestitemsrequestbody.rb' + autoload :SuggestOptsOld, 'open_api_sdk/models/shared/suggestoptsold.rb' + autoload :SuggestRequestBody, 'open_api_sdk/models/shared/suggestrequestbody.rb' + autoload :SuggestRequestBodySuggestionType, 'open_api_sdk/models/shared/suggestrequestbody_suggestion_type.rb' + autoload :Tag, 'open_api_sdk/models/shared/tag.rb' + autoload :TargetSDK, 'open_api_sdk/models/shared/targetsdk.rb' + autoload :UsageSnippet, 'open_api_sdk/models/shared/usagesnippet.rb' + autoload :UsageSnippets, 'open_api_sdk/models/shared/usagesnippets.rb' + autoload :User, 'open_api_sdk/models/shared/user.rb' + autoload :V2Descriptor, 'open_api_sdk/models/shared/v2descriptor.rb' + autoload :WorkflowDocument, 'open_api_sdk/models/shared/workflowdocument.rb' + autoload :Workspace, 'open_api_sdk/models/shared/workspace.rb' + autoload :WorkspaceAndOrganization, 'open_api_sdk/models/shared/workspaceandorganization.rb' + autoload :WorkspaceFeatureFlag, 'open_api_sdk/models/shared/workspacefeatureflag.rb' + autoload :WorkspaceFeatureFlagRequest, 'open_api_sdk/models/shared/workspacefeatureflagrequest.rb' + autoload :WorkspaceFeatureFlagResponse, 'open_api_sdk/models/shared/workspacefeatureflagresponse.rb' + autoload :WorkspaceInviteResponse, 'open_api_sdk/models/shared/workspaceinviteresponse.rb' + autoload :WorkspaceSettings, 'open_api_sdk/models/shared/workspacesettings.rb' + autoload :WorkspaceTeamResponse, 'open_api_sdk/models/shared/workspaceteamresponse.rb' + autoload :WorkspaceToken, 'open_api_sdk/models/shared/workspacetoken.rb' + autoload :Actions, 'open_api_sdk/models/shared/actions.rb' + autoload :Auth, 'open_api_sdk/models/shared/auth.rb' + autoload :Claims, 'open_api_sdk/models/shared/claims.rb' + autoload :CompositeSpecMetadata, 'open_api_sdk/models/shared/composite_spec_metadata.rb' + autoload :Format, 'open_api_sdk/models/shared/format.rb' + autoload :GenerateBumpType, 'open_api_sdk/models/shared/generate_bump_type.rb' + autoload :Level, 'open_api_sdk/models/shared/level.rb' + autoload :License, 'open_api_sdk/models/shared/license.rb' + autoload :OpenapiDiffBumpType, 'open_api_sdk/models/shared/openapi_diff_bump_type.rb' + autoload :PullRequestMetadata, 'open_api_sdk/models/shared/pull_request_metadata.rb' + autoload :Relationship, 'open_api_sdk/models/shared/relationship.rb' + autoload :SchemaFile, 'open_api_sdk/models/shared/schema_file.rb' + autoload :Secrets, 'open_api_sdk/models/shared/secrets.rb' + autoload :SuggestionType, 'open_api_sdk/models/shared/suggestion_type.rb' + autoload :TargetResource, 'open_api_sdk/models/shared/target_resource.rb' + autoload :Type, 'open_api_sdk/models/shared/type.rb' + autoload :Workspaces, 'open_api_sdk/models/shared/workspaces.rb' + end end end diff --git a/lib/open_api_sdk/models/shared/accessdetails.rb b/lib/open_api_sdk/models/shared/accessdetails.rb index 3a5caed9..47242d3c 100644 --- a/lib/open_api_sdk/models/shared/accessdetails.rb +++ b/lib/open_api_sdk/models/shared/accessdetails.rb @@ -5,25 +5,36 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class AccessDetails < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class AccessDetails + extend T::Sig + include Crystalline::MetadataFields - field :generation_allowed, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generation_allowed') } } + field :generation_allowed, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generation_allowed') } } - field :message, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('message') } } + field :message, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('message') } } - field :level, T.nilable(::OpenApiSDK::Shared::Level), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('level'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::Level, true) } } + field :level, T.nilable(Models::Shared::Level), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('level'), 'decoder': Utils.enum_from_string(Models::Shared::Level, true) } } - sig { params(generation_allowed: T::Boolean, message: ::String, level: T.nilable(::OpenApiSDK::Shared::Level)).void } - def initialize(generation_allowed: nil, message: nil, level: nil) - @generation_allowed = generation_allowed - @message = message - @level = level + sig { params(generation_allowed: T::Boolean, message: ::String, level: T.nilable(Models::Shared::Level)).void } + def initialize(generation_allowed: nil, message: nil, level: nil) + @generation_allowed = generation_allowed + @message = message + @level = level + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @generation_allowed == other.generation_allowed + return false unless @message == other.message + return false unless @level == other.level + true + end end end end diff --git a/lib/open_api_sdk/models/shared/accesstoken.rb b/lib/open_api_sdk/models/shared/accesstoken.rb index b2ea6b7a..ed68be30 100644 --- a/lib/open_api_sdk/models/shared/accesstoken.rb +++ b/lib/open_api_sdk/models/shared/accesstoken.rb @@ -5,31 +5,44 @@ module OpenApiSDK - module Shared - - # An AccessToken is a token that can be used to authenticate with the Speakeasy API. - class AccessToken < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # An AccessToken is a token that can be used to authenticate with the Speakeasy API. + class AccessToken + extend T::Sig + include Crystalline::MetadataFields - field :access_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('access_token') } } + field :access_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('access_token') } } - field :claims, ::OpenApiSDK::Shared::Claims, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('claims') } } + field :claims, Models::Shared::Claims, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('claims') } } - field :user, ::OpenApiSDK::Shared::AccessTokenUser, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('user') } } + field :user, Models::Shared::AccessTokenUser, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('user') } } - field :feature_flags, T.nilable(T::Array[::OpenApiSDK::Shared::FeatureFlag]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_flags') } } + field :feature_flags, T.nilable(T::Array[Models::Shared::FeatureFlag]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_flags') } } - field :workspaces, T.nilable(T::Array[::OpenApiSDK::Shared::Workspaces]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspaces') } } + field :workspaces, T.nilable(T::Array[Models::Shared::Workspaces]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspaces') } } - sig { params(access_token: ::String, claims: ::OpenApiSDK::Shared::Claims, user: ::OpenApiSDK::Shared::AccessTokenUser, feature_flags: T.nilable(T::Array[::OpenApiSDK::Shared::FeatureFlag]), workspaces: T.nilable(T::Array[::OpenApiSDK::Shared::Workspaces])).void } - def initialize(access_token: nil, claims: nil, user: nil, feature_flags: nil, workspaces: nil) - @access_token = access_token - @claims = claims - @user = user - @feature_flags = feature_flags - @workspaces = workspaces + sig { params(access_token: ::String, claims: Models::Shared::Claims, user: Models::Shared::AccessTokenUser, feature_flags: T.nilable(T::Array[Models::Shared::FeatureFlag]), workspaces: T.nilable(T::Array[Models::Shared::Workspaces])).void } + def initialize(access_token: nil, claims: nil, user: nil, feature_flags: nil, workspaces: nil) + @access_token = access_token + @claims = claims + @user = user + @feature_flags = feature_flags + @workspaces = workspaces + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @access_token == other.access_token + return false unless @claims == other.claims + return false unless @user == other.user + return false unless @feature_flags == other.feature_flags + return false unless @workspaces == other.workspaces + true + end end end end diff --git a/lib/open_api_sdk/models/shared/accesstoken_user.rb b/lib/open_api_sdk/models/shared/accesstoken_user.rb index 5c70f247..850b4411 100644 --- a/lib/open_api_sdk/models/shared/accesstoken_user.rb +++ b/lib/open_api_sdk/models/shared/accesstoken_user.rb @@ -5,34 +5,48 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class AccessTokenUser < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class AccessTokenUser + extend T::Sig + include Crystalline::MetadataFields - field :admin, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('admin') } } + field :admin, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('admin') } } - field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } } - field :display_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_name') } } + field :display_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_name') } } - field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } - field :email_verified, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } + field :email_verified, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } - field :id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + field :id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - sig { params(admin: T.nilable(T::Boolean), created_at: T.nilable(::DateTime), display_name: T.nilable(::String), email: T.nilable(::String), email_verified: T.nilable(T::Boolean), id: T.nilable(::String)).void } - def initialize(admin: nil, created_at: nil, display_name: nil, email: nil, email_verified: nil, id: nil) - @admin = admin - @created_at = created_at - @display_name = display_name - @email = email - @email_verified = email_verified - @id = id + sig { params(admin: T.nilable(T::Boolean), created_at: T.nilable(::DateTime), display_name: T.nilable(::String), email: T.nilable(::String), email_verified: T.nilable(T::Boolean), id: T.nilable(::String)).void } + def initialize(admin: nil, created_at: nil, display_name: nil, email: nil, email_verified: nil, id: nil) + @admin = admin + @created_at = created_at + @display_name = display_name + @email = email + @email_verified = email_verified + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @admin == other.admin + return false unless @created_at == other.created_at + return false unless @display_name == other.display_name + return false unless @email == other.email + return false unless @email_verified == other.email_verified + return false unless @id == other.id + true + end end end end diff --git a/lib/open_api_sdk/models/shared/accounttype.rb b/lib/open_api_sdk/models/shared/accounttype.rb index 96223ee6..67e9d5ca 100644 --- a/lib/open_api_sdk/models/shared/accounttype.rb +++ b/lib/open_api_sdk/models/shared/accounttype.rb @@ -5,15 +5,17 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class AccountType < T::Enum - enums do - FREE = new('free') - SCALE_UP = new('scale-up') - BUSINESS = new('business') - ENTERPRISE = new('enterprise') + class AccountType < T::Enum + enums do + FREE = new('free') + SCALE_UP = new('scale-up') + BUSINESS = new('business') + ENTERPRISE = new('enterprise') + end end end end diff --git a/lib/open_api_sdk/models/shared/actions.rb b/lib/open_api_sdk/models/shared/actions.rb new file mode 100644 index 00000000..d2b7904c --- /dev/null +++ b/lib/open_api_sdk/models/shared/actions.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Actions + extend T::Sig + include Crystalline::MetadataFields + + + field :generation_action_configured, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generation_action_configured') } } + + field :publish_action_configured, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_action_configured') } } + + + sig { params(generation_action_configured: T::Boolean, publish_action_configured: T::Boolean).void } + def initialize(generation_action_configured: nil, publish_action_configured: nil) + @generation_action_configured = generation_action_configured + @publish_action_configured = publish_action_configured + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @generation_action_configured == other.generation_action_configured + return false unless @publish_action_configured == other.publish_action_configured + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/addtags.rb b/lib/open_api_sdk/models/shared/addtags.rb index 19e61edb..baa7e814 100644 --- a/lib/open_api_sdk/models/shared/addtags.rb +++ b/lib/open_api_sdk/models/shared/addtags.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - - # Request body of tags to add to a revision - class AddTags < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # Request body of tags to add to a revision + class AddTags + extend T::Sig + include Crystalline::MetadataFields - # revision digest to add tags too sha256:... - field :revision_digest, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revision_digest') } } - # string tags to add to the revision - field :tags, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tags') } } + # revision digest to add tags too sha256:... + field :revision_digest, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revision_digest') } } + # string tags to add to the revision + field :tags, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tags') } } - sig { params(revision_digest: ::String, tags: T::Array[::String]).void } - def initialize(revision_digest: nil, tags: nil) - @revision_digest = revision_digest - @tags = tags + sig { params(revision_digest: ::String, tags: T::Array[::String]).void } + def initialize(revision_digest: nil, tags: nil) + @revision_digest = revision_digest + @tags = tags + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @revision_digest == other.revision_digest + return false unless @tags == other.tags + true + end end end end diff --git a/lib/open_api_sdk/models/shared/annotations.rb b/lib/open_api_sdk/models/shared/annotations.rb index 2ddaec7b..c9910297 100644 --- a/lib/open_api_sdk/models/shared/annotations.rb +++ b/lib/open_api_sdk/models/shared/annotations.rb @@ -5,52 +5,72 @@ module OpenApiSDK - module Shared - - # Annotations - class Annotations < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The authors of the image - field :org_opencontainers_image_authors, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.authors') } } - # The time the image was created - field :org_opencontainers_image_created, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.created') } } - # Human-readable description of the software packaged in the image - field :org_opencontainers_image_description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.description') } } - # The documentation URL of the image - field :org_opencontainers_image_documentation, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.documentation') } } - - field :org_opencontainers_image_licenses, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.licenses') } } - # Name of the reference for a target - field :org_opencontainers_image_ref_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.ref.name') } } - # Source control revision identifier - field :org_opencontainers_image_revision, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.revision') } } - # The URL to get source code for building the image - field :org_opencontainers_image_source, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.source') } } - # Human-readable title of the image - field :org_opencontainers_image_title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.title') } } - # The URL of the image - field :org_opencontainers_image_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.url') } } - # Name of the distributing entity, organization or individual. - field :org_opencontainers_image_vendor, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.vendor') } } - # The version of the packaged software - field :org_opencontainers_image_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.version') } } - - - sig { params(org_opencontainers_image_authors: T.nilable(::String), org_opencontainers_image_created: T.nilable(::String), org_opencontainers_image_description: T.nilable(::String), org_opencontainers_image_documentation: T.nilable(::String), org_opencontainers_image_licenses: T.nilable(::String), org_opencontainers_image_ref_name: T.nilable(::String), org_opencontainers_image_revision: T.nilable(::String), org_opencontainers_image_source: T.nilable(::String), org_opencontainers_image_title: T.nilable(::String), org_opencontainers_image_url: T.nilable(::String), org_opencontainers_image_vendor: T.nilable(::String), org_opencontainers_image_version: T.nilable(::String)).void } - def initialize(org_opencontainers_image_authors: nil, org_opencontainers_image_created: nil, org_opencontainers_image_description: nil, org_opencontainers_image_documentation: nil, org_opencontainers_image_licenses: nil, org_opencontainers_image_ref_name: nil, org_opencontainers_image_revision: nil, org_opencontainers_image_source: nil, org_opencontainers_image_title: nil, org_opencontainers_image_url: nil, org_opencontainers_image_vendor: nil, org_opencontainers_image_version: nil) - @org_opencontainers_image_authors = org_opencontainers_image_authors - @org_opencontainers_image_created = org_opencontainers_image_created - @org_opencontainers_image_description = org_opencontainers_image_description - @org_opencontainers_image_documentation = org_opencontainers_image_documentation - @org_opencontainers_image_licenses = org_opencontainers_image_licenses - @org_opencontainers_image_ref_name = org_opencontainers_image_ref_name - @org_opencontainers_image_revision = org_opencontainers_image_revision - @org_opencontainers_image_source = org_opencontainers_image_source - @org_opencontainers_image_title = org_opencontainers_image_title - @org_opencontainers_image_url = org_opencontainers_image_url - @org_opencontainers_image_vendor = org_opencontainers_image_vendor - @org_opencontainers_image_version = org_opencontainers_image_version + module Models + module Shared + + # Annotations + class Annotations + extend T::Sig + include Crystalline::MetadataFields + + # The authors of the image + field :org_opencontainers_image_authors, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.authors') } } + # The time the image was created + field :org_opencontainers_image_created, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.created') } } + # Human-readable description of the software packaged in the image + field :org_opencontainers_image_description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.description') } } + # The documentation URL of the image + field :org_opencontainers_image_documentation, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.documentation') } } + + field :org_opencontainers_image_licenses, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.licenses') } } + # Name of the reference for a target + field :org_opencontainers_image_ref_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.ref.name') } } + # Source control revision identifier + field :org_opencontainers_image_revision, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.revision') } } + # The URL to get source code for building the image + field :org_opencontainers_image_source, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.source') } } + # Human-readable title of the image + field :org_opencontainers_image_title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.title') } } + # The URL of the image + field :org_opencontainers_image_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.url') } } + # Name of the distributing entity, organization or individual. + field :org_opencontainers_image_vendor, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.vendor') } } + # The version of the packaged software + field :org_opencontainers_image_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org.opencontainers.image.version') } } + + + sig { params(org_opencontainers_image_authors: T.nilable(::String), org_opencontainers_image_created: T.nilable(::String), org_opencontainers_image_description: T.nilable(::String), org_opencontainers_image_documentation: T.nilable(::String), org_opencontainers_image_licenses: T.nilable(::String), org_opencontainers_image_ref_name: T.nilable(::String), org_opencontainers_image_revision: T.nilable(::String), org_opencontainers_image_source: T.nilable(::String), org_opencontainers_image_title: T.nilable(::String), org_opencontainers_image_url: T.nilable(::String), org_opencontainers_image_vendor: T.nilable(::String), org_opencontainers_image_version: T.nilable(::String)).void } + def initialize(org_opencontainers_image_authors: nil, org_opencontainers_image_created: nil, org_opencontainers_image_description: nil, org_opencontainers_image_documentation: nil, org_opencontainers_image_licenses: nil, org_opencontainers_image_ref_name: nil, org_opencontainers_image_revision: nil, org_opencontainers_image_source: nil, org_opencontainers_image_title: nil, org_opencontainers_image_url: nil, org_opencontainers_image_vendor: nil, org_opencontainers_image_version: nil) + @org_opencontainers_image_authors = org_opencontainers_image_authors + @org_opencontainers_image_created = org_opencontainers_image_created + @org_opencontainers_image_description = org_opencontainers_image_description + @org_opencontainers_image_documentation = org_opencontainers_image_documentation + @org_opencontainers_image_licenses = org_opencontainers_image_licenses + @org_opencontainers_image_ref_name = org_opencontainers_image_ref_name + @org_opencontainers_image_revision = org_opencontainers_image_revision + @org_opencontainers_image_source = org_opencontainers_image_source + @org_opencontainers_image_title = org_opencontainers_image_title + @org_opencontainers_image_url = org_opencontainers_image_url + @org_opencontainers_image_vendor = org_opencontainers_image_vendor + @org_opencontainers_image_version = org_opencontainers_image_version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @org_opencontainers_image_authors == other.org_opencontainers_image_authors + return false unless @org_opencontainers_image_created == other.org_opencontainers_image_created + return false unless @org_opencontainers_image_description == other.org_opencontainers_image_description + return false unless @org_opencontainers_image_documentation == other.org_opencontainers_image_documentation + return false unless @org_opencontainers_image_licenses == other.org_opencontainers_image_licenses + return false unless @org_opencontainers_image_ref_name == other.org_opencontainers_image_ref_name + return false unless @org_opencontainers_image_revision == other.org_opencontainers_image_revision + return false unless @org_opencontainers_image_source == other.org_opencontainers_image_source + return false unless @org_opencontainers_image_title == other.org_opencontainers_image_title + return false unless @org_opencontainers_image_url == other.org_opencontainers_image_url + return false unless @org_opencontainers_image_vendor == other.org_opencontainers_image_vendor + return false unless @org_opencontainers_image_version == other.org_opencontainers_image_version + true + end end end end diff --git a/lib/open_api_sdk/models/shared/api.rb b/lib/open_api_sdk/models/shared/api.rb deleted file mode 100644 index 94c74b15..00000000 --- a/lib/open_api_sdk/models/shared/api.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # An Api is representation of a API (a collection of API Endpoints) within the Speakeasy Platform. - class Api < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of this Api. This is a human-readable name (subject to change). - field :api_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('api_id') } } - # Creation timestamp. - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # A detailed description of the Api. - field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } - # Last update timestamp. - field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # The version ID of this Api. This is semantic version identifier. - field :version_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version_id') } } - # The workspace ID this Api belongs to. - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - # Determines if all the endpoints within the Api are found in the OpenAPI spec associated with the Api. - field :matched, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('matched') } } - # A set of values associated with a meta_data key. This field is only set on get requests. - field :meta_data, T.nilable(T::Hash[Symbol, T::Array[::String]]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meta_data') } } - - - sig { params(api_id: ::String, created_at: ::DateTime, description: ::String, updated_at: ::DateTime, version_id: ::String, workspace_id: ::String, matched: T.nilable(T::Boolean), meta_data: T.nilable(T::Hash[Symbol, T::Array[::String]])).void } - def initialize(api_id: nil, created_at: nil, description: nil, updated_at: nil, version_id: nil, workspace_id: nil, matched: nil, meta_data: nil) - @api_id = api_id - @created_at = created_at - @description = description - @updated_at = updated_at - @version_id = version_id - @workspace_id = workspace_id - @matched = matched - @meta_data = meta_data - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/api_input.rb b/lib/open_api_sdk/models/shared/api_input.rb deleted file mode 100644 index a7ed7034..00000000 --- a/lib/open_api_sdk/models/shared/api_input.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # An Api is representation of a API (a collection of API Endpoints) within the Speakeasy Platform. - class ApiInput < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of this Api. This is a human-readable name (subject to change). - field :api_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('api_id') } } - # A detailed description of the Api. - field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } - # The version ID of this Api. This is semantic version identifier. - field :version_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version_id') } } - # A set of values associated with a meta_data key. This field is only set on get requests. - field :meta_data, T.nilable(T::Hash[Symbol, T::Array[::String]]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meta_data') } } - - - sig { params(api_id: ::String, description: ::String, version_id: ::String, meta_data: T.nilable(T::Hash[Symbol, T::Array[::String]])).void } - def initialize(api_id: nil, description: nil, version_id: nil, meta_data: nil) - @api_id = api_id - @description = description - @version_id = version_id - @meta_data = meta_data - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/apiendpoint.rb b/lib/open_api_sdk/models/shared/apiendpoint.rb deleted file mode 100644 index 7de544c9..00000000 --- a/lib/open_api_sdk/models/shared/apiendpoint.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # An ApiEndpoint is a description of an Endpoint for an API. - class ApiEndpoint < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of this ApiEndpoint. This is a hash of the method and path. - field :api_endpoint_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('api_endpoint_id') } } - # The ID of the Api this ApiEndpoint belongs to. - field :api_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('api_id') } } - # Creation timestamp. - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # A detailed description of the ApiEndpoint. - field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } - # A human-readable name for the ApiEndpoint. - field :display_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_name') } } - # HTTP verb. - field :method, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('method') } } - # Path that handles this Api. - field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } - # Last update timestamp. - field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # The version ID of the Api this ApiEndpoint belongs to. - field :version_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version_id') } } - # The workspace ID this ApiEndpoint belongs to. - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - # Determines if the endpoint was found in the OpenAPI spec associated with the parent Api. - field :matched, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('matched') } } - - - sig { params(api_endpoint_id: ::String, api_id: ::String, created_at: ::DateTime, description: ::String, display_name: ::String, method: ::String, path: ::String, updated_at: ::DateTime, version_id: ::String, workspace_id: ::String, matched: T.nilable(T::Boolean)).void } - def initialize(api_endpoint_id: nil, api_id: nil, created_at: nil, description: nil, display_name: nil, method: nil, path: nil, updated_at: nil, version_id: nil, workspace_id: nil, matched: nil) - @api_endpoint_id = api_endpoint_id - @api_id = api_id - @created_at = created_at - @description = description - @display_name = display_name - @method = method - @path = path - @updated_at = updated_at - @version_id = version_id - @workspace_id = workspace_id - @matched = matched - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/apiendpoint_input.rb b/lib/open_api_sdk/models/shared/apiendpoint_input.rb deleted file mode 100644 index 0b60cd04..00000000 --- a/lib/open_api_sdk/models/shared/apiendpoint_input.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # An ApiEndpoint is a description of an Endpoint for an API. - class ApiEndpointInput < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of this ApiEndpoint. This is a hash of the method and path. - field :api_endpoint_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('api_endpoint_id') } } - # A detailed description of the ApiEndpoint. - field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } - # A human-readable name for the ApiEndpoint. - field :display_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_name') } } - # HTTP verb. - field :method, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('method') } } - # Path that handles this Api. - field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } - # The version ID of the Api this ApiEndpoint belongs to. - field :version_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version_id') } } - - - sig { params(api_endpoint_id: ::String, description: ::String, display_name: ::String, method: ::String, path: ::String, version_id: ::String).void } - def initialize(api_endpoint_id: nil, description: nil, display_name: nil, method: nil, path: nil, version_id: nil) - @api_endpoint_id = api_endpoint_id - @description = description - @display_name = display_name - @method = method - @path = path - @version_id = version_id - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/apikeydetails.rb b/lib/open_api_sdk/models/shared/apikeydetails.rb index f7d0df07..bbbc5112 100644 --- a/lib/open_api_sdk/models/shared/apikeydetails.rb +++ b/lib/open_api_sdk/models/shared/apikeydetails.rb @@ -5,40 +5,64 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class ApiKeyDetails < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class ApiKeyDetails + extend T::Sig + include Crystalline::MetadataFields - field :account_type_v2, ::OpenApiSDK::Shared::AccountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_type_v2'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::AccountType, false) } } + field :account_type_v2, Models::Shared::AccountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_type_v2'), 'decoder': Utils.enum_from_string(Models::Shared::AccountType, false) } } - field :enabled_features, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('enabled_features') } } + field :billing_add_ons, T::Array[Models::Shared::BillingAddOn], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_add_ons') } } - field :org_slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org_slug') } } + field :enabled_features, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('enabled_features') } } - field :telemetry_disabled, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('telemetry_disabled') } } + field :org_slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org_slug') } } - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } + field :telemetry_disabled, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('telemetry_disabled') } } + # Workspace creation timestamp. + field :workspace_created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - field :workspace_slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_slug') } } - # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. - field :feature_flags, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_flags') } } + field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - field :generation_access_unlimited, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generation_access_unlimited') } } + field :workspace_slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_slug') } } + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :feature_flags, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_flags') } } + field :generation_access_unlimited, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generation_access_unlimited') } } - sig { params(account_type_v2: ::OpenApiSDK::Shared::AccountType, enabled_features: T::Array[::String], org_slug: ::String, telemetry_disabled: T::Boolean, workspace_id: ::String, workspace_slug: ::String, feature_flags: T.nilable(T::Array[::String]), generation_access_unlimited: T.nilable(T::Boolean)).void } - def initialize(account_type_v2: nil, enabled_features: nil, org_slug: nil, telemetry_disabled: nil, workspace_id: nil, workspace_slug: nil, feature_flags: nil, generation_access_unlimited: nil) - @account_type_v2 = account_type_v2 - @enabled_features = enabled_features - @org_slug = org_slug - @telemetry_disabled = telemetry_disabled - @workspace_id = workspace_id - @workspace_slug = workspace_slug - @feature_flags = feature_flags - @generation_access_unlimited = generation_access_unlimited + + sig { params(account_type_v2: Models::Shared::AccountType, billing_add_ons: T::Array[Models::Shared::BillingAddOn], enabled_features: T::Array[::String], org_slug: ::String, telemetry_disabled: T::Boolean, workspace_created_at: ::DateTime, workspace_id: ::String, workspace_slug: ::String, feature_flags: T.nilable(T::Array[::String]), generation_access_unlimited: T.nilable(T::Boolean)).void } + def initialize(account_type_v2: nil, billing_add_ons: nil, enabled_features: nil, org_slug: nil, telemetry_disabled: nil, workspace_created_at: nil, workspace_id: nil, workspace_slug: nil, feature_flags: nil, generation_access_unlimited: nil) + @account_type_v2 = account_type_v2 + @billing_add_ons = billing_add_ons + @enabled_features = enabled_features + @org_slug = org_slug + @telemetry_disabled = telemetry_disabled + @workspace_created_at = workspace_created_at + @workspace_id = workspace_id + @workspace_slug = workspace_slug + @feature_flags = feature_flags + @generation_access_unlimited = generation_access_unlimited + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @account_type_v2 == other.account_type_v2 + return false unless @billing_add_ons == other.billing_add_ons + return false unless @enabled_features == other.enabled_features + return false unless @org_slug == other.org_slug + return false unless @telemetry_disabled == other.telemetry_disabled + return false unless @workspace_created_at == other.workspace_created_at + return false unless @workspace_id == other.workspace_id + return false unless @workspace_slug == other.workspace_slug + return false unless @feature_flags == other.feature_flags + return false unless @generation_access_unlimited == other.generation_access_unlimited + true + end end end end diff --git a/lib/open_api_sdk/models/shared/auth.rb b/lib/open_api_sdk/models/shared/auth.rb index a62762de..13bf4e3f 100644 --- a/lib/open_api_sdk/models/shared/auth.rb +++ b/lib/open_api_sdk/models/shared/auth.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class Auth < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class Auth + extend T::Sig + include Crystalline::MetadataFields - field :header, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('header') } } + field :header, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('header') } } - field :secret, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('secret') } } + field :secret, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('secret') } } - sig { params(header: ::String, secret: ::String).void } - def initialize(header: nil, secret: nil) - @header = header - @secret = secret + sig { params(header: ::String, secret: ::String).void } + def initialize(header: nil, secret: nil) + @header = header + @secret = secret + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @header == other.header + return false unless @secret == other.secret + true + end end end end diff --git a/lib/open_api_sdk/models/shared/billingaddon.rb b/lib/open_api_sdk/models/shared/billingaddon.rb new file mode 100644 index 00000000..86fca1b2 --- /dev/null +++ b/lib/open_api_sdk/models/shared/billingaddon.rb @@ -0,0 +1,22 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BillingAddOn < T::Enum + enums do + WEBHOOKS = new('webhooks') + SDK_TESTING = new('sdk_testing') + CUSTOM_CODE_REGIONS = new('custom_code_regions') + SNIPPET_AI = new('snippet_ai') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/boundedrequest.rb b/lib/open_api_sdk/models/shared/boundedrequest.rb deleted file mode 100644 index a056b20b..00000000 --- a/lib/open_api_sdk/models/shared/boundedrequest.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # A BoundedRequest is a request that has been logged by the Speakeasy without the contents of the request. - class BoundedRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the ApiEndpoint this request was made to. - field :api_endpoint_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('api_endpoint_id') } } - # The ID of the Api this request was made to. - field :api_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('api_id') } } - # Creation timestamp. - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # The ID of the customer that made this request. - field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } - # The latency of the request. - field :latency, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('latency') } } - # HTTP verb. - field :method, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('method') } } - # The path of the request. - field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } - # The time the request finished. - field :request_finish_time, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('request_finish_time'), 'decoder': Utils.datetime_from_iso_format(false) } } - # The ID of this request. - field :request_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('request_id') } } - # The time the request was made. - field :request_start_time, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('request_start_time'), 'decoder': Utils.datetime_from_iso_format(false) } } - # The status code of the request. - field :status, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status') } } - # The version ID of the Api this request was made to. - field :version_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version_id') } } - # The workspace ID this request was made to. - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - # Metadata associated with this request - field :metadata, T.nilable(T::Array[::OpenApiSDK::Shared::RequestMetadata]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } - - - sig { params(api_endpoint_id: ::String, api_id: ::String, created_at: ::DateTime, customer_id: ::String, latency: ::Integer, method: ::String, path: ::String, request_finish_time: ::DateTime, request_id: ::String, request_start_time: ::DateTime, status: ::Integer, version_id: ::String, workspace_id: ::String, metadata: T.nilable(T::Array[::OpenApiSDK::Shared::RequestMetadata])).void } - def initialize(api_endpoint_id: nil, api_id: nil, created_at: nil, customer_id: nil, latency: nil, method: nil, path: nil, request_finish_time: nil, request_id: nil, request_start_time: nil, status: nil, version_id: nil, workspace_id: nil, metadata: nil) - @api_endpoint_id = api_endpoint_id - @api_id = api_id - @created_at = created_at - @customer_id = customer_id - @latency = latency - @method = method - @path = path - @request_finish_time = request_finish_time - @request_id = request_id - @request_start_time = request_start_time - @status = status - @version_id = version_id - @workspace_id = workspace_id - @metadata = metadata - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/claims.rb b/lib/open_api_sdk/models/shared/claims.rb index cfd13477..86228e55 100644 --- a/lib/open_api_sdk/models/shared/claims.rb +++ b/lib/open_api_sdk/models/shared/claims.rb @@ -5,16 +5,24 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class Claims < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class Claims + extend T::Sig + include Crystalline::MetadataFields - - def initialize; end + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end end end end diff --git a/lib/open_api_sdk/models/shared/clievent.rb b/lib/open_api_sdk/models/shared/clievent.rb index e8117419..1607be5b 100644 --- a/lib/open_api_sdk/models/shared/clievent.rb +++ b/lib/open_api_sdk/models/shared/clievent.rb @@ -5,250 +5,352 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class CliEvent < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class CliEvent + extend T::Sig + include Crystalline::MetadataFields - # Timestamp when the event was created in the database. - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # Unique identifier for each execution of the CLI. - field :execution_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('execution_id') } } - # Unique identifier for each event. - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - # Type of interaction. - field :interaction_type, ::OpenApiSDK::Shared::InteractionType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('interaction_type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::InteractionType, false) } } - # Timestamp when the event started, in local time. - field :local_started_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('local_started_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # Identifier of the Speakeasy API key. - field :speakeasy_api_key_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('speakeasy_api_key_name') } } - # Version of the Speakeasy CLI. - field :speakeasy_version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('speakeasy_version') } } - # Indicates whether the event was successful. - field :success, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success') } } - # Identifier of the workspace. - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - # Remote commit ID. - field :commit_head, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('commit_head') } } - # Name of the CI environment. - field :continuous_integration_environment, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('continuous_integration_environment') } } - # Duration of the event in milliseconds. - field :duration_ms, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_ms') } } - # Error message if the event was not successful. - field :error, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } - # Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) - field :generate_bump_type, T.nilable(::OpenApiSDK::Shared::GenerateBumpType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_bump_type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::GenerateBumpType, true) } } - # Checksum of the configuration file (post generation) - field :generate_config_post_checksum, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_post_checksum') } } - # Rendered configuration file (post generation) - field :generate_config_post_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_post_raw') } } - # The version of the customer's SDK that we just generated - field :generate_config_post_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_post_version') } } - # Checksum of the configuration file (prior to generation) - field :generate_config_pre_checksum, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_pre_checksum') } } - # Rendered configuration file (prior to generation) - field :generate_config_pre_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_pre_raw') } } - # The version of the customer's SDK before we generated - field :generate_config_pre_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_pre_version') } } - # Eligible feature set during generation - field :generate_eligible_features, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_eligible_features') } } - # gen.lock ID (expected to be a uuid). - field :generate_gen_lock_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_id') } } - # Features post generation - field :generate_gen_lock_post_features, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_post_features') } } - # Blob digest of the Previous Generation - field :generate_gen_lock_pre_blob_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_blob_digest') } } - # Checksum of the Previous Rendered OpenAPI document (prior to generation, via gen lock) - field :generate_gen_lock_pre_doc_checksum, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_doc_checksum') } } - # info.Version of the Previous Rendered OpenAPI document (prior to generation, via gen lock) - field :generate_gen_lock_pre_doc_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_doc_version') } } - # Features prior to generation - field :generate_gen_lock_pre_features, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_features') } } - # Namespace name of the Previous Generation - field :generate_gen_lock_pre_namespace_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_namespace_name') } } - # Revision digest of the Previous Generation - field :generate_gen_lock_pre_revision_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_revision_digest') } } - # Artifact version for the Previous Generation - field :generate_gen_lock_pre_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_version') } } - # The number of operations ignored in generation. - field :generate_number_of_operations_ignored, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_number_of_operations_ignored') } } - # The number of operations used in generation. - field :generate_number_of_operations_used, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_number_of_operations_used') } } - # Indicates whether tests were output. - field :generate_output_tests, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_output_tests') } } - # Indicates whether the target was considered published. - field :generate_published, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_published') } } - # Expected Repo URL, for use in documentation generation. - field :generate_repo_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_repo_url') } } - # The target of the event. - field :generate_target, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target') } } - # The workflow name of the target. - field :generate_target_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target_name') } } - # The version of the target. - field :generate_target_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target_version') } } - # Version of the generation logic used. - field :generate_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_version') } } - # GitHub organization of the action. - field :gh_action_organization, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_organization') } } - # GitHub Action ref value. - field :gh_action_ref, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_ref') } } - # GitHub repository of the action. - field :gh_action_repository, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_repository') } } - # Link to the GitHub action run. - field :gh_action_run_link, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_run_link') } } - # Version of the GitHub action. - field :gh_action_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_version') } } - # Current working directory relative to the git root. - field :git_relative_cwd, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_relative_cwd') } } - # Default owner for git remote. - field :git_remote_default_owner, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_remote_default_owner') } } - # Default repository name for git remote. - field :git_remote_default_repo, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_remote_default_repo') } } - # User email from git configuration. - field :git_user_email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_user_email') } } - # User's name from git configuration. (not GitHub username) - field :git_user_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_user_name') } } - # Remote hostname. - field :hostname, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('hostname') } } - # The last step of the event. - field :last_step, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_step') } } - # The checksum of the lint report. - field :lint_report_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lint_report_digest') } } - # The number of errors in the lint report. - field :lint_report_error_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lint_report_error_count') } } - # The number of info messages in the lint report. - field :lint_report_info_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lint_report_info_count') } } - # The number of warnings in the lint report. - field :lint_report_warning_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lint_report_warning_count') } } - # Timestamp when the event completed, in local time. - field :local_completed_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('local_completed_at'), 'decoder': Utils.datetime_from_iso_format(true) } } - # Checksum of the currently Rendered OpenAPI document. - field :management_doc_checksum, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('management_doc_checksum') } } - # Version taken from info.version field of the Rendered OpenAPI document. - field :management_doc_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('management_doc_version') } } - # Mermaid diagram - field :mermaid_diagram, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mermaid_diagram') } } - # The blob digest of the base source. - field :openapi_diff_base_source_blob_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_base_source_blob_digest') } } - # The namespace name of the base source. - field :openapi_diff_base_source_namespace_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_base_source_namespace_name') } } - # The revision digest of the base source. - field :openapi_diff_base_source_revision_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_base_source_revision_digest') } } - # The number of breaking changes in the openapi diff report. - field :openapi_diff_breaking_changes_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_breaking_changes_count') } } - # Bump type of the lock file (calculated semver delta, or a custom change (manual release)) - field :openapi_diff_bump_type, T.nilable(::OpenApiSDK::Shared::OpenapiDiffBumpType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_bump_type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::OpenapiDiffBumpType, true) } } - # The checksum of the openapi diff report. - field :openapi_diff_report_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_report_digest') } } - # Name of the published package. - field :publish_package_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_name') } } - # Name of the registry where the package was published. - field :publish_package_registry_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_registry_name') } } - # URL of the published package. - field :publish_package_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_url') } } - # Version of the published package. - field :publish_package_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_version') } } - # Full CLI command. - field :raw_command, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('raw_command') } } - # Label of the git repository. - field :repo_label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo_label') } } - # The blob digest of the source. - field :source_blob_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_blob_digest') } } - # The namespace name of the source. - field :source_namespace_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_namespace_name') } } - # The revision digest of the source. - field :source_revision_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_revision_digest') } } - # Workflow lock file (post execution) - field :workflow_lock_post_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_lock_post_raw') } } - # Workflow lock file (prior to execution) - field :workflow_lock_pre_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_lock_pre_raw') } } - # Workflow file (post execution) - field :workflow_post_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_post_raw') } } - # Workflow file (prior to execution) - field :workflow_pre_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_pre_raw') } } + # Timestamp when the event was created in the database. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Unique identifier for each execution of the CLI. + field :execution_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('execution_id') } } + # Unique identifier for each event. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Type of interaction. + field :interaction_type, Models::Shared::InteractionType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('interaction_type'), 'decoder': Utils.enum_from_string(Models::Shared::InteractionType, false) } } + # Timestamp when the event started, in local time. + field :local_started_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('local_started_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Identifier of the Speakeasy API key. + field :speakeasy_api_key_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('speakeasy_api_key_name') } } + # Version of the Speakeasy CLI. + field :speakeasy_version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('speakeasy_version') } } + # Indicates whether the event was successful. + field :success, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success') } } + # Identifier of the workspace. + field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } + # Remote commit ID. + field :commit_head, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('commit_head') } } + # Name of the CI environment. + field :continuous_integration_environment, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('continuous_integration_environment') } } + # Duration of the event in milliseconds. + field :duration_ms, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_ms') } } + # Error message if the event was not successful. + field :error, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } + # Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) + field :generate_bump_type, T.nilable(Models::Shared::GenerateBumpType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_bump_type'), 'decoder': Utils.enum_from_string(Models::Shared::GenerateBumpType, true) } } + # Checksum of the configuration file (post generation) + field :generate_config_post_checksum, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_post_checksum') } } + # Rendered configuration file (post generation) + field :generate_config_post_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_post_raw') } } + # The version of the customer's SDK that we just generated + field :generate_config_post_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_post_version') } } + # Checksum of the configuration file (prior to generation) + field :generate_config_pre_checksum, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_pre_checksum') } } + # Rendered configuration file (prior to generation) + field :generate_config_pre_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_pre_raw') } } + # The version of the customer's SDK before we generated + field :generate_config_pre_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_pre_version') } } + # Eligible feature set during generation + field :generate_eligible_features, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_eligible_features') } } + # gen.lock ID (expected to be a uuid). + field :generate_gen_lock_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_id') } } + # Features post generation + field :generate_gen_lock_post_features, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_post_features') } } + # Blob digest of the Previous Generation + field :generate_gen_lock_pre_blob_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_blob_digest') } } + # Checksum of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + field :generate_gen_lock_pre_doc_checksum, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_doc_checksum') } } + # info.Version of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + field :generate_gen_lock_pre_doc_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_doc_version') } } + # Features prior to generation + field :generate_gen_lock_pre_features, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_features') } } + # Namespace name of the Previous Generation + field :generate_gen_lock_pre_namespace_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_namespace_name') } } + # Revision digest of the Previous Generation + field :generate_gen_lock_pre_revision_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_revision_digest') } } + # Artifact version for the Previous Generation + field :generate_gen_lock_pre_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_version') } } + # The number of operations ignored in generation. + field :generate_number_of_operations_ignored, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_number_of_operations_ignored') } } + # The number of operations used in generation. + field :generate_number_of_operations_used, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_number_of_operations_used') } } + # The number of terraform resources used in generation. + field :generate_number_of_terraform_resources, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_number_of_terraform_resources') } } + # Indicates whether tests were output. + field :generate_output_tests, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_output_tests') } } + # Indicates whether the target was considered published. + field :generate_published, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_published') } } + # Expected Repo URL, for use in documentation generation. + field :generate_repo_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_repo_url') } } + # The target of the event. + field :generate_target, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target') } } + # The workflow name of the target. + field :generate_target_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target_name') } } + # The version of the target. + field :generate_target_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target_version') } } + # Version of the generation logic used. + field :generate_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_version') } } + # GitHub organization of the action. + field :gh_action_organization, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_organization') } } + # GitHub Action ref value. + field :gh_action_ref, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_ref') } } + # GitHub repository of the action. + field :gh_action_repository, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_repository') } } + # Link to the GitHub action run. + field :gh_action_run_link, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_run_link') } } + # Version of the GitHub action. + field :gh_action_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_version') } } + # Whether or not changes were committed from generation in the Github Action. + field :gh_changes_committed, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_changes_committed') } } + # The reference to a created pull request URL. + field :gh_pull_request, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_pull_request') } } + # Current working directory relative to the git root. + field :git_relative_cwd, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_relative_cwd') } } + # Default owner for git remote. + field :git_remote_default_owner, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_remote_default_owner') } } + # Default repository name for git remote. + field :git_remote_default_repo, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_remote_default_repo') } } + # User email from git configuration. + field :git_user_email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_user_email') } } + # User's name from git configuration. (not GitHub username) + field :git_user_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_user_name') } } + # Remote hostname. + field :hostname, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('hostname') } } + # The last step of the event. + field :last_step, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_step') } } + # The checksum of the lint report. + field :lint_report_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lint_report_digest') } } + # The number of errors in the lint report. + field :lint_report_error_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lint_report_error_count') } } + # The number of info messages in the lint report. + field :lint_report_info_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lint_report_info_count') } } + # The number of warnings in the lint report. + field :lint_report_warning_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lint_report_warning_count') } } + # Timestamp when the event completed, in local time. + field :local_completed_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('local_completed_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + # Checksum of the currently Rendered OpenAPI document. + field :management_doc_checksum, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('management_doc_checksum') } } + # Version taken from info.version field of the Rendered OpenAPI document. + field :management_doc_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('management_doc_version') } } + # Mermaid diagram + field :mermaid_diagram, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mermaid_diagram') } } + # The blob digest of the base source. + field :openapi_diff_base_source_blob_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_base_source_blob_digest') } } + # The namespace name of the base source. + field :openapi_diff_base_source_namespace_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_base_source_namespace_name') } } + # The revision digest of the base source. + field :openapi_diff_base_source_revision_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_base_source_revision_digest') } } + # The number of breaking changes in the openapi diff report. + field :openapi_diff_breaking_changes_count, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_breaking_changes_count') } } + # Bump type of the lock file (calculated semver delta, or a custom change (manual release)) + field :openapi_diff_bump_type, T.nilable(Models::Shared::OpenapiDiffBumpType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_bump_type'), 'decoder': Utils.enum_from_string(Models::Shared::OpenapiDiffBumpType, true) } } + # The checksum of the openapi diff report. + field :openapi_diff_report_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('openapi_diff_report_digest') } } + # Name of the published package. + field :publish_package_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_name') } } + # Name of the registry where the package was published. + field :publish_package_registry_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_registry_name') } } + # URL of the published package. + field :publish_package_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_url') } } + # Version of the published package. + field :publish_package_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_version') } } + # Full CLI command. + field :raw_command, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('raw_command') } } + # Label of the git repository. + field :repo_label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo_label') } } + # The blob digest of the source. + field :source_blob_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_blob_digest') } } + # The namespace name of the source. + field :source_namespace_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_namespace_name') } } + # The revision digest of the source. + field :source_revision_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_revision_digest') } } + # The raw test report xml + field :test_report_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('test_report_raw') } } + # Workflow lock file (post execution) + field :workflow_lock_post_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_lock_post_raw') } } + # Workflow lock file (prior to execution) + field :workflow_lock_pre_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_lock_pre_raw') } } + # Workflow file (post execution) + field :workflow_post_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_post_raw') } } + # Workflow file (prior to execution) + field :workflow_pre_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_pre_raw') } } - sig { params(created_at: ::DateTime, execution_id: ::String, id: ::String, interaction_type: ::OpenApiSDK::Shared::InteractionType, local_started_at: ::DateTime, speakeasy_api_key_name: ::String, speakeasy_version: ::String, success: T::Boolean, workspace_id: ::String, commit_head: T.nilable(::String), continuous_integration_environment: T.nilable(::String), duration_ms: T.nilable(::Integer), error: T.nilable(::String), generate_bump_type: T.nilable(::OpenApiSDK::Shared::GenerateBumpType), generate_config_post_checksum: T.nilable(::String), generate_config_post_raw: T.nilable(::String), generate_config_post_version: T.nilable(::String), generate_config_pre_checksum: T.nilable(::String), generate_config_pre_raw: T.nilable(::String), generate_config_pre_version: T.nilable(::String), generate_eligible_features: T.nilable(::String), generate_gen_lock_id: T.nilable(::String), generate_gen_lock_post_features: T.nilable(::String), generate_gen_lock_pre_blob_digest: T.nilable(::String), generate_gen_lock_pre_doc_checksum: T.nilable(::String), generate_gen_lock_pre_doc_version: T.nilable(::String), generate_gen_lock_pre_features: T.nilable(::String), generate_gen_lock_pre_namespace_name: T.nilable(::String), generate_gen_lock_pre_revision_digest: T.nilable(::String), generate_gen_lock_pre_version: T.nilable(::String), generate_number_of_operations_ignored: T.nilable(::Integer), generate_number_of_operations_used: T.nilable(::Integer), generate_output_tests: T.nilable(T::Boolean), generate_published: T.nilable(T::Boolean), generate_repo_url: T.nilable(::String), generate_target: T.nilable(::String), generate_target_name: T.nilable(::String), generate_target_version: T.nilable(::String), generate_version: T.nilable(::String), gh_action_organization: T.nilable(::String), gh_action_ref: T.nilable(::String), gh_action_repository: T.nilable(::String), gh_action_run_link: T.nilable(::String), gh_action_version: T.nilable(::String), git_relative_cwd: T.nilable(::String), git_remote_default_owner: T.nilable(::String), git_remote_default_repo: T.nilable(::String), git_user_email: T.nilable(::String), git_user_name: T.nilable(::String), hostname: T.nilable(::String), last_step: T.nilable(::String), lint_report_digest: T.nilable(::String), lint_report_error_count: T.nilable(::Integer), lint_report_info_count: T.nilable(::Integer), lint_report_warning_count: T.nilable(::Integer), local_completed_at: T.nilable(::DateTime), management_doc_checksum: T.nilable(::String), management_doc_version: T.nilable(::String), mermaid_diagram: T.nilable(::String), openapi_diff_base_source_blob_digest: T.nilable(::String), openapi_diff_base_source_namespace_name: T.nilable(::String), openapi_diff_base_source_revision_digest: T.nilable(::String), openapi_diff_breaking_changes_count: T.nilable(::Integer), openapi_diff_bump_type: T.nilable(::OpenApiSDK::Shared::OpenapiDiffBumpType), openapi_diff_report_digest: T.nilable(::String), publish_package_name: T.nilable(::String), publish_package_registry_name: T.nilable(::String), publish_package_url: T.nilable(::String), publish_package_version: T.nilable(::String), raw_command: T.nilable(::String), repo_label: T.nilable(::String), source_blob_digest: T.nilable(::String), source_namespace_name: T.nilable(::String), source_revision_digest: T.nilable(::String), workflow_lock_post_raw: T.nilable(::String), workflow_lock_pre_raw: T.nilable(::String), workflow_post_raw: T.nilable(::String), workflow_pre_raw: T.nilable(::String)).void } - def initialize(created_at: nil, execution_id: nil, id: nil, interaction_type: nil, local_started_at: nil, speakeasy_api_key_name: nil, speakeasy_version: nil, success: nil, workspace_id: nil, commit_head: nil, continuous_integration_environment: nil, duration_ms: nil, error: nil, generate_bump_type: nil, generate_config_post_checksum: nil, generate_config_post_raw: nil, generate_config_post_version: nil, generate_config_pre_checksum: nil, generate_config_pre_raw: nil, generate_config_pre_version: nil, generate_eligible_features: nil, generate_gen_lock_id: nil, generate_gen_lock_post_features: nil, generate_gen_lock_pre_blob_digest: nil, generate_gen_lock_pre_doc_checksum: nil, generate_gen_lock_pre_doc_version: nil, generate_gen_lock_pre_features: nil, generate_gen_lock_pre_namespace_name: nil, generate_gen_lock_pre_revision_digest: nil, generate_gen_lock_pre_version: nil, generate_number_of_operations_ignored: nil, generate_number_of_operations_used: nil, generate_output_tests: nil, generate_published: nil, generate_repo_url: nil, generate_target: nil, generate_target_name: nil, generate_target_version: nil, generate_version: nil, gh_action_organization: nil, gh_action_ref: nil, gh_action_repository: nil, gh_action_run_link: nil, gh_action_version: nil, git_relative_cwd: nil, git_remote_default_owner: nil, git_remote_default_repo: nil, git_user_email: nil, git_user_name: nil, hostname: nil, last_step: nil, lint_report_digest: nil, lint_report_error_count: nil, lint_report_info_count: nil, lint_report_warning_count: nil, local_completed_at: nil, management_doc_checksum: nil, management_doc_version: nil, mermaid_diagram: nil, openapi_diff_base_source_blob_digest: nil, openapi_diff_base_source_namespace_name: nil, openapi_diff_base_source_revision_digest: nil, openapi_diff_breaking_changes_count: nil, openapi_diff_bump_type: nil, openapi_diff_report_digest: nil, publish_package_name: nil, publish_package_registry_name: nil, publish_package_url: nil, publish_package_version: nil, raw_command: nil, repo_label: nil, source_blob_digest: nil, source_namespace_name: nil, source_revision_digest: nil, workflow_lock_post_raw: nil, workflow_lock_pre_raw: nil, workflow_post_raw: nil, workflow_pre_raw: nil) - @created_at = created_at - @execution_id = execution_id - @id = id - @interaction_type = interaction_type - @local_started_at = local_started_at - @speakeasy_api_key_name = speakeasy_api_key_name - @speakeasy_version = speakeasy_version - @success = success - @workspace_id = workspace_id - @commit_head = commit_head - @continuous_integration_environment = continuous_integration_environment - @duration_ms = duration_ms - @error = error - @generate_bump_type = generate_bump_type - @generate_config_post_checksum = generate_config_post_checksum - @generate_config_post_raw = generate_config_post_raw - @generate_config_post_version = generate_config_post_version - @generate_config_pre_checksum = generate_config_pre_checksum - @generate_config_pre_raw = generate_config_pre_raw - @generate_config_pre_version = generate_config_pre_version - @generate_eligible_features = generate_eligible_features - @generate_gen_lock_id = generate_gen_lock_id - @generate_gen_lock_post_features = generate_gen_lock_post_features - @generate_gen_lock_pre_blob_digest = generate_gen_lock_pre_blob_digest - @generate_gen_lock_pre_doc_checksum = generate_gen_lock_pre_doc_checksum - @generate_gen_lock_pre_doc_version = generate_gen_lock_pre_doc_version - @generate_gen_lock_pre_features = generate_gen_lock_pre_features - @generate_gen_lock_pre_namespace_name = generate_gen_lock_pre_namespace_name - @generate_gen_lock_pre_revision_digest = generate_gen_lock_pre_revision_digest - @generate_gen_lock_pre_version = generate_gen_lock_pre_version - @generate_number_of_operations_ignored = generate_number_of_operations_ignored - @generate_number_of_operations_used = generate_number_of_operations_used - @generate_output_tests = generate_output_tests - @generate_published = generate_published - @generate_repo_url = generate_repo_url - @generate_target = generate_target - @generate_target_name = generate_target_name - @generate_target_version = generate_target_version - @generate_version = generate_version - @gh_action_organization = gh_action_organization - @gh_action_ref = gh_action_ref - @gh_action_repository = gh_action_repository - @gh_action_run_link = gh_action_run_link - @gh_action_version = gh_action_version - @git_relative_cwd = git_relative_cwd - @git_remote_default_owner = git_remote_default_owner - @git_remote_default_repo = git_remote_default_repo - @git_user_email = git_user_email - @git_user_name = git_user_name - @hostname = hostname - @last_step = last_step - @lint_report_digest = lint_report_digest - @lint_report_error_count = lint_report_error_count - @lint_report_info_count = lint_report_info_count - @lint_report_warning_count = lint_report_warning_count - @local_completed_at = local_completed_at - @management_doc_checksum = management_doc_checksum - @management_doc_version = management_doc_version - @mermaid_diagram = mermaid_diagram - @openapi_diff_base_source_blob_digest = openapi_diff_base_source_blob_digest - @openapi_diff_base_source_namespace_name = openapi_diff_base_source_namespace_name - @openapi_diff_base_source_revision_digest = openapi_diff_base_source_revision_digest - @openapi_diff_breaking_changes_count = openapi_diff_breaking_changes_count - @openapi_diff_bump_type = openapi_diff_bump_type - @openapi_diff_report_digest = openapi_diff_report_digest - @publish_package_name = publish_package_name - @publish_package_registry_name = publish_package_registry_name - @publish_package_url = publish_package_url - @publish_package_version = publish_package_version - @raw_command = raw_command - @repo_label = repo_label - @source_blob_digest = source_blob_digest - @source_namespace_name = source_namespace_name - @source_revision_digest = source_revision_digest - @workflow_lock_post_raw = workflow_lock_post_raw - @workflow_lock_pre_raw = workflow_lock_pre_raw - @workflow_post_raw = workflow_post_raw - @workflow_pre_raw = workflow_pre_raw + sig { params(created_at: ::DateTime, execution_id: ::String, id: ::String, interaction_type: Models::Shared::InteractionType, local_started_at: ::DateTime, speakeasy_api_key_name: ::String, speakeasy_version: ::String, success: T::Boolean, workspace_id: ::String, commit_head: T.nilable(::String), continuous_integration_environment: T.nilable(::String), duration_ms: T.nilable(::Integer), error: T.nilable(::String), generate_bump_type: T.nilable(Models::Shared::GenerateBumpType), generate_config_post_checksum: T.nilable(::String), generate_config_post_raw: T.nilable(::String), generate_config_post_version: T.nilable(::String), generate_config_pre_checksum: T.nilable(::String), generate_config_pre_raw: T.nilable(::String), generate_config_pre_version: T.nilable(::String), generate_eligible_features: T.nilable(::String), generate_gen_lock_id: T.nilable(::String), generate_gen_lock_post_features: T.nilable(::String), generate_gen_lock_pre_blob_digest: T.nilable(::String), generate_gen_lock_pre_doc_checksum: T.nilable(::String), generate_gen_lock_pre_doc_version: T.nilable(::String), generate_gen_lock_pre_features: T.nilable(::String), generate_gen_lock_pre_namespace_name: T.nilable(::String), generate_gen_lock_pre_revision_digest: T.nilable(::String), generate_gen_lock_pre_version: T.nilable(::String), generate_number_of_operations_ignored: T.nilable(::Integer), generate_number_of_operations_used: T.nilable(::Integer), generate_number_of_terraform_resources: T.nilable(::Integer), generate_output_tests: T.nilable(T::Boolean), generate_published: T.nilable(T::Boolean), generate_repo_url: T.nilable(::String), generate_target: T.nilable(::String), generate_target_name: T.nilable(::String), generate_target_version: T.nilable(::String), generate_version: T.nilable(::String), gh_action_organization: T.nilable(::String), gh_action_ref: T.nilable(::String), gh_action_repository: T.nilable(::String), gh_action_run_link: T.nilable(::String), gh_action_version: T.nilable(::String), gh_changes_committed: T.nilable(T::Boolean), gh_pull_request: T.nilable(::String), git_relative_cwd: T.nilable(::String), git_remote_default_owner: T.nilable(::String), git_remote_default_repo: T.nilable(::String), git_user_email: T.nilable(::String), git_user_name: T.nilable(::String), hostname: T.nilable(::String), last_step: T.nilable(::String), lint_report_digest: T.nilable(::String), lint_report_error_count: T.nilable(::Integer), lint_report_info_count: T.nilable(::Integer), lint_report_warning_count: T.nilable(::Integer), local_completed_at: T.nilable(::DateTime), management_doc_checksum: T.nilable(::String), management_doc_version: T.nilable(::String), mermaid_diagram: T.nilable(::String), openapi_diff_base_source_blob_digest: T.nilable(::String), openapi_diff_base_source_namespace_name: T.nilable(::String), openapi_diff_base_source_revision_digest: T.nilable(::String), openapi_diff_breaking_changes_count: T.nilable(::Integer), openapi_diff_bump_type: T.nilable(Models::Shared::OpenapiDiffBumpType), openapi_diff_report_digest: T.nilable(::String), publish_package_name: T.nilable(::String), publish_package_registry_name: T.nilable(::String), publish_package_url: T.nilable(::String), publish_package_version: T.nilable(::String), raw_command: T.nilable(::String), repo_label: T.nilable(::String), source_blob_digest: T.nilable(::String), source_namespace_name: T.nilable(::String), source_revision_digest: T.nilable(::String), test_report_raw: T.nilable(::String), workflow_lock_post_raw: T.nilable(::String), workflow_lock_pre_raw: T.nilable(::String), workflow_post_raw: T.nilable(::String), workflow_pre_raw: T.nilable(::String)).void } + def initialize(created_at: nil, execution_id: nil, id: nil, interaction_type: nil, local_started_at: nil, speakeasy_api_key_name: nil, speakeasy_version: nil, success: nil, workspace_id: nil, commit_head: nil, continuous_integration_environment: nil, duration_ms: nil, error: nil, generate_bump_type: nil, generate_config_post_checksum: nil, generate_config_post_raw: nil, generate_config_post_version: nil, generate_config_pre_checksum: nil, generate_config_pre_raw: nil, generate_config_pre_version: nil, generate_eligible_features: nil, generate_gen_lock_id: nil, generate_gen_lock_post_features: nil, generate_gen_lock_pre_blob_digest: nil, generate_gen_lock_pre_doc_checksum: nil, generate_gen_lock_pre_doc_version: nil, generate_gen_lock_pre_features: nil, generate_gen_lock_pre_namespace_name: nil, generate_gen_lock_pre_revision_digest: nil, generate_gen_lock_pre_version: nil, generate_number_of_operations_ignored: nil, generate_number_of_operations_used: nil, generate_number_of_terraform_resources: nil, generate_output_tests: nil, generate_published: nil, generate_repo_url: nil, generate_target: nil, generate_target_name: nil, generate_target_version: nil, generate_version: nil, gh_action_organization: nil, gh_action_ref: nil, gh_action_repository: nil, gh_action_run_link: nil, gh_action_version: nil, gh_changes_committed: nil, gh_pull_request: nil, git_relative_cwd: nil, git_remote_default_owner: nil, git_remote_default_repo: nil, git_user_email: nil, git_user_name: nil, hostname: nil, last_step: nil, lint_report_digest: nil, lint_report_error_count: nil, lint_report_info_count: nil, lint_report_warning_count: nil, local_completed_at: nil, management_doc_checksum: nil, management_doc_version: nil, mermaid_diagram: nil, openapi_diff_base_source_blob_digest: nil, openapi_diff_base_source_namespace_name: nil, openapi_diff_base_source_revision_digest: nil, openapi_diff_breaking_changes_count: nil, openapi_diff_bump_type: nil, openapi_diff_report_digest: nil, publish_package_name: nil, publish_package_registry_name: nil, publish_package_url: nil, publish_package_version: nil, raw_command: nil, repo_label: nil, source_blob_digest: nil, source_namespace_name: nil, source_revision_digest: nil, test_report_raw: nil, workflow_lock_post_raw: nil, workflow_lock_pre_raw: nil, workflow_post_raw: nil, workflow_pre_raw: nil) + @created_at = created_at + @execution_id = execution_id + @id = id + @interaction_type = interaction_type + @local_started_at = local_started_at + @speakeasy_api_key_name = speakeasy_api_key_name + @speakeasy_version = speakeasy_version + @success = success + @workspace_id = workspace_id + @commit_head = commit_head + @continuous_integration_environment = continuous_integration_environment + @duration_ms = duration_ms + @error = error + @generate_bump_type = generate_bump_type + @generate_config_post_checksum = generate_config_post_checksum + @generate_config_post_raw = generate_config_post_raw + @generate_config_post_version = generate_config_post_version + @generate_config_pre_checksum = generate_config_pre_checksum + @generate_config_pre_raw = generate_config_pre_raw + @generate_config_pre_version = generate_config_pre_version + @generate_eligible_features = generate_eligible_features + @generate_gen_lock_id = generate_gen_lock_id + @generate_gen_lock_post_features = generate_gen_lock_post_features + @generate_gen_lock_pre_blob_digest = generate_gen_lock_pre_blob_digest + @generate_gen_lock_pre_doc_checksum = generate_gen_lock_pre_doc_checksum + @generate_gen_lock_pre_doc_version = generate_gen_lock_pre_doc_version + @generate_gen_lock_pre_features = generate_gen_lock_pre_features + @generate_gen_lock_pre_namespace_name = generate_gen_lock_pre_namespace_name + @generate_gen_lock_pre_revision_digest = generate_gen_lock_pre_revision_digest + @generate_gen_lock_pre_version = generate_gen_lock_pre_version + @generate_number_of_operations_ignored = generate_number_of_operations_ignored + @generate_number_of_operations_used = generate_number_of_operations_used + @generate_number_of_terraform_resources = generate_number_of_terraform_resources + @generate_output_tests = generate_output_tests + @generate_published = generate_published + @generate_repo_url = generate_repo_url + @generate_target = generate_target + @generate_target_name = generate_target_name + @generate_target_version = generate_target_version + @generate_version = generate_version + @gh_action_organization = gh_action_organization + @gh_action_ref = gh_action_ref + @gh_action_repository = gh_action_repository + @gh_action_run_link = gh_action_run_link + @gh_action_version = gh_action_version + @gh_changes_committed = gh_changes_committed + @gh_pull_request = gh_pull_request + @git_relative_cwd = git_relative_cwd + @git_remote_default_owner = git_remote_default_owner + @git_remote_default_repo = git_remote_default_repo + @git_user_email = git_user_email + @git_user_name = git_user_name + @hostname = hostname + @last_step = last_step + @lint_report_digest = lint_report_digest + @lint_report_error_count = lint_report_error_count + @lint_report_info_count = lint_report_info_count + @lint_report_warning_count = lint_report_warning_count + @local_completed_at = local_completed_at + @management_doc_checksum = management_doc_checksum + @management_doc_version = management_doc_version + @mermaid_diagram = mermaid_diagram + @openapi_diff_base_source_blob_digest = openapi_diff_base_source_blob_digest + @openapi_diff_base_source_namespace_name = openapi_diff_base_source_namespace_name + @openapi_diff_base_source_revision_digest = openapi_diff_base_source_revision_digest + @openapi_diff_breaking_changes_count = openapi_diff_breaking_changes_count + @openapi_diff_bump_type = openapi_diff_bump_type + @openapi_diff_report_digest = openapi_diff_report_digest + @publish_package_name = publish_package_name + @publish_package_registry_name = publish_package_registry_name + @publish_package_url = publish_package_url + @publish_package_version = publish_package_version + @raw_command = raw_command + @repo_label = repo_label + @source_blob_digest = source_blob_digest + @source_namespace_name = source_namespace_name + @source_revision_digest = source_revision_digest + @test_report_raw = test_report_raw + @workflow_lock_post_raw = workflow_lock_post_raw + @workflow_lock_pre_raw = workflow_lock_pre_raw + @workflow_post_raw = workflow_post_raw + @workflow_pre_raw = workflow_pre_raw + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @execution_id == other.execution_id + return false unless @id == other.id + return false unless @interaction_type == other.interaction_type + return false unless @local_started_at == other.local_started_at + return false unless @speakeasy_api_key_name == other.speakeasy_api_key_name + return false unless @speakeasy_version == other.speakeasy_version + return false unless @success == other.success + return false unless @workspace_id == other.workspace_id + return false unless @commit_head == other.commit_head + return false unless @continuous_integration_environment == other.continuous_integration_environment + return false unless @duration_ms == other.duration_ms + return false unless @error == other.error + return false unless @generate_bump_type == other.generate_bump_type + return false unless @generate_config_post_checksum == other.generate_config_post_checksum + return false unless @generate_config_post_raw == other.generate_config_post_raw + return false unless @generate_config_post_version == other.generate_config_post_version + return false unless @generate_config_pre_checksum == other.generate_config_pre_checksum + return false unless @generate_config_pre_raw == other.generate_config_pre_raw + return false unless @generate_config_pre_version == other.generate_config_pre_version + return false unless @generate_eligible_features == other.generate_eligible_features + return false unless @generate_gen_lock_id == other.generate_gen_lock_id + return false unless @generate_gen_lock_post_features == other.generate_gen_lock_post_features + return false unless @generate_gen_lock_pre_blob_digest == other.generate_gen_lock_pre_blob_digest + return false unless @generate_gen_lock_pre_doc_checksum == other.generate_gen_lock_pre_doc_checksum + return false unless @generate_gen_lock_pre_doc_version == other.generate_gen_lock_pre_doc_version + return false unless @generate_gen_lock_pre_features == other.generate_gen_lock_pre_features + return false unless @generate_gen_lock_pre_namespace_name == other.generate_gen_lock_pre_namespace_name + return false unless @generate_gen_lock_pre_revision_digest == other.generate_gen_lock_pre_revision_digest + return false unless @generate_gen_lock_pre_version == other.generate_gen_lock_pre_version + return false unless @generate_number_of_operations_ignored == other.generate_number_of_operations_ignored + return false unless @generate_number_of_operations_used == other.generate_number_of_operations_used + return false unless @generate_number_of_terraform_resources == other.generate_number_of_terraform_resources + return false unless @generate_output_tests == other.generate_output_tests + return false unless @generate_published == other.generate_published + return false unless @generate_repo_url == other.generate_repo_url + return false unless @generate_target == other.generate_target + return false unless @generate_target_name == other.generate_target_name + return false unless @generate_target_version == other.generate_target_version + return false unless @generate_version == other.generate_version + return false unless @gh_action_organization == other.gh_action_organization + return false unless @gh_action_ref == other.gh_action_ref + return false unless @gh_action_repository == other.gh_action_repository + return false unless @gh_action_run_link == other.gh_action_run_link + return false unless @gh_action_version == other.gh_action_version + return false unless @gh_changes_committed == other.gh_changes_committed + return false unless @gh_pull_request == other.gh_pull_request + return false unless @git_relative_cwd == other.git_relative_cwd + return false unless @git_remote_default_owner == other.git_remote_default_owner + return false unless @git_remote_default_repo == other.git_remote_default_repo + return false unless @git_user_email == other.git_user_email + return false unless @git_user_name == other.git_user_name + return false unless @hostname == other.hostname + return false unless @last_step == other.last_step + return false unless @lint_report_digest == other.lint_report_digest + return false unless @lint_report_error_count == other.lint_report_error_count + return false unless @lint_report_info_count == other.lint_report_info_count + return false unless @lint_report_warning_count == other.lint_report_warning_count + return false unless @local_completed_at == other.local_completed_at + return false unless @management_doc_checksum == other.management_doc_checksum + return false unless @management_doc_version == other.management_doc_version + return false unless @mermaid_diagram == other.mermaid_diagram + return false unless @openapi_diff_base_source_blob_digest == other.openapi_diff_base_source_blob_digest + return false unless @openapi_diff_base_source_namespace_name == other.openapi_diff_base_source_namespace_name + return false unless @openapi_diff_base_source_revision_digest == other.openapi_diff_base_source_revision_digest + return false unless @openapi_diff_breaking_changes_count == other.openapi_diff_breaking_changes_count + return false unless @openapi_diff_bump_type == other.openapi_diff_bump_type + return false unless @openapi_diff_report_digest == other.openapi_diff_report_digest + return false unless @publish_package_name == other.publish_package_name + return false unless @publish_package_registry_name == other.publish_package_registry_name + return false unless @publish_package_url == other.publish_package_url + return false unless @publish_package_version == other.publish_package_version + return false unless @raw_command == other.raw_command + return false unless @repo_label == other.repo_label + return false unless @source_blob_digest == other.source_blob_digest + return false unless @source_namespace_name == other.source_namespace_name + return false unless @source_revision_digest == other.source_revision_digest + return false unless @test_report_raw == other.test_report_raw + return false unless @workflow_lock_post_raw == other.workflow_lock_post_raw + return false unless @workflow_lock_pre_raw == other.workflow_lock_pre_raw + return false unless @workflow_post_raw == other.workflow_post_raw + return false unless @workflow_pre_raw == other.workflow_pre_raw + true + end end end end diff --git a/lib/open_api_sdk/models/shared/codesampleschemainput.rb b/lib/open_api_sdk/models/shared/codesampleschemainput.rb new file mode 100644 index 00000000..bd1cf6a3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/codesampleschemainput.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CodeSampleSchemaInput + extend T::Sig + include Crystalline::MetadataFields + + # The language to generate code samples for + field :language, ::String, { 'multipart_form': { 'field_name': 'language' } } + # The OpenAPI file to be uploaded + field :schema_file, Models::Shared::SchemaFile, { 'multipart_form': { 'file': true, 'field_name': 'schema_file' } } + # A list of operations IDs to generate code samples for + field :operation_ids, T.nilable(T::Array[::String]), { 'multipart_form': { 'field_name': 'operation_ids' } } + # The name of the package + field :package_name, T.nilable(::String), { 'multipart_form': { 'field_name': 'package_name' } } + # The SDK class name + field :sdk_class_name, T.nilable(::String), { 'multipart_form': { 'field_name': 'sdk_class_name' } } + + + sig { params(language: ::String, schema_file: Models::Shared::SchemaFile, operation_ids: T.nilable(T::Array[::String]), package_name: T.nilable(::String), sdk_class_name: T.nilable(::String)).void } + def initialize(language: nil, schema_file: nil, operation_ids: nil, package_name: nil, sdk_class_name: nil) + @language = language + @schema_file = schema_file + @operation_ids = operation_ids + @package_name = package_name + @sdk_class_name = sdk_class_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @language == other.language + return false unless @schema_file == other.schema_file + return false unless @operation_ids == other.operation_ids + return false unless @package_name == other.package_name + return false unless @sdk_class_name == other.sdk_class_name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/codesamplesjobstatus.rb b/lib/open_api_sdk/models/shared/codesamplesjobstatus.rb new file mode 100644 index 00000000..607b2006 --- /dev/null +++ b/lib/open_api_sdk/models/shared/codesamplesjobstatus.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # CodeSamplesJobStatus - The current status of the job. Possible values are `pending` or `running`. + class CodeSamplesJobStatus < T::Enum + enums do + PENDING = new('pending') + RUNNING = new('running') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/composite_spec_metadata.rb b/lib/open_api_sdk/models/shared/composite_spec_metadata.rb new file mode 100644 index 00000000..e486eff3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/composite_spec_metadata.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CompositeSpecMetadata + extend T::Sig + include Crystalline::MetadataFields + + # The subscription ID for the remote source subscription, if applicable. This indicates that the namespace is created by a remote source and thus is composite. + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + + field :subscription_settings, Models::Shared::RemoteSourceSubscriptionSettings, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_settings') } } + + + sig { params(subscription_id: ::String, subscription_settings: Models::Shared::RemoteSourceSubscriptionSettings).void } + def initialize(subscription_id: nil, subscription_settings: nil) + @subscription_id = subscription_id + @subscription_settings = subscription_settings + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @subscription_id == other.subscription_id + return false unless @subscription_settings == other.subscription_settings + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/diagnostic.rb b/lib/open_api_sdk/models/shared/diagnostic.rb index 96d2e750..768902b4 100644 --- a/lib/open_api_sdk/models/shared/diagnostic.rb +++ b/lib/open_api_sdk/models/shared/diagnostic.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Shared - - - class Diagnostic < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Message describing the issue - field :message, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('message') } } - # Schema path to the issue - field :path, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } - # Issue type - field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } - # Help message for how to fix the issue - field :help_message, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('helpMessage') } } - - - sig { params(message: ::String, path: T::Array[::String], type: ::String, help_message: T.nilable(::String)).void } - def initialize(message: nil, path: nil, type: nil, help_message: nil) - @message = message - @path = path - @type = type - @help_message = help_message + module Models + module Shared + + + class Diagnostic + extend T::Sig + include Crystalline::MetadataFields + + # Message describing the issue + field :message, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('message') } } + # Schema path to the issue + field :path, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } + # Issue type + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Help message for how to fix the issue + field :help_message, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('helpMessage') } } + + + sig { params(message: ::String, path: T::Array[::String], type: ::String, help_message: T.nilable(::String)).void } + def initialize(message: nil, path: nil, type: nil, help_message: nil) + @message = message + @path = path + @type = type + @help_message = help_message + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @message == other.message + return false unless @path == other.path + return false unless @type == other.type + return false unless @help_message == other.help_message + true + end end end end diff --git a/lib/open_api_sdk/models/shared/embedaccesstokenresponse.rb b/lib/open_api_sdk/models/shared/embedaccesstokenresponse.rb deleted file mode 100644 index d35eeec5..00000000 --- a/lib/open_api_sdk/models/shared/embedaccesstokenresponse.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # An EmbedAccessTokenResponse contains a token that can be used to embed a Speakeasy dashboard. - class EmbedAccessTokenResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :access_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('access_token') } } - - - sig { params(access_token: ::String).void } - def initialize(access_token: nil) - @access_token = access_token - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/embedtoken.rb b/lib/open_api_sdk/models/shared/embedtoken.rb deleted file mode 100644 index 479a9d00..00000000 --- a/lib/open_api_sdk/models/shared/embedtoken.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # A representation of an embed token granted for working with Speakeasy components. - class EmbedToken < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Creation timestamp. - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # The ID of the user that created this token. - field :created_by, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_by') } } - # A detailed description of the EmbedToken. - field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } - # The time this token expires. - field :expires_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # The filters applied to this token. - field :filters, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('filters') } } - # The ID of this EmbedToken. - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - # The workspace ID this token belongs to. - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - # The last time this token was used. - field :last_used, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_used'), 'decoder': Utils.datetime_from_iso_format(true) } } - # The time this token was revoked. - field :revoked_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoked_at'), 'decoder': Utils.datetime_from_iso_format(true) } } - # The ID of the user that revoked this token. - field :revoked_by, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoked_by') } } - - - sig { params(created_at: ::DateTime, created_by: ::String, description: ::String, expires_at: ::DateTime, filters: ::String, id: ::String, workspace_id: ::String, last_used: T.nilable(::DateTime), revoked_at: T.nilable(::DateTime), revoked_by: T.nilable(::String)).void } - def initialize(created_at: nil, created_by: nil, description: nil, expires_at: nil, filters: nil, id: nil, workspace_id: nil, last_used: nil, revoked_at: nil, revoked_by: nil) - @created_at = created_at - @created_by = created_by - @description = description - @expires_at = expires_at - @filters = filters - @id = id - @workspace_id = workspace_id - @last_used = last_used - @revoked_at = revoked_at - @revoked_by = revoked_by - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/error.rb b/lib/open_api_sdk/models/shared/error.rb deleted file mode 100644 index 310d650a..00000000 --- a/lib/open_api_sdk/models/shared/error.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # The `Status` type defines a logical error model - class Error < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # A developer-facing error message. - field :message, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('message') } } - # The HTTP status code - field :status_code, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status_code') } } - - - sig { params(message: ::String, status_code: ::Integer).void } - def initialize(message: nil, status_code: nil) - @message = message - @status_code = status_code - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/featureflag.rb b/lib/open_api_sdk/models/shared/featureflag.rb index 6b335bee..9218017f 100644 --- a/lib/open_api_sdk/models/shared/featureflag.rb +++ b/lib/open_api_sdk/models/shared/featureflag.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - - # A feature flag is a key-value pair that can be used to enable or disable features. - class FeatureFlag < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :feature_flag, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_flag') } } - - field :trial_ends_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('trial_ends_at'), 'decoder': Utils.datetime_from_iso_format(true) } } - - - sig { params(feature_flag: ::String, trial_ends_at: T.nilable(::DateTime)).void } - def initialize(feature_flag: nil, trial_ends_at: nil) - @feature_flag = feature_flag - @trial_ends_at = trial_ends_at + module Models + module Shared + + # A feature flag is a key-value pair that can be used to enable or disable features. + class FeatureFlag + extend T::Sig + include Crystalline::MetadataFields + + # enum value workspace feature flag + field :feature_flag, Models::Shared::WorkspaceFeatureFlag, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_flag'), 'decoder': Utils.enum_from_string(Models::Shared::WorkspaceFeatureFlag, false) } } + + field :trial_ends_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('trial_ends_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(feature_flag: Models::Shared::WorkspaceFeatureFlag, trial_ends_at: T.nilable(::DateTime)).void } + def initialize(feature_flag: nil, trial_ends_at: nil) + @feature_flag = feature_flag + @trial_ends_at = trial_ends_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @feature_flag == other.feature_flag + return false unless @trial_ends_at == other.trial_ends_at + true + end end end end diff --git a/lib/open_api_sdk/models/shared/filter.rb b/lib/open_api_sdk/models/shared/filter.rb deleted file mode 100644 index 85892515..00000000 --- a/lib/open_api_sdk/models/shared/filter.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # A filter is a key-value pair that can be used to filter a list of requests. - class Filter < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The key of the filter. - field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } - # The operator of the filter. - field :operator, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('operator') } } - # The value of the filter. - field :value, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('value') } } - - - sig { params(key: ::String, operator: ::String, value: ::String).void } - def initialize(key: nil, operator: nil, value: nil) - @key = key - @operator = operator - @value = value - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/filters.rb b/lib/open_api_sdk/models/shared/filters.rb deleted file mode 100644 index 0fd4cf01..00000000 --- a/lib/open_api_sdk/models/shared/filters.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # Filters are used to query requests. - class Filters < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # A list of filters to apply to the query. - field :filters, T::Array[::OpenApiSDK::Shared::Filter], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('filters') } } - # The maximum number of results to return. - field :limit, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit') } } - # The offset to start the query from. - field :offset, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('offset') } } - # The operator to use when combining filters. - field :operator, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('operator') } } - - - sig { params(filters: T::Array[::OpenApiSDK::Shared::Filter], limit: ::Integer, offset: ::Integer, operator: ::String).void } - def initialize(filters: nil, limit: nil, offset: nil, operator: nil) - @filters = filters - @limit = limit - @offset = offset - @operator = operator - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/format.rb b/lib/open_api_sdk/models/shared/format.rb new file mode 100644 index 00000000..807584e0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/format.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Format < T::Enum + enums do + JSON = new('json') + YAML = new('yaml') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/generate_bump_type.rb b/lib/open_api_sdk/models/shared/generate_bump_type.rb index 02601aa3..6ca52e33 100644 --- a/lib/open_api_sdk/models/shared/generate_bump_type.rb +++ b/lib/open_api_sdk/models/shared/generate_bump_type.rb @@ -5,18 +5,20 @@ module OpenApiSDK - module Shared - - # GenerateBumpType - Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) - class GenerateBumpType < T::Enum - enums do - MAJOR = new('major') - MINOR = new('minor') - PATCH = new('patch') - CUSTOM = new('custom') - GRADUATE = new('graduate') - PRERELEASE = new('prerelease') - NONE = new('none') + module Models + module Shared + + # GenerateBumpType - Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) + class GenerateBumpType < T::Enum + enums do + MAJOR = new('major') + MINOR = new('minor') + PATCH = new('patch') + CUSTOM = new('custom') + GRADUATE = new('graduate') + PRERELEASE = new('prerelease') + NONE = new('none') + end end end end diff --git a/lib/open_api_sdk/models/shared/generateopenapispecdiff.rb b/lib/open_api_sdk/models/shared/generateopenapispecdiff.rb deleted file mode 100644 index 33e5d619..00000000 --- a/lib/open_api_sdk/models/shared/generateopenapispecdiff.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - - class GenerateOpenApiSpecDiff < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :current_schema, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_schema') } } - - field :new_schema, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('new_schema') } } - - - sig { params(current_schema: ::String, new_schema: ::String).void } - def initialize(current_schema: nil, new_schema: nil) - @current_schema = current_schema - @new_schema = new_schema - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/getnamespacesresponse.rb b/lib/open_api_sdk/models/shared/getnamespacesresponse.rb index f96096bd..c787b382 100644 --- a/lib/open_api_sdk/models/shared/getnamespacesresponse.rb +++ b/lib/open_api_sdk/models/shared/getnamespacesresponse.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class GetNamespacesResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetNamespacesResponse + extend T::Sig + include Crystalline::MetadataFields - field :items, T::Array[::OpenApiSDK::Shared::Namespace], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + field :items, T::Array[Models::Shared::Namespace], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } - sig { params(items: T::Array[::OpenApiSDK::Shared::Namespace]).void } - def initialize(items: nil) - @items = items + sig { params(items: T::Array[Models::Shared::Namespace]).void } + def initialize(items: nil) + @items = items + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + true + end end end end diff --git a/lib/open_api_sdk/models/shared/getrevisionsresponse.rb b/lib/open_api_sdk/models/shared/getrevisionsresponse.rb index 0d412d9c..1540ff20 100644 --- a/lib/open_api_sdk/models/shared/getrevisionsresponse.rb +++ b/lib/open_api_sdk/models/shared/getrevisionsresponse.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class GetRevisionsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetRevisionsResponse + extend T::Sig + include Crystalline::MetadataFields - field :items, T::Array[::OpenApiSDK::Shared::Revision], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + field :items, T::Array[Models::Shared::Revision], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } - field :next_page_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('next_page_token') } } + field :next_page_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('next_page_token') } } - sig { params(items: T::Array[::OpenApiSDK::Shared::Revision], next_page_token: ::String).void } - def initialize(items: nil, next_page_token: nil) - @items = items - @next_page_token = next_page_token + sig { params(items: T::Array[Models::Shared::Revision], next_page_token: ::String).void } + def initialize(items: nil, next_page_token: nil) + @items = items + @next_page_token = next_page_token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @next_page_token == other.next_page_token + true + end end end end diff --git a/lib/open_api_sdk/models/shared/gettagsresponse.rb b/lib/open_api_sdk/models/shared/gettagsresponse.rb index 8e845539..447489cb 100644 --- a/lib/open_api_sdk/models/shared/gettagsresponse.rb +++ b/lib/open_api_sdk/models/shared/gettagsresponse.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class GetTagsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class GetTagsResponse + extend T::Sig + include Crystalline::MetadataFields - field :items, T::Array[::OpenApiSDK::Shared::Tag], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + field :items, T::Array[Models::Shared::Tag], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } - sig { params(items: T::Array[::OpenApiSDK::Shared::Tag]).void } - def initialize(items: nil) - @items = items + sig { params(items: T::Array[Models::Shared::Tag]).void } + def initialize(items: nil) + @items = items + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + true + end end end end diff --git a/lib/open_api_sdk/models/shared/githubconfigurecodesamplesrequest.rb b/lib/open_api_sdk/models/shared/githubconfigurecodesamplesrequest.rb index 17f5f33b..ca8879a0 100644 --- a/lib/open_api_sdk/models/shared/githubconfigurecodesamplesrequest.rb +++ b/lib/open_api_sdk/models/shared/githubconfigurecodesamplesrequest.rb @@ -5,25 +5,36 @@ module OpenApiSDK - module Shared - - # A request to configure GitHub code samples - class GithubConfigureCodeSamplesRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A request to configure GitHub code samples + class GithubConfigureCodeSamplesRequest + extend T::Sig + include Crystalline::MetadataFields - # The GitHub organization name - field :org, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org') } } - # The GitHub repository name - field :repo, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo') } } - # The target name for the code samples - field :target_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('targetName') } } + # The GitHub organization name + field :org, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org') } } + # The GitHub repository name + field :repo, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo') } } + # The target name for the code samples + field :target_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('targetName') } } - sig { params(org: ::String, repo: ::String, target_name: ::String).void } - def initialize(org: nil, repo: nil, target_name: nil) - @org = org - @repo = repo - @target_name = target_name + sig { params(org: ::String, repo: ::String, target_name: ::String).void } + def initialize(org: nil, repo: nil, target_name: nil) + @org = org + @repo = repo + @target_name = target_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @org == other.org + return false unless @repo == other.repo + return false unless @target_name == other.target_name + true + end end end end diff --git a/lib/open_api_sdk/models/shared/githubconfigurecodesamplesresponse.rb b/lib/open_api_sdk/models/shared/githubconfigurecodesamplesresponse.rb index 29cbab9a..b5bc1e78 100644 --- a/lib/open_api_sdk/models/shared/githubconfigurecodesamplesresponse.rb +++ b/lib/open_api_sdk/models/shared/githubconfigurecodesamplesresponse.rb @@ -5,25 +5,36 @@ module OpenApiSDK - module Shared - - # A response to configure GitHub code samples - class GithubConfigureCodeSamplesResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A response to configure GitHub code samples + class GithubConfigureCodeSamplesResponse + extend T::Sig + include Crystalline::MetadataFields - # The URL of the code sample overlay registry - field :code_sample_overlay_registry_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('codeSampleOverlayRegistryURL') } } - # A document referenced by a workflow - field :source, ::OpenApiSDK::Shared::WorkflowDocument, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source') } } - # The ID of the GitHub action that was dispatched - field :gh_action_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ghActionID') } } + # The URL of the code sample overlay registry + field :code_sample_overlay_registry_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('codeSampleOverlayRegistryURL') } } + # A document referenced by a workflow + field :source, Models::Shared::WorkflowDocument, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source') } } + # The ID of the GitHub action that was dispatched + field :gh_action_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ghActionID') } } - sig { params(code_sample_overlay_registry_url: ::String, source: ::OpenApiSDK::Shared::WorkflowDocument, gh_action_id: T.nilable(::String)).void } - def initialize(code_sample_overlay_registry_url: nil, source: nil, gh_action_id: nil) - @code_sample_overlay_registry_url = code_sample_overlay_registry_url - @source = source - @gh_action_id = gh_action_id + sig { params(code_sample_overlay_registry_url: ::String, source: Models::Shared::WorkflowDocument, gh_action_id: T.nilable(::String)).void } + def initialize(code_sample_overlay_registry_url: nil, source: nil, gh_action_id: nil) + @code_sample_overlay_registry_url = code_sample_overlay_registry_url + @source = source + @gh_action_id = gh_action_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @code_sample_overlay_registry_url == other.code_sample_overlay_registry_url + return false unless @source == other.source + return false unless @gh_action_id == other.gh_action_id + true + end end end end diff --git a/lib/open_api_sdk/models/shared/githubconfiguremintlifyreporequest.rb b/lib/open_api_sdk/models/shared/githubconfiguremintlifyreporequest.rb index 6e5a22f1..c30a9da5 100644 --- a/lib/open_api_sdk/models/shared/githubconfiguremintlifyreporequest.rb +++ b/lib/open_api_sdk/models/shared/githubconfiguremintlifyreporequest.rb @@ -5,31 +5,44 @@ module OpenApiSDK - module Shared - - # A request to configure a GitHub repository for mintlify - class GithubConfigureMintlifyRepoRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A request to configure a GitHub repository for mintlify + class GithubConfigureMintlifyRepoRequest + extend T::Sig + include Crystalline::MetadataFields - # The input OpenAPI document - field :input, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('input') } } - # The GitHub organization name - field :org, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org') } } - # The overlays to apply - field :overlays, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('overlays') } } - # The GitHub repository name - field :repo, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo') } } - # The subdirectory (location of mint.json) - field :subdirectory, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subdirectory') } } + # The input OpenAPI document + field :input, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('input') } } + # The GitHub organization name + field :org, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org') } } + # The overlays to apply + field :overlays, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('overlays') } } + # The GitHub repository name + field :repo, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo') } } + # The subdirectory (location of mint.json) + field :subdirectory, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subdirectory') } } - sig { params(input: ::String, org: ::String, overlays: T::Array[::String], repo: ::String, subdirectory: T.nilable(::String)).void } - def initialize(input: nil, org: nil, overlays: nil, repo: nil, subdirectory: nil) - @input = input - @org = org - @overlays = overlays - @repo = repo - @subdirectory = subdirectory + sig { params(input: ::String, org: ::String, overlays: T::Array[::String], repo: ::String, subdirectory: T.nilable(::String)).void } + def initialize(input: nil, org: nil, overlays: nil, repo: nil, subdirectory: nil) + @input = input + @org = org + @overlays = overlays + @repo = repo + @subdirectory = subdirectory + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @input == other.input + return false unless @org == other.org + return false unless @overlays == other.overlays + return false unless @repo == other.repo + return false unless @subdirectory == other.subdirectory + true + end end end end diff --git a/lib/open_api_sdk/models/shared/githubconfiguretargetrequest.rb b/lib/open_api_sdk/models/shared/githubconfiguretargetrequest.rb index a02097cb..1502556c 100644 --- a/lib/open_api_sdk/models/shared/githubconfiguretargetrequest.rb +++ b/lib/open_api_sdk/models/shared/githubconfiguretargetrequest.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - - # A request to configure a GitHub target - class GithubConfigureTargetRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A request to configure a GitHub target + class GithubConfigureTargetRequest + extend T::Sig + include Crystalline::MetadataFields - # The GitHub organization name - field :org, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org') } } - # The GitHub repository name - field :repo_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo_name') } } + # The GitHub organization name + field :org, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org') } } + # The GitHub repository name + field :repo_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo_name') } } - sig { params(org: ::String, repo_name: ::String).void } - def initialize(org: nil, repo_name: nil) - @org = org - @repo_name = repo_name + sig { params(org: ::String, repo_name: ::String).void } + def initialize(org: nil, repo_name: nil) + @org = org + @repo_name = repo_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @org == other.org + return false unless @repo_name == other.repo_name + true + end end end end diff --git a/lib/open_api_sdk/models/shared/githubgetactionresponse.rb b/lib/open_api_sdk/models/shared/githubgetactionresponse.rb index 151764dc..af79dcec 100644 --- a/lib/open_api_sdk/models/shared/githubgetactionresponse.rb +++ b/lib/open_api_sdk/models/shared/githubgetactionresponse.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - - # response to a getting the latest action run on a GitHub request - class GithubGetActionResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # response to a getting the latest action run on a GitHub request + class GithubGetActionResponse + extend T::Sig + include Crystalline::MetadataFields - # The status of the latest action run if available - field :run_status, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('run_status') } } - # The URL for latest action run if available - field :run_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('run_url') } } + # The status of the latest action run if available + field :run_status, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('run_status') } } + # The URL for latest action run if available + field :run_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('run_url') } } - sig { params(run_status: T.nilable(::String), run_url: T.nilable(::String)).void } - def initialize(run_status: nil, run_url: nil) - @run_status = run_status - @run_url = run_url + sig { params(run_status: T.nilable(::String), run_url: T.nilable(::String)).void } + def initialize(run_status: nil, run_url: nil) + @run_status = run_status + @run_url = run_url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @run_status == other.run_status + return false unless @run_url == other.run_url + true + end end end end diff --git a/lib/open_api_sdk/models/shared/githubmissingpublishingsecretsresponse.rb b/lib/open_api_sdk/models/shared/githubmissingpublishingsecretsresponse.rb index d58d71cc..c3344473 100644 --- a/lib/open_api_sdk/models/shared/githubmissingpublishingsecretsresponse.rb +++ b/lib/open_api_sdk/models/shared/githubmissingpublishingsecretsresponse.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Shared - - # A valid response containing MISSING publishing secret keys for a github target - class GithubMissingPublishingSecretsResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A valid response containing MISSING publishing secret keys for a github target + class GithubMissingPublishingSecretsResponse + extend T::Sig + include Crystalline::MetadataFields - field :missing_secrets, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('missing_secrets') } } + field :missing_secrets, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('missing_secrets') } } - sig { params(missing_secrets: T.nilable(T::Array[::String])).void } - def initialize(missing_secrets: nil) - @missing_secrets = missing_secrets + sig { params(missing_secrets: T.nilable(T::Array[::String])).void } + def initialize(missing_secrets: nil) + @missing_secrets = missing_secrets + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @missing_secrets == other.missing_secrets + true + end end end end diff --git a/lib/open_api_sdk/models/shared/githubpublishingprresponse.rb b/lib/open_api_sdk/models/shared/githubpublishingprresponse.rb index 90d397b0..f72d9dee 100644 --- a/lib/open_api_sdk/models/shared/githubpublishingprresponse.rb +++ b/lib/open_api_sdk/models/shared/githubpublishingprresponse.rb @@ -5,22 +5,36 @@ module OpenApiSDK - module Shared - - # Open generation PRs pending publishing - class GithubPublishingPRResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :generation_pull_request, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generation_pull_request') } } - - field :pending_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pending_version') } } - - - sig { params(generation_pull_request: T.nilable(::String), pending_version: T.nilable(::String)).void } - def initialize(generation_pull_request: nil, pending_version: nil) - @generation_pull_request = generation_pull_request - @pending_version = pending_version + module Models + module Shared + + # Open generation PRs pending publishing + class GithubPublishingPRResponse + extend T::Sig + include Crystalline::MetadataFields + + + field :pending_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pending_version') } } + + field :pull_request, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pull_request') } } + # This can only be populated when the github app is installed for a repo + field :pull_request_metadata, T.nilable(Models::Shared::PullRequestMetadata), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pull_request_metadata') } } + + + sig { params(pending_version: T.nilable(::String), pull_request: T.nilable(::String), pull_request_metadata: T.nilable(Models::Shared::PullRequestMetadata)).void } + def initialize(pending_version: nil, pull_request: nil, pull_request_metadata: nil) + @pending_version = pending_version + @pull_request = pull_request + @pull_request_metadata = pull_request_metadata + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @pending_version == other.pending_version + return false unless @pull_request == other.pull_request + return false unless @pull_request_metadata == other.pull_request_metadata + true + end end end end diff --git a/lib/open_api_sdk/models/shared/githubsetupstateresponse.rb b/lib/open_api_sdk/models/shared/githubsetupstateresponse.rb new file mode 100644 index 00000000..1a4416aa --- /dev/null +++ b/lib/open_api_sdk/models/shared/githubsetupstateresponse.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # The state of a particular SDK targets github setup + class GithubSetupStateResponse + extend T::Sig + include Crystalline::MetadataFields + + + field :actions, Models::Shared::Actions, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('actions') } } + + field :app_installed, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('app_installed') } } + + field :secrets, Models::Shared::Secrets, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('secrets') } } + + + sig { params(actions: Models::Shared::Actions, app_installed: T::Boolean, secrets: Models::Shared::Secrets).void } + def initialize(actions: nil, app_installed: nil, secrets: nil) + @actions = actions + @app_installed = app_installed + @secrets = secrets + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @actions == other.actions + return false unless @app_installed == other.app_installed + return false unless @secrets == other.secrets + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/githubstorepublishingsecretsrequest.rb b/lib/open_api_sdk/models/shared/githubstorepublishingsecretsrequest.rb index bbd06a2e..fa5859d6 100644 --- a/lib/open_api_sdk/models/shared/githubstorepublishingsecretsrequest.rb +++ b/lib/open_api_sdk/models/shared/githubstorepublishingsecretsrequest.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - - # A request to store publishing secrets for a github target - class GithubStorePublishingSecretsRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A request to store publishing secrets for a github target + class GithubStorePublishingSecretsRequest + extend T::Sig + include Crystalline::MetadataFields - # The generation lock ID - field :generate_gen_lock_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_id') } } - # A map of secrets to store in the GitHub target - field :secrets, T.nilable(T::Hash[Symbol, ::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('secrets') } } + # The generation lock ID + field :generate_gen_lock_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_id') } } + # A map of secrets to store in the GitHub target + field :secrets, T.nilable(T::Hash[Symbol, ::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('secrets') } } - sig { params(generate_gen_lock_id: ::String, secrets: T.nilable(T::Hash[Symbol, ::String])).void } - def initialize(generate_gen_lock_id: nil, secrets: nil) - @generate_gen_lock_id = generate_gen_lock_id - @secrets = secrets + sig { params(generate_gen_lock_id: ::String, secrets: T.nilable(T::Hash[Symbol, ::String])).void } + def initialize(generate_gen_lock_id: nil, secrets: nil) + @generate_gen_lock_id = generate_gen_lock_id + @secrets = secrets + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @generate_gen_lock_id == other.generate_gen_lock_id + return false unless @secrets == other.secrets + true + end end end end diff --git a/lib/open_api_sdk/models/shared/githubtriggeractionrequest.rb b/lib/open_api_sdk/models/shared/githubtriggeractionrequest.rb index 21eb9938..ab785491 100644 --- a/lib/open_api_sdk/models/shared/githubtriggeractionrequest.rb +++ b/lib/open_api_sdk/models/shared/githubtriggeractionrequest.rb @@ -5,34 +5,48 @@ module OpenApiSDK - module Shared - - # A request to trigger an action on a GitHub target - class GithubTriggerActionRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A request to trigger an action on a GitHub target + class GithubTriggerActionRequest + extend T::Sig + include Crystalline::MetadataFields - # The generation lock ID - field :gen_lock_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gen_lock_id') } } - # The GitHub organization name - field :org, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org') } } - # The GitHub repository name - field :repo_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo_name') } } - # Force an SDK generation - field :force, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('force') } } - # A version to override the SDK too in workflow dispatch - field :set_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('set_version') } } - # The target name for the action - field :target_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('target_name') } } + # The generation lock ID + field :gen_lock_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gen_lock_id') } } + # The GitHub organization name + field :org, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('org') } } + # The GitHub repository name + field :repo_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo_name') } } + # Force an SDK generation + field :force, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('force') } } + # A version to override the SDK too in workflow dispatch + field :set_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('set_version') } } + # The target name for the action + field :target_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('target_name') } } - sig { params(gen_lock_id: ::String, org: ::String, repo_name: ::String, force: T.nilable(T::Boolean), set_version: T.nilable(::String), target_name: T.nilable(::String)).void } - def initialize(gen_lock_id: nil, org: nil, repo_name: nil, force: nil, set_version: nil, target_name: nil) - @gen_lock_id = gen_lock_id - @org = org - @repo_name = repo_name - @force = force - @set_version = set_version - @target_name = target_name + sig { params(gen_lock_id: ::String, org: ::String, repo_name: ::String, force: T.nilable(T::Boolean), set_version: T.nilable(::String), target_name: T.nilable(::String)).void } + def initialize(gen_lock_id: nil, org: nil, repo_name: nil, force: nil, set_version: nil, target_name: nil) + @gen_lock_id = gen_lock_id + @org = org + @repo_name = repo_name + @force = force + @set_version = set_version + @target_name = target_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @gen_lock_id == other.gen_lock_id + return false unless @org == other.org + return false unless @repo_name == other.repo_name + return false unless @force == other.force + return false unless @set_version == other.set_version + return false unless @target_name == other.target_name + true + end end end end diff --git a/lib/open_api_sdk/models/shared/interactiontype.rb b/lib/open_api_sdk/models/shared/interactiontype.rb index e875c62e..71433c49 100644 --- a/lib/open_api_sdk/models/shared/interactiontype.rb +++ b/lib/open_api_sdk/models/shared/interactiontype.rb @@ -5,22 +5,25 @@ module OpenApiSDK - module Shared - - # InteractionType - Type of interaction. - class InteractionType < T::Enum - enums do - CI_EXEC = new('CI_EXEC') - CLI_EXEC = new('CLI_EXEC') - LINT = new('LINT') - OPENAPI_DIFF = new('OPENAPI_DIFF') - TARGET_GENERATE = new('TARGET_GENERATE') - TOMBSTONE = new('TOMBSTONE') - AUTHENTICATE = new('AUTHENTICATE') - QUICKSTART = new('QUICKSTART') - RUN = new('RUN') - CONFIGURE = new('CONFIGURE') - PUBLISH = new('PUBLISH') + module Models + module Shared + + # InteractionType - Type of interaction. + class InteractionType < T::Enum + enums do + CI_EXEC = new('CI_EXEC') + CLI_EXEC = new('CLI_EXEC') + LINT = new('LINT') + OPENAPI_DIFF = new('OPENAPI_DIFF') + TARGET_GENERATE = new('TARGET_GENERATE') + TOMBSTONE = new('TOMBSTONE') + AUTHENTICATE = new('AUTHENTICATE') + QUICKSTART = new('QUICKSTART') + RUN = new('RUN') + CONFIGURE = new('CONFIGURE') + PUBLISH = new('PUBLISH') + TEST = new('TEST') + end end end end diff --git a/lib/open_api_sdk/models/shared/level.rb b/lib/open_api_sdk/models/shared/level.rb index 3b7f7328..64f1b494 100644 --- a/lib/open_api_sdk/models/shared/level.rb +++ b/lib/open_api_sdk/models/shared/level.rb @@ -5,14 +5,16 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class Level < T::Enum - enums do - ALLOWED = new('allowed') - WARNING = new('warning') - BLOCKED = new('blocked') + class Level < T::Enum + enums do + ALLOWED = new('allowed') + WARNING = new('warning') + BLOCKED = new('blocked') + end end end end diff --git a/lib/open_api_sdk/models/shared/license.rb b/lib/open_api_sdk/models/shared/license.rb index ba9635f6..b518f6a6 100644 --- a/lib/open_api_sdk/models/shared/license.rb +++ b/lib/open_api_sdk/models/shared/license.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class License < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class License + extend T::Sig + include Crystalline::MetadataFields - field :identifier, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('identifier') } } + field :identifier, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('identifier') } } - sig { params(identifier: T.nilable(::String)).void } - def initialize(identifier: nil) - @identifier = identifier + sig { params(identifier: T.nilable(::String)).void } + def initialize(identifier: nil) + @identifier = identifier + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @identifier == other.identifier + true + end end end end diff --git a/lib/open_api_sdk/models/shared/manifest.rb b/lib/open_api_sdk/models/shared/manifest.rb index a75a3a64..c4bc0dd7 100644 --- a/lib/open_api_sdk/models/shared/manifest.rb +++ b/lib/open_api_sdk/models/shared/manifest.rb @@ -5,31 +5,44 @@ module OpenApiSDK - module Shared - - # Returns the requested manifest file - class Manifest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # Returns the requested manifest file + class Manifest + extend T::Sig + include Crystalline::MetadataFields - # Annotations - field :annotations, T.nilable(::OpenApiSDK::Shared::Annotations), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('annotations') } } - # Type of artifact - field :artifact_type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('artifactType') } } - # List of V2 image layer information - field :layers, T.nilable(T::Array[::OpenApiSDK::Shared::V2Descriptor]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('layers') } } - # Media type usually application/vnd.docker.distribution.manifest.v2+json if this is in the accept header - field :media_type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mediaType') } } - # Schema version - field :schema_version, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('schemaVersion') } } + # Annotations + field :annotations, T.nilable(Models::Shared::Annotations), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('annotations') } } + # Type of artifact + field :artifact_type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('artifactType') } } + # List of V2 image layer information + field :layers, T.nilable(T::Array[Models::Shared::V2Descriptor]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('layers') } } + # Media type usually application/vnd.docker.distribution.manifest.v2+json if this is in the accept header + field :media_type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mediaType') } } + # Schema version + field :schema_version, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('schemaVersion') } } - sig { params(annotations: T.nilable(::OpenApiSDK::Shared::Annotations), artifact_type: T.nilable(::String), layers: T.nilable(T::Array[::OpenApiSDK::Shared::V2Descriptor]), media_type: T.nilable(::String), schema_version: T.nilable(::Integer)).void } - def initialize(annotations: nil, artifact_type: nil, layers: nil, media_type: nil, schema_version: nil) - @annotations = annotations - @artifact_type = artifact_type - @layers = layers - @media_type = media_type - @schema_version = schema_version + sig { params(annotations: T.nilable(Models::Shared::Annotations), artifact_type: T.nilable(::String), layers: T.nilable(T::Array[Models::Shared::V2Descriptor]), media_type: T.nilable(::String), schema_version: T.nilable(::Integer)).void } + def initialize(annotations: nil, artifact_type: nil, layers: nil, media_type: nil, schema_version: nil) + @annotations = annotations + @artifact_type = artifact_type + @layers = layers + @media_type = media_type + @schema_version = schema_version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @annotations == other.annotations + return false unless @artifact_type == other.artifact_type + return false unless @layers == other.layers + return false unless @media_type == other.media_type + return false unless @schema_version == other.schema_version + true + end end end end diff --git a/lib/open_api_sdk/models/shared/namespace.rb b/lib/open_api_sdk/models/shared/namespace.rb index 1cded07a..b4406b1e 100644 --- a/lib/open_api_sdk/models/shared/namespace.rb +++ b/lib/open_api_sdk/models/shared/namespace.rb @@ -5,28 +5,56 @@ module OpenApiSDK - module Shared - - # A namespace contains many revisions. - class Namespace < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # {organization_slug}/{workspace_slug}/{namespace_name} - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - # A human-readable name for the namespace. - field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } - - field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - - - sig { params(created_at: ::DateTime, id: ::String, name: ::String, updated_at: ::DateTime).void } - def initialize(created_at: nil, id: nil, name: nil, updated_at: nil) - @created_at = created_at - @id = id - @name = name - @updated_at = updated_at + module Models + module Shared + + # A namespace contains many revisions. + class Namespace + extend T::Sig + include Crystalline::MetadataFields + + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # {organization_slug}/{workspace_slug}/{namespace_name} + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # A human-readable name for the namespace. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :archived_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('archived_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + field :composite_spec_metadata, T.nilable(Models::Shared::CompositeSpecMetadata), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('composite_spec_metadata') } } + + field :latest_revision_metadata, T.nilable(Models::Shared::RevisionContentsMetadata), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('latest_revision_metadata') } } + # Indicates whether the namespace is publicly accessible + field :public, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('public') } } + + + sig { params(created_at: ::DateTime, id: ::String, name: ::String, updated_at: ::DateTime, archived_at: T.nilable(::DateTime), composite_spec_metadata: T.nilable(Models::Shared::CompositeSpecMetadata), latest_revision_metadata: T.nilable(Models::Shared::RevisionContentsMetadata), public: T.nilable(T::Boolean)).void } + def initialize(created_at: nil, id: nil, name: nil, updated_at: nil, archived_at: nil, composite_spec_metadata: nil, latest_revision_metadata: nil, public: nil) + @created_at = created_at + @id = id + @name = name + @updated_at = updated_at + @archived_at = archived_at + @composite_spec_metadata = composite_spec_metadata + @latest_revision_metadata = latest_revision_metadata + @public = public + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @name == other.name + return false unless @updated_at == other.updated_at + return false unless @archived_at == other.archived_at + return false unless @composite_spec_metadata == other.composite_spec_metadata + return false unless @latest_revision_metadata == other.latest_revision_metadata + return false unless @public == other.public + true + end end end end diff --git a/lib/open_api_sdk/models/shared/oasinfo.rb b/lib/open_api_sdk/models/shared/oasinfo.rb index 9fc01158..72c04703 100644 --- a/lib/open_api_sdk/models/shared/oasinfo.rb +++ b/lib/open_api_sdk/models/shared/oasinfo.rb @@ -5,31 +5,44 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class OASInfo < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class OASInfo + extend T::Sig + include Crystalline::MetadataFields - field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } - field :license, ::OpenApiSDK::Shared::License, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('license') } } + field :license, Models::Shared::License, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('license') } } - field :summary, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('summary') } } + field :summary, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('summary') } } - field :title, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } } + field :title, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } } - field :version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + field :version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } - sig { params(description: ::String, license: ::OpenApiSDK::Shared::License, summary: ::String, title: ::String, version: ::String).void } - def initialize(description: nil, license: nil, summary: nil, title: nil, version: nil) - @description = description - @license = license - @summary = summary - @title = title - @version = version + sig { params(description: ::String, license: Models::Shared::License, summary: ::String, title: ::String, version: ::String).void } + def initialize(description: nil, license: nil, summary: nil, title: nil, version: nil) + @description = description + @license = license + @summary = summary + @title = title + @version = version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @description == other.description + return false unless @license == other.license + return false unless @summary == other.summary + return false unless @title == other.title + return false unless @version == other.version + true + end end end end diff --git a/lib/open_api_sdk/models/shared/oasoperation.rb b/lib/open_api_sdk/models/shared/oasoperation.rb index 47c2622d..137442a4 100644 --- a/lib/open_api_sdk/models/shared/oasoperation.rb +++ b/lib/open_api_sdk/models/shared/oasoperation.rb @@ -5,37 +5,52 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class OASOperation < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class OASOperation + extend T::Sig + include Crystalline::MetadataFields - field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } - field :method, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('method') } } + field :method, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('method') } } - field :operation_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('operation_id') } } + field :operation_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('operation_id') } } - field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } + field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } - field :tags, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tags') } } + field :tags, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tags') } } - field :group_override, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('group_override') } } + field :group_override, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('group_override') } } - field :method_name_override, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('method_name_override') } } + field :method_name_override, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('method_name_override') } } - sig { params(description: ::String, method: ::String, operation_id: ::String, path: ::String, tags: T::Array[::String], group_override: T.nilable(::String), method_name_override: T.nilable(::String)).void } - def initialize(description: nil, method: nil, operation_id: nil, path: nil, tags: nil, group_override: nil, method_name_override: nil) - @description = description - @method = method - @operation_id = operation_id - @path = path - @tags = tags - @group_override = group_override - @method_name_override = method_name_override + sig { params(description: ::String, method: ::String, operation_id: ::String, path: ::String, tags: T::Array[::String], group_override: T.nilable(::String), method_name_override: T.nilable(::String)).void } + def initialize(description: nil, method: nil, operation_id: nil, path: nil, tags: nil, group_override: nil, method_name_override: nil) + @description = description + @method = method + @operation_id = operation_id + @path = path + @tags = tags + @group_override = group_override + @method_name_override = method_name_override + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @description == other.description + return false unless @method == other.method + return false unless @operation_id == other.operation_id + return false unless @path == other.path + return false unless @tags == other.tags + return false unless @group_override == other.group_override + return false unless @method_name_override == other.method_name_override + true + end end end end diff --git a/lib/open_api_sdk/models/shared/oassummary.rb b/lib/open_api_sdk/models/shared/oassummary.rb index d65a5c0a..14b6bf04 100644 --- a/lib/open_api_sdk/models/shared/oassummary.rb +++ b/lib/open_api_sdk/models/shared/oassummary.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class OASSummary < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class OASSummary + extend T::Sig + include Crystalline::MetadataFields - field :info, ::OpenApiSDK::Shared::OASInfo, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('info') } } + field :info, Models::Shared::OASInfo, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('info') } } - field :operations, T::Array[::OpenApiSDK::Shared::OASOperation], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('operations') } } + field :operations, T::Array[Models::Shared::OASOperation], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('operations') } } - sig { params(info: ::OpenApiSDK::Shared::OASInfo, operations: T::Array[::OpenApiSDK::Shared::OASOperation]).void } - def initialize(info: nil, operations: nil) - @info = info - @operations = operations + sig { params(info: Models::Shared::OASInfo, operations: T::Array[Models::Shared::OASOperation]).void } + def initialize(info: nil, operations: nil) + @info = info + @operations = operations + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @info == other.info + return false unless @operations == other.operations + true + end end end end diff --git a/lib/open_api_sdk/models/shared/openapi_diff_bump_type.rb b/lib/open_api_sdk/models/shared/openapi_diff_bump_type.rb index 5d0765d9..d0407c52 100644 --- a/lib/open_api_sdk/models/shared/openapi_diff_bump_type.rb +++ b/lib/open_api_sdk/models/shared/openapi_diff_bump_type.rb @@ -5,15 +5,17 @@ module OpenApiSDK - module Shared - - # OpenapiDiffBumpType - Bump type of the lock file (calculated semver delta, or a custom change (manual release)) - class OpenapiDiffBumpType < T::Enum - enums do - MAJOR = new('major') - MINOR = new('minor') - PATCH = new('patch') - NONE = new('none') + module Models + module Shared + + # OpenapiDiffBumpType - Bump type of the lock file (calculated semver delta, or a custom change (manual release)) + class OpenapiDiffBumpType < T::Enum + enums do + MAJOR = new('major') + MINOR = new('minor') + PATCH = new('patch') + NONE = new('none') + end end end end diff --git a/lib/open_api_sdk/models/shared/organization.rb b/lib/open_api_sdk/models/shared/organization.rb index 0f6b2e39..8e930290 100644 --- a/lib/open_api_sdk/models/shared/organization.rb +++ b/lib/open_api_sdk/models/shared/organization.rb @@ -5,40 +5,68 @@ module OpenApiSDK - module Shared - - # A speakeasy organization - class Organization < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A speakeasy organization + class Organization + extend T::Sig + include Crystalline::MetadataFields - field :account_type, ::OpenApiSDK::Shared::AccountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::AccountType, false) } } + field :account_type, Models::Shared::AccountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_type'), 'decoder': Utils.enum_from_string(Models::Shared::AccountType, false) } } - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } - field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } - field :telemetry_disabled, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('telemetry_disabled') } } + field :sso_activated, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sso_activated') } } - field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + field :telemetry_disabled, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('telemetry_disabled') } } - field :free_trial_expiry, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('free_trial_expiry'), 'decoder': Utils.datetime_from_iso_format(true) } } + field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + field :free_trial_expiry, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('free_trial_expiry'), 'decoder': Utils.datetime_from_iso_format(true) } } - sig { params(account_type: ::OpenApiSDK::Shared::AccountType, created_at: ::DateTime, id: ::String, name: ::String, slug: ::String, telemetry_disabled: T::Boolean, updated_at: ::DateTime, free_trial_expiry: T.nilable(::DateTime)).void } - def initialize(account_type: nil, created_at: nil, id: nil, name: nil, slug: nil, telemetry_disabled: nil, updated_at: nil, free_trial_expiry: nil) - @account_type = account_type - @created_at = created_at - @id = id - @name = name - @slug = slug - @telemetry_disabled = telemetry_disabled - @updated_at = updated_at - @free_trial_expiry = free_trial_expiry + field :internal, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('internal') } } + + field :sso_connection_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sso_connection_id') } } + + + sig { params(account_type: Models::Shared::AccountType, created_at: ::DateTime, id: ::String, name: ::String, slug: ::String, sso_activated: T::Boolean, telemetry_disabled: T::Boolean, updated_at: ::DateTime, free_trial_expiry: T.nilable(::DateTime), internal: T.nilable(T::Boolean), sso_connection_id: T.nilable(::String)).void } + def initialize(account_type: nil, created_at: nil, id: nil, name: nil, slug: nil, sso_activated: nil, telemetry_disabled: nil, updated_at: nil, free_trial_expiry: nil, internal: nil, sso_connection_id: nil) + @account_type = account_type + @created_at = created_at + @id = id + @name = name + @slug = slug + @sso_activated = sso_activated + @telemetry_disabled = telemetry_disabled + @updated_at = updated_at + @free_trial_expiry = free_trial_expiry + @internal = internal + @sso_connection_id = sso_connection_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @account_type == other.account_type + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @name == other.name + return false unless @slug == other.slug + return false unless @sso_activated == other.sso_activated + return false unless @telemetry_disabled == other.telemetry_disabled + return false unless @updated_at == other.updated_at + return false unless @free_trial_expiry == other.free_trial_expiry + return false unless @internal == other.internal + return false unless @sso_connection_id == other.sso_connection_id + true + end end end end diff --git a/lib/open_api_sdk/models/shared/organizationbillingaddonrequest.rb b/lib/open_api_sdk/models/shared/organizationbillingaddonrequest.rb new file mode 100644 index 00000000..fa29abd0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationbillingaddonrequest.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A request to add billing add ons + class OrganizationBillingAddOnRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :add_ons, T::Array[Models::Shared::BillingAddOn], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('add_ons') } } + + + sig { params(add_ons: T::Array[Models::Shared::BillingAddOn]).void } + def initialize(add_ons: nil) + @add_ons = add_ons + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @add_ons == other.add_ons + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationbillingaddonresponse.rb b/lib/open_api_sdk/models/shared/organizationbillingaddonresponse.rb new file mode 100644 index 00000000..4f54ffbb --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationbillingaddonresponse.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Billing add on response + class OrganizationBillingAddOnResponse + extend T::Sig + include Crystalline::MetadataFields + + + field :add_ons, T::Array[Models::Shared::BillingAddOn], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('add_ons') } } + + + sig { params(add_ons: T::Array[Models::Shared::BillingAddOn]).void } + def initialize(add_ons: nil) + @add_ons = add_ons + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @add_ons == other.add_ons + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationusage.rb b/lib/open_api_sdk/models/shared/organizationusage.rb index 5210a467..a98f7b91 100644 --- a/lib/open_api_sdk/models/shared/organizationusage.rb +++ b/lib/open_api_sdk/models/shared/organizationusage.rb @@ -5,37 +5,56 @@ module OpenApiSDK - module Shared - - - class OrganizationUsage < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Indicates if the features are accessible - field :accessible, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('accessible') } } - # Features that are accessible - field :accessible_features, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('accessible_features') } } - # List of generation lock IDs - field :gen_lock_ids, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gen_lock_ids') } } - # The programming language used - field :language, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('language') } } - # Number of operations performed - field :number_of_operations, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('number_of_operations') } } - # Features that have been used - field :used_features, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('used_features') } } - # List of workspace IDs - field :workspaces, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspaces') } } - - - sig { params(accessible: T::Boolean, accessible_features: T::Array[::String], gen_lock_ids: T::Array[::String], language: ::String, number_of_operations: ::Integer, used_features: T::Array[::String], workspaces: T::Array[::String]).void } - def initialize(accessible: nil, accessible_features: nil, gen_lock_ids: nil, language: nil, number_of_operations: nil, used_features: nil, workspaces: nil) - @accessible = accessible - @accessible_features = accessible_features - @gen_lock_ids = gen_lock_ids - @language = language - @number_of_operations = number_of_operations - @used_features = used_features - @workspaces = workspaces + module Models + module Shared + + + class OrganizationUsage + extend T::Sig + include Crystalline::MetadataFields + + # Indicates if the features are accessible + field :accessible, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('accessible') } } + # Features that are accessible + field :accessible_features, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('accessible_features') } } + # List of generation lock IDs + field :gen_lock_ids, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gen_lock_ids') } } + # The programming language used + field :language, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('language') } } + # Maximum Number of operations per SDK specific in contract + field :max_operations, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_operations') } } + # Number of operations performed + field :number_of_operations, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('number_of_operations') } } + # Features that have been used + field :used_features, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('used_features') } } + # List of workspace IDs + field :workspaces, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspaces') } } + + + sig { params(accessible: T::Boolean, accessible_features: T::Array[::String], gen_lock_ids: T::Array[::String], language: ::String, max_operations: ::Integer, number_of_operations: ::Integer, used_features: T::Array[::String], workspaces: T::Array[::String]).void } + def initialize(accessible: nil, accessible_features: nil, gen_lock_ids: nil, language: nil, max_operations: nil, number_of_operations: nil, used_features: nil, workspaces: nil) + @accessible = accessible + @accessible_features = accessible_features + @gen_lock_ids = gen_lock_ids + @language = language + @max_operations = max_operations + @number_of_operations = number_of_operations + @used_features = used_features + @workspaces = workspaces + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @accessible == other.accessible + return false unless @accessible_features == other.accessible_features + return false unless @gen_lock_ids == other.gen_lock_ids + return false unless @language == other.language + return false unless @max_operations == other.max_operations + return false unless @number_of_operations == other.number_of_operations + return false unless @used_features == other.used_features + return false unless @workspaces == other.workspaces + true + end end end end diff --git a/lib/open_api_sdk/models/shared/organizationusageresponse.rb b/lib/open_api_sdk/models/shared/organizationusageresponse.rb index 90cdd36a..a47e46b6 100644 --- a/lib/open_api_sdk/models/shared/organizationusageresponse.rb +++ b/lib/open_api_sdk/models/shared/organizationusageresponse.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Shared - - # A billing summary of organization usage - class OrganizationUsageResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # List of allowed languages - field :allowed_languages, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allowed_languages') } } - # Total number of allowed languages, -1 if unlimited - field :total_allowed_languages, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('total_allowed_languages') } } - - field :usage, T::Array[::OpenApiSDK::Shared::OrganizationUsage], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('usage') } } - # Expiry date of the free trial, will be null if no trial - field :free_trial_expiry, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('free_trial_expiry'), 'decoder': Utils.datetime_from_iso_format(true) } } - - - sig { params(allowed_languages: T::Array[::String], total_allowed_languages: ::Integer, usage: T::Array[::OpenApiSDK::Shared::OrganizationUsage], free_trial_expiry: T.nilable(::DateTime)).void } - def initialize(allowed_languages: nil, total_allowed_languages: nil, usage: nil, free_trial_expiry: nil) - @allowed_languages = allowed_languages - @total_allowed_languages = total_allowed_languages - @usage = usage - @free_trial_expiry = free_trial_expiry + module Models + module Shared + + # A billing summary of organization usage + class OrganizationUsageResponse + extend T::Sig + include Crystalline::MetadataFields + + # List of allowed languages + field :allowed_languages, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allowed_languages') } } + # Total number of allowed languages, -1 if unlimited + field :total_allowed_languages, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('total_allowed_languages') } } + + field :usage, T::Array[Models::Shared::OrganizationUsage], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('usage') } } + # Expiry date of the free trial, will be null if no trial + field :free_trial_expiry, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('free_trial_expiry'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(allowed_languages: T::Array[::String], total_allowed_languages: ::Integer, usage: T::Array[Models::Shared::OrganizationUsage], free_trial_expiry: T.nilable(::DateTime)).void } + def initialize(allowed_languages: nil, total_allowed_languages: nil, usage: nil, free_trial_expiry: nil) + @allowed_languages = allowed_languages + @total_allowed_languages = total_allowed_languages + @usage = usage + @free_trial_expiry = free_trial_expiry + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @allowed_languages == other.allowed_languages + return false unless @total_allowed_languages == other.total_allowed_languages + return false unless @usage == other.usage + return false unless @free_trial_expiry == other.free_trial_expiry + true + end end end end diff --git a/lib/open_api_sdk/models/shared/preflightrequest.rb b/lib/open_api_sdk/models/shared/preflightrequest.rb index 20ba460c..c1309168 100644 --- a/lib/open_api_sdk/models/shared/preflightrequest.rb +++ b/lib/open_api_sdk/models/shared/preflightrequest.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class PreflightRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class PreflightRequest + extend T::Sig + include Crystalline::MetadataFields - field :namespace_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('namespace_name') } } + field :namespace_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('namespace_name') } } - sig { params(namespace_name: ::String).void } - def initialize(namespace_name: nil) - @namespace_name = namespace_name + sig { params(namespace_name: ::String).void } + def initialize(namespace_name: nil) + @namespace_name = namespace_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @namespace_name == other.namespace_name + true + end end end end diff --git a/lib/open_api_sdk/models/shared/preflighttoken.rb b/lib/open_api_sdk/models/shared/preflighttoken.rb index 3e1da75a..0a0df3bf 100644 --- a/lib/open_api_sdk/models/shared/preflighttoken.rb +++ b/lib/open_api_sdk/models/shared/preflighttoken.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Shared - - # A PreflightToken is a token that allows access to the OCI distribution endpoints. - class PreflightToken < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A PreflightToken is a token that allows access to the OCI distribution endpoints. + class PreflightToken + extend T::Sig + include Crystalline::MetadataFields - field :auth_token, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('auth_token') } } + field :auth_token, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('auth_token') } } - sig { params(auth_token: T.nilable(::String)).void } - def initialize(auth_token: nil) - @auth_token = auth_token + sig { params(auth_token: T.nilable(::String)).void } + def initialize(auth_token: nil) + @auth_token = auth_token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @auth_token == other.auth_token + true + end end end end diff --git a/lib/open_api_sdk/models/shared/publishingtoken.rb b/lib/open_api_sdk/models/shared/publishingtoken.rb new file mode 100644 index 00000000..5f518256 --- /dev/null +++ b/lib/open_api_sdk/models/shared/publishingtoken.rb @@ -0,0 +1,77 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A token used to publish to a target + class PublishingToken + extend T::Sig + include Crystalline::MetadataFields + + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :created_by, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_by') } } + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :target_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('target_id') } } + + field :target_resource, Models::Shared::TargetResource, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('target_resource'), 'decoder': Utils.enum_from_string(Models::Shared::TargetResource, false) } } + + field :token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('token') } } + + field :token_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('token_name') } } + + field :valid_until, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('valid_until'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } + + field :updated_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + field :updated_by, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_by') } } + + + sig { params(created_at: ::DateTime, created_by: ::String, id: ::String, organization_id: ::String, target_id: ::String, target_resource: Models::Shared::TargetResource, token: ::String, token_name: ::String, valid_until: ::DateTime, workspace_id: ::String, updated_at: T.nilable(::DateTime), updated_by: T.nilable(::String)).void } + def initialize(created_at: nil, created_by: nil, id: nil, organization_id: nil, target_id: nil, target_resource: nil, token: nil, token_name: nil, valid_until: nil, workspace_id: nil, updated_at: nil, updated_by: nil) + @created_at = created_at + @created_by = created_by + @id = id + @organization_id = organization_id + @target_id = target_id + @target_resource = target_resource + @token = token + @token_name = token_name + @valid_until = valid_until + @workspace_id = workspace_id + @updated_at = updated_at + @updated_by = updated_by + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @created_by == other.created_by + return false unless @id == other.id + return false unless @organization_id == other.organization_id + return false unless @target_id == other.target_id + return false unless @target_resource == other.target_resource + return false unless @token == other.token + return false unless @token_name == other.token_name + return false unless @valid_until == other.valid_until + return false unless @workspace_id == other.workspace_id + return false unless @updated_at == other.updated_at + return false unless @updated_by == other.updated_by + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/pull_request_metadata.rb b/lib/open_api_sdk/models/shared/pull_request_metadata.rb new file mode 100644 index 00000000..9e3b7277 --- /dev/null +++ b/lib/open_api_sdk/models/shared/pull_request_metadata.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # This can only be populated when the github app is installed for a repo + class PullRequestMetadata + extend T::Sig + include Crystalline::MetadataFields + + + field :base_branch, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('base_branch') } } + + field :can_merge, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('can_merge') } } + + field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + # truncated to first 1000 characters + field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + + field :head_branch, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('head_branch') } } + # List of github labels + field :labels, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('labels') } } + # List of github handles + field :requested_reviewers, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('requested_reviewers') } } + + field :status, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status') } } + + field :title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } } + + + sig { params(base_branch: T.nilable(::String), can_merge: T.nilable(T::Boolean), created_at: T.nilable(::DateTime), description: T.nilable(::String), head_branch: T.nilable(::String), labels: T.nilable(T::Array[::String]), requested_reviewers: T.nilable(T::Array[::String]), status: T.nilable(::String), title: T.nilable(::String)).void } + def initialize(base_branch: nil, can_merge: nil, created_at: nil, description: nil, head_branch: nil, labels: nil, requested_reviewers: nil, status: nil, title: nil) + @base_branch = base_branch + @can_merge = can_merge + @created_at = created_at + @description = description + @head_branch = head_branch + @labels = labels + @requested_reviewers = requested_reviewers + @status = status + @title = title + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @base_branch == other.base_branch + return false unless @can_merge == other.can_merge + return false unless @created_at == other.created_at + return false unless @description == other.description + return false unless @head_branch == other.head_branch + return false unless @labels == other.labels + return false unless @requested_reviewers == other.requested_reviewers + return false unless @status == other.status + return false unless @title == other.title + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/relationship.rb b/lib/open_api_sdk/models/shared/relationship.rb index 2e8b0d23..e5708395 100644 --- a/lib/open_api_sdk/models/shared/relationship.rb +++ b/lib/open_api_sdk/models/shared/relationship.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class Relationship < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class Relationship + extend T::Sig + include Crystalline::MetadataFields - field :user_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('user_id') } } + field :user_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('user_id') } } - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } + field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - sig { params(user_id: ::String, workspace_id: ::String).void } - def initialize(user_id: nil, workspace_id: nil) - @user_id = user_id - @workspace_id = workspace_id + sig { params(user_id: ::String, workspace_id: ::String).void } + def initialize(user_id: nil, workspace_id: nil) + @user_id = user_id + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @user_id == other.user_id + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/shared/remotedocument.rb b/lib/open_api_sdk/models/shared/remotedocument.rb new file mode 100644 index 00000000..7ffcc67c --- /dev/null +++ b/lib/open_api_sdk/models/shared/remotedocument.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A document hosted in the registry + class RemoteDocument + extend T::Sig + include Crystalline::MetadataFields + + + field :registry_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('registry_url') } } + + + sig { params(registry_url: ::String).void } + def initialize(registry_url: nil) + @registry_url = registry_url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @registry_url == other.registry_url + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/remotesource.rb b/lib/open_api_sdk/models/shared/remotesource.rb new file mode 100644 index 00000000..7d2b9b60 --- /dev/null +++ b/lib/open_api_sdk/models/shared/remotesource.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Remote source configuration + class RemoteSource + extend T::Sig + include Crystalline::MetadataFields + + + field :inputs, T::Array[Models::Shared::RemoteDocument], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('inputs') } } + # A document hosted in the registry + field :output, Models::Shared::RemoteDocument, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('output') } } + + field :overlays, T.nilable(T::Array[Models::Shared::RemoteDocument]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('overlays') } } + + + sig { params(inputs: T::Array[Models::Shared::RemoteDocument], output: Models::Shared::RemoteDocument, overlays: T.nilable(T::Array[Models::Shared::RemoteDocument])).void } + def initialize(inputs: nil, output: nil, overlays: nil) + @inputs = inputs + @output = output + @overlays = overlays + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @inputs == other.inputs + return false unless @output == other.output + return false unless @overlays == other.overlays + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/remotesourcesubscriptionsettings.rb b/lib/open_api_sdk/models/shared/remotesourcesubscriptionsettings.rb new file mode 100644 index 00000000..5d9698d5 --- /dev/null +++ b/lib/open_api_sdk/models/shared/remotesourcesubscriptionsettings.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RemoteSourceSubscriptionSettings + extend T::Sig + include Crystalline::MetadataFields + + + field :base_spec_namespaces, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('base_spec_namespaces') } } + + field :output_namespace, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('output_namespace') } } + + field :overlay_namespaces, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('overlay_namespaces') } } + + field :ignored_namespaces, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ignored_namespaces') } } + + + sig { params(base_spec_namespaces: T::Array[::String], output_namespace: ::String, overlay_namespaces: T::Array[::String], ignored_namespaces: T.nilable(T::Array[::String])).void } + def initialize(base_spec_namespaces: nil, output_namespace: nil, overlay_namespaces: nil, ignored_namespaces: nil) + @base_spec_namespaces = base_spec_namespaces + @output_namespace = output_namespace + @overlay_namespaces = overlay_namespaces + @ignored_namespaces = ignored_namespaces + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @base_spec_namespaces == other.base_spec_namespaces + return false unless @output_namespace == other.output_namespace + return false unless @overlay_namespaces == other.overlay_namespaces + return false unless @ignored_namespaces == other.ignored_namespaces + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/report.rb b/lib/open_api_sdk/models/shared/report.rb index d3a3d003..2699fe5e 100644 --- a/lib/open_api_sdk/models/shared/report.rb +++ b/lib/open_api_sdk/models/shared/report.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class Report < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class Report + extend T::Sig + include Crystalline::MetadataFields - field :type, T.nilable(::OpenApiSDK::Shared::Type), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::Type, true) } } + field :type, T.nilable(Models::Shared::Type), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::Type, true) } } - sig { params(type: T.nilable(::OpenApiSDK::Shared::Type)).void } - def initialize(type: nil) - @type = type + sig { params(type: T.nilable(Models::Shared::Type)).void } + def initialize(type: nil) + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + true + end end end end diff --git a/lib/open_api_sdk/models/shared/requestmetadata.rb b/lib/open_api_sdk/models/shared/requestmetadata.rb deleted file mode 100644 index 92341b03..00000000 --- a/lib/open_api_sdk/models/shared/requestmetadata.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # Key-Value pairs associated with a request - class RequestMetadata < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } - - field :value, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('value') } } - - - sig { params(key: T.nilable(::String), value: T.nilable(::String)).void } - def initialize(key: nil, value: nil) - @key = key - @value = value - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/revision.rb b/lib/open_api_sdk/models/shared/revision.rb index 1047f123..cf243401 100644 --- a/lib/open_api_sdk/models/shared/revision.rb +++ b/lib/open_api_sdk/models/shared/revision.rb @@ -5,34 +5,52 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class Revision < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class Revision + extend T::Sig + include Crystalline::MetadataFields - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - field :digest, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('digest') } } - # Format {namespace_id}/{revision_digest} - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + field :digest, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('digest') } } + # Format {namespace_id}/{revision_digest} + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - field :namespace_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('namespace_name') } } + field :namespace_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('namespace_name') } } - field :tags, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tags') } } + field :tags, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tags') } } - field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + field :contents_metadata, T.nilable(Models::Shared::RevisionContentsMetadata), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('contents_metadata') } } - sig { params(created_at: ::DateTime, digest: ::String, id: ::String, namespace_name: ::String, tags: T::Array[::String], updated_at: ::DateTime).void } - def initialize(created_at: nil, digest: nil, id: nil, namespace_name: nil, tags: nil, updated_at: nil) - @created_at = created_at - @digest = digest - @id = id - @namespace_name = namespace_name - @tags = tags - @updated_at = updated_at + + sig { params(created_at: ::DateTime, digest: ::String, id: ::String, namespace_name: ::String, tags: T::Array[::String], updated_at: ::DateTime, contents_metadata: T.nilable(Models::Shared::RevisionContentsMetadata)).void } + def initialize(created_at: nil, digest: nil, id: nil, namespace_name: nil, tags: nil, updated_at: nil, contents_metadata: nil) + @created_at = created_at + @digest = digest + @id = id + @namespace_name = namespace_name + @tags = tags + @updated_at = updated_at + @contents_metadata = contents_metadata + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @digest == other.digest + return false unless @id == other.id + return false unless @namespace_name == other.namespace_name + return false unless @tags == other.tags + return false unless @updated_at == other.updated_at + return false unless @contents_metadata == other.contents_metadata + true + end end end end diff --git a/lib/open_api_sdk/models/shared/revisioncontentsmetadata.rb b/lib/open_api_sdk/models/shared/revisioncontentsmetadata.rb new file mode 100644 index 00000000..a1ce923b --- /dev/null +++ b/lib/open_api_sdk/models/shared/revisioncontentsmetadata.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RevisionContentsMetadata + extend T::Sig + include Crystalline::MetadataFields + + # Whether the OAS contains code samples. + field :contains_code_samples, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('contains_code_samples') } } + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The OAS description + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The hash of the contents + field :hash, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('hash') } } + # The fully qualified namespace + field :namespace, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('namespace') } } + # The number of overlay actions in the OAS. Will be 0 if the OAS is not an overlay. + field :num_overlay_actions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('num_overlay_actions') } } + # The operation IDs contained in the OAS. Will be empty if the OAS is an overlay. + field :operation_ids, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('operation_ids') } } + # The digest of the parent bundle + field :revision_digest, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revision_digest') } } + # The tags contained in the OAS -- NOT the OCI tags. Will be empty if the OAS is an overlay. + field :tags, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tags') } } + # The OAS title + field :title, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } } + + field :type, Models::Shared::RevisionContentsMetadataType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::RevisionContentsMetadataType, false) } } + # The OAS version + field :version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + # The workspace ID + field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } + + + sig { params(contains_code_samples: T::Boolean, created_at: ::DateTime, description: ::String, hash: ::String, namespace: ::String, num_overlay_actions: ::Integer, operation_ids: T::Array[::String], revision_digest: ::String, tags: T::Array[::String], title: ::String, type: Models::Shared::RevisionContentsMetadataType, version: ::String, workspace_id: ::String).void } + def initialize(contains_code_samples: nil, created_at: nil, description: nil, hash: nil, namespace: nil, num_overlay_actions: nil, operation_ids: nil, revision_digest: nil, tags: nil, title: nil, type: nil, version: nil, workspace_id: nil) + @contains_code_samples = contains_code_samples + @created_at = created_at + @description = description + @hash = hash + @namespace = namespace + @num_overlay_actions = num_overlay_actions + @operation_ids = operation_ids + @revision_digest = revision_digest + @tags = tags + @title = title + @type = type + @version = version + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @contains_code_samples == other.contains_code_samples + return false unless @created_at == other.created_at + return false unless @description == other.description + return false unless @hash == other.hash + return false unless @namespace == other.namespace + return false unless @num_overlay_actions == other.num_overlay_actions + return false unless @operation_ids == other.operation_ids + return false unless @revision_digest == other.revision_digest + return false unless @tags == other.tags + return false unless @title == other.title + return false unless @type == other.type + return false unless @version == other.version + return false unless @workspace_id == other.workspace_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/revisioncontentsmetadata_type.rb b/lib/open_api_sdk/models/shared/revisioncontentsmetadata_type.rb new file mode 100644 index 00000000..22fb4534 --- /dev/null +++ b/lib/open_api_sdk/models/shared/revisioncontentsmetadata_type.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RevisionContentsMetadataType < T::Enum + enums do + OPENAPI_BUNDLE = new('OPENAPI_BUNDLE') + OPENAPI_OVERLAY = new('OPENAPI_OVERLAY') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/schema.rb b/lib/open_api_sdk/models/shared/schema.rb deleted file mode 100644 index 873583b5..00000000 --- a/lib/open_api_sdk/models/shared/schema.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # A Schema represents an API schema for a particular Api and Version. - class Schema < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api this Schema belongs to. - field :api_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('api_id') } } - # Creation timestamp. - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # A detailed description of the Schema. - field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } - # An ID referencing this particular revision of the Schema. - field :revision_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revision_id') } } - # The version ID of the Api this Schema belongs to. - field :version_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version_id') } } - # The workspace ID this Schema belongs to. - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - - - sig { params(api_id: ::String, created_at: ::DateTime, description: ::String, revision_id: ::String, version_id: ::String, workspace_id: ::String).void } - def initialize(api_id: nil, created_at: nil, description: nil, revision_id: nil, version_id: nil, workspace_id: nil) - @api_id = api_id - @created_at = created_at - @description = description - @revision_id = revision_id - @version_id = version_id - @workspace_id = workspace_id - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/schema_file.rb b/lib/open_api_sdk/models/shared/schema_file.rb new file mode 100644 index 00000000..126e3e8b --- /dev/null +++ b/lib/open_api_sdk/models/shared/schema_file.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SchemaFile + extend T::Sig + include Crystalline::MetadataFields + + + field :content, ::String, { 'multipart_form': { 'content': true } } + + field :file_name, ::String, { 'multipart_form': { 'field_name': 'fileName' } } + + + sig { params(content: ::String, file_name: ::String).void } + def initialize(content: nil, file_name: nil) + @content = content + @file_name = file_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content == other.content + return false unless @file_name == other.file_name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/schemadiff.rb b/lib/open_api_sdk/models/shared/schemadiff.rb deleted file mode 100644 index a1721b80..00000000 --- a/lib/open_api_sdk/models/shared/schemadiff.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # A SchemaDiff represents a diff of two Schemas. - class SchemaDiff < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Holds every addition change in the diff. - field :additions, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('additions') } } - # Holds every deletion change in the diff. - field :deletions, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletions') } } - # Holds every modification change in the diff. - field :modifications, T::Hash[Symbol, ::OpenApiSDK::Shared::ValueChange], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modifications') } } - - - sig { params(additions: T::Array[::String], deletions: T::Array[::String], modifications: T::Hash[Symbol, ::OpenApiSDK::Shared::ValueChange]).void } - def initialize(additions: nil, deletions: nil, modifications: nil) - @additions = additions - @deletions = deletions - @modifications = modifications - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/schemastoreitem.rb b/lib/open_api_sdk/models/shared/schemastoreitem.rb new file mode 100644 index 00000000..c7c6aee5 --- /dev/null +++ b/lib/open_api_sdk/models/shared/schemastoreitem.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SchemaStoreItem + extend T::Sig + include Crystalline::MetadataFields + + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :format, Models::Shared::Format, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('format'), 'decoder': Utils.enum_from_string(Models::Shared::Format, false) } } + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :package_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('packageName') } } + + field :sdk_classname, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sdkClassname') } } + + field :spec, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('spec') } } + + + sig { params(created_at: ::DateTime, format: Models::Shared::Format, id: ::String, package_name: ::String, sdk_classname: ::String, spec: ::String).void } + def initialize(created_at: nil, format: nil, id: nil, package_name: nil, sdk_classname: nil, spec: nil) + @created_at = created_at + @format = format + @id = id + @package_name = package_name + @sdk_classname = sdk_classname + @spec = spec + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @format == other.format + return false unless @id == other.id + return false unless @package_name == other.package_name + return false unless @sdk_classname == other.sdk_classname + return false unless @spec == other.spec + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/secrets.rb b/lib/open_api_sdk/models/shared/secrets.rb new file mode 100644 index 00000000..657a1611 --- /dev/null +++ b/lib/open_api_sdk/models/shared/secrets.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Secrets + extend T::Sig + include Crystalline::MetadataFields + + + field :api_key_configured, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('api_key_configured') } } + + field :publishing_secrets_configured, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publishing_secrets_configured') } } + + + sig { params(api_key_configured: T::Boolean, publishing_secrets_configured: T::Boolean).void } + def initialize(api_key_configured: nil, publishing_secrets_configured: nil) + @api_key_configured = api_key_configured + @publishing_secrets_configured = publishing_secrets_configured + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @api_key_configured == other.api_key_configured + return false unless @publishing_secrets_configured == other.publishing_secrets_configured + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/security.rb b/lib/open_api_sdk/models/shared/security.rb index 1056fab4..540421bc 100644 --- a/lib/open_api_sdk/models/shared/security.rb +++ b/lib/open_api_sdk/models/shared/security.rb @@ -5,25 +5,36 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class Security < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class Security + extend T::Sig + include Crystalline::MetadataFields - field :api_key, T.nilable(::String), { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'x-api-key' } } + field :api_key, T.nilable(::String), { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'x-api-key' } } - field :bearer, T.nilable(::String), { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + field :bearer, T.nilable(::String), { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } - field :workspace_identifier, T.nilable(::String), { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'x-workspace-identifier' } } + field :workspace_identifier, T.nilable(::String), { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'x-workspace-identifier' } } - sig { params(api_key: T.nilable(::String), bearer: T.nilable(::String), workspace_identifier: T.nilable(::String)).void } - def initialize(api_key: nil, bearer: nil, workspace_identifier: nil) - @api_key = api_key - @bearer = bearer - @workspace_identifier = workspace_identifier + sig { params(api_key: T.nilable(::String), bearer: T.nilable(::String), workspace_identifier: T.nilable(::String)).void } + def initialize(api_key: nil, bearer: nil, workspace_identifier: nil) + @api_key = api_key + @bearer = bearer + @workspace_identifier = workspace_identifier + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @api_key == other.api_key + return false unless @bearer == other.bearer + return false unless @workspace_identifier == other.workspace_identifier + true + end end end end diff --git a/lib/open_api_sdk/models/shared/shorturl.rb b/lib/open_api_sdk/models/shared/shorturl.rb index 185a4b96..862393c5 100644 --- a/lib/open_api_sdk/models/shared/shorturl.rb +++ b/lib/open_api_sdk/models/shared/shorturl.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class ShortURL < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class ShortURL + extend T::Sig + include Crystalline::MetadataFields - field :full_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('full_url') } } + field :full_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('full_url') } } - field :short_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('short_url') } } + field :short_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('short_url') } } - sig { params(full_url: ::String, short_url: ::String).void } - def initialize(full_url: nil, short_url: nil) - @full_url = full_url - @short_url = short_url + sig { params(full_url: ::String, short_url: ::String).void } + def initialize(full_url: nil, short_url: nil) + @full_url = full_url + @short_url = short_url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @full_url == other.full_url + return false unless @short_url == other.short_url + true + end end end end diff --git a/lib/open_api_sdk/models/shared/ssometadata.rb b/lib/open_api_sdk/models/shared/ssometadata.rb index eed7255a..144a0abd 100644 --- a/lib/open_api_sdk/models/shared/ssometadata.rb +++ b/lib/open_api_sdk/models/shared/ssometadata.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - - # SSO metadata for a workspace - class SSOMetadata < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # SSO metadata for a workspace + class SSOMetadata + extend T::Sig + include Crystalline::MetadataFields - field :sso_activated, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sso_activated') } } + field :sso_activated, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sso_activated') } } - field :sso_domains, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sso_domains') } } + field :sso_domains, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sso_domains') } } - sig { params(sso_activated: T::Boolean, sso_domains: T::Array[::String]).void } - def initialize(sso_activated: nil, sso_domains: nil) - @sso_activated = sso_activated - @sso_domains = sso_domains + sig { params(sso_activated: T::Boolean, sso_domains: T::Array[::String]).void } + def initialize(sso_activated: nil, sso_domains: nil) + @sso_activated = sso_activated + @sso_domains = sso_domains + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @sso_activated == other.sso_activated + return false unless @sso_domains == other.sso_domains + true + end end end end diff --git a/lib/open_api_sdk/models/shared/suggestion_type.rb b/lib/open_api_sdk/models/shared/suggestion_type.rb index 7445a9b2..101665d8 100644 --- a/lib/open_api_sdk/models/shared/suggestion_type.rb +++ b/lib/open_api_sdk/models/shared/suggestion_type.rb @@ -5,13 +5,15 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class SuggestionType < T::Enum - enums do - METHOD_NAMES = new('method-names') - DIAGNOSTICS_ONLY = new('diagnostics-only') + class SuggestionType < T::Enum + enums do + METHOD_NAMES = new('method-names') + DIAGNOSTICS_ONLY = new('diagnostics-only') + end end end end diff --git a/lib/open_api_sdk/models/shared/suggestitemsrequestbody.rb b/lib/open_api_sdk/models/shared/suggestitemsrequestbody.rb new file mode 100644 index 00000000..61fed6ec --- /dev/null +++ b/lib/open_api_sdk/models/shared/suggestitemsrequestbody.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SuggestItemsRequestBody + extend T::Sig + include Crystalline::MetadataFields + + # The list of "things" to get suggestions for. One suggestion will be returned for each item in the list. + field :items, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + # The prompt to use for the suggestion. Think of this as the "preamble". + field :prompt, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prompt') } } + + + sig { params(items: T::Array[::String], prompt: ::String).void } + def initialize(items: nil, prompt: nil) + @items = items + @prompt = prompt + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @prompt == other.prompt + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/suggestoptsold.rb b/lib/open_api_sdk/models/shared/suggestoptsold.rb index b212fe15..3206b371 100644 --- a/lib/open_api_sdk/models/shared/suggestoptsold.rb +++ b/lib/open_api_sdk/models/shared/suggestoptsold.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class SuggestOptsOld < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class SuggestOptsOld + extend T::Sig + include Crystalline::MetadataFields - field :suggestion_type, ::OpenApiSDK::Shared::SuggestionType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('suggestion_type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::SuggestionType, false) } } + field :suggestion_type, Models::Shared::SuggestionType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('suggestion_type'), 'decoder': Utils.enum_from_string(Models::Shared::SuggestionType, false) } } - field :diagnostics, T.nilable(T::Array[::OpenApiSDK::Shared::Diagnostic]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('diagnostics') } } + field :diagnostics, T.nilable(T::Array[Models::Shared::Diagnostic]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('diagnostics') } } - sig { params(suggestion_type: ::OpenApiSDK::Shared::SuggestionType, diagnostics: T.nilable(T::Array[::OpenApiSDK::Shared::Diagnostic])).void } - def initialize(suggestion_type: nil, diagnostics: nil) - @suggestion_type = suggestion_type - @diagnostics = diagnostics + sig { params(suggestion_type: Models::Shared::SuggestionType, diagnostics: T.nilable(T::Array[Models::Shared::Diagnostic])).void } + def initialize(suggestion_type: nil, diagnostics: nil) + @suggestion_type = suggestion_type + @diagnostics = diagnostics + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @suggestion_type == other.suggestion_type + return false unless @diagnostics == other.diagnostics + true + end end end end diff --git a/lib/open_api_sdk/models/shared/suggestrequestbody.rb b/lib/open_api_sdk/models/shared/suggestrequestbody.rb index d43e4415..34c2fcae 100644 --- a/lib/open_api_sdk/models/shared/suggestrequestbody.rb +++ b/lib/open_api_sdk/models/shared/suggestrequestbody.rb @@ -5,25 +5,36 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class SuggestRequestBody < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class SuggestRequestBody + extend T::Sig + include Crystalline::MetadataFields - field :diagnostics, T::Array[::OpenApiSDK::Shared::Diagnostic], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('diagnostics') } } + field :diagnostics, T::Array[Models::Shared::Diagnostic], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('diagnostics') } } - field :oas_summary, ::OpenApiSDK::Shared::OASSummary, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('oas_summary') } } + field :oas_summary, Models::Shared::OASSummary, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('oas_summary') } } - field :suggestion_type, ::OpenApiSDK::Shared::SuggestRequestBodySuggestionType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('suggestion_type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::SuggestRequestBodySuggestionType, false) } } + field :suggestion_type, Models::Shared::SuggestRequestBodySuggestionType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('suggestion_type'), 'decoder': Utils.enum_from_string(Models::Shared::SuggestRequestBodySuggestionType, false) } } - sig { params(diagnostics: T::Array[::OpenApiSDK::Shared::Diagnostic], oas_summary: ::OpenApiSDK::Shared::OASSummary, suggestion_type: ::OpenApiSDK::Shared::SuggestRequestBodySuggestionType).void } - def initialize(diagnostics: nil, oas_summary: nil, suggestion_type: nil) - @diagnostics = diagnostics - @oas_summary = oas_summary - @suggestion_type = suggestion_type + sig { params(diagnostics: T::Array[Models::Shared::Diagnostic], oas_summary: Models::Shared::OASSummary, suggestion_type: Models::Shared::SuggestRequestBodySuggestionType).void } + def initialize(diagnostics: nil, oas_summary: nil, suggestion_type: nil) + @diagnostics = diagnostics + @oas_summary = oas_summary + @suggestion_type = suggestion_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @diagnostics == other.diagnostics + return false unless @oas_summary == other.oas_summary + return false unless @suggestion_type == other.suggestion_type + true + end end end end diff --git a/lib/open_api_sdk/models/shared/suggestrequestbody_suggestion_type.rb b/lib/open_api_sdk/models/shared/suggestrequestbody_suggestion_type.rb index a052142d..44cad3dc 100644 --- a/lib/open_api_sdk/models/shared/suggestrequestbody_suggestion_type.rb +++ b/lib/open_api_sdk/models/shared/suggestrequestbody_suggestion_type.rb @@ -5,13 +5,15 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class SuggestRequestBodySuggestionType < T::Enum - enums do - METHOD_NAMES = new('method-names') - DIAGNOSTICS_ONLY = new('diagnostics-only') + class SuggestRequestBodySuggestionType < T::Enum + enums do + METHOD_NAMES = new('method-names') + DIAGNOSTICS_ONLY = new('diagnostics-only') + end end end end diff --git a/lib/open_api_sdk/models/shared/tag.rb b/lib/open_api_sdk/models/shared/tag.rb index d96e7e1e..50d99bc0 100644 --- a/lib/open_api_sdk/models/shared/tag.rb +++ b/lib/open_api_sdk/models/shared/tag.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Shared - - - class Tag < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Format {namespace_id}/{tag} - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - # Human readable tag name - field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } - - field :namespace_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('namespace_name') } } - - field :revision_digest, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revision_digest') } } - - - sig { params(id: ::String, name: ::String, namespace_name: ::String, revision_digest: ::String).void } - def initialize(id: nil, name: nil, namespace_name: nil, revision_digest: nil) - @id = id - @name = name - @namespace_name = namespace_name - @revision_digest = revision_digest + module Models + module Shared + + + class Tag + extend T::Sig + include Crystalline::MetadataFields + + # Format {namespace_id}/{tag} + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Human readable tag name + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :namespace_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('namespace_name') } } + + field :revision_digest, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revision_digest') } } + + + sig { params(id: ::String, name: ::String, namespace_name: ::String, revision_digest: ::String).void } + def initialize(id: nil, name: nil, namespace_name: nil, revision_digest: nil) + @id = id + @name = name + @namespace_name = namespace_name + @revision_digest = revision_digest + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @name == other.name + return false unless @namespace_name == other.namespace_name + return false unless @revision_digest == other.revision_digest + true + end end end end diff --git a/lib/open_api_sdk/models/shared/target_resource.rb b/lib/open_api_sdk/models/shared/target_resource.rb new file mode 100644 index 00000000..cd7b3a76 --- /dev/null +++ b/lib/open_api_sdk/models/shared/target_resource.rb @@ -0,0 +1,19 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class TargetResource < T::Enum + enums do + DOCUMENT = new('document') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/targetsdk.rb b/lib/open_api_sdk/models/shared/targetsdk.rb index 37f38d8b..f9dc988c 100644 --- a/lib/open_api_sdk/models/shared/targetsdk.rb +++ b/lib/open_api_sdk/models/shared/targetsdk.rb @@ -5,136 +5,204 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class TargetSDK < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class TargetSDK + extend T::Sig + include Crystalline::MetadataFields - # gen.lock ID (expected to be a uuid). The same as `id`. A unique identifier for the target. - field :generate_gen_lock_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_id') } } - # eg `typescript`, `terraform`, `python` - field :generate_target, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target') } } - # Unique identifier of the target the same as `generate_gen_lock_id` - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - # Timestamp when the event was created in the database. - field :last_event_created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_event_created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # Unique identifier of the last event for the target - field :last_event_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_event_id') } } - # Type of interaction. - field :last_event_interaction_type, ::OpenApiSDK::Shared::InteractionType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_event_interaction_type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::InteractionType, false) } } - # Remote commit ID. - field :commit_head, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('commit_head') } } - # Name of the CI environment. - field :continuous_integration_environment, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('continuous_integration_environment') } } - # Error message if the last event was not successful. - field :error, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } - # Version of the generated target (post generation) - field :generate_config_post_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_post_version') } } - # Eligible feature set during generation - field :generate_eligible_features, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_eligible_features') } } - # Features prior to generation - field :generate_gen_lock_pre_features, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_features') } } - # Artifact version for the Previous Generation - field :generate_gen_lock_pre_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_version') } } - # The number of operations ignored in generation. - field :generate_number_of_operations_ignored, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_number_of_operations_ignored') } } - # The number of operations used in generation. - field :generate_number_of_operations_used, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_number_of_operations_used') } } - # Indicates whether the target was considered published. - field :generate_published, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_published') } } - # The workflow name of the target. - field :generate_target_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target_name') } } - # The version of the Speakeasy generator for this target eg v2 of the typescript generator. - field :generate_target_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target_version') } } - # GitHub organization of the action. - field :gh_action_organization, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_organization') } } - # GitHub Action ref value. - field :gh_action_ref, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_ref') } } - # GitHub repository of the action. - field :gh_action_repository, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_repository') } } - # Link to the GitHub action run. - field :gh_action_run_link, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_run_link') } } - # Version of the GitHub action. - field :gh_action_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_version') } } - # Current working directory relative to the git root. - field :git_relative_cwd, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_relative_cwd') } } - # Default owner for git remote. - field :git_remote_default_owner, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_remote_default_owner') } } - # Default repository name for git remote. - field :git_remote_default_repo, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_remote_default_repo') } } - # User email from git configuration. - field :git_user_email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_user_email') } } - # User's name from git configuration. (not GitHub username) - field :git_user_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_user_name') } } - # Remote hostname. - field :hostname, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('hostname') } } - # Name of the published package. - field :publish_package_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_name') } } - # Name of the registry where the package was published. - field :publish_package_registry_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_registry_name') } } - # URL of the published package. - field :publish_package_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_url') } } - # Version of the published package. - field :publish_package_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_version') } } - # Label of the git repository. - field :repo_label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo_label') } } - # The blob digest of the source. - field :source_blob_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_blob_digest') } } - # The namespace name of the source. - field :source_namespace_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_namespace_name') } } - # The revision digest of the source. - field :source_revision_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_revision_digest') } } - # Indicates whether the event was successful. - field :success, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success') } } - # Workflow file (post execution) - field :workflow_post_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_post_raw') } } - # Workflow file (prior to execution) - field :workflow_pre_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_pre_raw') } } + # gen.lock ID (expected to be a uuid). The same as `id`. A unique identifier for the target. + field :generate_gen_lock_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_id') } } + # eg `typescript`, `terraform`, `python` + field :generate_target, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target') } } + # Unique identifier of the target the same as `generate_gen_lock_id` + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Timestamp when the event was created in the database. + field :last_event_created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_event_created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Unique identifier of the last event for the target + field :last_event_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_event_id') } } + # Type of interaction. + field :last_event_interaction_type, Models::Shared::InteractionType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_event_interaction_type'), 'decoder': Utils.enum_from_string(Models::Shared::InteractionType, false) } } + # Remote commit ID. + field :commit_head, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('commit_head') } } + # Name of the CI environment. + field :continuous_integration_environment, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('continuous_integration_environment') } } + # Error message if the last event was not successful. + field :error, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } + # Version of the generated target (post generation) + field :generate_config_post_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_config_post_version') } } + # Eligible feature set during generation + field :generate_eligible_features, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_eligible_features') } } + # Features prior to generation + field :generate_gen_lock_pre_features, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_features') } } + # Artifact version for the Previous Generation + field :generate_gen_lock_pre_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_gen_lock_pre_version') } } + # The number of operations ignored in generation. + field :generate_number_of_operations_ignored, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_number_of_operations_ignored') } } + # The number of operations used in generation. + field :generate_number_of_operations_used, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_number_of_operations_used') } } + # The number of terraform resources used in generation. + field :generate_number_of_terraform_resources, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_number_of_terraform_resources') } } + # Indicates whether the target was considered published. + field :generate_published, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_published') } } + # The workflow name of the target. + field :generate_target_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target_name') } } + # The version of the Speakeasy generator for this target eg v2 of the typescript generator. + field :generate_target_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('generate_target_version') } } + # GitHub organization of the action. + field :gh_action_organization, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_organization') } } + # GitHub Action ref value. + field :gh_action_ref, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_ref') } } + # GitHub repository of the action. + field :gh_action_repository, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_repository') } } + # Link to the GitHub action run. + field :gh_action_run_link, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_run_link') } } + # Version of the GitHub action. + field :gh_action_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('gh_action_version') } } + # Current working directory relative to the git root. + field :git_relative_cwd, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_relative_cwd') } } + # Default owner for git remote. + field :git_remote_default_owner, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_remote_default_owner') } } + # Default repository name for git remote. + field :git_remote_default_repo, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_remote_default_repo') } } + # User email from git configuration. + field :git_user_email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_user_email') } } + # User's name from git configuration. (not GitHub username) + field :git_user_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('git_user_name') } } + # Remote hostname. + field :hostname, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('hostname') } } + # Timestamp when the last publishing event was created. + field :last_publish_created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_publish_created_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + # Link to the GitHub action run for the last publishing event. + field :last_publish_gh_action_run_link, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_publish_gh_action_run_link') } } + # Name of the published package. + field :publish_package_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_name') } } + # Name of the registry where the package was published. + field :publish_package_registry_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_registry_name') } } + # URL of the published package. + field :publish_package_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_url') } } + # Version of the published package. + field :publish_package_version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publish_package_version') } } + # Label of the git repository. + field :repo_label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repo_label') } } + # The blob digest of the source. + field :source_blob_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_blob_digest') } } + # The namespace name of the source. + field :source_namespace_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_namespace_name') } } + # The revision digest of the source. + field :source_revision_digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source_revision_digest') } } + # Indicates whether the event was successful. + field :success, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success') } } + # Workflow lock file (post execution) + field :workflow_lock_post_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_lock_post_raw') } } + # Workflow lock file (prior to execution) + field :workflow_lock_pre_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_lock_pre_raw') } } + # Workflow file (post execution) + field :workflow_post_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_post_raw') } } + # Workflow file (prior to execution) + field :workflow_pre_raw, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workflow_pre_raw') } } - sig { params(generate_gen_lock_id: ::String, generate_target: ::String, id: ::String, last_event_created_at: ::DateTime, last_event_id: ::String, last_event_interaction_type: ::OpenApiSDK::Shared::InteractionType, commit_head: T.nilable(::String), continuous_integration_environment: T.nilable(::String), error: T.nilable(::String), generate_config_post_version: T.nilable(::String), generate_eligible_features: T.nilable(::String), generate_gen_lock_pre_features: T.nilable(::String), generate_gen_lock_pre_version: T.nilable(::String), generate_number_of_operations_ignored: T.nilable(::Integer), generate_number_of_operations_used: T.nilable(::Integer), generate_published: T.nilable(T::Boolean), generate_target_name: T.nilable(::String), generate_target_version: T.nilable(::String), gh_action_organization: T.nilable(::String), gh_action_ref: T.nilable(::String), gh_action_repository: T.nilable(::String), gh_action_run_link: T.nilable(::String), gh_action_version: T.nilable(::String), git_relative_cwd: T.nilable(::String), git_remote_default_owner: T.nilable(::String), git_remote_default_repo: T.nilable(::String), git_user_email: T.nilable(::String), git_user_name: T.nilable(::String), hostname: T.nilable(::String), publish_package_name: T.nilable(::String), publish_package_registry_name: T.nilable(::String), publish_package_url: T.nilable(::String), publish_package_version: T.nilable(::String), repo_label: T.nilable(::String), source_blob_digest: T.nilable(::String), source_namespace_name: T.nilable(::String), source_revision_digest: T.nilable(::String), success: T.nilable(T::Boolean), workflow_post_raw: T.nilable(::String), workflow_pre_raw: T.nilable(::String)).void } - def initialize(generate_gen_lock_id: nil, generate_target: nil, id: nil, last_event_created_at: nil, last_event_id: nil, last_event_interaction_type: nil, commit_head: nil, continuous_integration_environment: nil, error: nil, generate_config_post_version: nil, generate_eligible_features: nil, generate_gen_lock_pre_features: nil, generate_gen_lock_pre_version: nil, generate_number_of_operations_ignored: nil, generate_number_of_operations_used: nil, generate_published: nil, generate_target_name: nil, generate_target_version: nil, gh_action_organization: nil, gh_action_ref: nil, gh_action_repository: nil, gh_action_run_link: nil, gh_action_version: nil, git_relative_cwd: nil, git_remote_default_owner: nil, git_remote_default_repo: nil, git_user_email: nil, git_user_name: nil, hostname: nil, publish_package_name: nil, publish_package_registry_name: nil, publish_package_url: nil, publish_package_version: nil, repo_label: nil, source_blob_digest: nil, source_namespace_name: nil, source_revision_digest: nil, success: nil, workflow_post_raw: nil, workflow_pre_raw: nil) - @generate_gen_lock_id = generate_gen_lock_id - @generate_target = generate_target - @id = id - @last_event_created_at = last_event_created_at - @last_event_id = last_event_id - @last_event_interaction_type = last_event_interaction_type - @commit_head = commit_head - @continuous_integration_environment = continuous_integration_environment - @error = error - @generate_config_post_version = generate_config_post_version - @generate_eligible_features = generate_eligible_features - @generate_gen_lock_pre_features = generate_gen_lock_pre_features - @generate_gen_lock_pre_version = generate_gen_lock_pre_version - @generate_number_of_operations_ignored = generate_number_of_operations_ignored - @generate_number_of_operations_used = generate_number_of_operations_used - @generate_published = generate_published - @generate_target_name = generate_target_name - @generate_target_version = generate_target_version - @gh_action_organization = gh_action_organization - @gh_action_ref = gh_action_ref - @gh_action_repository = gh_action_repository - @gh_action_run_link = gh_action_run_link - @gh_action_version = gh_action_version - @git_relative_cwd = git_relative_cwd - @git_remote_default_owner = git_remote_default_owner - @git_remote_default_repo = git_remote_default_repo - @git_user_email = git_user_email - @git_user_name = git_user_name - @hostname = hostname - @publish_package_name = publish_package_name - @publish_package_registry_name = publish_package_registry_name - @publish_package_url = publish_package_url - @publish_package_version = publish_package_version - @repo_label = repo_label - @source_blob_digest = source_blob_digest - @source_namespace_name = source_namespace_name - @source_revision_digest = source_revision_digest - @success = success - @workflow_post_raw = workflow_post_raw - @workflow_pre_raw = workflow_pre_raw + sig { params(generate_gen_lock_id: ::String, generate_target: ::String, id: ::String, last_event_created_at: ::DateTime, last_event_id: ::String, last_event_interaction_type: Models::Shared::InteractionType, commit_head: T.nilable(::String), continuous_integration_environment: T.nilable(::String), error: T.nilable(::String), generate_config_post_version: T.nilable(::String), generate_eligible_features: T.nilable(::String), generate_gen_lock_pre_features: T.nilable(::String), generate_gen_lock_pre_version: T.nilable(::String), generate_number_of_operations_ignored: T.nilable(::Integer), generate_number_of_operations_used: T.nilable(::Integer), generate_number_of_terraform_resources: T.nilable(::Integer), generate_published: T.nilable(T::Boolean), generate_target_name: T.nilable(::String), generate_target_version: T.nilable(::String), gh_action_organization: T.nilable(::String), gh_action_ref: T.nilable(::String), gh_action_repository: T.nilable(::String), gh_action_run_link: T.nilable(::String), gh_action_version: T.nilable(::String), git_relative_cwd: T.nilable(::String), git_remote_default_owner: T.nilable(::String), git_remote_default_repo: T.nilable(::String), git_user_email: T.nilable(::String), git_user_name: T.nilable(::String), hostname: T.nilable(::String), last_publish_created_at: T.nilable(::DateTime), last_publish_gh_action_run_link: T.nilable(::String), publish_package_name: T.nilable(::String), publish_package_registry_name: T.nilable(::String), publish_package_url: T.nilable(::String), publish_package_version: T.nilable(::String), repo_label: T.nilable(::String), source_blob_digest: T.nilable(::String), source_namespace_name: T.nilable(::String), source_revision_digest: T.nilable(::String), success: T.nilable(T::Boolean), workflow_lock_post_raw: T.nilable(::String), workflow_lock_pre_raw: T.nilable(::String), workflow_post_raw: T.nilable(::String), workflow_pre_raw: T.nilable(::String)).void } + def initialize(generate_gen_lock_id: nil, generate_target: nil, id: nil, last_event_created_at: nil, last_event_id: nil, last_event_interaction_type: nil, commit_head: nil, continuous_integration_environment: nil, error: nil, generate_config_post_version: nil, generate_eligible_features: nil, generate_gen_lock_pre_features: nil, generate_gen_lock_pre_version: nil, generate_number_of_operations_ignored: nil, generate_number_of_operations_used: nil, generate_number_of_terraform_resources: nil, generate_published: nil, generate_target_name: nil, generate_target_version: nil, gh_action_organization: nil, gh_action_ref: nil, gh_action_repository: nil, gh_action_run_link: nil, gh_action_version: nil, git_relative_cwd: nil, git_remote_default_owner: nil, git_remote_default_repo: nil, git_user_email: nil, git_user_name: nil, hostname: nil, last_publish_created_at: nil, last_publish_gh_action_run_link: nil, publish_package_name: nil, publish_package_registry_name: nil, publish_package_url: nil, publish_package_version: nil, repo_label: nil, source_blob_digest: nil, source_namespace_name: nil, source_revision_digest: nil, success: nil, workflow_lock_post_raw: nil, workflow_lock_pre_raw: nil, workflow_post_raw: nil, workflow_pre_raw: nil) + @generate_gen_lock_id = generate_gen_lock_id + @generate_target = generate_target + @id = id + @last_event_created_at = last_event_created_at + @last_event_id = last_event_id + @last_event_interaction_type = last_event_interaction_type + @commit_head = commit_head + @continuous_integration_environment = continuous_integration_environment + @error = error + @generate_config_post_version = generate_config_post_version + @generate_eligible_features = generate_eligible_features + @generate_gen_lock_pre_features = generate_gen_lock_pre_features + @generate_gen_lock_pre_version = generate_gen_lock_pre_version + @generate_number_of_operations_ignored = generate_number_of_operations_ignored + @generate_number_of_operations_used = generate_number_of_operations_used + @generate_number_of_terraform_resources = generate_number_of_terraform_resources + @generate_published = generate_published + @generate_target_name = generate_target_name + @generate_target_version = generate_target_version + @gh_action_organization = gh_action_organization + @gh_action_ref = gh_action_ref + @gh_action_repository = gh_action_repository + @gh_action_run_link = gh_action_run_link + @gh_action_version = gh_action_version + @git_relative_cwd = git_relative_cwd + @git_remote_default_owner = git_remote_default_owner + @git_remote_default_repo = git_remote_default_repo + @git_user_email = git_user_email + @git_user_name = git_user_name + @hostname = hostname + @last_publish_created_at = last_publish_created_at + @last_publish_gh_action_run_link = last_publish_gh_action_run_link + @publish_package_name = publish_package_name + @publish_package_registry_name = publish_package_registry_name + @publish_package_url = publish_package_url + @publish_package_version = publish_package_version + @repo_label = repo_label + @source_blob_digest = source_blob_digest + @source_namespace_name = source_namespace_name + @source_revision_digest = source_revision_digest + @success = success + @workflow_lock_post_raw = workflow_lock_post_raw + @workflow_lock_pre_raw = workflow_lock_pre_raw + @workflow_post_raw = workflow_post_raw + @workflow_pre_raw = workflow_pre_raw + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @generate_gen_lock_id == other.generate_gen_lock_id + return false unless @generate_target == other.generate_target + return false unless @id == other.id + return false unless @last_event_created_at == other.last_event_created_at + return false unless @last_event_id == other.last_event_id + return false unless @last_event_interaction_type == other.last_event_interaction_type + return false unless @commit_head == other.commit_head + return false unless @continuous_integration_environment == other.continuous_integration_environment + return false unless @error == other.error + return false unless @generate_config_post_version == other.generate_config_post_version + return false unless @generate_eligible_features == other.generate_eligible_features + return false unless @generate_gen_lock_pre_features == other.generate_gen_lock_pre_features + return false unless @generate_gen_lock_pre_version == other.generate_gen_lock_pre_version + return false unless @generate_number_of_operations_ignored == other.generate_number_of_operations_ignored + return false unless @generate_number_of_operations_used == other.generate_number_of_operations_used + return false unless @generate_number_of_terraform_resources == other.generate_number_of_terraform_resources + return false unless @generate_published == other.generate_published + return false unless @generate_target_name == other.generate_target_name + return false unless @generate_target_version == other.generate_target_version + return false unless @gh_action_organization == other.gh_action_organization + return false unless @gh_action_ref == other.gh_action_ref + return false unless @gh_action_repository == other.gh_action_repository + return false unless @gh_action_run_link == other.gh_action_run_link + return false unless @gh_action_version == other.gh_action_version + return false unless @git_relative_cwd == other.git_relative_cwd + return false unless @git_remote_default_owner == other.git_remote_default_owner + return false unless @git_remote_default_repo == other.git_remote_default_repo + return false unless @git_user_email == other.git_user_email + return false unless @git_user_name == other.git_user_name + return false unless @hostname == other.hostname + return false unless @last_publish_created_at == other.last_publish_created_at + return false unless @last_publish_gh_action_run_link == other.last_publish_gh_action_run_link + return false unless @publish_package_name == other.publish_package_name + return false unless @publish_package_registry_name == other.publish_package_registry_name + return false unless @publish_package_url == other.publish_package_url + return false unless @publish_package_version == other.publish_package_version + return false unless @repo_label == other.repo_label + return false unless @source_blob_digest == other.source_blob_digest + return false unless @source_namespace_name == other.source_namespace_name + return false unless @source_revision_digest == other.source_revision_digest + return false unless @success == other.success + return false unless @workflow_lock_post_raw == other.workflow_lock_post_raw + return false unless @workflow_lock_pre_raw == other.workflow_lock_pre_raw + return false unless @workflow_post_raw == other.workflow_post_raw + return false unless @workflow_pre_raw == other.workflow_pre_raw + true + end end end end diff --git a/lib/open_api_sdk/models/shared/type.rb b/lib/open_api_sdk/models/shared/type.rb index 658c1f3a..95580673 100644 --- a/lib/open_api_sdk/models/shared/type.rb +++ b/lib/open_api_sdk/models/shared/type.rb @@ -5,13 +5,15 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class Type < T::Enum - enums do - LINTING = new('linting') - CHANGES = new('changes') + class Type < T::Enum + enums do + LINTING = new('linting') + CHANGES = new('changes') + end end end end diff --git a/lib/open_api_sdk/models/shared/unboundedrequest.rb b/lib/open_api_sdk/models/shared/unboundedrequest.rb deleted file mode 100644 index 7b306f71..00000000 --- a/lib/open_api_sdk/models/shared/unboundedrequest.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # An UnboundedRequest represents the HAR content capture by Speakeasy when logging a request. - class UnboundedRequest < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Creation timestamp. - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # The HAR content of the request. - field :har, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('har') } } - # The size of the HAR content in bytes. - field :har_size_bytes, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('har_size_bytes') } } - # The ID of this request. - field :request_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('request_id') } } - # The workspace ID this request was made to. - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - - - sig { params(created_at: ::DateTime, har: ::String, har_size_bytes: ::Integer, request_id: ::String, workspace_id: ::String).void } - def initialize(created_at: nil, har: nil, har_size_bytes: nil, request_id: nil, workspace_id: nil) - @created_at = created_at - @har = har - @har_size_bytes = har_size_bytes - @request_id = request_id - @workspace_id = workspace_id - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/usagesnippet.rb b/lib/open_api_sdk/models/shared/usagesnippet.rb new file mode 100644 index 00000000..3d9704c8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/usagesnippet.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class UsageSnippet + extend T::Sig + include Crystalline::MetadataFields + + # The code snippet + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # The language of the snippet + field :language, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('language') } } + # The HTTP method of the operation + field :method, ::Object, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('method') } } + # The operation ID for the snippet + field :operation_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('operationId') } } + # The path of the operation + field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } + + + sig { params(code: ::String, language: ::String, method: ::Object, operation_id: ::String, path: ::String).void } + def initialize(code: nil, language: nil, method: nil, operation_id: nil, path: nil) + @code = code + @language = language + @method = method + @operation_id = operation_id + @path = path + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @code == other.code + return false unless @language == other.language + return false unless @method == other.method + return false unless @operation_id == other.operation_id + return false unless @path == other.path + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/usagesnippets.rb b/lib/open_api_sdk/models/shared/usagesnippets.rb new file mode 100644 index 00000000..3f403b2e --- /dev/null +++ b/lib/open_api_sdk/models/shared/usagesnippets.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class UsageSnippets + extend T::Sig + include Crystalline::MetadataFields + + + field :snippets, T::Array[Models::Shared::UsageSnippet], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('snippets') } } + + + sig { params(snippets: T::Array[Models::Shared::UsageSnippet]).void } + def initialize(snippets: nil) + @snippets = snippets + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @snippets == other.snippets + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/user.rb b/lib/open_api_sdk/models/shared/user.rb index 4a8a0da0..8ec5f492 100644 --- a/lib/open_api_sdk/models/shared/user.rb +++ b/lib/open_api_sdk/models/shared/user.rb @@ -5,55 +5,88 @@ module OpenApiSDK - module Shared - - - class User < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Indicates whether the user is an admin. - field :admin, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('admin') } } - # Indicates whether the user has been confirmed. - field :confirmed, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('confirmed') } } - # Timestamp of the user's creation. - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # Display name of the user. - field :display_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_name') } } - # Email address of the user. - field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } - # Indicates whether the email address has been verified. - field :email_verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } - # Unique identifier for the user. - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - # Timestamp of the user's last update. - field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # Indicates whether the user has been whitelisted. - field :whitelisted, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('whitelisted') } } - # Identifier of the default workspace. - field :default_workspace_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('default_workspace_id') } } - # GitHub handle of the user. - field :github_handle, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('github_handle') } } - # Timestamp of the last login. - field :last_login_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_login_at'), 'decoder': Utils.datetime_from_iso_format(true) } } - # URL of the user's photo. - field :photo_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('photo_url') } } - - - sig { params(admin: T::Boolean, confirmed: T::Boolean, created_at: ::DateTime, display_name: ::String, email: ::String, email_verified: T::Boolean, id: ::String, updated_at: ::DateTime, whitelisted: T::Boolean, default_workspace_id: T.nilable(::String), github_handle: T.nilable(::String), last_login_at: T.nilable(::DateTime), photo_url: T.nilable(::String)).void } - def initialize(admin: nil, confirmed: nil, created_at: nil, display_name: nil, email: nil, email_verified: nil, id: nil, updated_at: nil, whitelisted: nil, default_workspace_id: nil, github_handle: nil, last_login_at: nil, photo_url: nil) - @admin = admin - @confirmed = confirmed - @created_at = created_at - @display_name = display_name - @email = email - @email_verified = email_verified - @id = id - @updated_at = updated_at - @whitelisted = whitelisted - @default_workspace_id = default_workspace_id - @github_handle = github_handle - @last_login_at = last_login_at - @photo_url = photo_url + module Models + module Shared + + + class User + extend T::Sig + include Crystalline::MetadataFields + + # Indicates whether the user is an admin. + field :admin, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('admin') } } + # Indicates whether the user has been confirmed. + field :confirmed, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('confirmed') } } + # Timestamp of the user's creation. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Display name of the user. + field :display_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_name') } } + # Email address of the user. + field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # Indicates whether the email address has been verified. + field :email_verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } + # Unique identifier for the user. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Timestamp of the user's last update. + field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Indicates whether the user has been whitelisted. + field :whitelisted, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('whitelisted') } } + # Identifier of the default workspace. + field :default_workspace_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('default_workspace_id') } } + # GitHub handle of the user. + field :github_handle, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('github_handle') } } + # Indicates whether the user has created an API key. Not always populated + field :has_created_api_key, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('has_created_api_key') } } + # Indicates whether the user is internal. + field :internal, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('internal') } } + # Timestamp of the last login. + field :last_login_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_login_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + # URL of the user's photo. + field :photo_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('photo_url') } } + # Hash used for pylon identity verification returned on v1/user. + field :pylon_identity_hash, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pylon_identity_hash') } } + + + sig { params(admin: T::Boolean, confirmed: T::Boolean, created_at: ::DateTime, display_name: ::String, email: ::String, email_verified: T::Boolean, id: ::String, updated_at: ::DateTime, whitelisted: T::Boolean, default_workspace_id: T.nilable(::String), github_handle: T.nilable(::String), has_created_api_key: T.nilable(T::Boolean), internal: T.nilable(T::Boolean), last_login_at: T.nilable(::DateTime), photo_url: T.nilable(::String), pylon_identity_hash: T.nilable(::String)).void } + def initialize(admin: nil, confirmed: nil, created_at: nil, display_name: nil, email: nil, email_verified: nil, id: nil, updated_at: nil, whitelisted: nil, default_workspace_id: nil, github_handle: nil, has_created_api_key: nil, internal: nil, last_login_at: nil, photo_url: nil, pylon_identity_hash: nil) + @admin = admin + @confirmed = confirmed + @created_at = created_at + @display_name = display_name + @email = email + @email_verified = email_verified + @id = id + @updated_at = updated_at + @whitelisted = whitelisted + @default_workspace_id = default_workspace_id + @github_handle = github_handle + @has_created_api_key = has_created_api_key + @internal = internal + @last_login_at = last_login_at + @photo_url = photo_url + @pylon_identity_hash = pylon_identity_hash + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @admin == other.admin + return false unless @confirmed == other.confirmed + return false unless @created_at == other.created_at + return false unless @display_name == other.display_name + return false unless @email == other.email + return false unless @email_verified == other.email_verified + return false unless @id == other.id + return false unless @updated_at == other.updated_at + return false unless @whitelisted == other.whitelisted + return false unless @default_workspace_id == other.default_workspace_id + return false unless @github_handle == other.github_handle + return false unless @has_created_api_key == other.has_created_api_key + return false unless @internal == other.internal + return false unless @last_login_at == other.last_login_at + return false unless @photo_url == other.photo_url + return false unless @pylon_identity_hash == other.pylon_identity_hash + true + end end end end diff --git a/lib/open_api_sdk/models/shared/v2descriptor.rb b/lib/open_api_sdk/models/shared/v2descriptor.rb index 2880065c..907737b9 100644 --- a/lib/open_api_sdk/models/shared/v2descriptor.rb +++ b/lib/open_api_sdk/models/shared/v2descriptor.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Shared - - # V2 descriptor - class V2Descriptor < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # V2 descriptor + class V2Descriptor + extend T::Sig + include Crystalline::MetadataFields - # Annotations - field :annotations, T.nilable(::OpenApiSDK::Shared::Annotations), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('annotations') } } - # Digest - field :digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('digest') } } - # Media type - field :media_type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mediaType') } } - # Size - field :size, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } + # Annotations + field :annotations, T.nilable(Models::Shared::Annotations), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('annotations') } } + # Digest + field :digest, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('digest') } } + # Media type + field :media_type, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mediaType') } } + # Size + field :size, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } - sig { params(annotations: T.nilable(::OpenApiSDK::Shared::Annotations), digest: T.nilable(::String), media_type: T.nilable(::String), size: T.nilable(::Integer)).void } - def initialize(annotations: nil, digest: nil, media_type: nil, size: nil) - @annotations = annotations - @digest = digest - @media_type = media_type - @size = size + sig { params(annotations: T.nilable(Models::Shared::Annotations), digest: T.nilable(::String), media_type: T.nilable(::String), size: T.nilable(::Integer)).void } + def initialize(annotations: nil, digest: nil, media_type: nil, size: nil) + @annotations = annotations + @digest = digest + @media_type = media_type + @size = size + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @annotations == other.annotations + return false unless @digest == other.digest + return false unless @media_type == other.media_type + return false unless @size == other.size + true + end end end end diff --git a/lib/open_api_sdk/models/shared/valuechange.rb b/lib/open_api_sdk/models/shared/valuechange.rb deleted file mode 100644 index f7859174..00000000 --- a/lib/open_api_sdk/models/shared/valuechange.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - - class ValueChange < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # Represents the previous value of the element. - field :from, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('From') } } - # Represents the current value of the element. - field :to, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('To') } } - - - sig { params(from: ::String, to: ::String).void } - def initialize(from: nil, to: nil) - @from = from - @to = to - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/versionmetadata.rb b/lib/open_api_sdk/models/shared/versionmetadata.rb deleted file mode 100644 index 652a4e98..00000000 --- a/lib/open_api_sdk/models/shared/versionmetadata.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # A set of keys and associated values, attached to a particular version of an Api. - class VersionMetadata < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The ID of the Api this Metadata belongs to. - field :api_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('api_id') } } - # Creation timestamp. - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - # The key for this metadata. - field :meta_key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meta_key') } } - # One of the values for this metadata. - field :meta_value, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meta_value') } } - # The version ID of the Api this Metadata belongs to. - field :version_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version_id') } } - # The workspace ID this Metadata belongs to. - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - - - sig { params(api_id: ::String, created_at: ::DateTime, meta_key: ::String, meta_value: ::String, version_id: ::String, workspace_id: ::String).void } - def initialize(api_id: nil, created_at: nil, meta_key: nil, meta_value: nil, version_id: nil, workspace_id: nil) - @api_id = api_id - @created_at = created_at - @meta_key = meta_key - @meta_value = meta_value - @version_id = version_id - @workspace_id = workspace_id - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/versionmetadata_input.rb b/lib/open_api_sdk/models/shared/versionmetadata_input.rb deleted file mode 100644 index f1b30455..00000000 --- a/lib/open_api_sdk/models/shared/versionmetadata_input.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - - -module OpenApiSDK - module Shared - - # A set of keys and associated values, attached to a particular version of an Api. - class VersionMetadataInput < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - # The key for this metadata. - field :meta_key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meta_key') } } - # One of the values for this metadata. - field :meta_value, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meta_value') } } - - - sig { params(meta_key: ::String, meta_value: ::String).void } - def initialize(meta_key: nil, meta_value: nil) - @meta_key = meta_key - @meta_value = meta_value - end - end - end -end diff --git a/lib/open_api_sdk/models/shared/workflowdocument.rb b/lib/open_api_sdk/models/shared/workflowdocument.rb index cc567e2c..41f4c766 100644 --- a/lib/open_api_sdk/models/shared/workflowdocument.rb +++ b/lib/open_api_sdk/models/shared/workflowdocument.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - - # A document referenced by a workflow - class WorkflowDocument < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A document referenced by a workflow + class WorkflowDocument + extend T::Sig + include Crystalline::MetadataFields - field :location, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('location') } } + field :location, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('location') } } - field :auth, T.nilable(::OpenApiSDK::Shared::Auth), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('auth') } } + field :auth, T.nilable(Models::Shared::Auth), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('auth') } } - sig { params(location: ::String, auth: T.nilable(::OpenApiSDK::Shared::Auth)).void } - def initialize(location: nil, auth: nil) - @location = location - @auth = auth + sig { params(location: ::String, auth: T.nilable(Models::Shared::Auth)).void } + def initialize(location: nil, auth: nil) + @location = location + @auth = auth + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @location == other.location + return false unless @auth == other.auth + true + end end end end diff --git a/lib/open_api_sdk/models/shared/workspace.rb b/lib/open_api_sdk/models/shared/workspace.rb index 03465352..345d2ab3 100644 --- a/lib/open_api_sdk/models/shared/workspace.rb +++ b/lib/open_api_sdk/models/shared/workspace.rb @@ -5,46 +5,62 @@ module OpenApiSDK - module Shared - - # A speakeasy workspace - class Workspace < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig - - - field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - - field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } - - field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } - - field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } - - field :telemetry_disabled, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('telemetry_disabled') } } - - field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - - field :verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('verified') } } - - field :oci_repo, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('oci_repo') } } - - field :oci_repo_created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('oci_repo_created_at'), 'decoder': Utils.datetime_from_iso_format(true) } } - - - sig { params(created_at: ::DateTime, id: ::String, name: ::String, organization_id: ::String, slug: ::String, telemetry_disabled: T::Boolean, updated_at: ::DateTime, verified: T::Boolean, oci_repo: T.nilable(::String), oci_repo_created_at: T.nilable(::DateTime)).void } - def initialize(created_at: nil, id: nil, name: nil, organization_id: nil, slug: nil, telemetry_disabled: nil, updated_at: nil, verified: nil, oci_repo: nil, oci_repo_created_at: nil) - @created_at = created_at - @id = id - @name = name - @organization_id = organization_id - @slug = slug - @telemetry_disabled = telemetry_disabled - @updated_at = updated_at - @verified = verified - @oci_repo = oci_repo - @oci_repo_created_at = oci_repo_created_at + module Models + module Shared + + # A speakeasy workspace + class Workspace + extend T::Sig + include Crystalline::MetadataFields + + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('verified') } } + + field :inactive, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('inactive') } } + # Deprecated. Use organization.telemetry_disabled instead. + # + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :telemetry_disabled, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('telemetry_disabled') } } + + + sig { params(created_at: ::DateTime, id: ::String, name: ::String, organization_id: ::String, slug: ::String, updated_at: ::DateTime, verified: T::Boolean, inactive: T.nilable(T::Boolean), telemetry_disabled: T.nilable(T::Boolean)).void } + def initialize(created_at: nil, id: nil, name: nil, organization_id: nil, slug: nil, updated_at: nil, verified: nil, inactive: nil, telemetry_disabled: nil) + @created_at = created_at + @id = id + @name = name + @organization_id = organization_id + @slug = slug + @updated_at = updated_at + @verified = verified + @inactive = inactive + @telemetry_disabled = telemetry_disabled + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @slug == other.slug + return false unless @updated_at == other.updated_at + return false unless @verified == other.verified + return false unless @inactive == other.inactive + return false unless @telemetry_disabled == other.telemetry_disabled + true + end end end end diff --git a/lib/open_api_sdk/models/shared/workspaceandorganization.rb b/lib/open_api_sdk/models/shared/workspaceandorganization.rb index ed940a1e..1be2666d 100644 --- a/lib/open_api_sdk/models/shared/workspaceandorganization.rb +++ b/lib/open_api_sdk/models/shared/workspaceandorganization.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - - # A workspace and organization - class WorkspaceAndOrganization < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A workspace and organization + class WorkspaceAndOrganization + extend T::Sig + include Crystalline::MetadataFields - # A speakeasy organization - field :organization, ::OpenApiSDK::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } - # A speakeasy workspace - field :workspace, ::OpenApiSDK::Shared::Workspace, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace') } } + # A speakeasy organization + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + # A speakeasy workspace + field :workspace, Models::Shared::Workspace, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace') } } - sig { params(organization: ::OpenApiSDK::Shared::Organization, workspace: ::OpenApiSDK::Shared::Workspace).void } - def initialize(organization: nil, workspace: nil) - @organization = organization - @workspace = workspace + sig { params(organization: Models::Shared::Organization, workspace: Models::Shared::Workspace).void } + def initialize(organization: nil, workspace: nil) + @organization = organization + @workspace = workspace + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @organization == other.organization + return false unless @workspace == other.workspace + true + end end end end diff --git a/lib/open_api_sdk/models/shared/workspacefeatureflag.rb b/lib/open_api_sdk/models/shared/workspacefeatureflag.rb new file mode 100644 index 00000000..6943e050 --- /dev/null +++ b/lib/open_api_sdk/models/shared/workspacefeatureflag.rb @@ -0,0 +1,22 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # WorkspaceFeatureFlag - enum value workspace feature flag + class WorkspaceFeatureFlag < T::Enum + enums do + SCHEMA_REGISTRY = new('schema_registry') + CHANGES_REPORT = new('changes_report') + SKIP_SCHEMA_REGISTRY = new('skip_schema_registry') + WEBHOOKS = new('webhooks') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/workspacefeatureflagrequest.rb b/lib/open_api_sdk/models/shared/workspacefeatureflagrequest.rb new file mode 100644 index 00000000..87a88042 --- /dev/null +++ b/lib/open_api_sdk/models/shared/workspacefeatureflagrequest.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A request to add workspace feature flags + class WorkspaceFeatureFlagRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :feature_flags, T::Array[Models::Shared::WorkspaceFeatureFlag], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_flags') } } + + + sig { params(feature_flags: T::Array[Models::Shared::WorkspaceFeatureFlag]).void } + def initialize(feature_flags: nil) + @feature_flags = feature_flags + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @feature_flags == other.feature_flags + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/workspacefeatureflagresponse.rb b/lib/open_api_sdk/models/shared/workspacefeatureflagresponse.rb index a4471fbf..793443e4 100644 --- a/lib/open_api_sdk/models/shared/workspacefeatureflagresponse.rb +++ b/lib/open_api_sdk/models/shared/workspacefeatureflagresponse.rb @@ -5,19 +5,28 @@ module OpenApiSDK - module Shared - - # Workspace feature flag response - class WorkspaceFeatureFlagResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # Workspace feature flag response + class WorkspaceFeatureFlagResponse + extend T::Sig + include Crystalline::MetadataFields - field :feature_flags, T.nilable(T::Array[::OpenApiSDK::Shared::FeatureFlag]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_flags') } } + field :feature_flags, T.nilable(T::Array[Models::Shared::FeatureFlag]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_flags') } } - sig { params(feature_flags: T.nilable(T::Array[::OpenApiSDK::Shared::FeatureFlag])).void } - def initialize(feature_flags: nil) - @feature_flags = feature_flags + sig { params(feature_flags: T.nilable(T::Array[Models::Shared::FeatureFlag])).void } + def initialize(feature_flags: nil) + @feature_flags = feature_flags + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @feature_flags == other.feature_flags + true + end end end end diff --git a/lib/open_api_sdk/models/shared/workspaceinviteresponse.rb b/lib/open_api_sdk/models/shared/workspaceinviteresponse.rb index fd7f8d77..c683d5df 100644 --- a/lib/open_api_sdk/models/shared/workspaceinviteresponse.rb +++ b/lib/open_api_sdk/models/shared/workspaceinviteresponse.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - - # A response for workspace user invite - class WorkspaceInviteResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A response for workspace user invite + class WorkspaceInviteResponse + extend T::Sig + include Crystalline::MetadataFields - field :relationship, ::OpenApiSDK::Shared::Relationship, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('relationship') } } + field :relationship, Models::Shared::Relationship, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('relationship') } } - field :invite_link, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('invite_link') } } + field :invite_link, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('invite_link') } } - sig { params(relationship: ::OpenApiSDK::Shared::Relationship, invite_link: T.nilable(::String)).void } - def initialize(relationship: nil, invite_link: nil) - @relationship = relationship - @invite_link = invite_link + sig { params(relationship: Models::Shared::Relationship, invite_link: T.nilable(::String)).void } + def initialize(relationship: nil, invite_link: nil) + @relationship = relationship + @invite_link = invite_link + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @relationship == other.relationship + return false unless @invite_link == other.invite_link + true + end end end end diff --git a/lib/open_api_sdk/models/shared/workspaces.rb b/lib/open_api_sdk/models/shared/workspaces.rb index 71d13492..9d11315e 100644 --- a/lib/open_api_sdk/models/shared/workspaces.rb +++ b/lib/open_api_sdk/models/shared/workspaces.rb @@ -5,28 +5,40 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class Workspaces < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class Workspaces + extend T::Sig + include Crystalline::MetadataFields - field :account_type, T.nilable(::OpenApiSDK::Shared::AccountType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::AccountType, true) } } + field :account_type, T.nilable(Models::Shared::AccountType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_type'), 'decoder': Utils.enum_from_string(Models::Shared::AccountType, true) } } - field :id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + field :id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } - field :updated_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + field :updated_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(true) } } - sig { params(account_type: T.nilable(::OpenApiSDK::Shared::AccountType), id: T.nilable(::String), name: T.nilable(::String), updated_at: T.nilable(::DateTime)).void } - def initialize(account_type: nil, id: nil, name: nil, updated_at: nil) - @account_type = account_type - @id = id - @name = name - @updated_at = updated_at + sig { params(account_type: T.nilable(Models::Shared::AccountType), id: T.nilable(::String), name: T.nilable(::String), updated_at: T.nilable(::DateTime)).void } + def initialize(account_type: nil, id: nil, name: nil, updated_at: nil) + @account_type = account_type + @id = id + @name = name + @updated_at = updated_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @account_type == other.account_type + return false unless @id == other.id + return false unless @name == other.name + return false unless @updated_at == other.updated_at + true + end end end end diff --git a/lib/open_api_sdk/models/shared/workspacesettings.rb b/lib/open_api_sdk/models/shared/workspacesettings.rb index 041e5059..7bb36bdc 100644 --- a/lib/open_api_sdk/models/shared/workspacesettings.rb +++ b/lib/open_api_sdk/models/shared/workspacesettings.rb @@ -5,22 +5,40 @@ module OpenApiSDK - module Shared - + module Models + module Shared + - class WorkspaceSettings < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + class WorkspaceSettings + extend T::Sig + include Crystalline::MetadataFields - field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - field :webhook_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('webhook_url') } } + field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + field :webhook_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('webhook_url') } } - sig { params(workspace_id: ::String, webhook_url: T.nilable(::String)).void } - def initialize(workspace_id: nil, webhook_url: nil) - @workspace_id = workspace_id - @webhook_url = webhook_url + field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } + + + sig { params(created_at: ::DateTime, updated_at: ::DateTime, webhook_url: ::String, workspace_id: ::String).void } + def initialize(created_at: nil, updated_at: nil, webhook_url: nil, workspace_id: nil) + @created_at = created_at + @updated_at = updated_at + @webhook_url = webhook_url + @workspace_id = workspace_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @updated_at == other.updated_at + return false unless @webhook_url == other.webhook_url + return false unless @workspace_id == other.workspace_id + true + end end end end diff --git a/lib/open_api_sdk/models/shared/workspaceteamresponse.rb b/lib/open_api_sdk/models/shared/workspaceteamresponse.rb index 162f75bd..51a76541 100644 --- a/lib/open_api_sdk/models/shared/workspaceteamresponse.rb +++ b/lib/open_api_sdk/models/shared/workspaceteamresponse.rb @@ -5,22 +5,32 @@ module OpenApiSDK - module Shared - - # Workspace team response - class WorkspaceTeamResponse < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # Workspace team response + class WorkspaceTeamResponse + extend T::Sig + include Crystalline::MetadataFields - field :users, T::Array[::OpenApiSDK::Shared::User], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('users') } } - # SSO metadata for a workspace - field :sso_metadata, T.nilable(::OpenApiSDK::Shared::SSOMetadata), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sso_metadata') } } + field :users, T::Array[Models::Shared::User], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('users') } } + # SSO metadata for a workspace + field :sso_metadata, T.nilable(Models::Shared::SSOMetadata), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sso_metadata') } } - sig { params(users: T::Array[::OpenApiSDK::Shared::User], sso_metadata: T.nilable(::OpenApiSDK::Shared::SSOMetadata)).void } - def initialize(users: nil, sso_metadata: nil) - @users = users - @sso_metadata = sso_metadata + sig { params(users: T::Array[Models::Shared::User], sso_metadata: T.nilable(Models::Shared::SSOMetadata)).void } + def initialize(users: nil, sso_metadata: nil) + @users = users + @sso_metadata = sso_metadata + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @users == other.users + return false unless @sso_metadata == other.sso_metadata + true + end end end end diff --git a/lib/open_api_sdk/models/shared/workspacetoken.rb b/lib/open_api_sdk/models/shared/workspacetoken.rb index f30763b2..a15d6c52 100644 --- a/lib/open_api_sdk/models/shared/workspacetoken.rb +++ b/lib/open_api_sdk/models/shared/workspacetoken.rb @@ -5,43 +5,68 @@ module OpenApiSDK - module Shared - - # A workspace token - class WorkspaceToken < ::OpenApiSDK::Utils::FieldAugmented - extend T::Sig + module Models + module Shared + + # A workspace token + class WorkspaceToken + extend T::Sig + include Crystalline::MetadataFields - field :alg, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('alg') } } + field :alg, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('alg') } } - field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at') } } + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } - field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } + field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } - field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } - field :created_by, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_by') } } + field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } - field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + field :created_by, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_by') } } - field :last_used, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_used') } } + field :created_by_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_by_name') } } - field :workspace_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspace_id') } } + field :created_by_photo_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_by_photo_url') } } + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } - sig { params(alg: ::String, created_at: ::String, id: ::String, key: ::String, name: ::String, created_by: T.nilable(::String), email: T.nilable(::String), last_used: T.nilable(::String), workspace_id: T.nilable(::String)).void } - def initialize(alg: nil, created_at: nil, id: nil, key: nil, name: nil, created_by: nil, email: nil, last_used: nil, workspace_id: nil) - @alg = alg - @created_at = created_at - @id = id - @key = key - @name = name - @created_by = created_by - @email = email - @last_used = last_used - @workspace_id = workspace_id + field :last_used, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_used'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(alg: ::String, created_at: ::DateTime, id: ::String, key: ::String, name: ::String, workspace_id: ::String, created_by: T.nilable(::String), created_by_name: T.nilable(::String), created_by_photo_url: T.nilable(::String), email: T.nilable(::String), last_used: T.nilable(::DateTime)).void } + def initialize(alg: nil, created_at: nil, id: nil, key: nil, name: nil, workspace_id: nil, created_by: nil, created_by_name: nil, created_by_photo_url: nil, email: nil, last_used: nil) + @alg = alg + @created_at = created_at + @id = id + @key = key + @name = name + @workspace_id = workspace_id + @created_by = created_by + @created_by_name = created_by_name + @created_by_photo_url = created_by_photo_url + @email = email + @last_used = last_used + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @alg == other.alg + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @key == other.key + return false unless @name == other.name + return false unless @workspace_id == other.workspace_id + return false unless @created_by == other.created_by + return false unless @created_by_name == other.created_by_name + return false unless @created_by_photo_url == other.created_by_photo_url + return false unless @email == other.email + return false unless @last_used == other.last_used + true + end end end end diff --git a/lib/open_api_sdk/organizations.rb b/lib/open_api_sdk/organizations.rb index 2d016625..c9d1824f 100644 --- a/lib/open_api_sdk/organizations.rb +++ b/lib/open_api_sdk/organizations.rb @@ -5,13 +5,16 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig class Organizations extend T::Sig - + # REST APIs for managing Organizations (speakeasy L1 Tenancy construct) sig { params(sdk_config: SDKConfiguration).void } def initialize(sdk_config) @@ -19,8 +22,8 @@ def initialize(sdk_config) end - sig { returns(::OpenApiSDK::Operations::GetOrganizationsResponse) } - def get_all + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetOrganizationsResponse) } + def get_all(timeout_ms: nil) # get_all - Get organizations for a user # Returns a list of organizations a user has access too url, params = @sdk_configuration.get_server_details @@ -30,33 +33,108 @@ def get_all headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetOrganizationsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getOrganizations', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::Organization]) - res.organizations = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T::Array[Models::Shared::Organization]) + response = Models::Operations::GetOrganizationsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + organizations: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(request: ::OpenApiSDK::Shared::Organization).returns(::OpenApiSDK::Operations::CreateOrganizationResponse) } - def create(request) + sig { params(request: Models::Shared::Organization, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateOrganizationResponse) } + def create(request:, timeout_ms: nil) # create - Create an organization # Creates an organization url, params = @sdk_configuration.get_server_details @@ -66,53 +144,130 @@ def create(request) req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::CreateOrganizationResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'createOrganization', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Organization) - res.organization = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Organization) + response = Models::Operations::CreateOrganizationResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + organization: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(organization_id: ::String).returns(::OpenApiSDK::Operations::GetOrganizationResponse) } - def get(organization_id) + sig { params(organization_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetOrganizationResponse) } + def get(organization_id:, timeout_ms: nil) # get - Get organization # Get information about a particular organization. - request = ::OpenApiSDK::Operations::GetOrganizationRequest.new( + request = Models::Operations::GetOrganizationRequest.new( organization_id: organization_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetOrganizationRequest, + Models::Operations::GetOrganizationRequest, base_url, '/v1/organization/{organizationID}', request, @@ -122,33 +277,108 @@ def get(organization_id) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetOrganizationResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getOrganization', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Organization) - res.organization = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Organization) + response = Models::Operations::GetOrganizationResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + organization: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { returns(::OpenApiSDK::Operations::CreateFreeTrialResponse) } - def create_free_trial + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateFreeTrialResponse) } + def create_free_trial(timeout_ms: nil) # create_free_trial - Create a free trial for an organization # Creates a free trial for an organization url, params = @sdk_configuration.get_server_details @@ -158,29 +388,100 @@ def create_free_trial headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::CreateFreeTrialResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'createFreeTrial', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CreateFreeTrialResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { returns(::OpenApiSDK::Operations::GetOrganizationUsageResponse) } - def get_usage + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetOrganizationUsageResponse) } + def get_usage(timeout_ms: nil) # get_usage - Get billing usage summary for a particular organization # Returns a billing usage summary by target languages for a particular organization url, params = @sdk_configuration.get_server_details @@ -190,28 +491,447 @@ def get_usage headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getOrganizationUsage', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::OrganizationUsageResponse) + response = Models::Operations::GetOrganizationUsageResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + organization_usage_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - res = ::OpenApiSDK::Operations::GetOrganizationUsageResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + sig { params(request: Models::Shared::OrganizationBillingAddOnRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateBillingAddOnsResponse) } + def create_billing_add_ons(request:, timeout_ms: nil) + # create_billing_add_ons - Create billing add ons + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/organization/add_ons" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'createBillingAddOns', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::OrganizationBillingAddOnResponse) + response = Models::Operations::CreateBillingAddOnsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + organization_billing_add_on_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetBillingAddOnsResponse) } + def get_billing_add_ons(timeout_ms: nil) + # get_billing_add_ons - Get billing add ons + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/organization/add_ons" + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getBillingAddOns', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::OrganizationUsageResponse) - res.organization_usage_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::OrganizationBillingAddOnResponse) + response = Models::Operations::GetBillingAddOnsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + organization_billing_add_on_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(add_on: Models::Shared::BillingAddOn, timeout_ms: T.nilable(Integer)).returns(Models::Operations::DeleteBillingAddOnResponse) } + def delete_billing_add_on(add_on:, timeout_ms: nil) + # delete_billing_add_on - Delete billing add ons + request = Models::Operations::DeleteBillingAddOnRequest.new( + + add_on: add_on + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::DeleteBillingAddOnRequest, + base_url, + '/v1/organization/add_ons/{add_on}', + request, + @sdk_configuration.globals + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'deleteBillingAddOn', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) end - elsif r.status >= 400 && r.status < 500 + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::DeleteBillingAddOnResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end end end diff --git a/lib/open_api_sdk/publishingtokens.rb b/lib/open_api_sdk/publishingtokens.rb new file mode 100644 index 00000000..ca60a643 --- /dev/null +++ b/lib/open_api_sdk/publishingtokens.rb @@ -0,0 +1,857 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class PublishingTokens + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetPublishingTokenResponse) } + def list(timeout_ms: nil) + # list - Get publishing tokens for a workspace + # Returns a publishing token for the current workspace + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/publishing-tokens" + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getPublishingToken', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T::Array[Models::Shared::PublishingToken]) + response = Models::Operations::GetPublishingTokenResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + publishing_tokens: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: T.nilable(Models::Operations::CreatePublishingTokenRequestBody), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreatePublishingTokenResponse) } + def create(request: nil, timeout_ms: nil) + # create - Create a publishing token for a workspace + # Creates a publishing token for the current workspace + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/publishing-tokens" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'createPublishingToken', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::PublishingToken) + response = Models::Operations::CreatePublishingTokenResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + publishing_token: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(token_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetPublishingTokenByIDResponse) } + def get(token_id:, timeout_ms: nil) + # get - Get a specific publishing token + # Get information about a particular publishing token. + request = Models::Operations::GetPublishingTokenByIDRequest.new( + + token_id: token_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::GetPublishingTokenByIDRequest, + base_url, + '/v1/publishing-tokens/{tokenID}', + request, + @sdk_configuration.globals + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getPublishingTokenByID', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::PublishingToken) + response = Models::Operations::GetPublishingTokenByIDResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + publishing_token: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(token_id: ::String, request_body: T.nilable(Models::Operations::UpdatePublishingTokenExpirationRequestBody), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdatePublishingTokenExpirationResponse) } + def update(token_id:, request_body: nil, timeout_ms: nil) + # update - Updates the validitity period of a publishing token + # Updates the validity period of a particular publishing token. + request = Models::Operations::UpdatePublishingTokenExpirationRequest.new( + + token_id: token_id, + request_body: request_body + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::UpdatePublishingTokenExpirationRequest, + base_url, + '/v1/publishing-tokens/{tokenID}', + request, + @sdk_configuration.globals + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json) + headers['content-type'] = req_content_type + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'updatePublishingTokenExpiration', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.put(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::UpdatePublishingTokenExpirationResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(token_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::DeletePublishingTokenResponse) } + def delete(token_id:, timeout_ms: nil) + # delete - Delete a specific publishing token + # Delete a particular publishing token. + request = Models::Operations::DeletePublishingTokenRequest.new( + + token_id: token_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::DeletePublishingTokenRequest, + base_url, + '/v1/publishing-tokens/{tokenID}', + request, + @sdk_configuration.globals + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'deletePublishingToken', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::DeletePublishingTokenResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(token_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetPublishingTokenTargetByIDResponse) } + def resolve_target(token_id:, timeout_ms: nil) + # resolve_target - Get a specific publishing token target + # Get information about a particular publishing token target. + request = Models::Operations::GetPublishingTokenTargetByIDRequest.new( + + token_id: token_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::GetPublishingTokenTargetByIDRequest, + base_url, + '/v1/publishing-tokens/{tokenID}/target', + request, + @sdk_configuration.globals + ) + headers = {} + headers['Accept'] = 'text/yaml' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getPublishingTokenTargetByID', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'text/yaml') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = http_response.env.body + + return Models::Operations::GetPublishingTokenTargetByIDResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + body: obj + ) + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(token_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetPublishingTokenPublicMetadataResponse) } + def resolve_metadata(token_id:, timeout_ms: nil) + # resolve_metadata - Get metadata about the token + # Get information about a particular publishing token. + request = Models::Operations::GetPublishingTokenPublicMetadataRequest.new( + + token_id: token_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::GetPublishingTokenPublicMetadataRequest, + base_url, + '/v1/publishing-tokens/{tokenID}/metadata', + request, + @sdk_configuration.globals + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getPublishingTokenPublicMetadata', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Operations::GetPublishingTokenPublicMetadataResponseBody) + response = Models::Operations::GetPublishingTokenPublicMetadataResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/reports.rb b/lib/open_api_sdk/reports.rb index 9b98a21d..212ec1f0 100644 --- a/lib/open_api_sdk/reports.rb +++ b/lib/open_api_sdk/reports.rb @@ -5,13 +5,16 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig class Reports extend T::Sig - # REST APIs for managing reports + # REST APIs for managing reports (lint reports, change reports, etc) sig { params(sdk_config: SDKConfiguration).void } def initialize(sdk_config) @@ -19,8 +22,8 @@ def initialize(sdk_config) end - sig { params(request: ::OpenApiSDK::Operations::UploadReportRequestBody).returns(::OpenApiSDK::Operations::UploadReportResponse) } - def upload(request) + sig { params(request: Models::Operations::UploadReportRequestBody, timeout_ms: T.nilable(Integer)).returns(Models::Operations::UploadReportResponse) } + def upload(request:, timeout_ms: nil) # upload - Upload a report. url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -29,47 +32,118 @@ def upload(request) req_content_type, data, form = Utils.serialize_request_body(request, :request, :multipart) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::UploadReportResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'uploadReport', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::UploadReportUploadedReport) - res.uploaded_report = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Operations::UploadReportUploadedReport) + response = Models::Operations::UploadReportResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + uploaded_report: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(document_checksum: ::String).returns(::OpenApiSDK::Operations::GetLintingReportSignedUrlResponse) } - def get_signed_url(document_checksum) + sig { params(document_checksum: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetLintingReportSignedUrlResponse) } + def get_signed_url(document_checksum:, timeout_ms: nil) # get_signed_url - Get the signed access url for the linting reports for a particular document. - request = ::OpenApiSDK::Operations::GetLintingReportSignedUrlRequest.new( + request = Models::Operations::GetLintingReportSignedUrlRequest.new( document_checksum: document_checksum ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetLintingReportSignedUrlRequest, + Models::Operations::GetLintingReportSignedUrlRequest, base_url, '/v1/reports/linting/{documentChecksum}', request, @@ -79,37 +153,106 @@ def get_signed_url(document_checksum) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetLintingReportSignedUrlResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getLintingReportSignedUrl', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetLintingReportSignedUrlSignedAccess) - res.signed_access = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Operations::GetLintingReportSignedUrlSignedAccess) + response = Models::Operations::GetLintingReportSignedUrlResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + signed_access: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(document_checksum: ::String).returns(::OpenApiSDK::Operations::GetChangesReportSignedUrlResponse) } - def get_changes_signed_url(document_checksum) + sig { params(document_checksum: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetChangesReportSignedUrlResponse) } + def get_changes_signed_url(document_checksum:, timeout_ms: nil) # get_changes_signed_url - Get the signed access url for the change reports for a particular document. - request = ::OpenApiSDK::Operations::GetChangesReportSignedUrlRequest.new( + request = Models::Operations::GetChangesReportSignedUrlRequest.new( document_checksum: document_checksum ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetChangesReportSignedUrlRequest, + Models::Operations::GetChangesReportSignedUrlRequest, base_url, '/v1/reports/changes/{documentChecksum}', request, @@ -119,23 +262,92 @@ def get_changes_signed_url(document_checksum) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GetChangesReportSignedUrlResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getChangesReportSignedUrl', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetChangesReportSignedUrlSignedAccess) - res.signed_access = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Operations::GetChangesReportSignedUrlSignedAccess) + response = Models::Operations::GetChangesReportSignedUrlResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + signed_access: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end end end diff --git a/lib/open_api_sdk/requests.rb b/lib/open_api_sdk/requests.rb deleted file mode 100644 index 6aea78e6..00000000 --- a/lib/open_api_sdk/requests.rb +++ /dev/null @@ -1,154 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -require 'faraday' -require 'faraday/multipart' -require 'sorbet-runtime' - -module OpenApiSDK - extend T::Sig - class Requests - extend T::Sig - # REST APIs for retrieving request information - - sig { params(sdk_config: SDKConfiguration).void } - def initialize(sdk_config) - @sdk_configuration = sdk_config - end - - - sig { params(filters: T.nilable(::OpenApiSDK::Shared::Filters)).returns(::OpenApiSDK::Operations::QueryEventLogResponse) } - def query(filters = nil) - # query - Query the event log to retrieve a list of requests. - # Supports retrieving a list of request captured by the SDK for this workspace. - # Allows the filtering of requests on a number of criteria such as ApiID, VersionID, Path, Method, etc. - request = ::OpenApiSDK::Operations::QueryEventLogRequest.new( - - filters: filters - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = "#{base_url}/v1/eventlog/query" - headers = {} - query_params = Utils.get_query_params(::OpenApiSDK::Operations::QueryEventLogRequest, request, @sdk_configuration.globals) - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - req.params = query_params - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::QueryEventLogResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::BoundedRequest]) - res.bounded_requests = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(request_id: ::String).returns(::OpenApiSDK::Operations::GetRequestFromEventLogResponse) } - def get(request_id) - # get - Get information about a particular request. - request = ::OpenApiSDK::Operations::GetRequestFromEventLogRequest.new( - - request_id: request_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GetRequestFromEventLogRequest, - base_url, - '/v1/eventlog/{requestID}', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetRequestFromEventLogResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnboundedRequest) - res.unbounded_request = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(request_id: ::String).returns(::OpenApiSDK::Operations::GenerateRequestPostmanCollectionResponse) } - def generate_postman_collection(request_id) - # generate_postman_collection - Generate a Postman collection for a particular request. - # Generates a Postman collection for a particular request. - # Allowing it to be replayed with the same inputs that were captured by the SDK. - request = ::OpenApiSDK::Operations::GenerateRequestPostmanCollectionRequest.new( - - request_id: request_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GenerateRequestPostmanCollectionRequest, - base_url, - '/v1/eventlog/{requestID}/generate/postman', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GenerateRequestPostmanCollectionResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - res.postman_collection = r.env.response_body if Utils.match_content_type(content_type, 'application/octet-stream') - - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - end -end diff --git a/lib/open_api_sdk/schemas.rb b/lib/open_api_sdk/schemas.rb deleted file mode 100644 index 4862efb3..00000000 --- a/lib/open_api_sdk/schemas.rb +++ /dev/null @@ -1,405 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -require 'faraday' -require 'faraday/multipart' -require 'sorbet-runtime' - -module OpenApiSDK - extend T::Sig - class Schemas - extend T::Sig - # REST APIs for managing Schema entities - - sig { params(sdk_config: SDKConfiguration).void } - def initialize(sdk_config) - @sdk_configuration = sdk_config - end - - - sig { params(api_id: ::String, version_id: ::String).returns(::OpenApiSDK::Operations::GetSchemaResponse) } - def get_latest(api_id, version_id) - # get_latest - Get information about the latest schema. - # Returns information about the last uploaded schema for a particular API version. - # This won't include the schema itself, that can be retrieved via the downloadSchema operation. - request = ::OpenApiSDK::Operations::GetSchemaRequest.new( - - api_id: api_id, - version_id: version_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GetSchemaRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/schema', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetSchemaResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Schema) - res.schema = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, request_body: ::OpenApiSDK::Operations::RegisterSchemaRequestBody).returns(::OpenApiSDK::Operations::RegisterSchemaResponse) } - def post(api_id, version_id, request_body) - # post - Register a schema. - # Allows uploading a schema for a particular API version. - # This will be used to populate ApiEndpoints and used as a base for any schema generation if present. - request = ::OpenApiSDK::Operations::RegisterSchemaRequest.new( - - api_id: api_id, - version_id: version_id, - request_body: request_body - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::RegisterSchemaRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/schema', - request, - @sdk_configuration.globals - ) - headers = {} - req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :multipart) - headers['content-type'] = req_content_type - raise StandardError, 'request body is required' if data.nil? && form.nil? - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::RegisterSchemaResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String).returns(::OpenApiSDK::Operations::DownloadSchemaResponse) } - def download(api_id, version_id) - # download - Download the latest schema for a particular apiID. - request = ::OpenApiSDK::Operations::DownloadSchemaRequest.new( - - api_id: api_id, - version_id: version_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::DownloadSchemaRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/schema/download', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json;q=1, application/x-yaml;q=0' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::DownloadSchemaResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - res.two_xx_application_json_schema = r.env.response_body if Utils.match_content_type(content_type, 'application/json') - - res.two_xx_application_x_yaml_schema = r.env.response_body if Utils.match_content_type(content_type, 'application/x-yaml') - - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, base_revision_id: ::String, target_revision_id: ::String).returns(::OpenApiSDK::Operations::GetSchemaDiffResponse) } - def get_diff(api_id, version_id, base_revision_id, target_revision_id) - # get_diff - Get a diff of two schema revisions for an Api. - request = ::OpenApiSDK::Operations::GetSchemaDiffRequest.new( - - api_id: api_id, - version_id: version_id, - base_revision_id: base_revision_id, - target_revision_id: target_revision_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GetSchemaDiffRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/schema/{baseRevisionID}/diff/{targetRevisionID}', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetSchemaDiffResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::SchemaDiff) - res.schema_diff = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, revision_id: ::String).returns(::OpenApiSDK::Operations::DeleteSchemaResponse) } - def delete(api_id, version_id, revision_id) - # delete - Delete a particular schema revision for an Api. - request = ::OpenApiSDK::Operations::DeleteSchemaRequest.new( - - api_id: api_id, - version_id: version_id, - revision_id: revision_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::DeleteSchemaRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.delete(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::DeleteSchemaResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, revision_id: ::String).returns(::OpenApiSDK::Operations::GetSchemaRevisionResponse) } - def get_revision(api_id, version_id, revision_id) - # get_revision - Get information about a particular schema revision for an Api. - # Returns information about the last uploaded schema for a particular schema revision. - # This won't include the schema itself, that can be retrieved via the downloadSchema operation. - request = ::OpenApiSDK::Operations::GetSchemaRevisionRequest.new( - - api_id: api_id, - version_id: version_id, - revision_id: revision_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GetSchemaRevisionRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetSchemaRevisionResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Schema) - res.schema = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, revision_id: ::String).returns(::OpenApiSDK::Operations::DownloadSchemaRevisionResponse) } - def download_revision(api_id, version_id, revision_id) - # download_revision - Download a particular schema revision for an Api. - request = ::OpenApiSDK::Operations::DownloadSchemaRevisionRequest.new( - - api_id: api_id, - version_id: version_id, - revision_id: revision_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::DownloadSchemaRevisionRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}/download', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json;q=1, application/x-yaml;q=0' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::DownloadSchemaRevisionResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - res.two_xx_application_json_schema = r.env.response_body if Utils.match_content_type(content_type, 'application/json') - - res.two_xx_application_x_yaml_schema = r.env.response_body if Utils.match_content_type(content_type, 'application/x-yaml') - - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String).returns(::OpenApiSDK::Operations::GetSchemasResponse) } - def get(api_id, version_id) - # get - Get information about all schemas associated with a particular apiID. - # Returns information the schemas associated with a particular apiID. - # This won't include the schemas themselves, they can be retrieved via the downloadSchema operation. - request = ::OpenApiSDK::Operations::GetSchemasRequest.new( - - api_id: api_id, - version_id: version_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GetSchemasRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/schemas', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetSchemasResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::Schema]) - res.schemata = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - end -end diff --git a/lib/open_api_sdk/schemastore.rb b/lib/open_api_sdk/schemastore.rb new file mode 100644 index 00000000..2d17c339 --- /dev/null +++ b/lib/open_api_sdk/schemastore.rb @@ -0,0 +1,267 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class SchemaStore + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: T.nilable(Models::Operations::GetSchemaStoreItemRequestBody), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetSchemaStoreItemResponse) } + def get_schema_store_item(request: nil, timeout_ms: nil) + # get_schema_store_item - Get a OAS schema from the schema store + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/schema_store" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getSchemaStoreItem', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::SchemaStoreItem) + response = Models::Operations::GetSchemaStoreItemResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + schema_store_item: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Operations::CreateSchemaStoreItemRequestBody, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateSchemaStoreItemResponse) } + def create_schema_store_item(request:, timeout_ms: nil) + # create_schema_store_item - Create a schema in the schema store + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/schema_store" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'createSchemaStoreItem', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::SchemaStoreItem) + response = Models::Operations::CreateSchemaStoreItemResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + schema_store_item: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/sdk_hooks/hooks.rb b/lib/open_api_sdk/sdk_hooks/hooks.rb new file mode 100644 index 00000000..cc36c7da --- /dev/null +++ b/lib/open_api_sdk/sdk_hooks/hooks.rb @@ -0,0 +1,103 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require_relative './registration' +require_relative './types' + +require 'sorbet-runtime' + +module OpenApiSDK + module SDKHooks + class Hooks + extend T::Sig + + sig { void } + def initialize + @sdk_init_hooks = T.let([], T::Array[AbstractSDKInitHook]) + @before_request_hooks = T.let([], T::Array[AbstractBeforeRequestHook]) + @after_success_hooks = T.let([], T::Array[AbstractAfterSuccessHook]) + @after_error_hooks = T.let([], T::Array[AbstractAfterErrorHook]) + Registration.init_hooks self + end + + sig { params(hook: AbstractSDKInitHook).void } + def register_sdk_init_hook(hook) + @sdk_init_hooks << hook + end + + sig { params(hook: AbstractBeforeRequestHook).void } + def register_before_request_hook(hook) + @before_request_hooks << hook + end + + sig { params(hook: AbstractAfterSuccessHook).void } + def register_after_success_hook(hook) + @after_success_hooks << hook + end + + sig { params(hook: AbstractAfterErrorHook).void } + def register_after_error_hook(hook) + @after_error_hooks << hook + end + + sig do + params( + base_url: String, + client: Faraday::Connection + ).returns([String, Faraday::Connection]) + end + def sdk_init(base_url:, client:) + @sdk_init_hooks.each do |hook| + base_url, client = hook.sdk_init(base_url: base_url, client: client) + end + + return base_url, client + end + + sig do + params( + hook_ctx: BeforeRequestHookContext, + request: Faraday::Request + ).returns(Faraday::Request) + end + def before_request(hook_ctx:, request:) + @before_request_hooks.each do |hook| + request = hook.before_request(hook_ctx: hook_ctx, request: request) + end + + request + end + + sig do + params( + hook_ctx: AfterSuccessHookContext, + response: Faraday::Response + ).returns(Faraday::Response) + end + def after_success(hook_ctx:, response:) + @after_success_hooks.each do |hook| + response = hook.after_success(hook_ctx: hook_ctx, response: response) + end + + response + end + + sig do + params( + error: T.nilable(StandardError), + hook_ctx: AfterErrorHookContext, + response: T.nilable(Faraday::Response) + ).returns(T.nilable(Faraday::Response)) + end + def after_error(error:, hook_ctx:, response:) + @after_error_hooks.each do |hook| + response = hook.after_error(error: error, hook_ctx: hook_ctx, response: response) + end + + response + end + end + end +end diff --git a/lib/open_api_sdk/sdk_hooks/registration.rb b/lib/open_api_sdk/sdk_hooks/registration.rb new file mode 100644 index 00000000..5e6987e4 --- /dev/null +++ b/lib/open_api_sdk/sdk_hooks/registration.rb @@ -0,0 +1,35 @@ +# typed: true +# frozen_string_literal: true + +# +# This file is only ever generated once on the first generation and then is free to be modified. +# Any hooks you wish to add should be registered in the init_hooks method. +# +# Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance. +# + +require_relative './types' + +require 'sorbet-runtime' + +module OpenApiSDK + module SDKHooks + class Registration + extend T::Sig + + sig do + params( + hooks: Hooks + ).void + end + def self.init_hooks(hooks) + # example_hook = ExampleHook.new + + # hooks.register_sdk_init_hook example_hook + # hooks.register_before_request_hook example_hook + # hooks.register_after_error_hook example_hook + # hooks.register_after_success_hook example_hook + end + end + end +end diff --git a/lib/open_api_sdk/sdk_hooks/types.rb b/lib/open_api_sdk/sdk_hooks/types.rb new file mode 100644 index 00000000..f2f97109 --- /dev/null +++ b/lib/open_api_sdk/sdk_hooks/types.rb @@ -0,0 +1,152 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'sorbet-runtime' + +module OpenApiSDK + module SDKHooks + class HookContext + extend T::Sig + + sig { returns(String) } + attr_accessor :base_url + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :oauth2_scopes + + sig { returns(String) } + attr_accessor :operation_id + + sig { returns(T.nilable(T.proc.returns(T.untyped))) } + attr_accessor :security_source + + sig do + params( + base_url: String, + oauth2_scopes: T.nilable(T::Array[String]), + operation_id: String, + security_source: T.nilable(T.proc.returns(T.untyped)) + ).void + end + def initialize(base_url:, oauth2_scopes:, operation_id:, security_source:) + @base_url = T.let(base_url, String) + @oauth2_scopes = T.let(oauth2_scopes, T.nilable(T::Array[String])) + @operation_id = T.let(operation_id, String) + @security_source = T.let(security_source, T.nilable(T.proc.returns(T.untyped))) + end + end + + class BeforeRequestHookContext < HookContext + extend T::Sig + + sig do + params( + hook_ctx: HookContext + ).void + end + def initialize(hook_ctx:) + super( + base_url: hook_ctx.base_url, + operation_id: hook_ctx.operation_id, + oauth2_scopes: hook_ctx.oauth2_scopes, + security_source: hook_ctx.security_source + ) + end + end + + class AfterSuccessHookContext < HookContext + extend T::Sig + + sig do + params( + hook_ctx: HookContext + ).void + end + def initialize(hook_ctx:) + super( + base_url: hook_ctx.base_url, + operation_id: hook_ctx.operation_id, + oauth2_scopes: hook_ctx.oauth2_scopes, + security_source: hook_ctx.security_source + ) + end + end + + class AfterErrorHookContext < HookContext + extend T::Sig + + sig do + params( + hook_ctx: HookContext + ).void + end + def initialize(hook_ctx:) + super( + base_url: hook_ctx.base_url, + operation_id: hook_ctx.operation_id, + oauth2_scopes: hook_ctx.oauth2_scopes, + security_source: hook_ctx.security_source + ) + end + end + + module AbstractSDKInitHook + extend T::Sig + extend T::Helpers + abstract! + + sig do + abstract.params( + base_url: String, + client: Faraday::Connection + ).returns([String, Faraday::Connection]) + end + def sdk_init(base_url:, client:); end + end + + module AbstractBeforeRequestHook + extend T::Sig + extend T::Helpers + abstract! + + sig do + abstract.params( + hook_ctx: BeforeRequestHookContext, + request: Faraday::Request + ).returns(Faraday::Request) + end + def before_request(hook_ctx:, request:); end + end + + module AbstractAfterSuccessHook + extend T::Sig + extend T::Helpers + abstract! + + sig do + abstract.params( + hook_ctx: AfterSuccessHookContext, + response: Faraday::Response + ).returns(Faraday::Response) + end + def after_success(hook_ctx:, response:); end + end + + module AbstractAfterErrorHook + extend T::Sig + extend T::Helpers + abstract! + + sig do + abstract.params( + error: T.nilable(StandardError), + hook_ctx: AfterErrorHookContext, + response: T.nilable(Faraday::Response) + ).returns(T.nilable(Faraday::Response)) + end + def after_error(error:, hook_ctx:, response:); end + end + end +end diff --git a/lib/open_api_sdk/sdkconfiguration.rb b/lib/open_api_sdk/sdkconfiguration.rb index ca2cca0f..fdad6374 100644 --- a/lib/open_api_sdk/sdkconfiguration.rb +++ b/lib/open_api_sdk/sdkconfiguration.rb @@ -5,7 +5,10 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig @@ -16,11 +19,16 @@ module OpenApiSDK }.freeze # Contains the list of servers available to the SDK - class SDKConfiguration < ::OpenApiSDK::Utils::FieldAugmented + class SDKConfiguration extend T::Sig + include Crystalline::MetadataFields + field :client, T.nilable(Faraday::Connection) - field :security, T.nilable(::OpenApiSDK::Shared::Security) + field :hooks, ::OpenApiSDK::SDKHooks::Hooks + field :retry_config, T.nilable(::OpenApiSDK::Utils::RetryConfig) + field :timeout, T.nilable(Float) + field :security_source, T.nilable(T.proc.returns(T.nilable(Models::Shared::Security))) field :server_url, T.nilable(String) field :server, Symbol field :globals, Hash[Symbol, Hash[Symbol, Hash[Symbol, Object]]] @@ -30,20 +38,38 @@ class SDKConfiguration < ::OpenApiSDK::Utils::FieldAugmented field :gen_version, String field :user_agent, String - - sig { params(client: Faraday::Connection, security: T.nilable(::OpenApiSDK::Shared::Security), server_url: T.nilable(String), server: T.nilable(Symbol), globals: T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]]).void } - def initialize(client, security, server_url, server, globals) + sig do + params( + client: T.nilable(Faraday::Connection), + hooks: ::OpenApiSDK::SDKHooks::Hooks, + retry_config: T.nilable(::OpenApiSDK::Utils::RetryConfig), + timeout_ms: T.nilable(Integer), + security: T.nilable(Models::Shared::Security), + security_source: T.nilable(T.proc.returns(Models::Shared::Security)), + server_url: T.nilable(String), + server: T.nilable(Symbol), + globals: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]]) + ).void + end + def initialize(client, hooks, retry_config, timeout_ms, security, security_source, server_url, server, globals) @client = client + @hooks = hooks + @retry_config = retry_config @server_url = server_url + @timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? @server = server.nil? ? SERVER_PROD : server raise StandardError, "Invalid server \"#{server}\"" if !SERVERS.key?(@server) - @security = security + if !security_source.nil? + @security_source = security_source + elsif !security.nil? + @security_source = -> { security } + end @globals = globals.nil? ? {} : globals @language = 'ruby' - @openapi_doc_version = '0.4.0 .' - @sdk_version = '4.2.24' - @gen_version = '2.429.0' - @user_agent = 'speakeasy-sdk/ruby 4.2.24 2.429.0 0.4.0 . speakeasy_client_sdk_ruby' + @openapi_doc_version = '0.4.0' + @sdk_version = '4.3.0' + @gen_version = '2.578.0' + @user_agent = 'speakeasy-sdk/ruby 4.3.0 2.578.0 0.4.0 speakeasy_client_sdk_ruby' end sig { returns([String, T::Hash[Symbol, String]]) } diff --git a/lib/open_api_sdk/shorturls.rb b/lib/open_api_sdk/shorturls.rb index 04947a98..d03420e1 100644 --- a/lib/open_api_sdk/shorturls.rb +++ b/lib/open_api_sdk/shorturls.rb @@ -5,7 +5,10 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig @@ -19,8 +22,8 @@ def initialize(sdk_config) end - sig { params(request: ::OpenApiSDK::Operations::CreateRequestBody).returns(::OpenApiSDK::Operations::CreateResponse) } - def create(request) + sig { params(request: Models::Operations::CreateRequestBody, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateResponse) } + def create(request:, timeout_ms: nil) # create - Shorten a URL. url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -29,33 +32,104 @@ def create(request) req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::CreateResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'create', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::ShortURL) - res.short_url = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ShortURL) + response = Models::Operations::CreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + short_url: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end end end diff --git a/lib/open_api_sdk/speakeasyclientsdk.rb b/lib/open_api_sdk/speakeasyclientsdk.rb index 630081ac..a82671aa 100644 --- a/lib/open_api_sdk/speakeasyclientsdk.rb +++ b/lib/open_api_sdk/speakeasyclientsdk.rb @@ -5,7 +5,10 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig @@ -13,38 +16,43 @@ module OpenApiSDK class SpeakeasyClientSDK extend T::Sig - attr_accessor :apis, :apiendpoints, :speakeasy_client_sdk_api_endpoints, :metadata, :schemas, :auth, :requests, :github, :organizations, :embeds, :workspaces, :events, :artifacts, :reports, :suggest, :short_ur_ls + attr_accessor :auth, :code_samples, :github, :organizations, :publishing_tokens, :workspaces, :events, :reports, :suggest, :schema_store, :short_ur_ls, :artifacts, :subscriptions sig do - params(client: Faraday::Request, - security: T.nilable(Shared::Security), - workspace_id: ::String, - server: T.nilable(Symbol), - server_url: String, - url_params: T::Hash[Symbol, String]).void + params( + client: T.nilable(Faraday::Connection), + retry_config: T.nilable(::OpenApiSDK::Utils::RetryConfig), + timeout_ms: T.nilable(Integer), + security: T.nilable(Models::Shared::Security), + security_source: T.nilable(T.proc.returns(Models::Shared::Security)), + workspace_id: T.nilable(::String), + server: T.nilable(Symbol), + server_url: T.nilable(String), + url_params: T.nilable(T::Hash[Symbol, String]) + ).void end - def initialize(client: nil, - security: nil, - workspace_id: nil, - server: nil, - server_url: nil, - url_params: nil) - + def initialize(client: nil, retry_config: nil, timeout_ms: nil, security: nil, security_source: nil, workspace_id: nil, server: nil, server_url: nil, url_params: nil) ## Instantiates the SDK configuring it with the provided parameters. - # @param [Faraday::Request] client The faraday HTTP client to use for all operations - # @param [Shared::Security] security The security details required for authentication - # @param [::String] workspace_id: Configures the workspace_id parameter for all supported operations - # @param [::Symbol] server The server identifier to use for all operations - # @param [::String] server_url The server URL to use for all operations - # @param [::Hash<::Symbol, ::String>] url_params Parameters to optionally template the server URL with + # @param [T.nilable(Faraday::Connection)] client The faraday HTTP client to use for all operations + # @param [T.nilable(::OpenApiSDK::Utils::RetryConfig)] retry_config The retry configuration to use for all operations + # @param [T.nilable(Integer)] timeout_ms Request timeout in milliseconds for all operations + # @param [T.nilable(Models::Shared::Security)] security: The security details required for authentication + # @param [T.proc.returns(T.nilable(Models::Shared::Security))] security_source: A function that returns security details required for authentication + # @param [T.nilable(::String)] workspace_id: Configures the workspace_id parameter for all supported operations + # @param [T.nilable(::Symbol)] server The server identifier to use for all operations + # @param [T.nilable(::String)] server_url The server URL to use for all operations + # @param [T.nilable(::Hash<::Symbol, ::String>)] url_params Parameters to optionally template the server URL with - if client.nil? - client = Faraday.new(request: { - params_encoder: Faraday::FlatParamsEncoder - }) do |f| - f.request :multipart, {} - # f.response :logger - end + connection_options = { + request: { + params_encoder: Faraday::FlatParamsEncoder + } + } + connection_options[:request][:timeout] = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + + client ||= Faraday.new(**connection_options) do |f| + f.request :multipart, {} + # f.response :logger, nil, { headers: true, bodies: true, errors: true } end if !server_url.nil? @@ -53,6 +61,8 @@ def initialize(client: nil, end end + raise StandardError, "Invalid server \"#{server}\"" if !server.nil? && !SERVERS.key?(server) + globals = { 'parameters': { 'queryParam': { @@ -64,47 +74,41 @@ def initialize(client: nil, } } } + hooks = SDKHooks::Hooks.new + @sdk_configuration = SDKConfiguration.new( + client, + hooks, + retry_config, + timeout_ms, + security, + security_source, + server_url, + server, + globals + ) - @sdk_configuration = SDKConfiguration.new(client, security, server_url, server, globals) - init_sdks - end + original_server_url = @sdk_configuration.get_server_details.first + new_server_url, @sdk_configuration.client = hooks.sdk_init(base_url: original_server_url, client: client) + @sdk_configuration.server_url = new_server_url if new_server_url != original_server_url - sig { params(server_url: String).void } - def config_server_url(server_url) - @sdk_configuration.server_url = server_url init_sdks end - sig { params(server: Symbol).void } - def config_server(server) - raise StandardError, "Invalid server \"#{server}\"" if !SERVERS.key?(server) - @sdk_configuration.server = server - init_sdks - end - - sig { params(security: ::OpenApiSDK::Shared::Security).void } - def config_security(security) - @sdk_configuration.security = security - end - sig { void } def init_sdks - @apis = Apis.new(@sdk_configuration) - @apiendpoints = Apiendpoints.new(@sdk_configuration) - @api_endpoints = SpeakeasyClientSDKApiEndpoints.new(@sdk_configuration) - @metadata = Metadata.new(@sdk_configuration) - @schemas = Schemas.new(@sdk_configuration) @auth = Auth.new(@sdk_configuration) - @requests = Requests.new(@sdk_configuration) + @code_samples = CodeSamples.new(@sdk_configuration) @github = Github.new(@sdk_configuration) @organizations = Organizations.new(@sdk_configuration) - @embeds = Embeds.new(@sdk_configuration) + @publishing_tokens = PublishingTokens.new(@sdk_configuration) @workspaces = Workspaces.new(@sdk_configuration) @events = Events.new(@sdk_configuration) - @artifacts = Artifacts.new(@sdk_configuration) @reports = Reports.new(@sdk_configuration) @suggest = Suggest.new(@sdk_configuration) + @schema_store = SchemaStore.new(@sdk_configuration) @short_ur_ls = ShortURLs.new(@sdk_configuration) + @artifacts = Artifacts.new(@sdk_configuration) + @subscriptions = Subscriptions.new(@sdk_configuration) end end end diff --git a/lib/open_api_sdk/speakeasyclientsdk_apiendpoints.rb b/lib/open_api_sdk/speakeasyclientsdk_apiendpoints.rb deleted file mode 100644 index 1ff97f88..00000000 --- a/lib/open_api_sdk/speakeasyclientsdk_apiendpoints.rb +++ /dev/null @@ -1,361 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -require 'faraday' -require 'faraday/multipart' -require 'sorbet-runtime' - -module OpenApiSDK - extend T::Sig - class SpeakeasyClientSDKApiEndpoints - extend T::Sig - # REST APIs for managing ApiEndpoint entities - - sig { params(sdk_config: SDKConfiguration).void } - def initialize(sdk_config) - @sdk_configuration = sdk_config - end - - - sig { params(api_id: ::String, version_id: ::String).returns(::OpenApiSDK::Operations::GetAllForVersionApiEndpointsResponse) } - def get_all(api_id, version_id) - # get_all - Get all ApiEndpoints for a particular apiID and versionID. - request = ::OpenApiSDK::Operations::GetAllForVersionApiEndpointsRequest.new( - - api_id: api_id, - version_id: version_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GetAllForVersionApiEndpointsRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/api_endpoints', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetAllForVersionApiEndpointsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::ApiEndpoint]) - res.api_endpoints = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, display_name: ::String).returns(::OpenApiSDK::Operations::FindApiEndpointResponse) } - def find(api_id, version_id, display_name) - # find - Find an ApiEndpoint via its displayName. - # Find an ApiEndpoint via its displayName (set by operationId from a registered OpenAPI schema). - # This is useful for finding the ID of an ApiEndpoint to use in the /v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID} endpoints. - request = ::OpenApiSDK::Operations::FindApiEndpointRequest.new( - - api_id: api_id, - version_id: version_id, - display_name: display_name - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::FindApiEndpointRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/api_endpoints/find/{displayName}', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::FindApiEndpointResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::ApiEndpoint) - res.api_endpoint = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, api_endpoint_id: ::String).returns(::OpenApiSDK::Operations::DeleteApiEndpointResponse) } - def delete(api_id, version_id, api_endpoint_id) - # delete - Delete an ApiEndpoint. - # Delete an ApiEndpoint. This will also delete all associated Request Logs (if using a Postgres datastore). - request = ::OpenApiSDK::Operations::DeleteApiEndpointRequest.new( - - api_id: api_id, - version_id: version_id, - api_endpoint_id: api_endpoint_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::DeleteApiEndpointRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.delete(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::DeleteApiEndpointResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, api_endpoint_id: ::String).returns(::OpenApiSDK::Operations::GetApiEndpointResponse) } - def get(api_id, version_id, api_endpoint_id) - # get - Get an ApiEndpoint. - request = ::OpenApiSDK::Operations::GetApiEndpointRequest.new( - - api_id: api_id, - version_id: version_id, - api_endpoint_id: api_endpoint_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GetApiEndpointRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GetApiEndpointResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::ApiEndpoint) - res.api_endpoint = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, api_endpoint_id: ::String, api_endpoint: ::OpenApiSDK::Shared::ApiEndpointInput).returns(::OpenApiSDK::Operations::UpsertApiEndpointResponse) } - def upsert(api_id, version_id, api_endpoint_id, api_endpoint) - # upsert - Upsert an ApiEndpoint. - # Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated. - request = ::OpenApiSDK::Operations::UpsertApiEndpointRequest.new( - - api_id: api_id, - version_id: version_id, - api_endpoint_id: api_endpoint_id, - api_endpoint: api_endpoint - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::UpsertApiEndpointRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}', - request, - @sdk_configuration.globals - ) - headers = {} - req_content_type, data, form = Utils.serialize_request_body(request, :api_endpoint, :json) - headers['content-type'] = req_content_type - raise StandardError, 'request body is required' if data.nil? && form.nil? - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.put(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::UpsertApiEndpointResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::ApiEndpoint) - res.api_endpoint = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, api_endpoint_id: ::String).returns(::OpenApiSDK::Operations::GenerateOpenApiSpecForApiEndpointResponse) } - def generate_open_api_spec(api_id, version_id, api_endpoint_id) - # generate_open_api_spec - Generate an OpenAPI specification for a particular ApiEndpoint. - # This endpoint will generate a new operation in any registered OpenAPI document if the operation does not already exist in the document. - # Returns the original document and the newly generated document allowing a diff to be performed to see what has changed. - request = ::OpenApiSDK::Operations::GenerateOpenApiSpecForApiEndpointRequest.new( - - api_id: api_id, - version_id: version_id, - api_endpoint_id: api_endpoint_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GenerateOpenApiSpecForApiEndpointRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/openapi', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GenerateOpenApiSpecForApiEndpointResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::GenerateOpenApiSpecDiff) - res.generate_open_api_spec_diff = out - end - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - - - sig { params(api_id: ::String, version_id: ::String, api_endpoint_id: ::String).returns(::OpenApiSDK::Operations::GeneratePostmanCollectionForApiEndpointResponse) } - def generate_postman_collection(api_id, version_id, api_endpoint_id) - # generate_postman_collection - Generate a Postman collection for a particular ApiEndpoint. - # Generates a postman collection that allows the endpoint to be called from postman variables produced for any path/query/header parameters included in the OpenAPI document. - request = ::OpenApiSDK::Operations::GeneratePostmanCollectionForApiEndpointRequest.new( - - api_id: api_id, - version_id: version_id, - api_endpoint_id: api_endpoint_id - ) - url, params = @sdk_configuration.get_server_details - base_url = Utils.template_url(url, params) - url = Utils.generate_url( - ::OpenApiSDK::Operations::GeneratePostmanCollectionForApiEndpointRequest, - base_url, - '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/postman', - request, - @sdk_configuration.globals - ) - headers = {} - headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' - headers['user-agent'] = @sdk_configuration.user_agent - - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end - - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') - - res = ::OpenApiSDK::Operations::GeneratePostmanCollectionForApiEndpointResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - res.postman_collection = r.env.response_body if Utils.match_content_type(content_type, 'application/octet-stream') - - elsif r.status >= 400 && r.status < 500 - if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out - end - end - res - end - end -end diff --git a/lib/open_api_sdk/subscriptions.rb b/lib/open_api_sdk/subscriptions.rb new file mode 100644 index 00000000..0acf8c35 --- /dev/null +++ b/lib/open_api_sdk/subscriptions.rb @@ -0,0 +1,250 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Subscriptions + extend T::Sig + # REST APIs for managing subscriptions + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(subscription_id: ::String, namespace_name: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::IgnoreSubscriptionNamespaceResponse) } + def ignore_subscription_namespace(subscription_id:, namespace_name:, timeout_ms: nil) + # ignore_subscription_namespace - Ignored a namespace for a subscription + request = Models::Operations::IgnoreSubscriptionNamespaceRequest.new( + + subscription_id: subscription_id, + namespace_name: namespace_name + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::IgnoreSubscriptionNamespaceRequest, + base_url, + '/v1/subscriptions/{subscriptionID}/{namespaceName}/ignore', + request, + @sdk_configuration.globals + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'ignoreSubscriptionNamespace', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::IgnoreSubscriptionNamespaceResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(subscription_id: ::String, namespace_name: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ActivateSubscriptionNamespaceResponse) } + def activate_subscription_namespace(subscription_id:, namespace_name:, timeout_ms: nil) + # activate_subscription_namespace - Activate an ignored namespace for a subscription + request = Models::Operations::ActivateSubscriptionNamespaceRequest.new( + + subscription_id: subscription_id, + namespace_name: namespace_name + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::ActivateSubscriptionNamespaceRequest, + base_url, + '/v1/subscriptions/{subscriptionID}/{namespaceName}/activate', + request, + @sdk_configuration.globals + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'activateSubscriptionNamespace', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::ActivateSubscriptionNamespaceResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/suggest.rb b/lib/open_api_sdk/suggest.rb index 06c3389a..e8c49f9b 100644 --- a/lib/open_api_sdk/suggest.rb +++ b/lib/open_api_sdk/suggest.rb @@ -5,7 +5,10 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig @@ -19,11 +22,11 @@ def initialize(sdk_config) end - sig { params(x_session_id: ::String, request_body: ::OpenApiSDK::Operations::SuggestOpenAPIRequestBody).returns(::OpenApiSDK::Operations::SuggestOpenAPIResponse) } - def openapi(x_session_id, request_body) + sig { params(request_body: Models::Operations::SuggestOpenAPIRequestBody, x_session_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::SuggestOpenAPIResponse) } + def openapi(request_body:, x_session_id:, timeout_ms: nil) # openapi - (DEPRECATED) Generate suggestions for improving an OpenAPI document. # Get suggestions from an LLM model for improving an OpenAPI document. - request = ::OpenApiSDK::Operations::SuggestOpenAPIRequest.new( + request = Models::Operations::SuggestOpenAPIRequest.new( x_session_id: x_session_id, request_body: request_body @@ -35,39 +38,111 @@ def openapi(x_session_id, request_body) req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :multipart) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'suggestOpenAPI', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) else - req.body = data + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' end end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = http_response.env.body - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + return Models::Operations::SuggestOpenAPIResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + schema: obj + ) + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' - res = ::OpenApiSDK::Operations::SuggestOpenAPIResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - res.schema = r.env.response_body if Utils.match_content_type(content_type, 'application/json') - end - res end - sig { params(x_session_id: ::String, suggest_request_body: ::OpenApiSDK::Shared::SuggestRequestBody).returns(::OpenApiSDK::Operations::SuggestResponse) } - def generate(x_session_id, suggest_request_body) + sig { params(suggest_request_body: Models::Shared::SuggestRequestBody, x_session_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::SuggestResponse) } + def generate(suggest_request_body:, x_session_id:, timeout_ms: nil) # generate - Generate suggestions for improving an OpenAPI document. # Get suggestions from an LLM model for improving an OpenAPI document. - request = ::OpenApiSDK::Operations::SuggestRequest.new( + request = Models::Operations::SuggestRequest.new( x_session_id: x_session_id, suggest_request_body: suggest_request_body @@ -79,39 +154,222 @@ def generate(x_session_id, suggest_request_body) req_content_type, data, form = Utils.serialize_request_body(request, :suggest_request_body, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'suggest', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = http_response.env.body + + return Models::Operations::SuggestResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + schema: obj + ) else - req.body = data + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::SuggestItemsRequestBody, timeout_ms: T.nilable(Integer)).returns(Models::Operations::SuggestItemsResponse) } + def suggest_items(request:, timeout_ms: nil) + # suggest_items - Generate generic suggestions for a list of items. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/suggest/items" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::SuggestResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'suggestItems', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - res.schema = r.env.response_body if Utils.match_content_type(content_type, 'application/json') + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T::Array[::String]) + response = Models::Operations::SuggestItemsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + strings: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(x_session_id: ::String, namespace_name: ::String, revision_reference: ::String, suggest_request_body: T.nilable(::OpenApiSDK::Shared::SuggestRequestBody)).returns(::OpenApiSDK::Operations::SuggestOpenAPIRegistryResponse) } - def openapi_registry(x_session_id, namespace_name, revision_reference, suggest_request_body = nil) + sig { params(x_session_id: ::String, namespace_name: ::String, revision_reference: ::String, suggest_request_body: T.nilable(Models::Shared::SuggestRequestBody), timeout_ms: T.nilable(Integer)).returns(Models::Operations::SuggestOpenAPIRegistryResponse) } + def openapi_registry(x_session_id:, namespace_name:, revision_reference:, suggest_request_body: nil, timeout_ms: nil) # openapi_registry - Generate suggestions for improving an OpenAPI document stored in the registry. # Get suggestions from an LLM model for improving an OpenAPI document stored in the registry. - request = ::OpenApiSDK::Operations::SuggestOpenAPIRegistryRequest.new( + request = Models::Operations::SuggestOpenAPIRegistryRequest.new( x_session_id: x_session_id, namespace_name: namespace_name, @@ -121,7 +379,7 @@ def openapi_registry(x_session_id, namespace_name, revision_reference, suggest_r url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::SuggestOpenAPIRegistryRequest, + Models::Operations::SuggestOpenAPIRegistryRequest, base_url, '/v1/suggest/openapi/{namespace_name}/{revision_reference}', request, @@ -130,31 +388,103 @@ def openapi_registry(x_session_id, namespace_name, revision_reference, suggest_r headers = Utils.get_headers(request, @sdk_configuration.globals) req_content_type, data, form = Utils.serialize_request_body(request, :suggest_request_body, :json) headers['content-type'] = req_content_type + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'suggestOpenAPIRegistry', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) else - req.body = data + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' end end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = http_response.env.body - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + return Models::Operations::SuggestOpenAPIRegistryResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + schema: obj + ) + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' - res = ::OpenApiSDK::Operations::SuggestOpenAPIRegistryResponse.new( - status_code: r.status, content_type: content_type, raw_response: r - ) - if r.status >= 200 && r.status < 300 - res.schema = r.env.response_body if Utils.match_content_type(content_type, 'application/json') - end - res end end end diff --git a/lib/open_api_sdk/utils/retries.rb b/lib/open_api_sdk/utils/retries.rb new file mode 100644 index 00000000..3974262d --- /dev/null +++ b/lib/open_api_sdk/utils/retries.rb @@ -0,0 +1,95 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday/retry' +require 'sorbet-runtime' + +module OpenApiSDK + module Utils + class BackoffStrategy + extend T::Sig + + sig { returns(T.nilable(::Float)) } + attr_accessor :exponent + + sig { returns(T.nilable(::Integer)) } + attr_accessor :initial_interval + + sig { returns(T.nilable(::Integer)) } + attr_accessor :max_elapsed_time + + sig { returns(T.nilable(::Integer)) } + attr_accessor :max_interval + + sig do + params( + exponent: T.nilable(::Float), + initial_interval: T.nilable(::Integer), + max_elapsed_time: T.nilable(::Integer), + max_interval: T.nilable(::Integer) + ).void + end + def initialize(exponent: nil, initial_interval: nil, max_elapsed_time: nil, max_interval: nil) + @exponent = T.let(exponent, T.nilable(::Float)) + @initial_interval = T.let(initial_interval, T.nilable(::Integer)) + @max_elapsed_time = T.let(max_elapsed_time, T.nilable(::Integer)) + @max_interval = T.let(max_interval, T.nilable(::Integer)) + end + end + + class RetryConfig + extend T::Sig + + sig { returns(T.nilable(BackoffStrategy)) } + attr_accessor :backoff + + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :retry_connection_errors + + sig { returns(T.nilable(::String)) } + attr_accessor :strategy + + sig do + params( + backoff: T.nilable(BackoffStrategy), + retry_connection_errors: T.nilable(T::Boolean), + strategy: T.nilable(::String) + ).void + end + def initialize(backoff: nil, retry_connection_errors: nil, strategy: nil) + @backoff = T.let(backoff, T.nilable(BackoffStrategy)) + @retry_connection_errors = T.let(retry_connection_errors, T.nilable(T::Boolean)) + @strategy = T.let(strategy, T.nilable(::String)) + end + + sig { params(initial_time: ::Time).returns(::Hash) } + def to_faraday_retry_options(initial_time:) + retry_options = { + # must overwrite default max of 2 retries and it must be positive + max: 1_000_000_000, + # ensure all HTTP methods are retried, especially via retry_if + methods: [], + } + + if @retry_connection_errors + retry_options[:exceptions] = Faraday::Retry::Middleware::DEFAULT_EXCEPTIONS + [Faraday::ConnectionFailed] + end + + if @strategy == 'backoff' && @backoff + retry_options[:backoff_factor] = @backoff.exponent unless @backoff.exponent.nil? + retry_options[:interval] = (@backoff.initial_interval.to_f / 1000) unless @backoff.initial_interval.nil? + retry_options[:max_interval] = @backoff.max_interval unless @backoff.max_interval.nil? + + unless @backoff.max_elapsed_time.nil? + stop_time = initial_time + (@backoff.max_elapsed_time.to_f / 1000) + retry_options[:retry_if] = ->(_env, _exc) { Time.now < stop_time } + end + end + + retry_options + end + end + end +end diff --git a/lib/open_api_sdk/utils/utils.rb b/lib/open_api_sdk/utils/utils.rb index 2947b3f8..dccac195 100644 --- a/lib/open_api_sdk/utils/utils.rb +++ b/lib/open_api_sdk/utils/utils.rb @@ -6,16 +6,11 @@ require 'date' require 'sorbet-runtime' require 'base64' -require_relative './metadata_fields' module OpenApiSDK module Utils extend T::Sig - class FieldAugmented - include MetadataFields - end - sig { params(val: Object, primitives: T::Boolean).returns(Object) } def self.val_to_string(val, primitives: true) if val.is_a? T::Enum @@ -29,7 +24,7 @@ def self.val_to_string(val, primitives: true) end end - sig { params(headers_params: FieldAugmented, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(T::Hash[Symbol, String]) } + sig { params(headers_params: Object, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(T::Hash[Symbol, String]) } def self.get_headers(headers_params, gbls = nil) return {} if headers_params.nil? @@ -95,7 +90,7 @@ def self._serialize_header(explode, obj) sig do params(field_name: String, explode: T::Boolean, obj: Object, delimiter: String, - get_field_name_lambda: T.proc.params(obj_field: MetadataFields::Field).returns(String)) + get_field_name_lambda: T.proc.params(obj_field: ::Crystalline::MetadataFields::Field).returns(String)) .returns(T::Hash[Symbol, T::Array[String]]) end def self._populate_form(field_name, explode, obj, delimiter, &get_field_name_lambda) @@ -215,7 +210,7 @@ def self._get_serialized_params(metadata, field_name, obj) params = {} serialization = metadata.fetch(:serialization, '') - params[metadata.fetch(:field_name, field_name)] = obj.marshal_json if serialization == 'json' + params[metadata.fetch(:field_name, field_name)] = obj.to_json if serialization == 'json' params end @@ -236,7 +231,7 @@ def self._get_delimited_query_params(metadata, field_name, obj, delimiter) _populate_form(field_name, metadata.fetch(:explode, true), obj, delimiter, &get_query_param_field_name) end - sig { params(clazz: Class, query_params: FieldAugmented, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(T::Hash[Symbol, T::Array[String]]) } + sig { params(clazz: Class, query_params: Object, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(T::Hash[Symbol, T::Array[String]]) } def self.get_query_params(clazz, query_params, gbls = nil) params = {} param_fields = clazz.fields @@ -280,7 +275,7 @@ def self.get_query_params(clazz, query_params, gbls = nil) params end - sig { params(clazz: Class, server_url: String, path: String, path_params: FieldAugmented, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(String) } + sig { params(clazz: Class, server_url: String, path: String, path_params: Object, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(String) } def self.generate_url(clazz, server_url, path, path_params, gbls = nil) clazz.fields.each do |f| param_metadata = f.metadata[:path_param] @@ -356,9 +351,18 @@ def self.generate_url(clazz, server_url, path, path_params, gbls = nil) server_url.delete_suffix('/') + path end + sig { params(status: Integer).returns(T::Boolean) } + def self.error_status?(status) + status_major = status / 100 + return true if status_major == 4 + return true if status_major == 5 + + false + end + sig { params(content_type: String, pattern: String).returns(T::Boolean) } def self.match_content_type(content_type, pattern) - return true if content_type == pattern || pattern == '*' || pattern == '*/*' + return true if content_type == pattern || ['*', '*/*'].include?(pattern) pieces = content_type.split(';') pieces.each do |piece| @@ -368,8 +372,20 @@ def self.match_content_type(content_type, pattern) false end + sig { params(status_code: Integer, status_codes: T::Array[String]).returns(T::Boolean) } + def self.match_status_code(status_code, status_codes) + return true if status_codes.include? 'default' + status_code = status_code.to_s + status_codes.each do |code| + return true if code == status_code + return true if code.end_with?('xx') && status_code[0..1] == code[0..1] + end + false + end + sig { params(req: Faraday::Request, security: Object).void } def self.configure_request_security(req, security) + return if security.nil? sec_fields = security.fields sec_fields.each do |sec_field| value = security.send(sec_field.name) @@ -463,7 +479,7 @@ def self._parse_security_scheme_value(req, scheme_metadata, security_metadata, v end end - sig { params(req: Faraday::Request, scheme: FieldAugmented).void } + sig { params(req: Faraday::Request, scheme: Object).void } def self._parse_basic_auth_scheme(req, scheme) username, password = '' @@ -559,7 +575,7 @@ def self.serialize_request_body(request, request_field_name, serialization_metho .returns([String, Object, T.nilable(T::Array[T::Array[Object]])]) end def self.serialize_content_type(field_name, media_type, request) - return media_type, marshal_json_complex(request), nil if media_type.match('(application|text)\/.*?\+*json.*') + return media_type, ::Crystalline.to_json(request), nil if media_type.match('(application|text)\/.*?\+*json.*') return serialize_multipart_form(media_type, request) if media_type.match('multipart\/.*') return media_type, serialize_form_data(field_name, request), nil if media_type.match('application\/x-www-form-urlencoded.*') return media_type, request, nil if request.is_a?(String) || request.is_a?(Array) @@ -567,7 +583,7 @@ def self.serialize_content_type(field_name, media_type, request) raise StandardError, "invalid request body type #{type(request)} for mediaType {metadata['media_type']}" end - sig { params(field: MetadataFields::Field, data_class: FieldAugmented).returns(Object) } + sig { params(field: ::Crystalline::MetadataFields::Field, data_class: Object).returns(Object) } def self.parse_field(field, data_class) field_metadata = field.metadata[:metadata_string] return nil if field_metadata.nil? @@ -578,7 +594,7 @@ def self.parse_field(field, data_class) field_value end - sig { params(media_type: String, request: FieldAugmented).returns([String, Object, T::Array[T::Array[Object]]]) } + sig { params(media_type: String, request: Object).returns([String, Object, T::Array[T::Array[Object]]]) } def self.serialize_multipart_form(media_type, request) form = [] request_fields = request.fields @@ -593,7 +609,7 @@ def self.serialize_multipart_form(media_type, request) file_fields = val.fields file_name = '' - field_name = '' + field_name = field_metadata[:field_name] content = nil file_fields.each do |file_field| @@ -603,17 +619,16 @@ def self.serialize_multipart_form(media_type, request) if file_metadata[:content] == true content = val.send(file_field.name) else - field_name = file_metadata.fetch(:field_name, file_field.name) file_name = val.send(file_field.name) end end - raise StandardError, 'invalid multipart/form-data file' if field_name == '' || file_name == '' || content == nil? + raise StandardError, 'invalid multipart/form-data file' if file_name == '' || content == nil? form.append([field_name, [file_name, content]]) elsif field_metadata[:json] == true to_append = [ field_metadata.fetch(:field_name, field.name), [ - nil, marshal_json_complex(val), 'application/json' + nil, ::Crystalline.to_json(val), 'application/json' ] ] form.append(to_append) @@ -658,7 +673,7 @@ def self.encode_form(form) end sig do - params(field_name: Symbol, data: T.any(FieldAugmented, T::Hash[Symbol, String])) + params(field_name: Symbol, data: T.any(Object, T::Hash[Symbol, String])) .returns(T::Hash[Symbol, Object]) end def self.serialize_form_data(field_name, data) @@ -683,7 +698,7 @@ def self.serialize_form_data(field_name, data) field_name = metadata.fetch(:field_name, field.name) if metadata[:json] - form[field_name] = marshal_json_complex(val) + form[field_name] = ::Crystalline.to_json(val) else if metadata.fetch(:style, 'form') == 'form' form = form.merge( @@ -730,43 +745,5 @@ def self._populate_from_globals(param_name, value, param_type, gbls) value end - sig { params(complex: Object).returns(Object) } - def self.marshal_json_complex(complex) - if complex.is_a? Array - complex.map { |v| Utils.marshal_json_complex(v) }.to_json - elsif complex.is_a? Hash - complex.transform_values { |v| Utils.marshal_json_complex(v) }.to_json - elsif complex.respond_to? :marshal_json - complex.marshal_json - else - complex.to_json - end - end - - sig { params(data: Object, type: Object).returns(Object) } - def self.unmarshal_complex(data, type) - begin - value = unmarshal_json(JSON.parse(data), type) - rescue TypeError, JSON::ParserError - value = unmarshal_json(data, type) - end - value - end - - sig { params(data: Object, type: Object).returns(Object) } - def self.unmarshal_json(data, type) - if T.simplifiable? type - type = T.simplify_type type - end - if type.respond_to? :unmarshal_json - type.unmarshal_json(data) - elsif T.arr? type - data.map { |v| Utils.unmarshal_complex(v, T.arr_of(type)) } - elsif T.hash? type - data.transform_values { |v| Utils.unmarshal_complex(v, T.hash_of(type)) } - else - data - end - end end end diff --git a/lib/open_api_sdk/workspaces.rb b/lib/open_api_sdk/workspaces.rb index 0458754c..6218d8c1 100644 --- a/lib/open_api_sdk/workspaces.rb +++ b/lib/open_api_sdk/workspaces.rb @@ -5,13 +5,16 @@ require 'faraday' require 'faraday/multipart' +require 'faraday/retry' require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' module OpenApiSDK extend T::Sig class Workspaces extend T::Sig - + # REST APIs for managing Workspaces (speakeasy tenancy) sig { params(sdk_config: SDKConfiguration).void } def initialize(sdk_config) @@ -19,8 +22,8 @@ def initialize(sdk_config) end - sig { returns(::OpenApiSDK::Operations::GetWorkspacesResponse) } - def get_all + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspacesResponse) } + def get_all(timeout_ms: nil) # get_all - Get workspaces for a user # Returns a list of workspaces a user has access too url, params = @sdk_configuration.get_server_details @@ -30,33 +33,108 @@ def get_all headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GetWorkspacesResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspaces', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::Workspace]) - res.workspaces = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T::Array[Models::Shared::Workspace]) + response = Models::Operations::GetWorkspacesResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + workspaces: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { returns(::OpenApiSDK::Operations::GetWorkspaceByContextResponse) } - def get + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspaceByContextResponse) } + def get(timeout_ms: nil) # get - Get workspace by context # Get information about a particular workspace by context. url, params = @sdk_configuration.get_server_details @@ -66,33 +144,108 @@ def get headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GetWorkspaceByContextResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspaceByContext', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceAndOrganization) - res.workspace_and_organization = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::WorkspaceAndOrganization) + response = Models::Operations::GetWorkspaceByContextResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + workspace_and_organization: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(request: ::OpenApiSDK::Shared::Workspace).returns(::OpenApiSDK::Operations::CreateWorkspaceResponse) } - def create(request) + sig { params(request: Models::Shared::Workspace, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateWorkspaceResponse) } + def create(request:, timeout_ms: nil) # create - Create a workspace # Creates a workspace url, params = @sdk_configuration.get_server_details @@ -102,53 +255,130 @@ def create(request) req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::CreateWorkspaceResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'createWorkspace', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Workspace) - res.workspace = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Workspace) + response = Models::Operations::CreateWorkspaceResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + workspace: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceResponse) } - def get_by_id(workspace_id) + sig { params(workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspaceResponse) } + def get_by_id(workspace_id: nil, timeout_ms: nil) # get_by_id - Get workspace # Get information about a particular workspace. - request = ::OpenApiSDK::Operations::GetWorkspaceRequest.new( + request = Models::Operations::GetWorkspaceRequest.new( workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetWorkspaceRequest, + Models::Operations::GetWorkspaceRequest, base_url, '/v1/workspace/{workspace_id}', request, @@ -158,44 +388,119 @@ def get_by_id(workspace_id) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GetWorkspaceResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspace', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Workspace) - res.workspace = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Workspace) + response = Models::Operations::GetWorkspaceResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + workspace: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String, workspace: ::OpenApiSDK::Shared::Workspace).returns(::OpenApiSDK::Operations::UpdateWorkspaceDetailsResponse) } - def update_details(workspace_id, workspace) + sig { params(workspace: Models::Shared::Workspace, workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdateWorkspaceDetailsResponse) } + def update_details(workspace:, workspace_id: nil, timeout_ms: nil) # update_details - Update workspace details # Update information about a particular workspace. - request = ::OpenApiSDK::Operations::UpdateWorkspaceDetailsRequest.new( + request = Models::Operations::UpdateWorkspaceDetailsRequest.new( - workspace_id: workspace_id, - workspace: workspace + workspace: workspace, + workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::UpdateWorkspaceDetailsRequest, + Models::Operations::UpdateWorkspaceDetailsRequest, base_url, '/v1/workspace/{workspace_id}/details', request, @@ -205,49 +510,122 @@ def update_details(workspace_id, workspace) req_content_type, data, form = Utils.serialize_request_body(request, :workspace, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::UpdateWorkspaceDetailsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'updateWorkspaceDetails', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::UpdateWorkspaceDetailsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceSettingsResponse) } - def get_settings(workspace_id) + sig { params(workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspaceSettingsResponse) } + def get_settings(workspace_id: nil, timeout_ms: nil) # get_settings - Get workspace settings # Get settings about a particular workspace. - request = ::OpenApiSDK::Operations::GetWorkspaceSettingsRequest.new( + request = Models::Operations::GetWorkspaceSettingsRequest.new( workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetWorkspaceSettingsRequest, + Models::Operations::GetWorkspaceSettingsRequest, base_url, '/v1/workspace/{workspace_id}/settings', request, @@ -257,44 +635,119 @@ def get_settings(workspace_id) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetWorkspaceSettingsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspaceSettings', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceSettings) - res.workspace_settings = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::WorkspaceSettings) + response = Models::Operations::GetWorkspaceSettingsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + workspace_settings: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String, workspace_settings: ::OpenApiSDK::Shared::WorkspaceSettings).returns(::OpenApiSDK::Operations::UpdateWorkspaceSettingsResponse) } - def update_settings(workspace_id, workspace_settings) + sig { params(workspace_settings: Models::Shared::WorkspaceSettings, workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdateWorkspaceSettingsResponse) } + def update_settings(workspace_settings:, workspace_id: nil, timeout_ms: nil) # update_settings - Update workspace settings # Update settings about a particular workspace. - request = ::OpenApiSDK::Operations::UpdateWorkspaceSettingsRequest.new( + request = Models::Operations::UpdateWorkspaceSettingsRequest.new( - workspace_id: workspace_id, - workspace_settings: workspace_settings + workspace_settings: workspace_settings, + workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::UpdateWorkspaceSettingsRequest, + Models::Operations::UpdateWorkspaceSettingsRequest, base_url, '/v1/workspace/{workspace_id}/settings', request, @@ -304,48 +757,121 @@ def update_settings(workspace_id, workspace_settings) req_content_type, data, form = Utils.serialize_request_body(request, :workspace_settings, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.put(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::UpdateWorkspaceSettingsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'updateWorkspaceSettings', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.put(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::UpdateWorkspaceSettingsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceTeamResponse) } - def get_team(workspace_id) + sig { params(workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspaceTeamResponse) } + def get_team(workspace_id: nil, timeout_ms: nil) # get_team - Get team members for a particular workspace - request = ::OpenApiSDK::Operations::GetWorkspaceTeamRequest.new( + request = Models::Operations::GetWorkspaceTeamRequest.new( workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetWorkspaceTeamRequest, + Models::Operations::GetWorkspaceTeamRequest, base_url, '/v1/workspace/{workspace_id}/team', request, @@ -355,43 +881,118 @@ def get_team(workspace_id) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GetWorkspaceTeamResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspaceTeam', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceTeamResponse) - res.workspace_team_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::WorkspaceTeamResponse) + response = Models::Operations::GetWorkspaceTeamResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + workspace_team_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String, email: ::String).returns(::OpenApiSDK::Operations::GrantUserAccessToWorkspaceResponse) } - def grant_access(workspace_id, email) + sig { params(email: ::String, workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GrantUserAccessToWorkspaceResponse) } + def grant_access(email:, workspace_id: nil, timeout_ms: nil) # grant_access - Grant a user access to a particular workspace - request = ::OpenApiSDK::Operations::GrantUserAccessToWorkspaceRequest.new( + request = Models::Operations::GrantUserAccessToWorkspaceRequest.new( - workspace_id: workspace_id, - email: email + email: email, + workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GrantUserAccessToWorkspaceRequest, + Models::Operations::GrantUserAccessToWorkspaceRequest, base_url, '/v1/workspace/{workspace_id}/team/email/{email}', request, @@ -401,43 +1002,118 @@ def grant_access(workspace_id, email) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.put(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GrantUserAccessToWorkspaceResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'grantUserAccessToWorkspace', + security_source: @sdk_configuration.security_source ) - if r.status == 200 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.put(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceInviteResponse) - res.workspace_invite_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::WorkspaceInviteResponse) + response = Models::Operations::GrantUserAccessToWorkspaceResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + workspace_invite_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String, user_id: ::String).returns(::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceResponse) } - def revoke_access(workspace_id, user_id) + sig { params(user_id: ::String, workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::RevokeUserAccessToWorkspaceResponse) } + def revoke_access(user_id:, workspace_id: nil, timeout_ms: nil) # revoke_access - Revoke a user's access to a particular workspace - request = ::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceRequest.new( + request = Models::Operations::RevokeUserAccessToWorkspaceRequest.new( - workspace_id: workspace_id, - user_id: user_id + user_id: user_id, + workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceRequest, + Models::Operations::RevokeUserAccessToWorkspaceRequest, base_url, '/v1/workspace/{workspace_id}/team/{userId}', request, @@ -447,38 +1123,109 @@ def revoke_access(workspace_id, user_id) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.delete(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'revokeUserAccessToWorkspace', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::RevokeUserAccessToWorkspaceResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceTokensResponse) } - def get_tokens(workspace_id) + sig { params(workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspaceTokensResponse) } + def get_tokens(workspace_id: nil, timeout_ms: nil) # get_tokens - Get tokens for a particular workspace - request = ::OpenApiSDK::Operations::GetWorkspaceTokensRequest.new( + request = Models::Operations::GetWorkspaceTokensRequest.new( workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetWorkspaceTokensRequest, + Models::Operations::GetWorkspaceTokensRequest, base_url, '/v1/workspace/{workspace_id}/tokens', request, @@ -488,43 +1235,118 @@ def get_tokens(workspace_id) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + connection = @sdk_configuration.client - res = ::OpenApiSDK::Operations::GetWorkspaceTokensResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspaceTokens', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::WorkspaceToken]) - res.workspace_tokens = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T::Array[Models::Shared::WorkspaceToken]) + response = Models::Operations::GetWorkspaceTokensResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + workspace_tokens: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 400 && r.status < 500 + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String, workspace_token: ::OpenApiSDK::Shared::WorkspaceToken).returns(::OpenApiSDK::Operations::CreateWorkspaceTokenResponse) } - def create_token(workspace_id, workspace_token) + sig { params(workspace_token: Models::Shared::WorkspaceToken, workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateWorkspaceTokenResponse) } + def create_token(workspace_token:, workspace_id: nil, timeout_ms: nil) # create_token - Create a token for a particular workspace - request = ::OpenApiSDK::Operations::CreateWorkspaceTokenRequest.new( + request = Models::Operations::CreateWorkspaceTokenRequest.new( - workspace_id: workspace_id, - workspace_token: workspace_token + workspace_token: workspace_token, + workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::CreateWorkspaceTokenRequest, + Models::Operations::CreateWorkspaceTokenRequest, base_url, '/v1/workspace/{workspace_id}/tokens', request, @@ -534,49 +1356,122 @@ def create_token(workspace_id, workspace_token) req_content_type, data, form = Utils.serialize_request_body(request, :workspace_token, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.post(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - if form - req.body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') - req.body = URI.encode_www_form(data) - else - req.body = data - end - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::CreateWorkspaceTokenResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'createWorkspaceToken', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CreateWorkspaceTokenResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String, token_id: ::String).returns(::OpenApiSDK::Operations::DeleteWorkspaceTokenResponse) } - def delete_token(workspace_id, token_id) + sig { params(token_id: ::String, workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::DeleteWorkspaceTokenResponse) } + def delete_token(token_id:, workspace_id: nil, timeout_ms: nil) # delete_token - Delete a token for a particular workspace - request = ::OpenApiSDK::Operations::DeleteWorkspaceTokenRequest.new( + request = Models::Operations::DeleteWorkspaceTokenRequest.new( - workspace_id: workspace_id, - token_id: token_id + token_id: token_id, + workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::DeleteWorkspaceTokenRequest, + Models::Operations::DeleteWorkspaceTokenRequest, base_url, '/v1/workspace/{workspace_id}/tokens/{tokenID}', request, @@ -586,38 +1481,231 @@ def delete_token(workspace_id, token_id) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.delete(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'deleteWorkspaceToken', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['2XX']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::DeleteWorkspaceTokenResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['4XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::WorkspaceFeatureFlagRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::SetWorkspaceFeatureFlagsResponse) } + def set_feature_flags(request:, timeout_ms: nil) + # set_feature_flags - Set workspace feature flags + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/workspace/feature_flags" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::DeleteWorkspaceTokenResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'setWorkspaceFeatureFlags', + security_source: @sdk_configuration.security_source ) - if r.status >= 200 && r.status < 300 - elsif r.status >= 400 && r.status < 500 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::WorkspaceFeatureFlagResponse) + response = Models::Operations::SetWorkspaceFeatureFlagsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + workspace_feature_flag_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end - sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsResponse) } - def get_feature_flags(workspace_id) + sig { params(workspace_id: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWorkspaceFeatureFlagsResponse) } + def get_feature_flags(workspace_id: nil, timeout_ms: nil) # get_feature_flags - Get workspace feature flags - request = ::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsRequest.new( + request = Models::Operations::GetWorkspaceFeatureFlagsRequest.new( workspace_id: workspace_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( - ::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsRequest, + Models::Operations::GetWorkspaceFeatureFlagsRequest, base_url, '/v1/workspace/{workspace_id}/feature_flags', request, @@ -627,28 +1715,103 @@ def get_feature_flags(workspace_id) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent - r = @sdk_configuration.client.get(url) do |req| - req.headers = headers - Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? - end + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil - content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout - res = ::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsResponse.new( - status_code: r.status, content_type: content_type, raw_response: r + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'getWorkspaceFeatureFlags', + security_source: @sdk_configuration.security_source ) - if r.status == 200 + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceFeatureFlagResponse) - res.workspace_feature_flag_response = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::WorkspaceFeatureFlagResponse) + response = Models::Operations::GetWorkspaceFeatureFlagsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + workspace_feature_flag_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end - elsif r.status >= 500 && r.status < 600 + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) if Utils.match_content_type(content_type, 'application/json') - out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error) - res.error = out + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Error) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + end - res end end end diff --git a/lib/speakeasy_client_sdk_ruby.rb b/lib/speakeasy_client_sdk_ruby.rb index 58e5fa5a..1ef4c99f 100644 --- a/lib/speakeasy_client_sdk_ruby.rb +++ b/lib/speakeasy_client_sdk_ruby.rb @@ -5,27 +5,26 @@ module OpenApiSDK autoload :SpeakeasyClientSDK, 'open_api_sdk/speakeasyclientsdk' - autoload :Shared, 'open_api_sdk/models/shared' - autoload :Operations, 'open_api_sdk/models/operations' - autoload :Apis, 'open_api_sdk/apis' - autoload :Apiendpoints, 'open_api_sdk/apiendpoints' - autoload :SpeakeasyClientSDKApiEndpoints, 'open_api_sdk/speakeasyclientsdk_apiendpoints' - autoload :Metadata, 'open_api_sdk/metadata' - autoload :Schemas, 'open_api_sdk/schemas' autoload :Auth, 'open_api_sdk/auth' - autoload :Requests, 'open_api_sdk/requests' + autoload :CodeSamples, 'open_api_sdk/codesamples' autoload :Github, 'open_api_sdk/github' autoload :Organizations, 'open_api_sdk/organizations' - autoload :Embeds, 'open_api_sdk/embeds' + autoload :PublishingTokens, 'open_api_sdk/publishingtokens' autoload :Workspaces, 'open_api_sdk/workspaces' autoload :Events, 'open_api_sdk/events' - autoload :Artifacts, 'open_api_sdk/artifacts' autoload :Reports, 'open_api_sdk/reports' autoload :Suggest, 'open_api_sdk/suggest' + autoload :SchemaStore, 'open_api_sdk/schemastore' autoload :ShortURLs, 'open_api_sdk/shorturls' + autoload :Artifacts, 'open_api_sdk/artifacts' + autoload :Subscriptions, 'open_api_sdk/subscriptions' + module Models + autoload :Shared, 'open_api_sdk/models/shared' + autoload :Operations, 'open_api_sdk/models/operations' + autoload :Errors, 'open_api_sdk/models/errors' + end end -require_relative 'open_api_sdk/utils/t' require_relative 'open_api_sdk/utils/utils' -require_relative 'open_api_sdk/utils/metadata_fields' +require_relative 'crystalline' require_relative 'open_api_sdk/sdkconfiguration' diff --git a/sorbet/rbi/gems/faraday-retry@2.2.1.rbi b/sorbet/rbi/gems/faraday-retry@2.2.1.rbi new file mode 100644 index 00000000..7a8c41ad --- /dev/null +++ b/sorbet/rbi/gems/faraday-retry@2.2.1.rbi @@ -0,0 +1,207 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-retry` gem. +# Please instead update this file by running `bin/tapioca gem faraday-retry`. + +# Faraday namespace. +# +# source://faraday-retry//lib/faraday/retriable_response.rb#4 +module Faraday + class << self + # source://faraday/2.12.2/lib/faraday.rb#55 + def default_adapter; end + + # source://faraday/2.12.2/lib/faraday.rb#102 + def default_adapter=(adapter); end + + # source://faraday/2.12.2/lib/faraday.rb#59 + def default_adapter_options; end + + # source://faraday/2.12.2/lib/faraday.rb#59 + def default_adapter_options=(_arg0); end + + # source://faraday/2.12.2/lib/faraday.rb#120 + def default_connection; end + + # source://faraday/2.12.2/lib/faraday.rb#62 + def default_connection=(_arg0); end + + # source://faraday/2.12.2/lib/faraday.rb#127 + def default_connection_options; end + + # source://faraday/2.12.2/lib/faraday.rb#134 + def default_connection_options=(options); end + + # source://faraday/2.12.2/lib/faraday.rb#67 + def ignore_env_proxy; end + + # source://faraday/2.12.2/lib/faraday.rb#67 + def ignore_env_proxy=(_arg0); end + + # source://faraday/2.12.2/lib/faraday.rb#46 + def lib_path; end + + # source://faraday/2.12.2/lib/faraday.rb#46 + def lib_path=(_arg0); end + + # source://faraday/2.12.2/lib/faraday.rb#96 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/2.12.2/lib/faraday.rb#107 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/2.12.2/lib/faraday.rb#42 + def root_path; end + + # source://faraday/2.12.2/lib/faraday.rb#42 + def root_path=(_arg0); end + + private + + # source://faraday/2.12.2/lib/faraday.rb#143 + def method_missing(name, *args, &block); end + end +end + +# Exception used to control the Retry middleware. +# +# source://faraday-retry//lib/faraday/retriable_response.rb#6 +class Faraday::RetriableResponse < ::Faraday::Error; end + +# Middleware main module. +# +# source://faraday-retry//lib/faraday/retry/middleware.rb#4 +module Faraday::Retry; end + +# This class provides the main implementation for your middleware. +# Your middleware can implement any of the following methods: +# * on_request - called when the request is being prepared +# * on_complete - called when the response is being processed +# +# Optionally, you can also override the following methods from Faraday::Middleware +# * initialize(app, options = {}) - the initializer method +# * call(env) - the main middleware invocation method. +# This already calls on_request and on_complete, so you normally don't need to override it. +# You may need to in case you need to "wrap" the request or need more control +# (see "retry" middleware: https://github.com/lostisland/faraday/blob/main/lib/faraday/request/retry.rb#L142). +# IMPORTANT: Remember to call `@app.call(env)` or `super` to not interrupt the middleware chain! +# +# source://faraday-retry//lib/faraday/retry/middleware.rb#17 +class Faraday::Retry::Middleware < ::Faraday::Middleware + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param app [#call] + # @param options [Hash] + # @return [Middleware] a new instance of Middleware + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#127 + def initialize(app, options = T.unsafe(nil)); end + + # An exception matcher for the rescue clause can usually be any object + # that responds to `===`, but for Ruby 1.8 it has to be a Class or Module. + # + # @api private + # @param exceptions [Array] + # @return [Module] an exception matcher + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#185 + def build_exception_matcher(exceptions); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#133 + def calculate_sleep_amount(retries, env); end + + # @param env [Faraday::Env] + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#147 + def call(env); end + + private + + # RFC for RateLimit Header Fields for HTTP: + # https://www.ietf.org/archive/id/draft-ietf-httpapi-ratelimit-headers-05.html#name-fields-definition + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#222 + def calculate_rate_limit_reset(env); end + + # MDN spec for Retry-After header: + # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#229 + def calculate_retry_after(env); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#234 + def calculate_retry_interval(retries); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#245 + def parse_retry_header(env, header); end + + # @return [Boolean] + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#206 + def retry_request?(env, exception); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#211 + def rewind_files(body); end +end + +# source://faraday-retry//lib/faraday/retry/middleware.rb#18 +Faraday::Retry::Middleware::DEFAULT_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://faraday-retry//lib/faraday/retry/middleware.rb#22 +Faraday::Retry::Middleware::IDEMPOTENT_METHODS = T.let(T.unsafe(nil), Array) + +# Options contains the configurable parameters for the Retry middleware. +# +# source://faraday-retry//lib/faraday/retry/middleware.rb#25 +class Faraday::Retry::Middleware::Options < ::Faraday::Options + # source://faraday-retry//lib/faraday/retry/middleware.rb#58 + def backoff_factor; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#62 + def exceptions; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#46 + def interval; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#54 + def interval_randomness; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#42 + def max; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#50 + def max_interval; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#66 + def methods; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#74 + def retry_block; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#70 + def retry_if; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#78 + def retry_statuses; end + + class << self + # source://faraday-retry//lib/faraday/retry/middleware.rb#34 + def from(value); end + end +end + +# source://faraday-retry//lib/faraday/retry/middleware.rb#32 +Faraday::Retry::Middleware::Options::DEFAULT_CHECK = T.let(T.unsafe(nil), Proc) + +# source://faraday-retry//lib/faraday/retry/version.rb#5 +Faraday::Retry::VERSION = T.let(T.unsafe(nil), String) diff --git a/speakeasy_client_sdk_ruby.gemspec b/speakeasy_client_sdk_ruby.gemspec index d07fc158..2cec3cec 100644 --- a/speakeasy_client_sdk_ruby.gemspec +++ b/speakeasy_client_sdk_ruby.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__) Gem::Specification.new do |s| s.name = 'speakeasy_client_sdk_ruby' - s.version = '4.2.24' + s.version = '4.3.0' s.platform = Gem::Platform::RUBY s.licenses = ['Apache-2.0'] s.summary = '' @@ -23,13 +23,14 @@ Gem::Specification.new do |s| s.add_dependency('faraday') s.add_dependency('faraday-multipart') + s.add_dependency('faraday-retry', '~> 2.2.1') s.add_dependency('rack') s.add_dependency('rake') - s.add_dependency('sorbet') - - + s.add_dependency('sorbet-runtime') s.add_development_dependency('minitest') - s.add_development_dependency('rubocop') - s.add_development_dependency('sorbet-runtime') + s.add_development_dependency('minitest-focus') + s.add_development_dependency('rubocop', '~> 1.73.2') + s.add_development_dependency('rubocop-minitest', '~> 0.37.1') + s.add_development_dependency('sorbet') s.add_development_dependency('tapioca') end