diff --git a/.gitignore b/.gitignore index 10179e56..3abefabb 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ +.speakeasy/temp/ obj/ bin/ debug/ -.idea/ \ No newline at end of file +.idea/ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 64277a85..d9682b04 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,28 +1,30 @@ lockVersion: 2.0.0 id: f73d2126-985b-4d69-88ee-b7c69254d8bf management: - docChecksum: 52df6f1f34dfe76968f8ed009cc2bfd3 + docChecksum: 8e7108c1d91dd68426e05e155eea40e5 docVersion: 0.4.0 - speakeasyVersion: 1.468.2 - generationVersion: 2.493.4 - releaseVersion: 5.12.0 - configChecksum: 4ac5f7ce74e22b4b8247f447fc0fc3c9 + speakeasyVersion: 1.540.1 + generationVersion: 2.593.4 + releaseVersion: 5.13.0 + configChecksum: ae9208e6039de06e25950b166c066425 repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-csharp.git repoSubDirectory: . published: true features: csharp: additionalDependencies: 0.1.0 - core: 3.10.10 + constsAndDefaults: 0.0.1 + core: 3.10.16 deprecations: 2.81.2 - globalSecurity: 2.83.6 + getRequestBodies: 2.81.1 + globalSecurity: 2.83.7 globalSecurityCallbacks: 0.1.0 globalServerURLs: 2.82.3 globals: 2.82.1 intellisenseMarkdownSupport: 0.1.0 methodArguments: 0.2.0 nameOverrides: 2.81.2 - nullables: 0.1.0 + nullables: 0.1.1 responseFormat: 0.0.4 retries: 0.0.1 sdkHooks: 0.1.0 @@ -35,24 +37,38 @@ generatedFiles: - 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/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/File.md + - docs/Models/Operations/Format.md - docs/Models/Operations/GenerateCodeSamplePreviewAsyncResponse.md - docs/Models/Operations/GenerateCodeSamplePreviewAsyncResponseBody.md - docs/Models/Operations/GenerateCodeSamplePreviewResponse.md - docs/Models/Operations/GetAccessTokenRequest.md - docs/Models/Operations/GetAccessTokenResponse.md + - docs/Models/Operations/GetBillingAddOnsResponse.md - docs/Models/Operations/GetBlobRequest.md - docs/Models/Operations/GetBlobResponse.md - docs/Models/Operations/GetChangesReportSignedUrlRequest.md @@ -61,8 +77,6 @@ generatedFiles: - docs/Models/Operations/GetCodeSamplePreviewAsyncRequest.md - docs/Models/Operations/GetCodeSamplePreviewAsyncResponse.md - docs/Models/Operations/GetCodeSamplePreviewAsyncResponseBody.md - - docs/Models/Operations/GetCodeSamplesRequest.md - - docs/Models/Operations/GetCodeSamplesResponse.md - docs/Models/Operations/GetGitHubActionRequest.md - docs/Models/Operations/GetGitHubActionResponse.md - docs/Models/Operations/GetGithubSetupStateRequest.md @@ -77,8 +91,18 @@ generatedFiles: - docs/Models/Operations/GetOrganizationResponse.md - docs/Models/Operations/GetOrganizationUsageResponse.md - docs/Models/Operations/GetOrganizationsResponse.md + - docs/Models/Operations/GetPublishingTokenByIDRequest.md + - docs/Models/Operations/GetPublishingTokenByIDResponse.md + - docs/Models/Operations/GetPublishingTokenPublicMetadataRequest.md + - docs/Models/Operations/GetPublishingTokenPublicMetadataResponse.md + - docs/Models/Operations/GetPublishingTokenPublicMetadataResponseBody.md + - docs/Models/Operations/GetPublishingTokenResponse.md + - docs/Models/Operations/GetPublishingTokenTargetByIDRequest.md + - docs/Models/Operations/GetPublishingTokenTargetByIDResponse.md - docs/Models/Operations/GetRevisionsRequest.md - docs/Models/Operations/GetRevisionsResponse.md + - docs/Models/Operations/GetSchemaStoreItemRequestBody.md + - docs/Models/Operations/GetSchemaStoreItemResponse.md - docs/Models/Operations/GetTagsRequest.md - docs/Models/Operations/GetTagsResponse.md - docs/Models/Operations/GetUserResponse.md @@ -141,6 +165,9 @@ generatedFiles: - docs/Models/Operations/SuggestOpenAPIResponse.md - docs/Models/Operations/SuggestRequest.md - docs/Models/Operations/SuggestResponse.md + - docs/Models/Operations/UpdatePublishingTokenExpirationRequest.md + - docs/Models/Operations/UpdatePublishingTokenExpirationRequestBody.md + - docs/Models/Operations/UpdatePublishingTokenExpirationResponse.md - docs/Models/Operations/UpdateWorkspaceDetailsRequest.md - docs/Models/Operations/UpdateWorkspaceDetailsResponse.md - docs/Models/Operations/UpdateWorkspaceSettingsRequest.md @@ -158,6 +185,7 @@ generatedFiles: - docs/Models/Shared/Annotations.md - docs/Models/Shared/ApiKeyDetails.md - docs/Models/Shared/Auth.md + - docs/Models/Shared/BillingAddOn.md - docs/Models/Shared/Claims.md - docs/Models/Shared/CliEvent.md - docs/Models/Shared/CodeSampleSchemaInput.md @@ -165,6 +193,7 @@ generatedFiles: - docs/Models/Shared/CompositeSpecMetadata.md - docs/Models/Shared/Diagnostic.md - docs/Models/Shared/FeatureFlag.md + - docs/Models/Shared/Format.md - docs/Models/Shared/GenerateBumpType.md - docs/Models/Shared/GetNamespacesResponse.md - docs/Models/Shared/GetRevisionsResponse.md @@ -189,10 +218,13 @@ 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 @@ -200,8 +232,11 @@ generatedFiles: - docs/Models/Shared/RemoteSourceSubscriptionSettings.md - docs/Models/Shared/Report.md - docs/Models/Shared/Revision.md + - docs/Models/Shared/RevisionContentsMetadata.md + - docs/Models/Shared/RevisionContentsMetadataType.md - docs/Models/Shared/SSOMetadata.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 @@ -211,6 +246,7 @@ generatedFiles: - docs/Models/Shared/SuggestRequestBodySuggestionType.md - docs/Models/Shared/SuggestionType.md - docs/Models/Shared/Tag.md + - docs/Models/Shared/TargetResource.md - docs/Models/Shared/TargetSDK.md - docs/Models/Shared/Type.md - docs/Models/Shared/UsageSnippet.md @@ -234,7 +270,9 @@ generatedFiles: - docs/sdks/events/README.md - docs/sdks/github/README.md - docs/sdks/organizations/README.md + - docs/sdks/publishingtokens/README.md - docs/sdks/reports/README.md + - docs/sdks/schemastore/README.md - docs/sdks/sdk/README.md - docs/sdks/shorturls/README.md - docs/sdks/subscriptions/README.md @@ -252,24 +290,38 @@ generatedFiles: - src/SpeakeasySDK/Models/Errors/SDKException.cs - src/SpeakeasySDK/Models/Operations/ActivateSubscriptionNamespaceRequest.cs - src/SpeakeasySDK/Models/Operations/ActivateSubscriptionNamespaceResponse.cs + - src/SpeakeasySDK/Models/Operations/ArchiveNamespaceRequest.cs + - src/SpeakeasySDK/Models/Operations/ArchiveNamespaceRequestBody.cs + - src/SpeakeasySDK/Models/Operations/ArchiveNamespaceResponse.cs - src/SpeakeasySDK/Models/Operations/CheckGithubAccessRequest.cs - src/SpeakeasySDK/Models/Operations/CheckGithubAccessResponse.cs + - src/SpeakeasySDK/Models/Operations/CreateBillingAddOnsResponse.cs - src/SpeakeasySDK/Models/Operations/CreateFreeTrialResponse.cs - src/SpeakeasySDK/Models/Operations/CreateOrganizationResponse.cs + - src/SpeakeasySDK/Models/Operations/CreatePublishingTokenRequestBody.cs + - src/SpeakeasySDK/Models/Operations/CreatePublishingTokenResponse.cs - src/SpeakeasySDK/Models/Operations/CreateRemoteSourceResponse.cs - src/SpeakeasySDK/Models/Operations/CreateRequestBody.cs - src/SpeakeasySDK/Models/Operations/CreateResponse.cs + - src/SpeakeasySDK/Models/Operations/CreateSchemaStoreItemRequestBody.cs + - src/SpeakeasySDK/Models/Operations/CreateSchemaStoreItemResponse.cs - src/SpeakeasySDK/Models/Operations/CreateWorkspaceResponse.cs - src/SpeakeasySDK/Models/Operations/CreateWorkspaceTokenRequest.cs - src/SpeakeasySDK/Models/Operations/CreateWorkspaceTokenResponse.cs + - src/SpeakeasySDK/Models/Operations/DeleteBillingAddOnRequest.cs + - src/SpeakeasySDK/Models/Operations/DeleteBillingAddOnResponse.cs + - src/SpeakeasySDK/Models/Operations/DeletePublishingTokenRequest.cs + - src/SpeakeasySDK/Models/Operations/DeletePublishingTokenResponse.cs - src/SpeakeasySDK/Models/Operations/DeleteWorkspaceTokenRequest.cs - src/SpeakeasySDK/Models/Operations/DeleteWorkspaceTokenResponse.cs - src/SpeakeasySDK/Models/Operations/File.cs + - src/SpeakeasySDK/Models/Operations/Format.cs - src/SpeakeasySDK/Models/Operations/GenerateCodeSamplePreviewAsyncResponse.cs - src/SpeakeasySDK/Models/Operations/GenerateCodeSamplePreviewAsyncResponseBody.cs - src/SpeakeasySDK/Models/Operations/GenerateCodeSamplePreviewResponse.cs - src/SpeakeasySDK/Models/Operations/GetAccessTokenRequest.cs - src/SpeakeasySDK/Models/Operations/GetAccessTokenResponse.cs + - src/SpeakeasySDK/Models/Operations/GetBillingAddOnsResponse.cs - src/SpeakeasySDK/Models/Operations/GetBlobRequest.cs - src/SpeakeasySDK/Models/Operations/GetBlobResponse.cs - src/SpeakeasySDK/Models/Operations/GetChangesReportSignedUrlRequest.cs @@ -278,8 +330,6 @@ generatedFiles: - src/SpeakeasySDK/Models/Operations/GetCodeSamplePreviewAsyncRequest.cs - src/SpeakeasySDK/Models/Operations/GetCodeSamplePreviewAsyncResponse.cs - src/SpeakeasySDK/Models/Operations/GetCodeSamplePreviewAsyncResponseBody.cs - - src/SpeakeasySDK/Models/Operations/GetCodeSamplesRequest.cs - - src/SpeakeasySDK/Models/Operations/GetCodeSamplesResponse.cs - src/SpeakeasySDK/Models/Operations/GetGitHubActionRequest.cs - src/SpeakeasySDK/Models/Operations/GetGitHubActionResponse.cs - src/SpeakeasySDK/Models/Operations/GetGithubSetupStateRequest.cs @@ -294,8 +344,18 @@ generatedFiles: - src/SpeakeasySDK/Models/Operations/GetOrganizationResponse.cs - src/SpeakeasySDK/Models/Operations/GetOrganizationUsageResponse.cs - src/SpeakeasySDK/Models/Operations/GetOrganizationsResponse.cs + - src/SpeakeasySDK/Models/Operations/GetPublishingTokenByIDRequest.cs + - src/SpeakeasySDK/Models/Operations/GetPublishingTokenByIDResponse.cs + - src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataRequest.cs + - src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataResponse.cs + - src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataResponseBody.cs + - src/SpeakeasySDK/Models/Operations/GetPublishingTokenResponse.cs + - src/SpeakeasySDK/Models/Operations/GetPublishingTokenTargetByIDRequest.cs + - src/SpeakeasySDK/Models/Operations/GetPublishingTokenTargetByIDResponse.cs - src/SpeakeasySDK/Models/Operations/GetRevisionsRequest.cs - src/SpeakeasySDK/Models/Operations/GetRevisionsResponse.cs + - src/SpeakeasySDK/Models/Operations/GetSchemaStoreItemRequestBody.cs + - src/SpeakeasySDK/Models/Operations/GetSchemaStoreItemResponse.cs - src/SpeakeasySDK/Models/Operations/GetTagsRequest.cs - src/SpeakeasySDK/Models/Operations/GetTagsResponse.cs - src/SpeakeasySDK/Models/Operations/GetUserResponse.cs @@ -358,6 +418,9 @@ generatedFiles: - src/SpeakeasySDK/Models/Operations/SuggestOpenAPIResponse.cs - src/SpeakeasySDK/Models/Operations/SuggestRequest.cs - src/SpeakeasySDK/Models/Operations/SuggestResponse.cs + - src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationRequest.cs + - src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationRequestBody.cs + - src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationResponse.cs - src/SpeakeasySDK/Models/Operations/UpdateWorkspaceDetailsRequest.cs - src/SpeakeasySDK/Models/Operations/UpdateWorkspaceDetailsResponse.cs - src/SpeakeasySDK/Models/Operations/UpdateWorkspaceSettingsRequest.cs @@ -375,6 +438,7 @@ generatedFiles: - src/SpeakeasySDK/Models/Shared/Annotations.cs - src/SpeakeasySDK/Models/Shared/ApiKeyDetails.cs - src/SpeakeasySDK/Models/Shared/Auth.cs + - src/SpeakeasySDK/Models/Shared/BillingAddOn.cs - src/SpeakeasySDK/Models/Shared/Claims.cs - src/SpeakeasySDK/Models/Shared/CliEvent.cs - src/SpeakeasySDK/Models/Shared/CodeSampleSchemaInput.cs @@ -382,6 +446,7 @@ generatedFiles: - src/SpeakeasySDK/Models/Shared/CompositeSpecMetadata.cs - src/SpeakeasySDK/Models/Shared/Diagnostic.cs - src/SpeakeasySDK/Models/Shared/FeatureFlag.cs + - src/SpeakeasySDK/Models/Shared/Format.cs - src/SpeakeasySDK/Models/Shared/GenerateBumpType.cs - src/SpeakeasySDK/Models/Shared/GetNamespacesResponse.cs - src/SpeakeasySDK/Models/Shared/GetRevisionsResponse.cs @@ -406,10 +471,13 @@ generatedFiles: - src/SpeakeasySDK/Models/Shared/OASSummary.cs - src/SpeakeasySDK/Models/Shared/OpenapiDiffBumpType.cs - src/SpeakeasySDK/Models/Shared/Organization.cs + - src/SpeakeasySDK/Models/Shared/OrganizationBillingAddOnRequest.cs + - src/SpeakeasySDK/Models/Shared/OrganizationBillingAddOnResponse.cs - src/SpeakeasySDK/Models/Shared/OrganizationUsage.cs - src/SpeakeasySDK/Models/Shared/OrganizationUsageResponse.cs - src/SpeakeasySDK/Models/Shared/PreflightRequest.cs - src/SpeakeasySDK/Models/Shared/PreflightToken.cs + - src/SpeakeasySDK/Models/Shared/PublishingToken.cs - src/SpeakeasySDK/Models/Shared/PullRequestMetadata.cs - src/SpeakeasySDK/Models/Shared/Relationship.cs - src/SpeakeasySDK/Models/Shared/RemoteDocument.cs @@ -417,8 +485,11 @@ generatedFiles: - src/SpeakeasySDK/Models/Shared/RemoteSourceSubscriptionSettings.cs - src/SpeakeasySDK/Models/Shared/Report.cs - src/SpeakeasySDK/Models/Shared/Revision.cs + - src/SpeakeasySDK/Models/Shared/RevisionContentsMetadata.cs + - src/SpeakeasySDK/Models/Shared/RevisionContentsMetadataType.cs - src/SpeakeasySDK/Models/Shared/SSOMetadata.cs - src/SpeakeasySDK/Models/Shared/SchemaFile.cs + - src/SpeakeasySDK/Models/Shared/SchemaStoreItem.cs - src/SpeakeasySDK/Models/Shared/Secrets.cs - src/SpeakeasySDK/Models/Shared/Security.cs - src/SpeakeasySDK/Models/Shared/ShortURL.cs @@ -428,6 +499,7 @@ generatedFiles: - src/SpeakeasySDK/Models/Shared/SuggestRequestBodySuggestionType.cs - src/SpeakeasySDK/Models/Shared/SuggestionType.cs - src/SpeakeasySDK/Models/Shared/Tag.cs + - src/SpeakeasySDK/Models/Shared/TargetResource.cs - src/SpeakeasySDK/Models/Shared/TargetSDK.cs - src/SpeakeasySDK/Models/Shared/Type.cs - src/SpeakeasySDK/Models/Shared/UsageSnippet.cs @@ -446,8 +518,10 @@ generatedFiles: - src/SpeakeasySDK/Models/Shared/WorkspaceToken.cs - src/SpeakeasySDK/Models/Shared/Workspaces.cs - src/SpeakeasySDK/Organizations.cs + - src/SpeakeasySDK/PublishingTokens.cs - src/SpeakeasySDK/Reports.cs - src/SpeakeasySDK/SDK.cs + - src/SpeakeasySDK/SchemaStore.cs - src/SpeakeasySDK/ShortURLs.cs - src/SpeakeasySDK/SpeakeasySDK.csproj - src/SpeakeasySDK/Subscriptions.cs @@ -471,288 +545,11 @@ generatedFiles: - src/SpeakeasySDK/Utils/Utilities.cs - src/SpeakeasySDK/Workspaces.cs examples: - deleteApi: - speakeasy-default-delete-api: - parameters: - path: - apiID: "" - versionID: "" - responses: - default: - application/json: {"message": "", "status_code": 875451} - generateOpenApiSpec: - speakeasy-default-generate-open-api-spec: - parameters: - path: - apiID: "" - versionID: "" - responses: - "200": - application/json: {"current_schema": "", "new_schema": ""} - default: - application/json: {"message": "", "status_code": 871055} - generatePostmanCollection: - speakeasy-default-generate-postman-collection: - parameters: - path: - apiID: "" - versionID: "" - responses: - "200": - application/octet-stream: "0xd6Be621e7F" - default: - application/json: {"message": "", "status_code": 697008} - getAllApiVersions: - speakeasy-default-get-all-api-versions: - parameters: - path: - apiID: "" - query: {} - responses: - "200": - application/json: [] - default: - application/json: {"message": "", "status_code": 784529} - getApis: - speakeasy-default-get-apis: - responses: - "200": - application/json: [] - default: - application/json: {"message": "", "status_code": 11490} - upsertApi: - speakeasy-default-upsert-api: - parameters: - path: - apiID: "" - requestBody: - application/json: {"api_id": "", "description": "Synchronised 5th generation knowledge user", "version_id": ""} - responses: - "200": - application/json: {"api_id": "", "created_at": "2022-11-30T03:11:22.096Z", "description": "Visionary 4th generation focus group", "updated_at": "2022-03-06T16:10:22.154Z", "version_id": "", "workspace_id": ""} - default: - application/json: {"message": "", "status_code": 17590} - deleteApiEndpoint: - speakeasy-default-delete-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - apiEndpointID: "" - responses: - default: - application/json: {"message": "", "status_code": 788324} - findApiEndpoint: - speakeasy-default-find-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - displayName: "Don.Strosin" - responses: - "200": - application/json: {"api_endpoint_id": "", "api_id": "", "created_at": "2023-05-01T15:36:31.538Z", "description": "Programmable uniform adapter", "display_name": "Gracie23", "method": "", "path": "/srv", "updated_at": "2024-01-26T05:16:49.540Z", "version_id": "", "workspace_id": ""} - default: - application/json: {"message": "", "status_code": 398024} - generateOpenApiSpecForApiEndpoint: - speakeasy-default-generate-open-api-spec-for-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - apiEndpointID: "" - responses: - "200": - application/json: {"current_schema": "", "new_schema": ""} - default: - application/json: {"message": "", "status_code": 833540} - generatePostmanCollectionForApiEndpoint: - speakeasy-default-generate-postman-collection-for-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - apiEndpointID: "" - responses: - "200": - application/octet-stream: "0xBBF5e24c4D" - default: - application/json: {"message": "", "status_code": 870898} - getAllApiEndpoints: - speakeasy-default-get-all-api-endpoints: - parameters: - path: - apiID: "" - responses: - "200": - application/json: [] - default: - application/json: {"message": "", "status_code": 909400} - getAllForVersionApiEndpoints: - speakeasy-default-get-all-for-version-api-endpoints: - parameters: - path: - apiID: "" - versionID: "" - responses: - "200": - application/json: [] - default: - application/json: {"message": "", "status_code": 908203} - getApiEndpoint: - speakeasy-default-get-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - apiEndpointID: "" - responses: - "200": - application/json: {"api_endpoint_id": "", "api_id": "", "created_at": "2024-12-16T12:54:49.054Z", "description": "Grass-roots interactive orchestration", "display_name": "Mylene_Kozey58", "method": "", "path": "/rescue", "updated_at": "2024-07-01T02:49:47.888Z", "version_id": "", "workspace_id": ""} - default: - application/json: {"message": "", "status_code": 572524} - upsertApiEndpoint: - speakeasy-default-upsert-api-endpoint: - parameters: - path: - apiID: "" - versionID: "" - apiEndpointID: "" - requestBody: - application/json: {"api_endpoint_id": "", "description": "Public-key systematic attitude", "display_name": "Camille.Schaefer11", "method": "", "path": "/Library", "version_id": ""} - responses: - "200": - application/json: {"api_endpoint_id": "", "api_id": "", "created_at": "2023-05-11T02:25:34.515Z", "description": "Triple-buffered optimal methodology", "display_name": "Nolan_Corwin58", "method": "", "path": "/home/user", "updated_at": "2022-04-29T18:24:21.535Z", "version_id": "", "workspace_id": ""} - default: - application/json: {"message": "", "status_code": 462700} - deleteVersionMetadata: - speakeasy-default-delete-version-metadata: - parameters: - path: - apiID: "" - versionID: "" - metaKey: "" - metaValue: "" - responses: - default: - application/json: {"message": "", "status_code": 730807} - getVersionMetadata: - speakeasy-default-get-version-metadata: - parameters: - path: - apiID: "" - versionID: "" - responses: - "200": - application/json: [] - default: - application/json: {"message": "", "status_code": 269133} - insertVersionMetadata: - speakeasy-default-insert-version-metadata: - parameters: - path: - apiID: "" - versionID: "" - requestBody: - application/json: {"meta_key": "", "meta_value": ""} - responses: - "200": - application/json: {"api_id": "", "created_at": "2022-03-18T13:32:09.395Z", "meta_key": "", "meta_value": "", "version_id": "", "workspace_id": ""} - default: - application/json: {"message": "", "status_code": 516378} - deleteSchema: - speakeasy-default-delete-schema: - parameters: - path: - apiID: "" - versionID: "" - revisionID: "" - responses: - default: - application/json: {"message": "", "status_code": 9376} - downloadSchema: - speakeasy-default-download-schema: - parameters: - path: - apiID: "" - versionID: "" - responses: - "200": - application/json: "0xaf6D2e8557" - application/x-yaml: "0x5EFea906ee" - default: - application/json: {"message": "", "status_code": 375177} - downloadSchemaRevision: - speakeasy-default-download-schema-revision: - parameters: - path: - apiID: "" - versionID: "" - revisionID: "" - responses: - "200": - application/json: "0xC11b2bbEC4" - application/x-yaml: "0xE04B837904" - default: - application/json: {"message": "", "status_code": 298817} - getSchema: - speakeasy-default-get-schema: - parameters: - path: - apiID: "" - versionID: "" - responses: - "200": - application/json: {"api_id": "", "created_at": "2022-09-09T00:58:17.303Z", "description": "Quality-focused scalable superstructure", "revision_id": "", "version_id": "", "workspace_id": ""} - default: - application/json: {"message": "", "status_code": 983881} - getSchemaDiff: - speakeasy-default-get-schema-diff: - parameters: - path: - apiID: "" - versionID: "" - baseRevisionID: "" - targetRevisionID: "" - responses: - "200": - application/json: {"additions": [], "deletions": [], "modifications": {}} - default: - application/json: {"message": "", "status_code": 201370} - getSchemaRevision: - speakeasy-default-get-schema-revision: - parameters: - path: - apiID: "" - versionID: "" - revisionID: "" - responses: - "200": - application/json: {"api_id": "", "created_at": "2022-01-23T10:21:45.287Z", "description": "Managed intermediate flexibility", "revision_id": "", "version_id": "", "workspace_id": ""} - default: - application/json: {"message": "", "status_code": 941905} - getSchemas: - speakeasy-default-get-schemas: - parameters: - path: - apiID: "" - versionID: "" - responses: - "200": - application/json: [] - default: - application/json: {"message": "", "status_code": 170115} - registerSchema: - speakeasy-default-register-schema: - parameters: - path: - apiID: "" - versionID: "" - requestBody: - multipart/form-data: {"file": {"": "example.file"}} + createRemoteSource: + speakeasy-default-create-remote-source: responses: - default: - application/json: {"message": "", "status_code": 867990} + 4XX: + application/json: {"message": "", "status_code": 580557} getBlob: speakeasy-default-get-blob: parameters: @@ -762,10 +559,6 @@ examples: namespace_name: "" digest: "" responses: - "200": - application/octet-stream: "0x211ECBAE5E" - default: - application/json: {"message": "", "status_code": 279725} 2XX: application/octet-stream: "0x21CA56a82d" 4XX: @@ -779,10 +572,6 @@ examples: namespace_name: "" revision_reference: "" responses: - "200": - application/vnd.oci.image.manifest.v1+json: {"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} - default: - application/json: {"message": "", "status_code": 707258} 2XX: application/vnd.oci.image.manifest.v1+json: {"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} 4XX: @@ -790,25 +579,10 @@ examples: getNamespaces: speakeasy-default-get-namespaces: responses: - "200": - application/json: {"items": []} - default: - application/json: {"message": "", "status_code": 917991} 2XX: application/json: {"items": [{"created_at": "2025-01-19T10:11:46.428Z", "id": "", "name": "", "updated_at": "2023-01-07T04:43:36.873Z"}, {"created_at": "2024-07-05T07:26:30.970Z", "id": "", "name": "", "updated_at": "2025-01-30T11:34:19.590Z"}, {"created_at": "2023-08-10T13:43:30.983Z", "id": "", "name": "", "updated_at": "2023-07-15T08:41:36.371Z"}]} 4XX: application/json: {"message": "", "status_code": 305198} - getOASSummary: - speakeasy-default-get-OAS-summary: - parameters: - path: - namespace_name: "" - revision_reference: "" - responses: - "200": - application/json: {"info": {"description": "Fully-configurable neutral software", "summary": "", "title": "", "version": ""}, "operations": []} - default: - application/json: {"message": "", "status_code": 963960} getRevisions: speakeasy-default-get-revisions: parameters: @@ -816,10 +590,6 @@ examples: namespace_name: "" query: {} responses: - "200": - application/json: {"items": [], "next_page_token": ""} - default: - application/json: {"message": "", "status_code": 284614} 2XX: application/json: {"items": [{"created_at": "2025-09-16T19:17:04.361Z", "digest": "sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f", "id": "", "namespace_name": "", "tags": [""], "updated_at": "2024-12-05T05:58:38.953Z"}], "next_page_token": ""} 4XX: @@ -830,446 +600,106 @@ examples: path: namespace_name: "" responses: - "200": - application/json: {"items": []} - default: - application/json: {"message": "", "status_code": 136548} 2XX: application/json: {"items": []} 4XX: application/json: {"message": "", "status_code": 50428} + 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} postTags: speakeasy-default-post-tags: parameters: path: namespace_name: "" responses: - default: - application/json: {"message": "", "status_code": 581484} 4XX: application/json: {"message": "", "status_code": 581484} preflight: speakeasy-default-preflight: responses: - default: - application/json: {"message": "", "status_code": 820828} - "200": {} 2XX: application/json: {} 4XX: application/json: {"message": "", "status_code": 820828} - getAccessToken: - speakeasy-default-get-access-token: + archiveNamespace: + speakeasy-default-archive-namespace: parameters: - query: - workspace_id: "" + path: + namespace_name: "" responses: - "200": - application/json: {"access_token": ""} - default: - application/json: {"message": "", "status_code": 299050} - 2XX: - application/json: {"access_token": ""} 4XX: - application/json: {"message": "", "status_code": 299050} - getUser: - speakeasy-default-get-user: + application/json: {"message": "", "status_code": 334009} + setVisibility: + speakeasy-default-set-visibility: + parameters: + path: + namespace_name: "" responses: - "200": - application/json: {"admin": true, "confirmed": false, "created_at": "2022-06-27T09:27:02.992Z", "display_name": "Kendrick92", "email": "Kirstin.Kautzer61@yahoo.com", "email_verified": false, "id": "", "last_login_at": "2023-04-23T00:14:06.093Z", "updated_at": "2023-07-11T14:17:50.684Z", "whitelisted": false} - default: - application/json: {"message": "", "status_code": 502060} - 2XX: - application/json: {"admin": false, "confirmed": true, "created_at": "2025-09-05T08:59:40.988Z", "display_name": "Tianna_Prohaska", "email": "Morton82@gmail.com", "email_verified": false, "id": "", "updated_at": "2023-08-28T03:26:52.335Z", "whitelisted": true} 4XX: - application/json: {"message": "", "status_code": 237845} + application/json: {"message": "", "status_code": 651364} getWorkspaceAccess: speakeasy-default-get-workspace-access: responses: - "200": - application/json: {"generation_allowed": false, "message": ""} 2XX: application/json: {"generation_allowed": true, "message": ""} - validateApiKey: - speakeasy-default-validate-api-key: - responses: - "200": - application/json: {"account_type_v2": "enterprise", "enabled_features": [], "org_slug": "", "telemetry_disabled": true, "workspace_id": "", "workspace_slug": ""} - default: - application/json: {"message": "", "status_code": 858745} - 2XX: - application/json: {"account_type_v2": "enterprise", "enabled_features": ["", "", ""], "org_slug": "", "telemetry_disabled": true, "workspace_created_at": "2024-02-05T22:57:49.657Z", "workspace_id": "", "workspace_slug": ""} - 4XX: - application/json: {"message": "", "status_code": 150892} - generateRequestPostmanCollection: - speakeasy-default-generate-request-postman-collection: - parameters: - path: - requestID: "" - responses: - "200": - application/octet-stream: "0xe9bfc5350A" - default: - application/json: {"message": "", "status_code": 319220} - getRequestFromEventLog: - speakeasy-default-get-request-from-event-log: - parameters: - path: - requestID: "" - responses: - "200": - application/json: {"created_at": "2024-07-06T20:33:24.663Z", "har": "", "har_size_bytes": 205280, "request_id": "", "workspace_id": ""} - default: - application/json: {"message": "", "status_code": 659422} - queryEventLog: - speakeasy-default-query-event-log: - responses: - "200": - application/json: [] - default: - application/json: {"message": "", "status_code": 241978} - checkAccess: - speakeasy-default-check-access: - parameters: - query: - org: "" - repo: "" - responses: - default: - application/json: {"message": "", "status_code": 74604} - configureCodeSamples: - speakeasy-default-configure-code-samples: - requestBody: - application/json: {"org": "", "repo": "", "targetName": ""} - responses: - "200": - application/json: {"codeSampleOverlayRegistryURL": "", "source": {"location": ""}} - default: - application/json: {"message": "", "status_code": 968093} - configureMintlifyRepo: - speakeasy-default-configure-mintlify-repo: - requestBody: - application/json: {"input": "", "org": "", "overlays": [], "repo": ""} - responses: - default: - application/json: {"message": "", "status_code": 310607} - configureTarget: - speakeasy-default-configure-target: - requestBody: - application/json: {"org": "", "repo_name": ""} - responses: - default: - application/json: {"message": "", "status_code": 210299} - fetchPublishingPRs: - speakeasy-default-fetch-publishing-P-rs: - parameters: - query: - generate_gen_lock_id: "" - org: "" - repo: "" - responses: - default: - application/json: {"message": "", "status_code": 192607} - "200": {} - getAction: - speakeasy-default-get-action: - parameters: - query: - org: "" - repo: "" - responses: - default: - application/json: {"message": "", "status_code": 252330} - "200": {} - githubCheckPublishingSecrets: - speakeasy-default-github-check-publishing-secrets: + getAccessToken: + speakeasy-default-get-access-token: parameters: query: - generate_gen_lock_id: "" - responses: - default: - application/json: {"message": "", "status_code": 445560} - "200": {} - 2XX: - application/json: {} - 4XX: - application/json: {"message": "", "status_code": 749379} - githubStorePublishingSecrets: - speakeasy-default-github-store-publishing-secrets: - requestBody: - application/json: {"generate_gen_lock_id": ""} - responses: - default: - application/json: {"message": "", "status_code": 802162} - 4XX: - application/json: {"message": "", "status_code": 444361} - triggerAction: - speakeasy-default-trigger-action: - requestBody: - application/json: {"gen_lock_id": "", "org": "", "repo_name": ""} - responses: - default: - application/json: {"message": "", "status_code": 689611} - createFreeTrial: - speakeasy-default-create-free-trial: - responses: - default: - application/json: {"message": "", "status_code": 728627} - 4XX: - application/json: {"message": "", "status_code": 728627} - getOrganization: - speakeasy-default-get-organization: - parameters: - path: - organizationID: "" - responses: - "200": - application/json: {"account_type": "scale-up", "id": "", "name": "", "telemetry_disabled": true} - default: - application/json: {"message": "", "status_code": 492205} - 2XX: - application/json: {"account_type": "business", "created_at": "2024-09-04T11:33:52.011Z", "id": "", "name": "", "slug": "", "sso_activated": false, "telemetry_disabled": false, "updated_at": "2025-11-29T01:50:48.954Z"} - 4XX: - application/json: {"message": "", "status_code": 458049} - getOrganizationUsage: - speakeasy-default-get-organization-usage: - responses: - "200": - application/json: {"allowed_languages": [], "total_allowed_languages": 85188, "usage": []} - default: - application/json: {"message": "", "status_code": 689787} - 2XX: - application/json: {"allowed_languages": [], "total_allowed_languages": 863126, "usage": [{"accessible": false, "accessible_features": [""], "gen_lock_ids": ["", "", ""], "language": "", "max_operations": 939867, "number_of_operations": 881790, "used_features": [""], "workspaces": ["", ""]}, {"accessible": true, "accessible_features": ["", "", ""], "gen_lock_ids": [""], "language": "", "max_operations": 593645, "number_of_operations": 369818, "used_features": [""], "workspaces": []}]} - 4XX: - application/json: {"message": "", "status_code": 804495} - getOrganizations: - speakeasy-default-get-organizations: - responses: - "200": - application/json: [] - default: - application/json: {"message": "", "status_code": 952344} - 2XX: - application/json: [{"account_type": "free", "created_at": "2024-10-17T22:25:06.537Z", "id": "", "name": "", "slug": "", "sso_activated": false, "telemetry_disabled": true, "updated_at": "2024-05-22T13:01:16.115Z"}] - 4XX: - application/json: {"message": "", "status_code": 621425} - getChangesReportSignedUrl: - speakeasy-default-get-changes-report-signed-url: - parameters: - path: - documentChecksum: "" - responses: - "200": - application/json: {"url": "http://precious-pressure.biz"} - 2XX: - application/json: {"url": "https://rosy-masterpiece.biz/"} - getLintingReportSignedUrl: - speakeasy-default-get-linting-report-signed-url: - parameters: - path: - documentChecksum: "" - responses: - "200": - application/json: {"url": "https://overdue-maybe.net"} - 2XX: - application/json: {"url": "https://negligible-merit.info"} - uploadReport: - speakeasy-default-upload-report: - requestBody: - multipart/form-data: {"file": {"": "example.file"}} - responses: - "200": - application/json: {"url": "http://earnest-upgrade.com"} - 2XX: - application/json: {"url": "https://cluttered-stall.info"} - create: - speakeasy-default-create: - requestBody: - application/json: {"url": "http://limp-pastry.org"} - responses: - "200": - application/json: {"full_url": "", "short_url": ""} - 2XX: - application/json: {"full_url": "https://probable-heating.com/", "short_url": "https://standard-utilization.com/"} - suggest: - speakeasy-default-suggest: - parameters: - header: - x-session-id: "" - requestBody: - application/json: {"diagnostics": [], "oas_summary": {"info": {"description": "Operative impactful monitoring", "summary": "", "title": "", "version": ""}, "operations": []}, "suggestion_type": "diagnostics-only"} - responses: - "200": - application/json: "0x8D9A3DCDEa" - 2XX: - application/json: "0xbe893CEca6" - suggestOpenAPI: - speakeasy-default-suggest-open-API: - parameters: - header: - x-session-id: "" - requestBody: - multipart/form-data: {"schema": {"": "example.file"}} - responses: - "200": - application/json: "0xB470c0FE6E" - 2XX: - application/json: "0x0beEcB7cF6" - suggestOpenAPIRegistry: - speakeasy-default-suggest-open-API-registry: - parameters: - path: - namespace_name: "" - revision_reference: "" - header: - x-session-id: "" - responses: - "200": - application/json: "0x94DFDbB4df" - 2XX: - application/json: "0x9DDBdD905F" - getEmbedAccessToken: - speakeasy-default-get-embed-access-token: - responses: - "200": - application/json: {"access_token": ""} - default: - application/json: {"message": "", "status_code": 964408} - getValidEmbedAccessTokens: - speakeasy-default-get-valid-embed-access-tokens: - responses: - "200": - application/json: [] - default: - application/json: {"message": "", "status_code": 806352} - revokeEmbedAccessToken: - speakeasy-default-revoke-embed-access-token: - parameters: - path: - tokenID: "" - responses: - default: - application/json: {"message": "", "status_code": 217594} - getWorkspace: - speakeasy-default-get-workspace: - parameters: - path: workspace_id: "" responses: - "200": - application/json: {"created_at": "2024-06-17T21:39:51.489Z", "id": "", "name": "", "organization_id": "", "slug": "", "telemetry_disabled": true, "updated_at": "2022-01-05T09:55:04.665Z", "verified": false} - default: - application/json: {"message": "", "status_code": 488095} 2XX: - 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} + application/json: {"access_token": "", "claims": {}, "user": {}} 4XX: - application/json: {"message": "", "status_code": 868924} - getWorkspaceFeatureFlags: - speakeasy-default-get-workspace-feature-flags: - parameters: - path: - workspace_id: "" - responses: - 5XX: - application/json: {"message": "", "status_code": 365854} - "200": - application/json: {} - getWorkspaceEventsByTarget: - speakeasy-default-get-workspace-events-by-target: - parameters: - path: - targetID: "" - target_id: "" - workspace_id: "" - query: {} - responses: - "200": - application/json: [] - 5XX: - application/json: {"message": "", "status_code": 749240} - getWorkspaceTargets: - speakeasy-default-get-workspace-targets: - responses: - "200": - application/json: [] - 5XX: - application/json: {"message": "", "status_code": 966013} - postWorkspaceEvents: - speakeasy-default-post-workspace-events: - parameters: - path: - workspace_id: "" - requestBody: - application/json: [] + application/json: {"message": "", "status_code": 299050} + getUser: + speakeasy-default-get-user: responses: - 5XX: - application/json: {"message": "", "status_code": 962857} - searchWorkspaceEvents: - speakeasy-default-search-workspace-events: - parameters: - path: - workspace_id: "" - query: {} + 2XX: + application/json: {"admin": false, "confirmed": true, "created_at": "2025-09-05T08:59:40.988Z", "display_name": "Tianna_Prohaska", "email": "Morton82@gmail.com", "email_verified": false, "id": "", "updated_at": "2023-08-28T03:26:52.335Z", "whitelisted": true} + 4XX: + application/json: {"message": "", "status_code": 237845} + validateApiKey: + speakeasy-default-validate-api-key: responses: - "200": - application/json: [] - 5XX: - application/json: {"message": "", "status_code": 750032} + 2XX: + application/json: {"account_type_v2": "enterprise", "billing_add_ons": ["webhooks", "sdk_testing", "webhooks"], "enabled_features": ["", "", ""], "org_slug": "", "telemetry_disabled": false, "workspace_created_at": "2024-02-23T05:39:14.801Z", "workspace_id": "", "workspace_slug": ""} + 4XX: + application/json: {"message": "", "status_code": 380984} generateCodeSamplePreview: - speakeasy-default-generate-code-sample-preview: + default: requestBody: - multipart/form-data: {"languages": ["", ""], "schema_file": {"": "example.file"}} + multipart/form-data: {"language": "", "schema_file": {"": "example.file"}} responses: - "200": - application/json: "0x28e0E3f5d1" - application/x-yaml: "0xfA011e0be4" - 4XX: - application/json: {"message": "", "status_code": 396101} + 2XX: + application/json: {"snippets": [{"code": "import { Petstore } from \"petstore-sdk\";\n\nconst petstore = new Petstore({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await petstore.pet.getById({\n id: 137396,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();", "language": "typescript", "method": "get", "operationId": "getPetById", "path": "/pet/{id}"}]} generateCodeSamplePreviewAsync: speakeasy-default-generate-code-sample-preview-async: requestBody: - multipart/form-data: {"languages": ["", "", ""], "schema_file": {"": "example.file"}} + multipart/form-data: {"language": "", "schema_file": {"": "example.file"}} responses: "202": - application/json: {"job_id": "", "status": "pending"} + application/json: {"job_id": "", "status": "running"} 4XX: + application/json: {"message": "", "status_code": 134142} + 5XX: application/json: {"message": "", "status_code": 394086} getCodeSamplePreviewAsync: - speakeasy-default-get-code-sample-preview-async: + default: parameters: path: jobID: "" - responses: - "200": - application/json: "0x2090d4E1A7" - application/x-yaml: "0x14456CbEbA" - "202": - application/json: {"status": "running"} - 4XX: - application/json: {"message": "", "status_code": 462062} - createRemoteSource: - speakeasy-default-create-remote-source: - responses: - 4XX: - application/json: {"message": "", "status_code": 580557} - 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} - setVisibility: - speakeasy-default-set-visibility: - parameters: - path: - namespace_name: "" - responses: - 4XX: - application/json: {"message": "", "status_code": 651364} + application/json: {"snippets": [{"code": "import { Petstore } from \"petstore-sdk\";\n\nconst petstore = new Petstore({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await petstore.pet.getById({\n id: 137396,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();", "language": "typescript", "method": "get", "operationId": "getPetById", "path": "/pet/{id}"}]} checkGithubAccess: speakeasy-default-check-github-access: parameters: @@ -1291,6 +721,16 @@ examples: application/json: {} 4XX: application/json: {"message": "", "status_code": 670562} + githubCheckPublishingSecrets: + speakeasy-default-github-check-publishing-secrets: + parameters: + query: + generate_gen_lock_id: "" + responses: + 2XX: + application/json: {} + 4XX: + application/json: {"message": "", "status_code": 749379} githubConfigureCodeSamples: speakeasy-default-github-configure-code-samples: requestBody: @@ -1342,6 +782,13 @@ examples: responses: 4XX: application/json: {"message": "", "status_code": 774553} + githubStorePublishingSecrets: + speakeasy-default-github-store-publishing-secrets: + requestBody: + application/json: {"generate_gen_lock_id": ""} + responses: + 4XX: + application/json: {"message": "", "status_code": 444361} githubTriggerAction: speakeasy-default-github-trigger-action: requestBody: @@ -1358,6 +805,165 @@ examples: application/json: {"account_type": "enterprise", "created_at": "2025-11-08T08:43:39.394Z", "id": "", "name": "", "slug": "", "sso_activated": true, "telemetry_disabled": true, "updated_at": "2023-04-09T14:25:29.356Z"} 4XX: application/json: {"message": "", "status_code": 792620} + createBillingAddOns: + speakeasy-default-create-billing-add-ons: + requestBody: + application/json: {"add_ons": ["custom_code_regions", "custom_code_regions", "sdk_testing"]} + responses: + "200": + application/json: {"add_ons": ["snippet_ai", "snippet_ai", "sdk_testing"]} + 5XX: + application/json: {"message": "", "status_code": 518517} + createFreeTrial: + speakeasy-default-create-free-trial: + responses: + 4XX: + application/json: {"message": "", "status_code": 728627} + deleteBillingAddOn: + speakeasy-default-delete-billing-add-on: + parameters: + path: + add_on: "snippet_ai" + responses: + 5XX: + application/json: {"message": "", "status_code": 783245} + getOrganization: + speakeasy-default-get-organization: + parameters: + path: + organizationID: "" + responses: + 2XX: + application/json: {"account_type": "business", "created_at": "2024-09-04T11:33:52.011Z", "id": "", "name": "", "slug": "", "sso_activated": false, "telemetry_disabled": false, "updated_at": "2025-11-29T01:50:48.954Z"} + 4XX: + application/json: {"message": "", "status_code": 458049} + getOrganizations: + speakeasy-default-get-organizations: + responses: + 2XX: + application/json: [{"account_type": "free", "created_at": "2024-10-17T22:25:06.537Z", "id": "", "name": "", "slug": "", "sso_activated": false, "telemetry_disabled": true, "updated_at": "2024-05-22T13:01:16.115Z"}, {"account_type": "business", "created_at": "2023-03-09T16:25:53.264Z", "id": "", "name": "", "slug": "", "sso_activated": false, "telemetry_disabled": false, "updated_at": "2023-06-16T08:07:08.454Z"}] + 4XX: + application/json: {"message": "", "status_code": 217828} + getBillingAddOns: + speakeasy-default-get-billing-add-ons: + responses: + "200": + application/json: {"add_ons": []} + 5XX: + application/json: {"message": "", "status_code": 697034} + getOrganizationUsage: + speakeasy-default-get-organization-usage: + responses: + 2XX: + application/json: {"allowed_languages": [], "total_allowed_languages": 863126, "usage": [{"accessible": false, "accessible_features": [""], "gen_lock_ids": ["", "", ""], "language": "", "max_operations": 939867, "number_of_operations": 881790, "used_features": [""], "workspaces": ["", ""]}, {"accessible": true, "accessible_features": ["", "", ""], "gen_lock_ids": [""], "language": "", "max_operations": 593645, "number_of_operations": 369818, "used_features": [""], "workspaces": []}]} + 4XX: + application/json: {"message": "", "status_code": 804495} + createPublishingToken: + speakeasy-default-create-publishing-token: + responses: + "200": + application/json: {"created_at": "2024-06-17T07:14:55.338Z", "created_by": "", "id": "", "organization_id": "", "target_id": "", "target_resource": "document", "token": "", "token_name": "", "valid_until": "2024-11-30T17:06:07.804Z", "workspace_id": ""} + 4XX: + application/json: {"message": "", "status_code": 417458} + deletePublishingToken: + speakeasy-default-delete-publishing-token: + parameters: + path: + tokenID: "" + responses: + 4XX: + application/json: {"message": "", "status_code": 545907} + getPublishingTokenByID: + speakeasy-default-get-publishing-token-by-ID: + parameters: + path: + tokenID: "" + responses: + "200": + application/json: {"created_at": "2025-02-06T13:54:48.821Z", "created_by": "", "id": "", "organization_id": "", "target_id": "", "target_resource": "document", "token": "", "token_name": "", "valid_until": "2024-09-04T11:33:52.011Z", "workspace_id": ""} + 4XX: + application/json: {"message": "", "status_code": 544221} + getPublishingToken: + speakeasy-default-get-publishing-token: + responses: + "200": + application/json: [{"created_at": "2024-08-22T19:26:20.850Z", "created_by": "", "id": "", "organization_id": "", "target_id": "", "target_resource": "document", "token": "", "token_name": "", "valid_until": "2025-01-13T10:26:00.433Z", "workspace_id": ""}, {"created_at": "2023-07-14T18:23:27.528Z", "created_by": "", "id": "", "organization_id": "", "target_id": "", "target_resource": "document", "token": "", "token_name": "", "valid_until": "2023-09-09T18:28:08.953Z", "workspace_id": ""}, {"created_at": "2023-06-17T12:14:27.999Z", "created_by": "", "id": "", "organization_id": "", "target_id": "", "target_resource": "document", "token": "", "token_name": "", "valid_until": "2024-11-27T13:02:27.296Z", "workspace_id": ""}] + 4XX: + application/json: {"message": "", "status_code": 639387} + getPublishingTokenPublicMetadata: + speakeasy-default-get-publishing-token-public-metadata: + parameters: + path: + tokenID: "" + responses: + "200": + application/json: {} + 4XX: + application/json: {"message": "", "status_code": 25297} + getPublishingTokenTargetByID: + speakeasy-default-get-publishing-token-target-by-ID: + parameters: + path: + tokenID: "" + responses: + "200": + text/plain: "" + 4XX: + application/json: {"message": "", "status_code": 398362} + updatePublishingTokenExpiration: + speakeasy-default-update-publishing-token-expiration: + parameters: + path: + tokenID: "" + responses: + 4XX: + application/json: {"message": "", "status_code": 857478} + getChangesReportSignedUrl: + speakeasy-default-get-changes-report-signed-url: + parameters: + path: + documentChecksum: "" + responses: + 2XX: + application/json: {"url": "https://rosy-masterpiece.biz/"} + getLintingReportSignedUrl: + speakeasy-default-get-linting-report-signed-url: + parameters: + path: + documentChecksum: "" + responses: + 2XX: + application/json: {"url": "https://negligible-merit.info"} + uploadReport: + speakeasy-default-upload-report: + requestBody: + multipart/form-data: {"data": {}, "file": {"": "example.file"}} + responses: + 2XX: + application/json: {"url": "https://everlasting-hexagon.info"} + createSchemaStoreItem: + speakeasy-default-create-schema-store-item: + requestBody: + application/json: {"format": "yaml", "packageName": "", "sdkClassname": "", "spec": ""} + responses: + 2XX: + application/json: {"created_at": "2024-08-06T03:45:46.936Z", "format": "json", "id": "", "packageName": "", "sdkClassname": "", "spec": ""} + 4XX: + application/json: {"message": "", "status_code": 769739} + getSchemaStoreItem: + speakeasy-default-get-schema-store-item: + responses: + 2XX: + application/json: {"created_at": "2023-02-14T01:44:55.437Z", "format": "yaml", "id": "", "packageName": "", "sdkClassname": "", "spec": ""} + 4XX: + application/json: {"message": "", "status_code": 168509} + create: + speakeasy-default-create: + requestBody: + application/json: {"url": "https://probable-heating.com/"} + responses: + 2XX: + application/json: {"full_url": "https://standard-utilization.com/", "short_url": "https://brisk-seafood.net/"} activateSubscriptionNamespace: speakeasy-default-activate-subscription-namespace: parameters: @@ -1376,6 +982,16 @@ examples: responses: 4XX: application/json: {"message": "", "status_code": 844164} + suggest: + speakeasy-default-suggest: + parameters: + header: + x-session-id: "" + requestBody: + application/json: {"diagnostics": [{"message": "", "path": ["/opt/include", "/opt/share"], "type": ""}, {"message": "", "path": [], "type": ""}], "oas_summary": {"info": {"description": "amid traffic the unfortunately underneath what father lovely out", "license": {}, "summary": "", "title": "", "version": ""}, "operations": [{"description": "times dull than except", "method": "", "operation_id": "", "path": "/mnt", "tags": ["", ""]}]}, "suggestion_type": "diagnostics-only"} + responses: + 2XX: + application/json: "0x5e221847Cc" suggestItems: speakeasy-default-suggest-items: requestBody: @@ -1383,6 +999,27 @@ examples: responses: 2XX: application/json: ["", ""] + suggestOpenAPI: + speakeasy-default-suggest-open-API: + parameters: + header: + x-session-id: "" + requestBody: + multipart/form-data: {"schema": {"": "example.file"}} + responses: + 2XX: + application/json: "0x5F8Df5AB67" + suggestOpenAPIRegistry: + speakeasy-default-suggest-open-API-registry: + parameters: + path: + namespace_name: "" + revision_reference: "" + header: + x-session-id: "" + responses: + 2XX: + application/json: "0x9DDBdD905F" createWorkspace: speakeasy-default-create-workspace: requestBody: @@ -1406,8 +1043,8 @@ examples: speakeasy-default-delete-workspace-token: parameters: path: - tokenID: "" workspace_id: "" + tokenID: "" responses: 4XX: application/json: {"message": "", "status_code": 120260} @@ -1422,9 +1059,29 @@ examples: speakeasy-default-get-workspaces: responses: 2XX: - application/json: [{"created_at": "2023-03-06T21:36:22.528Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2024-10-17T22:25:06.537Z", "verified": false}] + application/json: [{"created_at": "2023-03-06T21:36:22.528Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2024-10-17T22:25:06.537Z", "verified": false}, {"created_at": "2023-01-18T20:59:19.735Z", "id": "", "name": "", "organization_id": "", "slug": "", "updated_at": "2024-05-22T13:01:16.115Z", "verified": false}] + 4XX: + application/json: {"message": "", "status_code": 61756} + getWorkspace: + speakeasy-default-get-workspace: + parameters: + path: + workspace_id: "" + responses: + 2XX: + 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": 16308} + application/json: {"message": "", "status_code": 868924} + getWorkspaceFeatureFlags: + speakeasy-default-get-workspace-feature-flags: + parameters: + path: + workspace_id: "" + responses: + "200": + application/json: {} + 5XX: + application/json: {"message": "", "status_code": 104495} getWorkspaceSettings: speakeasy-default-get-workspace-settings: parameters: @@ -1459,8 +1116,8 @@ examples: speakeasy-default-grant-user-access-to-workspace: parameters: path: - email: "Lucinda.Batz8@hotmail.com" workspace_id: "" + email: "Lucinda.Batz8@hotmail.com" responses: "200": application/json: {"relationship": {"user_id": "", "workspace_id": ""}} @@ -1470,11 +1127,20 @@ examples: speakeasy-default-revoke-user-access-to-workspace: parameters: path: - userId: "" workspace_id: "" + userId: "" responses: 4XX: application/json: {"message": "", "status_code": 243814} + setWorkspaceFeatureFlags: + speakeasy-default-set-workspace-feature-flags: + requestBody: + application/json: {"feature_flags": ["skip_schema_registry", "webhooks"]} + responses: + "200": + application/json: {} + 5XX: + application/json: {"message": "", "status_code": 264889} updateWorkspaceDetails: speakeasy-default-update-workspace-details: parameters: @@ -1495,6 +1161,25 @@ examples: responses: 4XX: application/json: {"message": "", "status_code": 54657} + getWorkspaceEventsByTarget: + speakeasy-default-get-workspace-events-by-target: + parameters: + path: + workspace_id: "" + target_id: "" + query: {} + responses: + "200": + application/json: [{"created_at": "2023-11-22T11:46:52.430Z", "execution_id": "", "id": "", "interaction_type": "QUICKSTART", "local_started_at": "2023-09-25T12:14:43.566Z", "speakeasy_api_key_name": "", "speakeasy_version": "", "success": true, "workspace_id": ""}] + 5XX: + application/json: {"message": "", "status_code": 858330} + getWorkspaceTargets: + speakeasy-default-get-workspace-targets: + responses: + "200": + application/json: [{"generate_gen_lock_id": "", "generate_target": "", "id": "", "last_event_created_at": "2025-12-14T05:15:52.449Z", "last_event_id": "", "last_event_interaction_type": "TARGET_GENERATE"}, {"generate_gen_lock_id": "", "generate_target": "", "id": "", "last_event_created_at": "2023-05-31T08:33:28.499Z", "last_event_id": "", "last_event_interaction_type": "CLI_EXEC"}] + 5XX: + application/json: {"message": "", "status_code": 801192} getWorkspaceTargetsDeprecated: speakeasy-default-get-workspace-targets-deprecated: parameters: @@ -1503,26 +1188,29 @@ examples: query: {} responses: "200": - application/json: [] + application/json: [{"generate_gen_lock_id": "", "generate_target": "", "id": "", "last_event_created_at": "2023-10-08T11:47:38.510Z", "last_event_id": "", "last_event_interaction_type": "TOMBSTONE"}] 5XX: - application/json: {"message": "", "status_code": 255923} - getCodeSamples: - speakeasy-default-get-code-samples: + application/json: {"message": "", "status_code": 264673} + postWorkspaceEvents: + speakeasy-default-post-workspace-events: parameters: - query: - registry_url: "https://normal-making.name" - responses: - 2XX: - application/json: {"snippets": [{"code": "", "language": "", "operationId": ""}, {"code": "", "language": "", "operationId": ""}, {"code": "", "language": "", "operationId": ""}]} - 4XX: - application/json: {"message": "", "status_code": 458049} - setWorkspaceFeatureFlags: - speakeasy-default-set-workspace-feature-flags: + path: + workspace_id: "" requestBody: - application/json: {"feature_flags": ["skip_schema_registry", "webhooks"]} + application/json: [{"created_at": "2025-03-02T10:07:28.113Z", "execution_id": "", "id": "", "interaction_type": "AUTHENTICATE", "local_started_at": "2025-08-12T17:54:17.538Z", "speakeasy_api_key_name": "", "speakeasy_version": "", "success": true, "workspace_id": ""}] + responses: + 5XX: + application/json: {"message": "", "status_code": 630719} + searchWorkspaceEvents: + speakeasy-default-search-workspace-events: + parameters: + path: + workspace_id: "" + query: {} responses: "200": - application/json: {} + application/json: [{"created_at": "2024-01-24T23:49:11.608Z", "execution_id": "", "id": "", "interaction_type": "LINT", "local_started_at": "2023-03-09T07:00:10.489Z", "speakeasy_api_key_name": "", "speakeasy_version": "", "success": true, "workspace_id": ""}] 5XX: - application/json: {"message": "", "status_code": 264889} + application/json: {"message": "", "status_code": 238575} +examplesVersion: 1.0.1 generatedTests: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index d3a7000c..b416588b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.468.2 +speakeasyVersion: 1.540.1 sources: speakeasy: sourceNamespace: speakeasy - sourceRevisionDigest: sha256:8af7ebde12785185cdbd700c1b3b6b8848b43d34f1fe8c06fff5ae4af471faf2 - sourceBlobDigest: sha256:952a58da1511e3191ea8e470c7f01a4e3785d11d9152f490a3e5a7173c8542e7 + sourceRevisionDigest: sha256:50f0ad65ffd44bf53e4c9d9e21e683077ee1a964132a69fa09572a17885a4acb + sourceBlobDigest: sha256:f2d1e073b00081bfb7918b31d08cb00e7cd6c8563bf488872251583b98c8be5c tags: - latest - - speakeasy-sdk-regen-1735949986 + - speakeasy-sdk-regen-1736900413 - 0.4.0 targets: speakeasy-client-sdk-csharp: source: speakeasy sourceNamespace: speakeasy - sourceRevisionDigest: sha256:8af7ebde12785185cdbd700c1b3b6b8848b43d34f1fe8c06fff5ae4af471faf2 - sourceBlobDigest: sha256:952a58da1511e3191ea8e470c7f01a4e3785d11d9152f490a3e5a7173c8542e7 + sourceRevisionDigest: sha256:50f0ad65ffd44bf53e4c9d9e21e683077ee1a964132a69fa09572a17885a4acb + sourceBlobDigest: sha256:f2d1e073b00081bfb7918b31d08cb00e7cd6c8563bf488872251583b98c8be5c codeSamplesNamespace: code-samples-csharp-speakeasy-client-sdk-csharp - codeSamplesRevisionDigest: sha256:aacf508e82244f7628670bda7c73bdda3a36059c4143c3566f2b4d4935251ec8 + codeSamplesRevisionDigest: sha256:427a6beb6df9395ed8b4675f61cc8736fc9dd1b244d10b0a4866e4dec0caa546 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..d585717f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to This Repository + +Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements. + +## How to Report Issues + +If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes: + +- A clear and descriptive title +- Steps to reproduce the issue +- Expected and actual behavior +- Any relevant logs, screenshots, or error messages +- Information about your environment (e.g., operating system, software versions) + - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed + +## Issue Triage and Upstream Fixes + +We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code. + +## Contact + +If you have any questions or need further assistance, please feel free to reach out by opening an issue. + +Thank you for your understanding and cooperation! + +The Maintainers diff --git a/NUGET.md b/NUGET.md index 711d23aa..53fad6ff 100644 --- a/NUGET.md +++ b/NUGET.md @@ -243,9 +243,9 @@ catch (Exception ex) You can override the default server globally by passing a server name to the `server: string` 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 | -| ------ | ----------------------------------- | -| `prod` | `https://api.prod.speakeasyapi.dev` | +| Name | Server | Description | +| ------ | ----------------------------------- | ----------- | +| `prod` | `https://api.prod.speakeasyapi.dev` | | #### Example diff --git a/README.md b/README.md index 1b233214..e4e8cdf7 100755 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ var res = await sdk.Artifacts.CreateRemoteSourceAsync(req); * [ListRemoteSources](docs/sdks/artifacts/README.md#listremotesources) - Get remote sources attached to a particular namespace * [PostTags](docs/sdks/artifacts/README.md#posttags) - Add tags to an existing revision * [Preflight](docs/sdks/artifacts/README.md#preflight) - Get access token for communicating with OCI distribution endpoints +* [SetArchived](docs/sdks/artifacts/README.md#setarchived) - Set whether a namespace is archived * [SetVisibility](docs/sdks/artifacts/README.md#setvisibility) - Set visibility of a namespace with an existing metadata entry ### [Auth](docs/sdks/auth/README.md) @@ -102,7 +103,6 @@ var res = await sdk.Artifacts.CreateRemoteSourceAsync(req); * [GenerateCodeSamplePreview](docs/sdks/codesamples/README.md#generatecodesamplepreview) - Generate Code Sample previews from a file and configuration parameters. * [GenerateCodeSamplePreviewAsync](docs/sdks/codesamples/README.md#generatecodesamplepreviewasync) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling. -* [Get](docs/sdks/codesamples/README.md#get) - Retrieve usage snippets from document stored in the registry * [GetCodeSamplePreviewAsync](docs/sdks/codesamples/README.md#getcodesamplepreviewasync) - Poll for the result of an asynchronous Code Sample preview generation. ### [Events](docs/sdks/events/README.md) @@ -130,17 +130,35 @@ var res = await sdk.Artifacts.CreateRemoteSourceAsync(req); ### [Organizations](docs/sdks/organizations/README.md) * [Create](docs/sdks/organizations/README.md#create) - Create an organization +* [CreateBillingAddOns](docs/sdks/organizations/README.md#createbillingaddons) - Create billing add ons * [CreateFreeTrial](docs/sdks/organizations/README.md#createfreetrial) - Create a free trial for an organization +* [DeleteBillingAddOn](docs/sdks/organizations/README.md#deletebillingaddon) - Delete billing add ons * [Get](docs/sdks/organizations/README.md#get) - Get organization * [GetAll](docs/sdks/organizations/README.md#getall) - Get organizations for a user +* [GetBillingAddOns](docs/sdks/organizations/README.md#getbillingaddons) - Get billing add ons * [GetUsage](docs/sdks/organizations/README.md#getusage) - Get billing usage summary for a particular organization +### [PublishingTokens](docs/sdks/publishingtokens/README.md) + +* [Create](docs/sdks/publishingtokens/README.md#create) - Create a publishing token for a workspace +* [Delete](docs/sdks/publishingtokens/README.md#delete) - Delete a specific publishing token +* [Get](docs/sdks/publishingtokens/README.md#get) - Get a specific publishing token +* [List](docs/sdks/publishingtokens/README.md#list) - Get publishing tokens for a workspace +* [ResolveMetadata](docs/sdks/publishingtokens/README.md#resolvemetadata) - Get metadata about the token +* [ResolveTarget](docs/sdks/publishingtokens/README.md#resolvetarget) - Get a specific publishing token target +* [Update](docs/sdks/publishingtokens/README.md#update) - Updates the validitity period of a publishing token + ### [Reports](docs/sdks/reports/README.md) * [GetChangesReportSignedUrl](docs/sdks/reports/README.md#getchangesreportsignedurl) - Get the signed access url for the change reports for a particular document. * [GetLintingReportSignedUrl](docs/sdks/reports/README.md#getlintingreportsignedurl) - Get the signed access url for the linting reports for a particular document. * [UploadReport](docs/sdks/reports/README.md#uploadreport) - Upload a report. +### [SchemaStore](docs/sdks/schemastore/README.md) + +* [CreateSchemaStoreItem](docs/sdks/schemastore/README.md#createschemastoreitem) - Create a schema in the schema store +* [GetSchemaStoreItem](docs/sdks/schemastore/README.md#getschemastoreitem) - Get a OAS schema from the schema store + ### [ShortURLs](docs/sdks/shorturls/README.md) @@ -188,9 +206,9 @@ var res = await sdk.Artifacts.CreateRemoteSourceAsync(req); You can override the default server globally by passing a server name to the `server: string` 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 | -| ------ | ----------------------------------- | -| `prod` | `https://api.prod.speakeasyapi.dev` | +| Name | Server | Description | +| ------ | ----------------------------------- | ----------- | +| `prod` | `https://api.prod.speakeasyapi.dev` | | #### Example diff --git a/RELEASES.md b/RELEASES.md index 4df5c678..5cd8e232 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -949,4 +949,14 @@ Based on: ### Generated - [csharp v5.12.0] . ### Releases -- [NuGet v5.12.0] https://www.nuget.org/packages/SpeakeasySDK/5.12.0 - . \ No newline at end of file +- [NuGet v5.12.0] https://www.nuget.org/packages/SpeakeasySDK/5.12.0 - . + +## 2025-04-29 00:22:39 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.540.1 (2.593.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v5.13.0] . +### Releases +- [NuGet v5.13.0] https://www.nuget.org/packages/SpeakeasySDK/5.13.0 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 6ded62a4..5ae0da34 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -18,6 +18,27 @@ actions: var res = await sdk.Artifacts.GetNamespacesAsync(); + // handle response + - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/archive"]["post"] + update: + x-codeSamples: + - lang: csharp + label: archiveNamespace + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + ArchiveNamespaceRequest req = new ArchiveNamespaceRequest() { + NamespaceName = "", + }; + + var res = await sdk.Artifacts.SetArchivedAsync(req); + // handle response - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/revisions"]["get"] update: @@ -205,27 +226,6 @@ actions: var res = await sdk.Auth.ValidateApiKeyAsync(); - // handle response - - target: $["paths"]["/v1/code_sample"]["get"] - update: - x-codeSamples: - - lang: csharp - label: getCodeSamples - source: |- - using SpeakeasySDK; - using SpeakeasySDK.Models.Operations; - using SpeakeasySDK.Models.Shared; - - var sdk = new SDK(security: new Security() { - APIKey = "", - }); - - GetCodeSamplesRequest req = new GetCodeSamplesRequest() { - RegistryUrl = "https://normal-making.name", - }; - - var res = await sdk.CodeSamples.GetAsync(req); - // handle response - target: $["paths"]["/v1/code_sample/preview"]["post"] update: @@ -236,16 +236,13 @@ actions: using SpeakeasySDK; using SpeakeasySDK.Models.Shared; using System; - using System.Collections.Generic; var sdk = new SDK(security: new Security() { APIKey = "", }); CodeSampleSchemaInput req = new CodeSampleSchemaInput() { - Languages = new List() { - "", - }, + Language = "", SchemaFile = new SchemaFile() { FileName = "example.file", Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"), @@ -264,16 +261,13 @@ actions: using SpeakeasySDK; using SpeakeasySDK.Models.Shared; using System; - using System.Collections.Generic; var sdk = new SDK(security: new Security() { APIKey = "", }); CodeSampleSchemaInput req = new CodeSampleSchemaInput() { - Languages = new List() { - "", - }, + Language = "", SchemaFile = new SchemaFile() { FileName = "example.file", Content = System.Text.Encoding.UTF8.GetBytes("0xED5CDd177E"), @@ -620,6 +614,66 @@ actions: var res = await sdk.Organizations.CreateAsync(req); + // handle response + - target: $["paths"]["/v1/organization/add_ons"]["get"] + update: + x-codeSamples: + - lang: csharp + label: getBillingAddOns + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + var res = await sdk.Organizations.GetBillingAddOnsAsync(); + + // handle response + - target: $["paths"]["/v1/organization/add_ons"]["post"] + update: + x-codeSamples: + - lang: csharp + label: createBillingAddOns + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Shared; + using System.Collections.Generic; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + OrganizationBillingAddOnRequest req = new OrganizationBillingAddOnRequest() { + AddOns = new List() { + BillingAddOn.SnippetAi, + }, + }; + + var res = await sdk.Organizations.CreateBillingAddOnsAsync(req); + + // handle response + - target: $["paths"]["/v1/organization/add_ons/{add_on}"]["delete"] + update: + x-codeSamples: + - lang: csharp + label: deleteBillingAddOn + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + DeleteBillingAddOnRequest req = new DeleteBillingAddOnRequest() { + AddOn = BillingAddOn.SnippetAi, + }; + + var res = await sdk.Organizations.DeleteBillingAddOnAsync(req); + // handle response - target: $["paths"]["/v1/organization/free_trial"]["post"] update: @@ -689,6 +743,152 @@ actions: var res = await sdk.Organizations.GetAllAsync(); + // handle response + - target: $["paths"]["/v1/publishing-tokens"]["get"] + update: + x-codeSamples: + - lang: csharp + label: getPublishingToken + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + var res = await sdk.PublishingTokens.ListAsync(); + + // handle response + - target: $["paths"]["/v1/publishing-tokens"]["post"] + update: + x-codeSamples: + - lang: csharp + label: createPublishingToken + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + using System; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + CreatePublishingTokenRequestBody req = new CreatePublishingTokenRequestBody() { + TargetId = "", + TargetResource = "", + ValidUntil = System.DateTime.Parse("2024-06-17T07:14:55.338Z"), + TokenName = "", + }; + + var res = await sdk.PublishingTokens.CreateAsync(req); + + // handle response + - target: $["paths"]["/v1/publishing-tokens/{tokenID}"]["delete"] + update: + x-codeSamples: + - lang: csharp + label: deletePublishingToken + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + DeletePublishingTokenRequest req = new DeletePublishingTokenRequest() { + TokenID = "", + }; + + var res = await sdk.PublishingTokens.DeleteAsync(req); + + // handle response + - target: $["paths"]["/v1/publishing-tokens/{tokenID}"]["get"] + update: + x-codeSamples: + - lang: csharp + label: getPublishingTokenByID + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + GetPublishingTokenByIDRequest req = new GetPublishingTokenByIDRequest() { + TokenID = "", + }; + + var res = await sdk.PublishingTokens.GetAsync(req); + + // handle response + - target: $["paths"]["/v1/publishing-tokens/{tokenID}"]["put"] + update: + x-codeSamples: + - lang: csharp + label: updatePublishingTokenExpiration + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + UpdatePublishingTokenExpirationRequest req = new UpdatePublishingTokenExpirationRequest() { + TokenID = "", + }; + + var res = await sdk.PublishingTokens.UpdateAsync(req); + + // handle response + - target: $["paths"]["/v1/publishing-tokens/{tokenID}/metadata"]["get"] + update: + x-codeSamples: + - lang: csharp + label: getPublishingTokenPublicMetadata + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + GetPublishingTokenPublicMetadataRequest req = new GetPublishingTokenPublicMetadataRequest() { + TokenID = "", + }; + + var res = await sdk.PublishingTokens.ResolveMetadataAsync(req); + + // handle response + - target: $["paths"]["/v1/publishing-tokens/{tokenID}/target"]["get"] + update: + x-codeSamples: + - lang: csharp + label: getPublishingTokenTargetByID + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + GetPublishingTokenTargetByIDRequest req = new GetPublishingTokenTargetByIDRequest() { + TokenID = "", + }; + + var res = await sdk.PublishingTokens.ResolveTargetAsync(req); + // handle response - target: $["paths"]["/v1/reports"]["post"] update: @@ -757,6 +957,49 @@ actions: var res = await sdk.Reports.GetLintingReportSignedUrlAsync(req); + // handle response + - target: $["paths"]["/v1/schema_store"]["get"] + update: + x-codeSamples: + - lang: csharp + label: getSchemaStoreItem + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + GetSchemaStoreItemRequestBody req = new GetSchemaStoreItemRequestBody() {}; + + var res = await sdk.SchemaStore.GetSchemaStoreItemAsync(req); + + // handle response + - target: $["paths"]["/v1/schema_store"]["post"] + update: + x-codeSamples: + - lang: csharp + label: createSchemaStoreItem + source: |- + using SpeakeasySDK; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + + var sdk = new SDK(security: new Security() { + APIKey = "", + }); + + CreateSchemaStoreItemRequestBody req = new CreateSchemaStoreItemRequestBody() { + Spec = "", + PackageName = "", + SDKClassname = "", + Format = Format.Yaml, + }; + + var res = await sdk.SchemaStore.CreateSchemaStoreItemAsync(req); + // handle response - target: $["paths"]["/v1/short_urls"]["post"] update: @@ -1169,7 +1412,7 @@ actions: ExecutionId = "", WorkspaceId = "", SpeakeasyApiKeyName = "", - InteractionType = InteractionType.TargetGenerate, + InteractionType = InteractionType.Tombstone, LocalStartedAt = System.DateTime.Parse("2025-03-02T10:07:28.113Z"), CreatedAt = System.DateTime.Parse("2024-09-08T05:59:33.876Z"), SpeakeasyVersion = "", diff --git a/docs/Models/Operations/ArchiveNamespaceRequest.md b/docs/Models/Operations/ArchiveNamespaceRequest.md new file mode 100644 index 00000000..e631a8a9 --- /dev/null +++ b/docs/Models/Operations/ArchiveNamespaceRequest.md @@ -0,0 +1,9 @@ +# ArchiveNamespaceRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `RequestBody` | [ArchiveNamespaceRequestBody](../../Models/Operations/ArchiveNamespaceRequestBody.md) | :heavy_minus_sign: | Archived status | +| `NamespaceName` | *string* | :heavy_check_mark: | N/A | \ 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..79e11679 --- /dev/null +++ b/docs/Models/Operations/ArchiveNamespaceRequestBody.md @@ -0,0 +1,10 @@ +# ArchiveNamespaceRequestBody + +Archived status + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Archived` | *bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/ArchiveNamespaceResponse.md b/docs/Models/Operations/ArchiveNamespaceResponse.md new file mode 100644 index 00000000..0588677a --- /dev/null +++ b/docs/Models/Operations/ArchiveNamespaceResponse.md @@ -0,0 +1,10 @@ +# ArchiveNamespaceResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :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..904b25d2 --- /dev/null +++ b/docs/Models/Operations/CreateBillingAddOnsResponse.md @@ -0,0 +1,11 @@ +# CreateBillingAddOnsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `OrganizationBillingAddOnResponse` | [OrganizationBillingAddOnResponse](../../Models/Shared/OrganizationBillingAddOnResponse.md) | :heavy_minus_sign: | Success | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePublishingTokenRequestBody.md b/docs/Models/Operations/CreatePublishingTokenRequestBody.md new file mode 100644 index 00000000..1b8cf980 --- /dev/null +++ b/docs/Models/Operations/CreatePublishingTokenRequestBody.md @@ -0,0 +1,13 @@ +# CreatePublishingTokenRequestBody + +The publishing token to create + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `TargetId` | *string* | :heavy_check_mark: | N/A | +| `TargetResource` | *string* | :heavy_check_mark: | N/A | +| `TokenName` | *string* | :heavy_check_mark: | N/A | +| `ValidUntil` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :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..ef8d18e1 --- /dev/null +++ b/docs/Models/Operations/CreatePublishingTokenResponse.md @@ -0,0 +1,11 @@ +# CreatePublishingTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `PublishingToken` | [PublishingToken](../../Models/Shared/PublishingToken.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Operations/CreateSchemaStoreItemRequestBody.md b/docs/Models/Operations/CreateSchemaStoreItemRequestBody.md new file mode 100644 index 00000000..fb894351 --- /dev/null +++ b/docs/Models/Operations/CreateSchemaStoreItemRequestBody.md @@ -0,0 +1,11 @@ +# CreateSchemaStoreItemRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `Format` | [Models.Operations.Format](../../Models/Operations/Format.md) | :heavy_check_mark: | The format of the OpenAPI specification. | +| `PackageName` | *string* | :heavy_check_mark: | The package name to use in code snippets / quickstart. | +| `SDKClassname` | *string* | :heavy_check_mark: | The classname of the SDK to use in code snippets / quickstart. | +| `Spec` | *string* | :heavy_check_mark: | The OpenAPI specification to store. | \ No newline at end of file diff --git a/docs/Models/Operations/CreateSchemaStoreItemResponse.md b/docs/Models/Operations/CreateSchemaStoreItemResponse.md new file mode 100644 index 00000000..169f2fa7 --- /dev/null +++ b/docs/Models/Operations/CreateSchemaStoreItemResponse.md @@ -0,0 +1,11 @@ +# CreateSchemaStoreItemResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `SchemaStoreItem` | [SchemaStoreItem](../../Models/Shared/SchemaStoreItem.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ 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..c57b957d --- /dev/null +++ b/docs/Models/Operations/DeleteBillingAddOnRequest.md @@ -0,0 +1,8 @@ +# DeleteBillingAddOnRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `AddOn` | [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..82cbd9df --- /dev/null +++ b/docs/Models/Operations/DeleteBillingAddOnResponse.md @@ -0,0 +1,10 @@ +# DeleteBillingAddOnResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :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..2269b729 --- /dev/null +++ b/docs/Models/Operations/DeletePublishingTokenRequest.md @@ -0,0 +1,8 @@ +# DeletePublishingTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `TokenID` | *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..54cb5247 --- /dev/null +++ b/docs/Models/Operations/DeletePublishingTokenResponse.md @@ -0,0 +1,10 @@ +# DeletePublishingTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ 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..ddbf6464 --- /dev/null +++ b/docs/Models/Operations/Format.md @@ -0,0 +1,11 @@ +# Format + +The format of the OpenAPI specification. + + +## Values + +| Name | Value | +| ------ | ------ | +| `Json` | json | +| `Yaml` | yaml | \ No newline at end of file diff --git a/docs/Models/Operations/GenerateCodeSamplePreviewResponse.md b/docs/Models/Operations/GenerateCodeSamplePreviewResponse.md index d4cbe9b5..a22ef0d4 100644 --- a/docs/Models/Operations/GenerateCodeSamplePreviewResponse.md +++ b/docs/Models/Operations/GenerateCodeSamplePreviewResponse.md @@ -5,8 +5,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `TwoHundredApplicationJsonBytes` | *byte[]* | :heavy_minus_sign: | Successfully returned codeSample overlay file | -| `TwoHundredApplicationXYamlBytes` | *byte[]* | :heavy_minus_sign: | Successfully returned codeSample overlay file | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `UsageSnippets` | [UsageSnippets](../../Models/Shared/UsageSnippets.md) | :heavy_minus_sign: | OK | \ 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..8484eb31 --- /dev/null +++ b/docs/Models/Operations/GetBillingAddOnsResponse.md @@ -0,0 +1,11 @@ +# GetBillingAddOnsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `OrganizationBillingAddOnResponse` | [OrganizationBillingAddOnResponse](../../Models/Shared/OrganizationBillingAddOnResponse.md) | :heavy_minus_sign: | Success | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Operations/GetCodeSamplePreviewAsyncResponse.md b/docs/Models/Operations/GetCodeSamplePreviewAsyncResponse.md index b967f295..e72dab96 100644 --- a/docs/Models/Operations/GetCodeSamplePreviewAsyncResponse.md +++ b/docs/Models/Operations/GetCodeSamplePreviewAsyncResponse.md @@ -5,9 +5,8 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `TwoHundredApplicationJsonBytes` | *byte[]* | :heavy_minus_sign: | Successfully returned codeSample overlay file | -| `TwoHundredApplicationXYamlBytes` | *byte[]* | :heavy_minus_sign: | Successfully returned codeSample overlay file | -| `TwoHundredAndTwoApplicationJsonObject` | [GetCodeSamplePreviewAsyncResponseBody](../../Models/Operations/GetCodeSamplePreviewAsyncResponseBody.md) | :heavy_minus_sign: | Job is still in progress | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `UsageSnippets` | [UsageSnippets](../../Models/Shared/UsageSnippets.md) | :heavy_minus_sign: | OK | +| `Object` | [GetCodeSamplePreviewAsyncResponseBody](../../Models/Operations/GetCodeSamplePreviewAsyncResponseBody.md) | :heavy_minus_sign: | Job is still in progress | \ No newline at end of file diff --git a/docs/Models/Operations/GetCodeSamplesRequest.md b/docs/Models/Operations/GetCodeSamplesRequest.md deleted file mode 100644 index 679b5b87..00000000 --- a/docs/Models/Operations/GetCodeSamplesRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetCodeSamplesRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `RegistryUrl` | *string* | :heavy_check_mark: | The registry URL from which to retrieve the snippets. E.g. https://spec.speakeasy.com/org/ws/my-source | -| `Languages` | List<*string*> | :heavy_minus_sign: | N/A | -| `OperationIds` | List<*string*> | :heavy_minus_sign: | N/A | \ 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..04349e8f --- /dev/null +++ b/docs/Models/Operations/GetPublishingTokenByIDRequest.md @@ -0,0 +1,8 @@ +# GetPublishingTokenByIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `TokenID` | *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..8be1113f --- /dev/null +++ b/docs/Models/Operations/GetPublishingTokenByIDResponse.md @@ -0,0 +1,11 @@ +# GetPublishingTokenByIDResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `PublishingToken` | [PublishingToken](../../Models/Shared/PublishingToken.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Operations/GetPublishingTokenPublicMetadataRequest.md b/docs/Models/Operations/GetPublishingTokenPublicMetadataRequest.md new file mode 100644 index 00000000..2a8ff252 --- /dev/null +++ b/docs/Models/Operations/GetPublishingTokenPublicMetadataRequest.md @@ -0,0 +1,8 @@ +# GetPublishingTokenPublicMetadataRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `TokenID` | *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..499ab4f0 --- /dev/null +++ b/docs/Models/Operations/GetPublishingTokenPublicMetadataResponse.md @@ -0,0 +1,11 @@ +# GetPublishingTokenPublicMetadataResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `Object` | [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..b7326464 --- /dev/null +++ b/docs/Models/Operations/GetPublishingTokenPublicMetadataResponseBody.md @@ -0,0 +1,14 @@ +# GetPublishingTokenPublicMetadataResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `OrganizationId` | *string* | :heavy_minus_sign: | N/A | +| `TargetId` | *string* | :heavy_minus_sign: | N/A | +| `TargetResource` | *string* | :heavy_minus_sign: | N/A | +| `ValidUntil` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | +| `WorkspaceId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/GetCodeSamplesResponse.md b/docs/Models/Operations/GetPublishingTokenResponse.md similarity index 92% rename from docs/Models/Operations/GetCodeSamplesResponse.md rename to docs/Models/Operations/GetPublishingTokenResponse.md index ab675241..d67a1bf3 100644 --- a/docs/Models/Operations/GetCodeSamplesResponse.md +++ b/docs/Models/Operations/GetPublishingTokenResponse.md @@ -1,4 +1,4 @@ -# GetCodeSamplesResponse +# GetPublishingTokenResponse ## Fields @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `UsageSnippets` | [UsageSnippets](../../Models/Shared/UsageSnippets.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `Classes` | List<[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..ca0835ab --- /dev/null +++ b/docs/Models/Operations/GetPublishingTokenTargetByIDRequest.md @@ -0,0 +1,8 @@ +# GetPublishingTokenTargetByIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `TokenID` | *string* | :heavy_check_mark: | Unique identifier of the publishing token. | \ No newline at end of file diff --git a/docs/Models/Operations/GetPublishingTokenTargetByIDResponse.md b/docs/Models/Operations/GetPublishingTokenTargetByIDResponse.md new file mode 100644 index 00000000..ad34969c --- /dev/null +++ b/docs/Models/Operations/GetPublishingTokenTargetByIDResponse.md @@ -0,0 +1,11 @@ +# GetPublishingTokenTargetByIDResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `Res` | *string* | :heavy_minus_sign: | OK | \ 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..657adc49 --- /dev/null +++ b/docs/Models/Operations/GetSchemaStoreItemRequestBody.md @@ -0,0 +1,8 @@ +# GetSchemaStoreItemRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/GetSchemaStoreItemResponse.md b/docs/Models/Operations/GetSchemaStoreItemResponse.md new file mode 100644 index 00000000..87b51c25 --- /dev/null +++ b/docs/Models/Operations/GetSchemaStoreItemResponse.md @@ -0,0 +1,11 @@ +# GetSchemaStoreItemResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `SchemaStoreItem` | [SchemaStoreItem](../../Models/Shared/SchemaStoreItem.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Operations/GetWorkspaceEventsByTargetRequest.md b/docs/Models/Operations/GetWorkspaceEventsByTargetRequest.md index 1d5583fc..eb0cbd6b 100644 --- a/docs/Models/Operations/GetWorkspaceEventsByTargetRequest.md +++ b/docs/Models/Operations/GetWorkspaceEventsByTargetRequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `TargetId` | *string* | :heavy_check_mark: | Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) | | `AfterCreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | Filter to only return events created after this timestamp | +| `TargetId` | *string* | :heavy_check_mark: | Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) | | `WorkspaceId` | *string* | :heavy_minus_sign: | Unique identifier of the workspace. | \ No newline at end of file diff --git a/docs/Models/Operations/PostTagsRequest.md b/docs/Models/Operations/PostTagsRequest.md index d5bf446b..b48dd5fc 100644 --- a/docs/Models/Operations/PostTagsRequest.md +++ b/docs/Models/Operations/PostTagsRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `NamespaceName` | *string* | :heavy_check_mark: | N/A | -| `AddTags` | [AddTags](../../Models/Shared/AddTags.md) | :heavy_minus_sign: | A JSON representation of the tags to add | \ No newline at end of file +| `AddTags` | [AddTags](../../Models/Shared/AddTags.md) | :heavy_minus_sign: | A JSON representation of the tags to add | +| `NamespaceName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/SetVisibilityRequest.md b/docs/Models/Operations/SetVisibilityRequest.md index dc728016..3ad763ce 100644 --- a/docs/Models/Operations/SetVisibilityRequest.md +++ b/docs/Models/Operations/SetVisibilityRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `NamespaceName` | *string* | :heavy_check_mark: | N/A | -| `RequestBody` | [SetVisibilityRequestBody](../../Models/Operations/SetVisibilityRequestBody.md) | :heavy_minus_sign: | Namespace visibility | \ No newline at end of file +| `RequestBody` | [SetVisibilityRequestBody](../../Models/Operations/SetVisibilityRequestBody.md) | :heavy_minus_sign: | Namespace visibility | +| `NamespaceName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/SuggestOpenAPIRegistryRequest.md b/docs/Models/Operations/SuggestOpenAPIRegistryRequest.md index 97212eeb..bb9a33e2 100644 --- a/docs/Models/Operations/SuggestOpenAPIRegistryRequest.md +++ b/docs/Models/Operations/SuggestOpenAPIRegistryRequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `SuggestRequestBody` | [SuggestRequestBody](../../Models/Shared/SuggestRequestBody.md) | :heavy_minus_sign: | Suggest options | | `NamespaceName` | *string* | :heavy_check_mark: | N/A | | `RevisionReference` | *string* | :heavy_check_mark: | Tag or digest | -| `XSessionId` | *string* | :heavy_check_mark: | N/A | -| `SuggestRequestBody` | [SuggestRequestBody](../../Models/Shared/SuggestRequestBody.md) | :heavy_minus_sign: | Suggest options | \ No newline at end of file +| `XSessionId` | *string* | :heavy_check_mark: | N/A | \ 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..dd630299 --- /dev/null +++ b/docs/Models/Operations/UpdatePublishingTokenExpirationRequest.md @@ -0,0 +1,9 @@ +# UpdatePublishingTokenExpirationRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `RequestBody` | [UpdatePublishingTokenExpirationRequestBody](../../Models/Operations/UpdatePublishingTokenExpirationRequestBody.md) | :heavy_minus_sign: | The publishing token to update | +| `TokenID` | *string* | :heavy_check_mark: | Unique identifier of the publishing token. | \ 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..69a52196 --- /dev/null +++ b/docs/Models/Operations/UpdatePublishingTokenExpirationRequestBody.md @@ -0,0 +1,11 @@ +# UpdatePublishingTokenExpirationRequestBody + +The publishing token to update + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `TokenName` | *string* | :heavy_minus_sign: | The new name for the publishing token. | +| `ValidUntil` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The new expiration date for the publishing token. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdatePublishingTokenExpirationResponse.md b/docs/Models/Operations/UpdatePublishingTokenExpirationResponse.md new file mode 100644 index 00000000..9bb34299 --- /dev/null +++ b/docs/Models/Operations/UpdatePublishingTokenExpirationResponse.md @@ -0,0 +1,10 @@ +# UpdatePublishingTokenExpirationResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Shared/ApiKeyDetails.md b/docs/Models/Shared/ApiKeyDetails.md index 8ea0e489..e5c0b01d 100644 --- a/docs/Models/Shared/ApiKeyDetails.md +++ b/docs/Models/Shared/ApiKeyDetails.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `AccountTypeV2` | [AccountType](../../Models/Shared/AccountType.md) | :heavy_check_mark: | N/A | +| `BillingAddOns` | List<[BillingAddOn](../../Models/Shared/BillingAddOn.md)> | :heavy_check_mark: | N/A | | `EnabledFeatures` | List<*string*> | :heavy_check_mark: | N/A | | ~~`FeatureFlags`~~ | List<*string*> | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | `GenerationAccessUnlimited` | *bool* | :heavy_minus_sign: | N/A | diff --git a/docs/Models/Shared/BillingAddOn.md b/docs/Models/Shared/BillingAddOn.md new file mode 100644 index 00000000..f02a5990 --- /dev/null +++ b/docs/Models/Shared/BillingAddOn.md @@ -0,0 +1,11 @@ +# BillingAddOn + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `Webhooks` | webhooks | +| `SDKTesting` | sdk_testing | +| `CustomCodeRegions` | custom_code_regions | +| `SnippetAi` | snippet_ai | \ No newline at end of file diff --git a/docs/Models/Shared/CliEvent.md b/docs/Models/Shared/CliEvent.md index 59461fb5..3698ca07 100644 --- a/docs/Models/Shared/CliEvent.md +++ b/docs/Models/Shared/CliEvent.md @@ -81,6 +81,7 @@ | `SpeakeasyApiKeyName` | *string* | :heavy_check_mark: | Identifier of the Speakeasy API key. | | `SpeakeasyVersion` | *string* | :heavy_check_mark: | Version of the Speakeasy CLI. | | `Success` | *bool* | :heavy_check_mark: | Indicates whether the event was successful. | +| `TestReportRaw` | *string* | :heavy_minus_sign: | The raw test report xml | | `WorkflowLockPostRaw` | *string* | :heavy_minus_sign: | Workflow lock file (post execution) | | `WorkflowLockPreRaw` | *string* | :heavy_minus_sign: | Workflow lock file (prior to execution) | | `WorkflowPostRaw` | *string* | :heavy_minus_sign: | Workflow file (post execution) | diff --git a/docs/Models/Shared/CodeSampleSchemaInput.md b/docs/Models/Shared/CodeSampleSchemaInput.md index 0253e80c..c29710b5 100644 --- a/docs/Models/Shared/CodeSampleSchemaInput.md +++ b/docs/Models/Shared/CodeSampleSchemaInput.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `Languages` | List<*string*> | :heavy_check_mark: | A list of languages to generate code samples for | -| `SchemaFile` | [SchemaFile](../../Models/Shared/SchemaFile.md) | :heavy_check_mark: | The OpenAPI file to be uploaded | -| `PackageName` | *string* | :heavy_minus_sign: | The name of the package | -| `SDKClassName` | *string* | :heavy_minus_sign: | The SDK class name | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `Language` | *string* | :heavy_check_mark: | The language to generate code samples for | +| `OperationIds` | List<*string*> | :heavy_minus_sign: | A list of operations IDs to generate code samples for | +| `PackageName` | *string* | :heavy_minus_sign: | The name of the package | +| `SchemaFile` | [SchemaFile](../../Models/Shared/SchemaFile.md) | :heavy_check_mark: | The OpenAPI file to be uploaded | +| `SDKClassName` | *string* | :heavy_minus_sign: | The SDK class name | \ 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..dc66a53a --- /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/GithubTriggerActionRequest.md b/docs/Models/Shared/GithubTriggerActionRequest.md index 72feb339..86844565 100644 --- a/docs/Models/Shared/GithubTriggerActionRequest.md +++ b/docs/Models/Shared/GithubTriggerActionRequest.md @@ -7,9 +7,9 @@ A request to trigger an action on a GitHub target | Field | Type | Required | Description | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `Force` | *bool* | :heavy_minus_sign: | Force an SDK generation | | `GenLockId` | *string* | :heavy_check_mark: | The generation lock ID | | `Org` | *string* | :heavy_check_mark: | The GitHub organization name | | `RepoName` | *string* | :heavy_check_mark: | The GitHub repository name | -| `Force` | *bool* | :heavy_minus_sign: | Force an SDK generation | | `SetVersion` | *string* | :heavy_minus_sign: | A version to override the SDK too in workflow dispatch | | `TargetName` | *string* | :heavy_minus_sign: | The target name for the action | \ No newline at end of file diff --git a/docs/Models/Shared/InteractionType.md b/docs/Models/Shared/InteractionType.md index 8acd51a2..1f503a9f 100644 --- a/docs/Models/Shared/InteractionType.md +++ b/docs/Models/Shared/InteractionType.md @@ -17,4 +17,5 @@ Type of interaction. | `Quickstart` | QUICKSTART | | `Run` | RUN | | `Configure` | CONFIGURE | -| `Publish` | PUBLISH | \ No newline at end of file +| `Publish` | PUBLISH | +| `Test` | TEST | \ No newline at end of file diff --git a/docs/Models/Shared/Namespace.md b/docs/Models/Shared/Namespace.md index 1741b841..b42d60ec 100644 --- a/docs/Models/Shared/Namespace.md +++ b/docs/Models/Shared/Namespace.md @@ -7,9 +7,11 @@ A namespace contains many revisions. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `ArchivedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | | `CompositeSpecMetadata` | [CompositeSpecMetadata](../../Models/Shared/CompositeSpecMetadata.md) | :heavy_minus_sign: | N/A | | `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | | `Id` | *string* | :heavy_check_mark: | {organization_slug}/{workspace_slug}/{namespace_name} | +| `LatestRevisionMetadata` | [RevisionContentsMetadata](../../Models/Shared/RevisionContentsMetadata.md) | :heavy_minus_sign: | N/A | | `Name` | *string* | :heavy_check_mark: | A human-readable name for the namespace. | | `Public` | *bool* | :heavy_minus_sign: | Indicates whether the namespace is publicly accessible | | `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :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 d981ebad..68a8f7b4 100644 --- a/docs/Models/Shared/Organization.md +++ b/docs/Models/Shared/Organization.md @@ -9,12 +9,12 @@ A speakeasy organization | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `AccountType` | [AccountType](../../Models/Shared/AccountType.md) | :heavy_check_mark: | N/A | | `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | +| `FreeTrialExpiry` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | | `Id` | *string* | :heavy_check_mark: | N/A | +| `Internal` | *bool* | :heavy_minus_sign: | N/A | | `Name` | *string* | :heavy_check_mark: | N/A | | `Slug` | *string* | :heavy_check_mark: | N/A | | `SsoActivated` | *bool* | :heavy_check_mark: | N/A | +| `SsoConnectionId` | *string* | :heavy_minus_sign: | N/A | | `TelemetryDisabled` | *bool* | :heavy_check_mark: | N/A | -| `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | -| `FreeTrialExpiry` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | -| `Internal` | *bool* | :heavy_minus_sign: | N/A | -| `SsoConnectionId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Shared/OrganizationBillingAddOnRequest.md b/docs/Models/Shared/OrganizationBillingAddOnRequest.md new file mode 100644 index 00000000..4cb7e621 --- /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 | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `AddOns` | List<[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..d51fcf17 --- /dev/null +++ b/docs/Models/Shared/OrganizationBillingAddOnResponse.md @@ -0,0 +1,10 @@ +# OrganizationBillingAddOnResponse + +Billing add on response + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `AddOns` | List<[BillingAddOn](../../Models/Shared/BillingAddOn.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Shared/PublishingToken.md b/docs/Models/Shared/PublishingToken.md new file mode 100644 index 00000000..fcc9a1e5 --- /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 | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | +| `CreatedBy` | *string* | :heavy_check_mark: | N/A | +| `Id` | *string* | :heavy_check_mark: | N/A | +| `OrganizationId` | *string* | :heavy_check_mark: | N/A | +| `TargetId` | *string* | :heavy_check_mark: | N/A | +| `TargetResource` | [TargetResource](../../Models/Shared/TargetResource.md) | :heavy_check_mark: | N/A | +| `Token` | *string* | :heavy_check_mark: | N/A | +| `TokenName` | *string* | :heavy_check_mark: | N/A | +| `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | +| `UpdatedBy` | *string* | :heavy_minus_sign: | N/A | +| `ValidUntil` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | +| `WorkspaceId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Shared/Revision.md b/docs/Models/Shared/Revision.md index adeb8407..030fd435 100644 --- a/docs/Models/Shared/Revision.md +++ b/docs/Models/Shared/Revision.md @@ -5,6 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `ContentsMetadata` | [RevisionContentsMetadata](../../Models/Shared/RevisionContentsMetadata.md) | :heavy_minus_sign: | N/A | | | `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | | | `Digest` | *string* | :heavy_check_mark: | N/A | sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f | | `Id` | *string* | :heavy_check_mark: | Format {namespace_id}/{revision_digest} | | diff --git a/docs/Models/Shared/RevisionContentsMetadata.md b/docs/Models/Shared/RevisionContentsMetadata.md new file mode 100644 index 00000000..2169b106 --- /dev/null +++ b/docs/Models/Shared/RevisionContentsMetadata.md @@ -0,0 +1,20 @@ +# RevisionContentsMetadata + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `ContainsCodeSamples` | *bool* | :heavy_check_mark: | Whether the OAS contains code samples. | +| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | +| `Description` | *string* | :heavy_check_mark: | The OAS description | +| `Hash` | *string* | :heavy_check_mark: | The hash of the contents | +| `Namespace` | *string* | :heavy_check_mark: | The fully qualified namespace | +| `NumOverlayActions` | *long* | :heavy_check_mark: | The number of overlay actions in the OAS. Will be 0 if the OAS is not an overlay. | +| `OperationIds` | List<*string*> | :heavy_check_mark: | The operation IDs contained in the OAS. Will be empty if the OAS is an overlay. | +| `RevisionDigest` | *string* | :heavy_check_mark: | The digest of the parent bundle | +| `Tags` | List<*string*> | :heavy_check_mark: | The tags contained in the OAS -- NOT the OCI tags. Will be empty if the OAS is an overlay. | +| `Title` | *string* | :heavy_check_mark: | The OAS title | +| `Type` | [RevisionContentsMetadataType](../../Models/Shared/RevisionContentsMetadataType.md) | :heavy_check_mark: | N/A | +| `Version` | *string* | :heavy_check_mark: | The OAS version | +| `WorkspaceId` | *string* | :heavy_check_mark: | The workspace ID | \ No newline at end of file diff --git a/docs/Models/Shared/RevisionContentsMetadataType.md b/docs/Models/Shared/RevisionContentsMetadataType.md new file mode 100644 index 00000000..1b3b6020 --- /dev/null +++ b/docs/Models/Shared/RevisionContentsMetadataType.md @@ -0,0 +1,9 @@ +# RevisionContentsMetadataType + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `OpenapiBundle` | OPENAPI_BUNDLE | +| `OpenapiOverlay` | OPENAPI_OVERLAY | \ No newline at end of file diff --git a/docs/Models/Shared/SchemaStoreItem.md b/docs/Models/Shared/SchemaStoreItem.md new file mode 100644 index 00000000..443f13e8 --- /dev/null +++ b/docs/Models/Shared/SchemaStoreItem.md @@ -0,0 +1,13 @@ +# SchemaStoreItem + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | +| `Format` | [Models.Shared.Format](../../Models/Shared/Format.md) | :heavy_check_mark: | N/A | +| `Id` | *string* | :heavy_check_mark: | N/A | +| `PackageName` | *string* | :heavy_check_mark: | N/A | +| `SDKClassname` | *string* | :heavy_check_mark: | N/A | +| `Spec` | *string* | :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..c0e0116c --- /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/UsageSnippet.md b/docs/Models/Shared/UsageSnippet.md index c75a9015..3acfd939 100644 --- a/docs/Models/Shared/UsageSnippet.md +++ b/docs/Models/Shared/UsageSnippet.md @@ -7,4 +7,6 @@ | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | | `Code` | *string* | :heavy_check_mark: | The code snippet | | `Language` | *string* | :heavy_check_mark: | The language of the snippet | -| `OperationId` | *string* | :heavy_check_mark: | The operation ID for the snippet | \ No newline at end of file +| `Method` | *object* | :heavy_check_mark: | The HTTP method of the operation | +| `OperationId` | *string* | :heavy_check_mark: | The operation ID for the snippet | +| `Path` | *string* | :heavy_check_mark: | The path of the operation | \ No newline at end of file diff --git a/docs/Models/Shared/User.md b/docs/Models/Shared/User.md index 0f8eb716..56257cea 100644 --- a/docs/Models/Shared/User.md +++ b/docs/Models/Shared/User.md @@ -13,9 +13,11 @@ | `Email` | *string* | :heavy_check_mark: | Email address of the user. | | `EmailVerified` | *bool* | :heavy_check_mark: | Indicates whether the email address has been verified. | | `GithubHandle` | *string* | :heavy_minus_sign: | GitHub handle of the user. | +| `HasCreatedApiKey` | *bool* | :heavy_minus_sign: | Indicates whether the user has created an API key. Not always populated | | `Id` | *string* | :heavy_check_mark: | Unique identifier for the user. | | `Internal` | *bool* | :heavy_minus_sign: | Indicates whether the user is internal. | | `LastLoginAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | Timestamp of the last login. | | `PhotoUrl` | *string* | :heavy_minus_sign: | URL of the user's photo. | +| `PylonIdentityHash` | *string* | :heavy_minus_sign: | Hash used for pylon identity verification returned on v1/user. | | `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | Timestamp of the user's last update. | | `Whitelisted` | *bool* | :heavy_check_mark: | Indicates whether the user has been whitelisted. | \ No newline at end of file diff --git a/docs/Models/Shared/Workspace.md b/docs/Models/Shared/Workspace.md index fd474e40..5e9f6ba6 100644 --- a/docs/Models/Shared/Workspace.md +++ b/docs/Models/Shared/Workspace.md @@ -9,10 +9,10 @@ A speakeasy workspace | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | | `Id` | *string* | :heavy_check_mark: | N/A | +| `Inactive` | *bool* | :heavy_minus_sign: | N/A | | `Name` | *string* | :heavy_check_mark: | N/A | | `OrganizationId` | *string* | :heavy_check_mark: | N/A | | `Slug` | *string* | :heavy_check_mark: | N/A | +| ~~`TelemetryDisabled`~~ | *bool* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use organization.telemetry_disabled instead. | | `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | -| `Verified` | *bool* | :heavy_check_mark: | N/A | -| `Inactive` | *bool* | :heavy_minus_sign: | N/A | -| ~~`TelemetryDisabled`~~ | *bool* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use organization.telemetry_disabled instead. | \ No newline at end of file +| `Verified` | *bool* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Shared/WorkspaceToken.md b/docs/Models/Shared/WorkspaceToken.md index f4748c81..2562449c 100644 --- a/docs/Models/Shared/WorkspaceToken.md +++ b/docs/Models/Shared/WorkspaceToken.md @@ -10,6 +10,8 @@ A workspace token | `Alg` | *string* | :heavy_check_mark: | N/A | | `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | | `CreatedBy` | *string* | :heavy_minus_sign: | N/A | +| `CreatedByName` | *string* | :heavy_minus_sign: | N/A | +| `CreatedByPhotoUrl` | *string* | :heavy_minus_sign: | N/A | | `Email` | *string* | :heavy_minus_sign: | N/A | | `Id` | *string* | :heavy_check_mark: | N/A | | `Key` | *string* | :heavy_check_mark: | N/A | diff --git a/docs/sdks/artifacts/README.md b/docs/sdks/artifacts/README.md index 9291801c..cbe62856 100644 --- a/docs/sdks/artifacts/README.md +++ b/docs/sdks/artifacts/README.md @@ -16,6 +16,7 @@ REST APIs for working with Registry artifacts * [ListRemoteSources](#listremotesources) - Get remote sources attached to a particular namespace * [PostTags](#posttags) - Add tags to an existing revision * [Preflight](#preflight) - Get access token for communicating with OCI distribution endpoints +* [SetArchived](#setarchived) - Set whether a namespace is archived * [SetVisibility](#setvisibility) - Set visibility of a namespace with an existing metadata entry ## CreateRemoteSource @@ -384,6 +385,47 @@ var res = await sdk.Artifacts.PreflightAsync(req); | SpeakeasySDK.Models.Errors.Error | 4XX | application/json | | SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | +## SetArchived + +Set whether a namespace is archived + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Operations; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +ArchiveNamespaceRequest req = new ArchiveNamespaceRequest() { + NamespaceName = "", +}; + +var res = await sdk.Artifacts.SetArchivedAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [ArchiveNamespaceRequest](../../Models/Operations/ArchiveNamespaceRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ArchiveNamespaceResponse](../../Models/Operations/ArchiveNamespaceResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | + ## SetVisibility Set visibility of a namespace with an existing metadata entry diff --git a/docs/sdks/codesamples/README.md b/docs/sdks/codesamples/README.md index f814ab3a..fad083c6 100644 --- a/docs/sdks/codesamples/README.md +++ b/docs/sdks/codesamples/README.md @@ -9,7 +9,6 @@ REST APIs for retrieving Code Samples * [GenerateCodeSamplePreview](#generatecodesamplepreview) - Generate Code Sample previews from a file and configuration parameters. * [GenerateCodeSamplePreviewAsync](#generatecodesamplepreviewasync) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling. -* [Get](#get) - Retrieve usage snippets from document stored in the registry * [GetCodeSamplePreviewAsync](#getcodesamplepreviewasync) - Poll for the result of an asynchronous Code Sample preview generation. ## GenerateCodeSamplePreview @@ -22,16 +21,13 @@ This endpoint generates Code Sample previews from a file and configuration param using SpeakeasySDK; using SpeakeasySDK.Models.Shared; using System; -using System.Collections.Generic; var sdk = new SDK(security: new Security() { APIKey = "", }); CodeSampleSchemaInput req = new CodeSampleSchemaInput() { - Languages = new List() { - "", - }, + Language = "", SchemaFile = new SchemaFile() { Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"), FileName = "example.file", @@ -57,7 +53,8 @@ var res = await sdk.CodeSamples.GenerateCodeSamplePreviewAsync(req); | Error Type | Status Code | Content Type | | -------------------------------- | -------------------------------- | -------------------------------- | -| SpeakeasySDK.Models.Errors.Error | 4XX, 5XX | application/json | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.Error | 5XX | application/json | ## GenerateCodeSamplePreviewAsync @@ -69,16 +66,13 @@ This endpoint generates Code Sample previews from a file and configuration param using SpeakeasySDK; using SpeakeasySDK.Models.Shared; using System; -using System.Collections.Generic; var sdk = new SDK(security: new Security() { APIKey = "", }); CodeSampleSchemaInput req = new CodeSampleSchemaInput() { - Languages = new List() { - "", - }, + Language = "", SchemaFile = new SchemaFile() { Content = System.Text.Encoding.UTF8.GetBytes("0xED5CDd177E"), FileName = "example.file", @@ -104,48 +98,8 @@ var res = await sdk.CodeSamples.GenerateCodeSamplePreviewAsyncAsync(req); | Error Type | Status Code | Content Type | | -------------------------------- | -------------------------------- | -------------------------------- | -| SpeakeasySDK.Models.Errors.Error | 4XX, 5XX | application/json | - -## Get - -Retrieve usage snippets from document stored in the registry. Supports filtering by language and operation ID. - -### Example Usage - -```csharp -using SpeakeasySDK; -using SpeakeasySDK.Models.Operations; -using SpeakeasySDK.Models.Shared; - -var sdk = new SDK(security: new Security() { - APIKey = "", -}); - -GetCodeSamplesRequest req = new GetCodeSamplesRequest() { - RegistryUrl = "https://normal-making.name", -}; - -var res = await sdk.CodeSamples.GetAsync(req); - -// handle response -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `request` | [GetCodeSamplesRequest](../../Models/Operations/GetCodeSamplesRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[GetCodeSamplesResponse](../../Models/Operations/GetCodeSamplesResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | -| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.Error | 5XX | application/json | ## GetCodeSamplePreviewAsync @@ -185,4 +139,5 @@ var res = await sdk.CodeSamples.GetCodeSamplePreviewAsyncAsync(req); | Error Type | Status Code | Content Type | | -------------------------------- | -------------------------------- | -------------------------------- | -| SpeakeasySDK.Models.Errors.Error | 4XX, 5XX | application/json | \ No newline at end of file +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.Error | 5XX | application/json | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index b0945553..2c8e1164 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -158,7 +158,7 @@ PostWorkspaceEventsRequest req = new PostWorkspaceEventsRequest() { CreatedAt = System.DateTime.Parse("2024-05-07T03:24:39.583Z"), ExecutionId = "", Id = "", - InteractionType = InteractionType.Quickstart, + InteractionType = InteractionType.Run, LocalStartedAt = System.DateTime.Parse("2024-09-08T05:59:33.876Z"), SpeakeasyApiKeyName = "", SpeakeasyVersion = "", diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index d5394d19..0d412b15 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -8,9 +8,12 @@ REST APIs for managing Organizations (speakeasy L1 Tenancy construct) ### Available Operations * [Create](#create) - Create an organization +* [CreateBillingAddOns](#createbillingaddons) - Create billing add ons * [CreateFreeTrial](#createfreetrial) - Create a free trial for an organization +* [DeleteBillingAddOn](#deletebillingaddon) - Delete billing add ons * [Get](#get) - Get organization * [GetAll](#getall) - Get organizations for a user +* [GetBillingAddOns](#getbillingaddons) - Get billing add ons * [GetUsage](#getusage) - Get billing usage summary for a particular organization ## Create @@ -61,6 +64,49 @@ var res = await sdk.Organizations.CreateAsync(req); | SpeakeasySDK.Models.Errors.Error | 4XX | application/json | | SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | +## CreateBillingAddOns + +Create billing add ons + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Shared; +using System.Collections.Generic; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +OrganizationBillingAddOnRequest req = new OrganizationBillingAddOnRequest() { + AddOns = new List() { + BillingAddOn.SnippetAi, + }, +}; + +var res = await sdk.Organizations.CreateBillingAddOnsAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `request` | [OrganizationBillingAddOnRequest](../../Models/Shared/OrganizationBillingAddOnRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateBillingAddOnsResponse](../../Models/Operations/CreateBillingAddOnsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 5XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 4XX | \*/\* | + ## CreateFreeTrial Creates a free trial for an organization @@ -91,6 +137,47 @@ var res = await sdk.Organizations.CreateFreeTrialAsync(); | SpeakeasySDK.Models.Errors.Error | 4XX | application/json | | SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | +## DeleteBillingAddOn + +Delete billing add ons + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Operations; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +DeleteBillingAddOnRequest req = new DeleteBillingAddOnRequest() { + AddOn = BillingAddOn.SnippetAi, +}; + +var res = await sdk.Organizations.DeleteBillingAddOnAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [DeleteBillingAddOnRequest](../../Models/Operations/DeleteBillingAddOnRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteBillingAddOnResponse](../../Models/Operations/DeleteBillingAddOnResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 5XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 4XX | \*/\* | + ## Get Get information about a particular organization. @@ -162,6 +249,36 @@ var res = await sdk.Organizations.GetAllAsync(); | SpeakeasySDK.Models.Errors.Error | 4XX | application/json | | SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | +## GetBillingAddOns + +Get billing add ons + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +var res = await sdk.Organizations.GetBillingAddOnsAsync(); + +// handle response +``` + +### Response + +**[GetBillingAddOnsResponse](../../Models/Operations/GetBillingAddOnsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 5XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 4XX | \*/\* | + ## GetUsage Returns a billing usage summary by target languages for a particular organization diff --git a/docs/sdks/publishingtokens/README.md b/docs/sdks/publishingtokens/README.md new file mode 100644 index 00000000..393987bf --- /dev/null +++ b/docs/sdks/publishingtokens/README.md @@ -0,0 +1,294 @@ +# PublishingTokens +(*PublishingTokens*) + +## Overview + +### Available Operations + +* [Create](#create) - Create a publishing token for a workspace +* [Delete](#delete) - Delete a specific publishing token +* [Get](#get) - Get a specific publishing token +* [List](#list) - Get publishing tokens for a workspace +* [ResolveMetadata](#resolvemetadata) - Get metadata about the token +* [ResolveTarget](#resolvetarget) - Get a specific publishing token target +* [Update](#update) - Updates the validitity period of a publishing token + +## Create + +Creates a publishing token for the current workspace + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Operations; +using SpeakeasySDK.Models.Shared; +using System; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +CreatePublishingTokenRequestBody req = new CreatePublishingTokenRequestBody() { + TargetId = "", + TargetResource = "", + TokenName = "", + ValidUntil = System.DateTime.Parse("2024-06-17T07:14:55.338Z"), +}; + +var res = await sdk.PublishingTokens.CreateAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `request` | [CreatePublishingTokenRequestBody](../../Models/Operations/CreatePublishingTokenRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreatePublishingTokenResponse](../../Models/Operations/CreatePublishingTokenResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | + +## Delete + +Delete a particular publishing token. + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Operations; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +DeletePublishingTokenRequest req = new DeletePublishingTokenRequest() { + TokenID = "", +}; + +var res = await sdk.PublishingTokens.DeleteAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [DeletePublishingTokenRequest](../../Models/Operations/DeletePublishingTokenRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeletePublishingTokenResponse](../../Models/Operations/DeletePublishingTokenResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | + +## Get + +Get information about a particular publishing token. + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Operations; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +GetPublishingTokenByIDRequest req = new GetPublishingTokenByIDRequest() { + TokenID = "", +}; + +var res = await sdk.PublishingTokens.GetAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `request` | [GetPublishingTokenByIDRequest](../../Models/Operations/GetPublishingTokenByIDRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPublishingTokenByIDResponse](../../Models/Operations/GetPublishingTokenByIDResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | + +## List + +Returns a publishing token for the current workspace + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +var res = await sdk.PublishingTokens.ListAsync(); + +// handle response +``` + +### Response + +**[GetPublishingTokenResponse](../../Models/Operations/GetPublishingTokenResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | + +## ResolveMetadata + +Get information about a particular publishing token. + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Operations; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +GetPublishingTokenPublicMetadataRequest req = new GetPublishingTokenPublicMetadataRequest() { + TokenID = "", +}; + +var res = await sdk.PublishingTokens.ResolveMetadataAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `request` | [GetPublishingTokenPublicMetadataRequest](../../Models/Operations/GetPublishingTokenPublicMetadataRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPublishingTokenPublicMetadataResponse](../../Models/Operations/GetPublishingTokenPublicMetadataResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | + +## ResolveTarget + +Get information about a particular publishing token target. + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Operations; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +GetPublishingTokenTargetByIDRequest req = new GetPublishingTokenTargetByIDRequest() { + TokenID = "", +}; + +var res = await sdk.PublishingTokens.ResolveTargetAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `request` | [GetPublishingTokenTargetByIDRequest](../../Models/Operations/GetPublishingTokenTargetByIDRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPublishingTokenTargetByIDResponse](../../Models/Operations/GetPublishingTokenTargetByIDResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | + +## Update + +Updates the validity period of a particular publishing token. + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Operations; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +UpdatePublishingTokenExpirationRequest req = new UpdatePublishingTokenExpirationRequest() { + TokenID = "", +}; + +var res = await sdk.PublishingTokens.UpdateAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `request` | [UpdatePublishingTokenExpirationRequest](../../Models/Operations/UpdatePublishingTokenExpirationRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UpdatePublishingTokenExpirationResponse](../../Models/Operations/UpdatePublishingTokenExpirationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/schemastore/README.md b/docs/sdks/schemastore/README.md new file mode 100644 index 00000000..3d520a26 --- /dev/null +++ b/docs/sdks/schemastore/README.md @@ -0,0 +1,92 @@ +# SchemaStore +(*SchemaStore*) + +## Overview + +### Available Operations + +* [CreateSchemaStoreItem](#createschemastoreitem) - Create a schema in the schema store +* [GetSchemaStoreItem](#getschemastoreitem) - Get a OAS schema from the schema store + +## CreateSchemaStoreItem + +Create a schema in the schema store + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Operations; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +CreateSchemaStoreItemRequestBody req = new CreateSchemaStoreItemRequestBody() { + Format = Format.Yaml, + PackageName = "", + SDKClassname = "", + Spec = "", +}; + +var res = await sdk.SchemaStore.CreateSchemaStoreItemAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `request` | [CreateSchemaStoreItemRequestBody](../../Models/Operations/CreateSchemaStoreItemRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateSchemaStoreItemResponse](../../Models/Operations/CreateSchemaStoreItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | + +## GetSchemaStoreItem + +Get a OAS schema from the schema store + +### Example Usage + +```csharp +using SpeakeasySDK; +using SpeakeasySDK.Models.Operations; +using SpeakeasySDK.Models.Shared; + +var sdk = new SDK(security: new Security() { + APIKey = "", +}); + +GetSchemaStoreItemRequestBody req = new GetSchemaStoreItemRequestBody() {}; + +var res = await sdk.SchemaStore.GetSchemaStoreItemAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `request` | [GetSchemaStoreItemRequestBody](../../Models/Operations/GetSchemaStoreItemRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSchemaStoreItemResponse](../../Models/Operations/GetSchemaStoreItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| SpeakeasySDK.Models.Errors.Error | 4XX | application/json | +| SpeakeasySDK.Models.Errors.SDKException | 5XX | \*/\* | \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index 7d57f2ac..66810b07 100755 --- a/gen.yaml +++ b/gen.yaml @@ -4,14 +4,16 @@ generation: usageSnippets: optionalPropertyRendering: withExample fixes: - nameResolutionDec2023: false + nameResolutionFeb2025: false parameterOrderingFeb2024: false requestResponseComponentNamesFeb2024: false + securityFeb2025: false + sharedErrorComponentsApr2025: false auth: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false csharp: - version: 5.12.0 + version: 5.13.0 additionalDependencies: [] author: Speakeasy clientServerStatusCodesAsErrors: true diff --git a/src/SpeakeasySDK/Artifacts.cs b/src/SpeakeasySDK/Artifacts.cs index 0b8ea240..336c77d5 100644 --- a/src/SpeakeasySDK/Artifacts.cs +++ b/src/SpeakeasySDK/Artifacts.cs @@ -65,6 +65,11 @@ public interface IArtifacts /// Task PreflightAsync(PreflightRequest? request = null); + /// + /// Set whether a namespace is archived + /// + Task SetArchivedAsync(ArchiveNamespaceRequest request); + /// /// Set visibility of a namespace with an existing metadata entry /// @@ -78,10 +83,10 @@ public class Artifacts: IArtifacts { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -114,7 +119,7 @@ public async Task CreateRemoteSourceAsync(RemoteSour httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("createRemoteSource", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "createRemoteSource", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -190,7 +195,7 @@ public async Task GetBlobAsync(GetBlobRequest request) httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getBlob", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getBlob", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -273,7 +278,7 @@ public async Task GetManifestAsync(GetManifestRequest reque httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getManifest", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getManifest", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -358,7 +363,7 @@ public async Task GetManifestAsync(GetManifestRequest reque httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getNamespaces", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getNamespaces", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -442,7 +447,7 @@ public async Task GetManifestAsync(GetManifestRequest reque httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getRevisions", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getRevisions", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -526,7 +531,7 @@ public async Task GetManifestAsync(GetManifestRequest reque httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getTags", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getTags", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -610,7 +615,7 @@ public async Task ListRemoteSourcesAsync(ListRemoteSo httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("listRemoteSources", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "listRemoteSources", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -700,7 +705,7 @@ public async Task PostTagsAsync(PostTagsRequest request) httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("postTags", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "postTags", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -783,7 +788,7 @@ public async Task PreflightAsync(PreflightRequest? request = httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("preflight", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "preflight", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -854,6 +859,88 @@ public async Task PreflightAsync(PreflightRequest? request = throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + public async Task SetArchivedAsync(ArchiveNamespaceRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/v1/artifacts/namespaces/{namespace_name}/archive", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "archiveNamespace", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode >= 200 && responseStatusCode < 300) + { + return new ArchiveNamespaceResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + public async Task SetVisibilityAsync(SetVisibilityRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); @@ -873,7 +960,7 @@ public async Task SetVisibilityAsync(SetVisibilityRequest httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("setVisibility", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "setVisibility", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); diff --git a/src/SpeakeasySDK/Auth.cs b/src/SpeakeasySDK/Auth.cs index 493d69b9..3b08a0e1 100644 --- a/src/SpeakeasySDK/Auth.cs +++ b/src/SpeakeasySDK/Auth.cs @@ -60,10 +60,10 @@ public class Auth: IAuth { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -89,7 +89,7 @@ public async Task GetAccessAsync(GetWorkspaceAccessR httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspaceAccess", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspaceAccess", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); if (retryConfig == null) @@ -178,7 +178,11 @@ public async Task GetAccessAsync(GetWorkspaceAccessR throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) { throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } @@ -200,7 +204,7 @@ public async Task GetAccessTokenAsync(GetAccessTokenRequ var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var hookCtx = new HookContext("getAccessToken", null, null); + var hookCtx = new HookContext(baseUrl, "getAccessToken", new List { }, null); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -285,7 +289,7 @@ public async Task GetUserAsync() httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getUser", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getUser", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -370,7 +374,7 @@ public async Task ValidateApiKeyAsync() httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("validateApiKey", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "validateApiKey", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); diff --git a/src/SpeakeasySDK/CodeSamples.cs b/src/SpeakeasySDK/CodeSamples.cs index c1027ec0..590226ed 100644 --- a/src/SpeakeasySDK/CodeSamples.cs +++ b/src/SpeakeasySDK/CodeSamples.cs @@ -46,15 +46,6 @@ public interface ICodeSamples /// Task GenerateCodeSamplePreviewAsyncAsync(CodeSampleSchemaInput request); - /// - /// Retrieve usage snippets from document stored in the registry - /// - /// - /// Retrieve usage snippets from document stored in the registry. Supports filtering by language and operation ID. - /// - /// - Task GetAsync(GetCodeSamplesRequest request); - /// /// Poll for the result of an asynchronous Code Sample preview generation. /// @@ -72,10 +63,10 @@ public class CodeSamples: ICodeSamples { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -108,7 +99,7 @@ public async Task GenerateCodeSamplePreviewAs httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("generateCodeSamplePreview", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "generateCodeSamplePreview", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -144,34 +135,34 @@ public async Task GenerateCodeSamplePreviewAs var contentType = httpResponse.Content.Headers.ContentType?.MediaType; int responseStatusCode = (int)httpResponse.StatusCode; - if(responseStatusCode == 200) + if(responseStatusCode >= 200 && responseStatusCode < 300) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); var response = new GenerateCodeSamplePreviewResponse() { StatusCode = responseStatusCode, ContentType = contentType, RawResponse = httpResponse }; - response.TwoHundredApplicationJsonBytes = await httpResponse.Content.ReadAsByteArrayAsync(); + response.UsageSnippets = obj; return response; } - else if(Utilities.IsContentTypeMatch("application/x-yaml", contentType)) + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var response = new GenerateCodeSamplePreviewResponse() - { - StatusCode = responseStatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - response.TwoHundredApplicationXYamlBytes = await httpResponse.Content.ReadAsByteArrayAsync(); - return response; + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 500 && responseStatusCode < 600) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { @@ -205,7 +196,7 @@ public async Task GenerateCodeSamplePrev httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("generateCodeSamplePreviewAsync", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "generateCodeSamplePreviewAsync", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -258,7 +249,7 @@ public async Task GenerateCodeSamplePrev throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 400 && responseStatusCode < 500) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { @@ -268,77 +259,7 @@ public async Task GenerateCodeSamplePrev throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - - public async Task GetAsync(GetCodeSamplesRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/v1/code_sample", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - if (_securitySource != null) - { - httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); - } - - var hookCtx = new HookContext("getCodeSamples", null, _securitySource); - - httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); - - HttpResponseMessage httpResponse; - try - { - httpResponse = await _client.SendAsync(httpRequest); - int _statusCode = (int)httpResponse.StatusCode; - - if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) - { - var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); - if (_httpResponse != null) - { - httpResponse = _httpResponse; - } - } - } - catch (Exception error) - { - var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); - if (_httpResponse != null) - { - httpResponse = _httpResponse; - } - else - { - throw; - } - } - - httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - int responseStatusCode = (int)httpResponse.StatusCode; - if(responseStatusCode >= 200 && responseStatusCode < 300) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); - var response = new GetCodeSamplesResponse() - { - StatusCode = responseStatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - response.UsageSnippets = obj; - return response; - } - - throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode >= 400 && responseStatusCode < 500) + else if(responseStatusCode >= 500 && responseStatusCode < 600) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { @@ -348,10 +269,6 @@ public async Task GetAsync(GetCodeSamplesRequest request throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 500 && responseStatusCode < 600) - { - throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } @@ -369,7 +286,7 @@ public async Task GetCodeSamplePreviewAsyncAs httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getCodeSamplePreviewAsync", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getCodeSamplePreviewAsync", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -405,51 +322,51 @@ public async Task GetCodeSamplePreviewAsyncAs var contentType = httpResponse.Content.Headers.ContentType?.MediaType; int responseStatusCode = (int)httpResponse.StatusCode; - if(responseStatusCode == 200) + if(responseStatusCode == 202) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); var response = new GetCodeSamplePreviewAsyncResponse() { StatusCode = responseStatusCode, ContentType = contentType, RawResponse = httpResponse }; - response.TwoHundredApplicationJsonBytes = await httpResponse.Content.ReadAsByteArrayAsync(); + response.Object = obj; return response; } - else if(Utilities.IsContentTypeMatch("application/x-yaml", contentType)) + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 200 && responseStatusCode < 300) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); var response = new GetCodeSamplePreviewAsyncResponse() { StatusCode = responseStatusCode, ContentType = contentType, RawResponse = httpResponse }; - response.TwoHundredApplicationXYamlBytes = await httpResponse.Content.ReadAsByteArrayAsync(); + response.UsageSnippets = obj; return response; } throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode == 202) + else if(responseStatusCode >= 400 && responseStatusCode < 500) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); - var response = new GetCodeSamplePreviewAsyncResponse() - { - StatusCode = responseStatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - response.TwoHundredAndTwoApplicationJsonObject = obj; - return response; + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 500 && responseStatusCode < 600) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { diff --git a/src/SpeakeasySDK/Events.cs b/src/SpeakeasySDK/Events.cs index ff9266b3..b9afae8d 100644 --- a/src/SpeakeasySDK/Events.cs +++ b/src/SpeakeasySDK/Events.cs @@ -65,10 +65,10 @@ public class Events: IEvents { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -100,7 +100,7 @@ public async Task GetEventsByTargetAsync(Get httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspaceEventsByTarget", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspaceEventsByTarget", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -184,7 +184,7 @@ public async Task GetTargetsAsync(GetWorkspaceTarge httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspaceTargets", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspaceTargets", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -270,7 +270,7 @@ public async Task GetTargetsDeprecatedAsy httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspaceTargetsDeprecated", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspaceTargetsDeprecated", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -366,7 +366,7 @@ public async Task PostAsync(PostWorkspaceEventsRequ httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("postWorkspaceEvents", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "postWorkspaceEvents", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); if (retryConfig == null) @@ -480,7 +480,7 @@ public async Task SearchAsync(SearchWorkspaceEven httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("searchWorkspaceEvents", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "searchWorkspaceEvents", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); diff --git a/src/SpeakeasySDK/Github.cs b/src/SpeakeasySDK/Github.cs index 6fcd317f..0b716dd0 100644 --- a/src/SpeakeasySDK/Github.cs +++ b/src/SpeakeasySDK/Github.cs @@ -47,10 +47,10 @@ public class Github: IGithub { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -76,7 +76,7 @@ public async Task CheckAccessAsync(CheckGithubAccessR httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("checkGithubAccess", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "checkGithubAccess", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -152,7 +152,7 @@ public async Task CheckPublishingPRsAsync(Gith httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("githubCheckPublishingPRs", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "githubCheckPublishingPRs", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -236,7 +236,7 @@ public async Task CheckPublishingSecretsAs httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("githubCheckPublishingSecrets", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "githubCheckPublishingSecrets", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -327,7 +327,7 @@ public async Task CheckPublishingSecretsAs httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("githubConfigureCodeSamples", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "githubConfigureCodeSamples", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -418,7 +418,7 @@ public async Task ConfigureMintlifyRepoAsyn httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("githubConfigureMintlifyRepo", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "githubConfigureMintlifyRepo", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -501,7 +501,7 @@ public async Task ConfigureTargetAsync(GithubConf httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("githubConfigureTarget", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "githubConfigureTarget", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -577,7 +577,7 @@ public async Task GetActionAsync(GetGitHubActionRequest httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getGitHubAction", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getGitHubAction", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -661,7 +661,7 @@ public async Task GetSetupAsync(GetGithubSetupState httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getGithubSetupState", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getGithubSetupState", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -745,7 +745,7 @@ public async Task LinkGithubAsync(LinkGithubAccessRequ httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("linkGithubAccess", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "linkGithubAccess", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -828,7 +828,7 @@ public async Task StorePublishingSecretsAs httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("githubStorePublishingSecrets", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "githubStorePublishingSecrets", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -911,7 +911,7 @@ public async Task TriggerActionAsync(GithubTriggerA httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("githubTriggerAction", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "githubTriggerAction", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); diff --git a/src/SpeakeasySDK/Hooks/HookTypes.cs b/src/SpeakeasySDK/Hooks/HookTypes.cs index fca50b8f..d5c35b78 100644 --- a/src/SpeakeasySDK/Hooks/HookTypes.cs +++ b/src/SpeakeasySDK/Hooks/HookTypes.cs @@ -17,12 +17,14 @@ namespace SpeakeasySDK.Hooks public class HookContext { + public string BaseURL { get; set; } = ""; public string OperationID { get; set; } public List? Oauth2Scopes { get; set; } public Func? SecuritySource { get; set; } - public HookContext(string operationID, List? oauth2Scopes, Func? securitySource) + public HookContext(string baseURL, string operationID, List? oauth2Scopes, Func? securitySource) { + BaseURL = baseURL; OperationID = operationID; Oauth2Scopes = oauth2Scopes; SecuritySource = securitySource; @@ -32,19 +34,19 @@ public HookContext(string operationID, List? oauth2Scopes, Func? public class BeforeRequestContext : HookContext { public BeforeRequestContext(HookContext hookCtx) - : base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } + : base(hookCtx.BaseURL, hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } } public class AfterSuccessContext : HookContext { public AfterSuccessContext(HookContext hookCtx) - : base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } + : base(hookCtx.BaseURL, hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } } public class AfterErrorContext : HookContext { public AfterErrorContext(HookContext hookCtx) - : base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } + : base(hookCtx.BaseURL, hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } } /// diff --git a/src/SpeakeasySDK/Models/Operations/ArchiveNamespaceRequest.cs b/src/SpeakeasySDK/Models/Operations/ArchiveNamespaceRequest.cs new file mode 100644 index 00000000..61dd3e0c --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/ArchiveNamespaceRequest.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Utils; + + public class ArchiveNamespaceRequest + { + + /// + /// Archived status + /// + [SpeakeasyMetadata("request:mediaType=application/json")] + public ArchiveNamespaceRequestBody? RequestBody { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name")] + public string NamespaceName { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/ArchiveNamespaceRequestBody.cs b/src/SpeakeasySDK/Models/Operations/ArchiveNamespaceRequestBody.cs new file mode 100644 index 00000000..582758b2 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/ArchiveNamespaceRequestBody.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using Newtonsoft.Json; + using SpeakeasySDK.Utils; + + /// + /// Archived status + /// + public class ArchiveNamespaceRequestBody + { + + [JsonProperty("archived")] + public bool? Archived { get; set; } = true; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/ArchiveNamespaceResponse.cs b/src/SpeakeasySDK/Models/Operations/ArchiveNamespaceResponse.cs new file mode 100644 index 00000000..1e2496ba --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/ArchiveNamespaceResponse.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class ArchiveNamespaceResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/CreateBillingAddOnsResponse.cs b/src/SpeakeasySDK/Models/Operations/CreateBillingAddOnsResponse.cs new file mode 100644 index 00000000..f1fd6180 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/CreateBillingAddOnsResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class CreateBillingAddOnsResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// Success + /// + public OrganizationBillingAddOnResponse? OrganizationBillingAddOnResponse { get; set; } + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/CreatePublishingTokenRequestBody.cs b/src/SpeakeasySDK/Models/Operations/CreatePublishingTokenRequestBody.cs new file mode 100644 index 00000000..99c7baaa --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/CreatePublishingTokenRequestBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using Newtonsoft.Json; + using SpeakeasySDK.Utils; + using System; + + /// + /// The publishing token to create + /// + public class CreatePublishingTokenRequestBody + { + + [JsonProperty("target_id")] + public string TargetId { get; set; } = default!; + + [JsonProperty("target_resource")] + public string TargetResource { get; set; } = default!; + + [JsonProperty("token_name")] + public string TokenName { get; set; } = default!; + + [JsonProperty("valid_until")] + public DateTime ValidUntil { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/CreatePublishingTokenResponse.cs b/src/SpeakeasySDK/Models/Operations/CreatePublishingTokenResponse.cs new file mode 100644 index 00000000..7d146282 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/CreatePublishingTokenResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class CreatePublishingTokenResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// OK + /// + public PublishingToken? PublishingToken { get; set; } + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/CreateSchemaStoreItemRequestBody.cs b/src/SpeakeasySDK/Models/Operations/CreateSchemaStoreItemRequestBody.cs new file mode 100644 index 00000000..4beb9ecd --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/CreateSchemaStoreItemRequestBody.cs @@ -0,0 +1,43 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using Newtonsoft.Json; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Utils; + + public class CreateSchemaStoreItemRequestBody + { + + /// + /// The format of the OpenAPI specification. + /// + [JsonProperty("format")] + public Models.Operations.Format Format { get; set; } = default!; + + /// + /// The package name to use in code snippets / quickstart. + /// + [JsonProperty("packageName")] + public string PackageName { get; set; } = default!; + + /// + /// The classname of the SDK to use in code snippets / quickstart. + /// + [JsonProperty("sdkClassname")] + public string SDKClassname { get; set; } = default!; + + /// + /// The OpenAPI specification to store. + /// + [JsonProperty("spec")] + public string Spec { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/CreateSchemaStoreItemResponse.cs b/src/SpeakeasySDK/Models/Operations/CreateSchemaStoreItemResponse.cs new file mode 100644 index 00000000..05343888 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/CreateSchemaStoreItemResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class CreateSchemaStoreItemResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// OK + /// + public SchemaStoreItem? SchemaStoreItem { get; set; } + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/DeleteBillingAddOnRequest.cs b/src/SpeakeasySDK/Models/Operations/DeleteBillingAddOnRequest.cs new file mode 100644 index 00000000..8fb7ad9b --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/DeleteBillingAddOnRequest.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + + public class DeleteBillingAddOnRequest + { + + /// + /// The specific add-on to delete. + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=add_on")] + public BillingAddOn AddOn { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/DeleteBillingAddOnResponse.cs b/src/SpeakeasySDK/Models/Operations/DeleteBillingAddOnResponse.cs new file mode 100644 index 00000000..d70442f6 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/DeleteBillingAddOnResponse.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class DeleteBillingAddOnResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/DeletePublishingTokenRequest.cs b/src/SpeakeasySDK/Models/Operations/DeletePublishingTokenRequest.cs new file mode 100644 index 00000000..daf42ebc --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/DeletePublishingTokenRequest.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Utils; + + public class DeletePublishingTokenRequest + { + + /// + /// Unique identifier of the publishing token. + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tokenID")] + public string TokenID { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/DeletePublishingTokenResponse.cs b/src/SpeakeasySDK/Models/Operations/DeletePublishingTokenResponse.cs new file mode 100644 index 00000000..ea5d65f7 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/DeletePublishingTokenResponse.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class DeletePublishingTokenResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/Format.cs b/src/SpeakeasySDK/Models/Operations/Format.cs new file mode 100644 index 00000000..c265f104 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/Format.cs @@ -0,0 +1,60 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using Newtonsoft.Json; + using SpeakeasySDK.Utils; + using System; + + /// + /// The format of the OpenAPI specification. + /// + public enum Format + { + [JsonProperty("json")] + Json, + [JsonProperty("yaml")] + Yaml, + } + + public static class FormatExtension + { + public static string Value(this Format value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static Format ToEnum(this string value) + { + foreach(var field in typeof(Format).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is Format) + { + return (Format)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum Format"); + } + } + +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GenerateCodeSamplePreviewResponse.cs b/src/SpeakeasySDK/Models/Operations/GenerateCodeSamplePreviewResponse.cs index 8bcb0164..10f4b041 100644 --- a/src/SpeakeasySDK/Models/Operations/GenerateCodeSamplePreviewResponse.cs +++ b/src/SpeakeasySDK/Models/Operations/GenerateCodeSamplePreviewResponse.cs @@ -9,6 +9,7 @@ #nullable enable namespace SpeakeasySDK.Models.Operations { + using SpeakeasySDK.Models.Shared; using SpeakeasySDK.Utils; using System; using System.Net.Http; @@ -16,16 +17,6 @@ namespace SpeakeasySDK.Models.Operations public class GenerateCodeSamplePreviewResponse { - /// - /// Successfully returned codeSample overlay file - /// - public byte[]? TwoHundredApplicationJsonBytes { get; set; } - - /// - /// Successfully returned codeSample overlay file - /// - public byte[]? TwoHundredApplicationXYamlBytes { get; set; } - /// /// HTTP response content type for this operation /// @@ -40,5 +31,10 @@ public class GenerateCodeSamplePreviewResponse /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; + + /// + /// OK + /// + public UsageSnippets? UsageSnippets { get; set; } } } \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetBillingAddOnsResponse.cs b/src/SpeakeasySDK/Models/Operations/GetBillingAddOnsResponse.cs new file mode 100644 index 00000000..d96d895c --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/GetBillingAddOnsResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class GetBillingAddOnsResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// Success + /// + public OrganizationBillingAddOnResponse? OrganizationBillingAddOnResponse { get; set; } + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetCodeSamplePreviewAsyncResponse.cs b/src/SpeakeasySDK/Models/Operations/GetCodeSamplePreviewAsyncResponse.cs index 26c1b3b6..f13ee3ce 100644 --- a/src/SpeakeasySDK/Models/Operations/GetCodeSamplePreviewAsyncResponse.cs +++ b/src/SpeakeasySDK/Models/Operations/GetCodeSamplePreviewAsyncResponse.cs @@ -10,6 +10,7 @@ namespace SpeakeasySDK.Models.Operations { using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; using SpeakeasySDK.Utils; using System; using System.Net.Http; @@ -17,21 +18,6 @@ namespace SpeakeasySDK.Models.Operations public class GetCodeSamplePreviewAsyncResponse { - /// - /// Successfully returned codeSample overlay file - /// - public byte[]? TwoHundredApplicationJsonBytes { get; set; } - - /// - /// Successfully returned codeSample overlay file - /// - public byte[]? TwoHundredApplicationXYamlBytes { get; set; } - - /// - /// Job is still in progress - /// - public GetCodeSamplePreviewAsyncResponseBody? TwoHundredAndTwoApplicationJsonObject { get; set; } - /// /// HTTP response content type for this operation /// @@ -46,5 +32,15 @@ public class GetCodeSamplePreviewAsyncResponse /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; + + /// + /// OK + /// + public UsageSnippets? UsageSnippets { get; set; } + + /// + /// Job is still in progress + /// + public GetCodeSamplePreviewAsyncResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetCodeSamplesRequest.cs b/src/SpeakeasySDK/Models/Operations/GetCodeSamplesRequest.cs deleted file mode 100644 index c709971c..00000000 --- a/src/SpeakeasySDK/Models/Operations/GetCodeSamplesRequest.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace SpeakeasySDK.Models.Operations -{ - using SpeakeasySDK.Utils; - using System.Collections.Generic; - - public class GetCodeSamplesRequest - { - - /// - /// The registry URL from which to retrieve the snippets. E.g. https://spec.speakeasy.com/org/ws/my-source - /// - [SpeakeasyMetadata("queryParam:style=form,explode=true,name=registry_url")] - public string RegistryUrl { get; set; } = default!; - - [SpeakeasyMetadata("queryParam:style=form,explode=true,name=languages")] - public List? Languages { get; set; } - - [SpeakeasyMetadata("queryParam:style=form,explode=true,name=operation_ids")] - public List? OperationIds { get; set; } - } -} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetPublishingTokenByIDRequest.cs b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenByIDRequest.cs new file mode 100644 index 00000000..744a7fc6 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenByIDRequest.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Utils; + + public class GetPublishingTokenByIDRequest + { + + /// + /// Unique identifier of the publishing token. + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tokenID")] + public string TokenID { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetPublishingTokenByIDResponse.cs b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenByIDResponse.cs new file mode 100644 index 00000000..9bb3af37 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenByIDResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class GetPublishingTokenByIDResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// OK + /// + public PublishingToken? PublishingToken { get; set; } + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataRequest.cs b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataRequest.cs new file mode 100644 index 00000000..351b097b --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataRequest.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Utils; + + public class GetPublishingTokenPublicMetadataRequest + { + + /// + /// Unique identifier of the publishing token. + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tokenID")] + public string TokenID { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataResponse.cs b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataResponse.cs new file mode 100644 index 00000000..fb9246d9 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class GetPublishingTokenPublicMetadataResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + + /// + /// OK + /// + public GetPublishingTokenPublicMetadataResponseBody? Object { get; set; } + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataResponseBody.cs b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataResponseBody.cs new file mode 100644 index 00000000..7afd3567 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenPublicMetadataResponseBody.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using Newtonsoft.Json; + using SpeakeasySDK.Utils; + using System; + + /// + /// OK + /// + public class GetPublishingTokenPublicMetadataResponseBody + { + + [JsonProperty("organization_id")] + public string? OrganizationId { get; set; } + + [JsonProperty("target_id")] + public string? TargetId { get; set; } + + [JsonProperty("target_resource")] + public string? TargetResource { get; set; } + + [JsonProperty("valid_until")] + public DateTime? ValidUntil { get; set; } + + [JsonProperty("workspace_id")] + public string? WorkspaceId { get; set; } + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetPublishingTokenResponse.cs b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenResponse.cs new file mode 100644 index 00000000..1bd46671 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenResponse.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System; + using System.Collections.Generic; + using System.Net.Http; + + public class GetPublishingTokenResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + + /// + /// OK + /// + public List? Classes { get; set; } + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetPublishingTokenTargetByIDRequest.cs b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenTargetByIDRequest.cs new file mode 100644 index 00000000..0732f3c6 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenTargetByIDRequest.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Utils; + + public class GetPublishingTokenTargetByIDRequest + { + + /// + /// Unique identifier of the publishing token. + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tokenID")] + public string TokenID { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetPublishingTokenTargetByIDResponse.cs b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenTargetByIDResponse.cs new file mode 100644 index 00000000..502d4384 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/GetPublishingTokenTargetByIDResponse.cs @@ -0,0 +1,39 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class GetPublishingTokenTargetByIDResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + + /// + /// OK + /// + public string? Res { get; set; } + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetSchemaStoreItemRequestBody.cs b/src/SpeakeasySDK/Models/Operations/GetSchemaStoreItemRequestBody.cs new file mode 100644 index 00000000..e2322e3e --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/GetSchemaStoreItemRequestBody.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using Newtonsoft.Json; + using SpeakeasySDK.Utils; + + public class GetSchemaStoreItemRequestBody + { + + [JsonProperty("id")] + public string? Id { get; set; } + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetCodeSamplesResponse.cs b/src/SpeakeasySDK/Models/Operations/GetSchemaStoreItemResponse.cs similarity index 91% rename from src/SpeakeasySDK/Models/Operations/GetCodeSamplesResponse.cs rename to src/SpeakeasySDK/Models/Operations/GetSchemaStoreItemResponse.cs index 03092bd0..5dbf5f8f 100644 --- a/src/SpeakeasySDK/Models/Operations/GetCodeSamplesResponse.cs +++ b/src/SpeakeasySDK/Models/Operations/GetSchemaStoreItemResponse.cs @@ -14,7 +14,7 @@ namespace SpeakeasySDK.Models.Operations using System; using System.Net.Http; - public class GetCodeSamplesResponse + public class GetSchemaStoreItemResponse { /// @@ -22,6 +22,11 @@ public class GetCodeSamplesResponse /// public string? ContentType { get; set; } = default!; + /// + /// OK + /// + public SchemaStoreItem? SchemaStoreItem { get; set; } + /// /// HTTP response status code for this operation /// @@ -31,10 +36,5 @@ public class GetCodeSamplesResponse /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// OK - /// - public UsageSnippets? UsageSnippets { get; set; } } } \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/GetWorkspaceEventsByTargetRequest.cs b/src/SpeakeasySDK/Models/Operations/GetWorkspaceEventsByTargetRequest.cs index f35af538..9bcf6c34 100644 --- a/src/SpeakeasySDK/Models/Operations/GetWorkspaceEventsByTargetRequest.cs +++ b/src/SpeakeasySDK/Models/Operations/GetWorkspaceEventsByTargetRequest.cs @@ -15,18 +15,18 @@ namespace SpeakeasySDK.Models.Operations public class GetWorkspaceEventsByTargetRequest { - /// - /// Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) - /// - [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=target_id")] - public string TargetId { get; set; } = default!; - /// /// Filter to only return events created after this timestamp /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=after_created_at")] public DateTime? AfterCreatedAt { get; set; } + /// + /// Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=target_id")] + public string TargetId { get; set; } = default!; + /// /// Unique identifier of the workspace. /// diff --git a/src/SpeakeasySDK/Models/Operations/PostTagsRequest.cs b/src/SpeakeasySDK/Models/Operations/PostTagsRequest.cs index a270f6b2..e9d5571e 100644 --- a/src/SpeakeasySDK/Models/Operations/PostTagsRequest.cs +++ b/src/SpeakeasySDK/Models/Operations/PostTagsRequest.cs @@ -15,13 +15,13 @@ namespace SpeakeasySDK.Models.Operations public class PostTagsRequest { - [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name")] - public string NamespaceName { get; set; } = default!; - /// /// A JSON representation of the tags to add /// [SpeakeasyMetadata("request:mediaType=application/json")] public AddTags? AddTags { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name")] + public string NamespaceName { get; set; } = default!; } } \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/SetVisibilityRequest.cs b/src/SpeakeasySDK/Models/Operations/SetVisibilityRequest.cs index c1f7fcad..c17e0fa2 100644 --- a/src/SpeakeasySDK/Models/Operations/SetVisibilityRequest.cs +++ b/src/SpeakeasySDK/Models/Operations/SetVisibilityRequest.cs @@ -15,13 +15,13 @@ namespace SpeakeasySDK.Models.Operations public class SetVisibilityRequest { - [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name")] - public string NamespaceName { get; set; } = default!; - /// /// Namespace visibility /// [SpeakeasyMetadata("request:mediaType=application/json")] public SetVisibilityRequestBody? RequestBody { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name")] + public string NamespaceName { get; set; } = default!; } } \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/SuggestOpenAPIRegistryRequest.cs b/src/SpeakeasySDK/Models/Operations/SuggestOpenAPIRegistryRequest.cs index 7a659cca..d9a2a55c 100644 --- a/src/SpeakeasySDK/Models/Operations/SuggestOpenAPIRegistryRequest.cs +++ b/src/SpeakeasySDK/Models/Operations/SuggestOpenAPIRegistryRequest.cs @@ -15,6 +15,12 @@ namespace SpeakeasySDK.Models.Operations public class SuggestOpenAPIRegistryRequest { + /// + /// Suggest options + /// + [SpeakeasyMetadata("request:mediaType=application/json")] + public SuggestRequestBody? SuggestRequestBody { get; set; } + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name")] public string NamespaceName { get; set; } = default!; @@ -26,11 +32,5 @@ public class SuggestOpenAPIRegistryRequest [SpeakeasyMetadata("header:style=simple,explode=false,name=x-session-id")] public string XSessionId { get; set; } = default!; - - /// - /// Suggest options - /// - [SpeakeasyMetadata("request:mediaType=application/json")] - public SuggestRequestBody? SuggestRequestBody { get; set; } } } \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationRequest.cs b/src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationRequest.cs new file mode 100644 index 00000000..a85f5b52 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationRequest.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Utils; + + public class UpdatePublishingTokenExpirationRequest + { + + /// + /// The publishing token to update + /// + [SpeakeasyMetadata("request:mediaType=application/json")] + public UpdatePublishingTokenExpirationRequestBody? RequestBody { get; set; } + + /// + /// Unique identifier of the publishing token. + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tokenID")] + public string TokenID { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationRequestBody.cs b/src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationRequestBody.cs new file mode 100644 index 00000000..b450cc59 --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationRequestBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using Newtonsoft.Json; + using SpeakeasySDK.Utils; + using System; + + /// + /// The publishing token to update + /// + public class UpdatePublishingTokenExpirationRequestBody + { + + /// + /// The new name for the publishing token. + /// + [JsonProperty("token_name")] + public string? TokenName { get; set; } + + /// + /// The new expiration date for the publishing token. + /// + [JsonProperty("valid_until")] + public DateTime ValidUntil { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationResponse.cs b/src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationResponse.cs new file mode 100644 index 00000000..a6168f9c --- /dev/null +++ b/src/SpeakeasySDK/Models/Operations/UpdatePublishingTokenExpirationResponse.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Operations +{ + using SpeakeasySDK.Utils; + using System; + using System.Net.Http; + + public class UpdatePublishingTokenExpirationResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/ApiKeyDetails.cs b/src/SpeakeasySDK/Models/Shared/ApiKeyDetails.cs index 318112a8..7ef14fd4 100644 --- a/src/SpeakeasySDK/Models/Shared/ApiKeyDetails.cs +++ b/src/SpeakeasySDK/Models/Shared/ApiKeyDetails.cs @@ -21,6 +21,9 @@ public class ApiKeyDetails [JsonProperty("account_type_v2")] public AccountType AccountTypeV2 { get; set; } = default!; + [JsonProperty("billing_add_ons")] + public List BillingAddOns { get; set; } = default!; + [JsonProperty("enabled_features")] public List EnabledFeatures { get; set; } = default!; diff --git a/src/SpeakeasySDK/Models/Shared/BillingAddOn.cs b/src/SpeakeasySDK/Models/Shared/BillingAddOn.cs new file mode 100644 index 00000000..e6efd174 --- /dev/null +++ b/src/SpeakeasySDK/Models/Shared/BillingAddOn.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Shared +{ + using Newtonsoft.Json; + using SpeakeasySDK.Utils; + using System; + + public enum BillingAddOn + { + [JsonProperty("webhooks")] + Webhooks, + [JsonProperty("sdk_testing")] + SDKTesting, + [JsonProperty("custom_code_regions")] + CustomCodeRegions, + [JsonProperty("snippet_ai")] + SnippetAi, + } + + public static class BillingAddOnExtension + { + public static string Value(this BillingAddOn value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static BillingAddOn ToEnum(this string value) + { + foreach(var field in typeof(BillingAddOn).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is BillingAddOn) + { + return (BillingAddOn)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum BillingAddOn"); + } + } + +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/CliEvent.cs b/src/SpeakeasySDK/Models/Shared/CliEvent.cs index ecc30d78..c1182ff6 100644 --- a/src/SpeakeasySDK/Models/Shared/CliEvent.cs +++ b/src/SpeakeasySDK/Models/Shared/CliEvent.cs @@ -473,6 +473,12 @@ public class CliEvent [JsonProperty("success")] public bool Success { get; set; } = default!; + /// + /// The raw test report xml + /// + [JsonProperty("test_report_raw")] + public string? TestReportRaw { get; set; } + /// /// Workflow lock file (post execution) /// diff --git a/src/SpeakeasySDK/Models/Shared/CodeSampleSchemaInput.cs b/src/SpeakeasySDK/Models/Shared/CodeSampleSchemaInput.cs index 8beae2e8..e875fe85 100644 --- a/src/SpeakeasySDK/Models/Shared/CodeSampleSchemaInput.cs +++ b/src/SpeakeasySDK/Models/Shared/CodeSampleSchemaInput.cs @@ -17,16 +17,16 @@ public class CodeSampleSchemaInput { /// - /// A list of languages to generate code samples for + /// The language to generate code samples for /// - [SpeakeasyMetadata("multipartForm:name=languages")] - public List Languages { get; set; } = default!; + [SpeakeasyMetadata("multipartForm:name=language")] + public string Language { get; set; } = default!; /// - /// The OpenAPI file to be uploaded + /// A list of operations IDs to generate code samples for /// - [SpeakeasyMetadata("multipartForm:file,name=schema_file")] - public SchemaFile SchemaFile { get; set; } = default!; + [SpeakeasyMetadata("multipartForm:name=operation_ids")] + public List? OperationIds { get; set; } /// /// The name of the package @@ -34,6 +34,12 @@ public class CodeSampleSchemaInput [SpeakeasyMetadata("multipartForm:name=package_name")] public string? PackageName { get; set; } + /// + /// The OpenAPI file to be uploaded + /// + [SpeakeasyMetadata("multipartForm:file,name=schema_file")] + public SchemaFile SchemaFile { get; set; } = default!; + /// /// The SDK class name /// diff --git a/src/SpeakeasySDK/Models/Shared/Format.cs b/src/SpeakeasySDK/Models/Shared/Format.cs new file mode 100644 index 00000000..9bdaab90 --- /dev/null +++ b/src/SpeakeasySDK/Models/Shared/Format.cs @@ -0,0 +1,57 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Shared +{ + using Newtonsoft.Json; + using SpeakeasySDK.Utils; + using System; + + public enum Format + { + [JsonProperty("json")] + Json, + [JsonProperty("yaml")] + Yaml, + } + + public static class FormatExtension + { + public static string Value(this Format value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static Format ToEnum(this string value) + { + foreach(var field in typeof(Format).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is Format) + { + return (Format)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum Format"); + } + } + +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/GithubTriggerActionRequest.cs b/src/SpeakeasySDK/Models/Shared/GithubTriggerActionRequest.cs index 8ef9d700..634d6323 100644 --- a/src/SpeakeasySDK/Models/Shared/GithubTriggerActionRequest.cs +++ b/src/SpeakeasySDK/Models/Shared/GithubTriggerActionRequest.cs @@ -18,6 +18,12 @@ namespace SpeakeasySDK.Models.Shared public class GithubTriggerActionRequest { + /// + /// Force an SDK generation + /// + [JsonProperty("force")] + public bool? Force { get; set; } + /// /// The generation lock ID /// @@ -36,12 +42,6 @@ public class GithubTriggerActionRequest [JsonProperty("repo_name")] public string RepoName { get; set; } = default!; - /// - /// Force an SDK generation - /// - [JsonProperty("force")] - public bool? Force { get; set; } - /// /// A version to override the SDK too in workflow dispatch /// diff --git a/src/SpeakeasySDK/Models/Shared/InteractionType.cs b/src/SpeakeasySDK/Models/Shared/InteractionType.cs index 2cd15282..d7b1793e 100644 --- a/src/SpeakeasySDK/Models/Shared/InteractionType.cs +++ b/src/SpeakeasySDK/Models/Shared/InteractionType.cs @@ -40,6 +40,8 @@ public enum InteractionType Configure, [JsonProperty("PUBLISH")] Publish, + [JsonProperty("TEST")] + Test, } public static class InteractionTypeExtension diff --git a/src/SpeakeasySDK/Models/Shared/Namespace.cs b/src/SpeakeasySDK/Models/Shared/Namespace.cs index 5ab49c03..f4c9bdaa 100644 --- a/src/SpeakeasySDK/Models/Shared/Namespace.cs +++ b/src/SpeakeasySDK/Models/Shared/Namespace.cs @@ -20,6 +20,9 @@ namespace SpeakeasySDK.Models.Shared public class Namespace { + [JsonProperty("archived_at")] + public DateTime? ArchivedAt { get; set; } + [JsonProperty("composite_spec_metadata")] public CompositeSpecMetadata? CompositeSpecMetadata { get; set; } @@ -32,6 +35,9 @@ public class Namespace [JsonProperty("id")] public string Id { get; set; } = default!; + [JsonProperty("latest_revision_metadata")] + public RevisionContentsMetadata? LatestRevisionMetadata { get; set; } + /// /// A human-readable name for the namespace. /// diff --git a/src/SpeakeasySDK/Models/Shared/Organization.cs b/src/SpeakeasySDK/Models/Shared/Organization.cs index caf33647..1d329bc8 100644 --- a/src/SpeakeasySDK/Models/Shared/Organization.cs +++ b/src/SpeakeasySDK/Models/Shared/Organization.cs @@ -26,9 +26,15 @@ public class Organization [JsonProperty("created_at")] public DateTime CreatedAt { get; set; } = default!; + [JsonProperty("free_trial_expiry")] + public DateTime? FreeTrialExpiry { get; set; } = null; + [JsonProperty("id")] public string Id { get; set; } = default!; + [JsonProperty("internal")] + public bool? Internal { get; set; } + [JsonProperty("name")] public string Name { get; set; } = default!; @@ -38,19 +44,13 @@ public class Organization [JsonProperty("sso_activated")] public bool SsoActivated { get; set; } = default!; + [JsonProperty("sso_connection_id")] + public string? SsoConnectionId { get; set; } = null; + [JsonProperty("telemetry_disabled")] public bool TelemetryDisabled { get; set; } = default!; [JsonProperty("updated_at")] public DateTime UpdatedAt { get; set; } = default!; - - [JsonProperty("free_trial_expiry")] - public DateTime? FreeTrialExpiry { get; set; } = null; - - [JsonProperty("internal")] - public bool? Internal { get; set; } - - [JsonProperty("sso_connection_id")] - public string? SsoConnectionId { get; set; } = null; } } \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/OrganizationBillingAddOnRequest.cs b/src/SpeakeasySDK/Models/Shared/OrganizationBillingAddOnRequest.cs new file mode 100644 index 00000000..c5c56c4f --- /dev/null +++ b/src/SpeakeasySDK/Models/Shared/OrganizationBillingAddOnRequest.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Shared +{ + using Newtonsoft.Json; + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System.Collections.Generic; + + /// + /// A request to add billing add ons + /// + public class OrganizationBillingAddOnRequest + { + + [JsonProperty("add_ons")] + public List AddOns { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/OrganizationBillingAddOnResponse.cs b/src/SpeakeasySDK/Models/Shared/OrganizationBillingAddOnResponse.cs new file mode 100644 index 00000000..eaf04e90 --- /dev/null +++ b/src/SpeakeasySDK/Models/Shared/OrganizationBillingAddOnResponse.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Shared +{ + using Newtonsoft.Json; + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System.Collections.Generic; + + /// + /// Billing add on response + /// + public class OrganizationBillingAddOnResponse + { + + [JsonProperty("add_ons")] + public List AddOns { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/PublishingToken.cs b/src/SpeakeasySDK/Models/Shared/PublishingToken.cs new file mode 100644 index 00000000..67fb9869 --- /dev/null +++ b/src/SpeakeasySDK/Models/Shared/PublishingToken.cs @@ -0,0 +1,59 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Shared +{ + using Newtonsoft.Json; + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System; + + /// + /// A token used to publish to a target + /// + public class PublishingToken + { + + [JsonProperty("created_at")] + public DateTime CreatedAt { get; set; } = default!; + + [JsonProperty("created_by")] + public string CreatedBy { get; set; } = default!; + + [JsonProperty("id")] + public string Id { get; set; } = default!; + + [JsonProperty("organization_id")] + public string OrganizationId { get; set; } = default!; + + [JsonProperty("target_id")] + public string TargetId { get; set; } = default!; + + [JsonProperty("target_resource")] + public TargetResource TargetResource { get; set; } = default!; + + [JsonProperty("token")] + public string Token { get; set; } = default!; + + [JsonProperty("token_name")] + public string TokenName { get; set; } = default!; + + [JsonProperty("updated_at")] + public DateTime? UpdatedAt { get; set; } + + [JsonProperty("updated_by")] + public string? UpdatedBy { get; set; } + + [JsonProperty("valid_until")] + public DateTime ValidUntil { get; set; } = default!; + + [JsonProperty("workspace_id")] + public string WorkspaceId { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/Revision.cs b/src/SpeakeasySDK/Models/Shared/Revision.cs index e19a985b..3cda1aa7 100644 --- a/src/SpeakeasySDK/Models/Shared/Revision.cs +++ b/src/SpeakeasySDK/Models/Shared/Revision.cs @@ -10,6 +10,7 @@ namespace SpeakeasySDK.Models.Shared { using Newtonsoft.Json; + using SpeakeasySDK.Models.Shared; using SpeakeasySDK.Utils; using System; using System.Collections.Generic; @@ -17,6 +18,9 @@ namespace SpeakeasySDK.Models.Shared public class Revision { + [JsonProperty("contents_metadata")] + public RevisionContentsMetadata? ContentsMetadata { get; set; } + [JsonProperty("created_at")] public DateTime CreatedAt { get; set; } = default!; diff --git a/src/SpeakeasySDK/Models/Shared/RevisionContentsMetadata.cs b/src/SpeakeasySDK/Models/Shared/RevisionContentsMetadata.cs new file mode 100644 index 00000000..c282b51f --- /dev/null +++ b/src/SpeakeasySDK/Models/Shared/RevisionContentsMetadata.cs @@ -0,0 +1,93 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Shared +{ + using Newtonsoft.Json; + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System; + using System.Collections.Generic; + + public class RevisionContentsMetadata + { + + /// + /// Whether the OAS contains code samples. + /// + [JsonProperty("contains_code_samples")] + public bool ContainsCodeSamples { get; set; } = default!; + + [JsonProperty("created_at")] + public DateTime CreatedAt { get; set; } = default!; + + /// + /// The OAS description + /// + [JsonProperty("description")] + public string Description { get; set; } = default!; + + /// + /// The hash of the contents + /// + [JsonProperty("hash")] + public string Hash { get; set; } = default!; + + /// + /// The fully qualified namespace + /// + [JsonProperty("namespace")] + public string Namespace { get; set; } = default!; + + /// + /// The number of overlay actions in the OAS. Will be 0 if the OAS is not an overlay. + /// + [JsonProperty("num_overlay_actions")] + public long NumOverlayActions { get; set; } = default!; + + /// + /// The operation IDs contained in the OAS. Will be empty if the OAS is an overlay. + /// + [JsonProperty("operation_ids")] + public List OperationIds { get; set; } = default!; + + /// + /// The digest of the parent bundle + /// + [JsonProperty("revision_digest")] + public string RevisionDigest { get; set; } = default!; + + /// + /// The tags contained in the OAS -- NOT the OCI tags. Will be empty if the OAS is an overlay. + /// + [JsonProperty("tags")] + public List Tags { get; set; } = default!; + + /// + /// The OAS title + /// + [JsonProperty("title")] + public string Title { get; set; } = default!; + + [JsonProperty("type")] + public RevisionContentsMetadataType Type { get; set; } = default!; + + /// + /// The OAS version + /// + [JsonProperty("version")] + public string Version { get; set; } = default!; + + /// + /// The workspace ID + /// + [JsonProperty("workspace_id")] + public string WorkspaceId { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/RevisionContentsMetadataType.cs b/src/SpeakeasySDK/Models/Shared/RevisionContentsMetadataType.cs new file mode 100644 index 00000000..fe811667 --- /dev/null +++ b/src/SpeakeasySDK/Models/Shared/RevisionContentsMetadataType.cs @@ -0,0 +1,57 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Shared +{ + using Newtonsoft.Json; + using SpeakeasySDK.Utils; + using System; + + public enum RevisionContentsMetadataType + { + [JsonProperty("OPENAPI_BUNDLE")] + OpenapiBundle, + [JsonProperty("OPENAPI_OVERLAY")] + OpenapiOverlay, + } + + public static class RevisionContentsMetadataTypeExtension + { + public static string Value(this RevisionContentsMetadataType value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static RevisionContentsMetadataType ToEnum(this string value) + { + foreach(var field in typeof(RevisionContentsMetadataType).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is RevisionContentsMetadataType) + { + return (RevisionContentsMetadataType)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum RevisionContentsMetadataType"); + } + } + +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/SchemaStoreItem.cs b/src/SpeakeasySDK/Models/Shared/SchemaStoreItem.cs new file mode 100644 index 00000000..ddd7a4a9 --- /dev/null +++ b/src/SpeakeasySDK/Models/Shared/SchemaStoreItem.cs @@ -0,0 +1,38 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Shared +{ + using Newtonsoft.Json; + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using System; + + public class SchemaStoreItem + { + + [JsonProperty("created_at")] + public DateTime CreatedAt { get; set; } = default!; + + [JsonProperty("format")] + public Models.Shared.Format Format { get; set; } = default!; + + [JsonProperty("id")] + public string Id { get; set; } = default!; + + [JsonProperty("packageName")] + public string PackageName { get; set; } = default!; + + [JsonProperty("sdkClassname")] + public string SDKClassname { get; set; } = default!; + + [JsonProperty("spec")] + public string Spec { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/TargetResource.cs b/src/SpeakeasySDK/Models/Shared/TargetResource.cs new file mode 100644 index 00000000..f32f08b3 --- /dev/null +++ b/src/SpeakeasySDK/Models/Shared/TargetResource.cs @@ -0,0 +1,55 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK.Models.Shared +{ + using Newtonsoft.Json; + using SpeakeasySDK.Utils; + using System; + + public enum TargetResource + { + [JsonProperty("document")] + Document, + } + + public static class TargetResourceExtension + { + public static string Value(this TargetResource value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static TargetResource ToEnum(this string value) + { + foreach(var field in typeof(TargetResource).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is TargetResource) + { + return (TargetResource)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum TargetResource"); + } + } + +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/UsageSnippet.cs b/src/SpeakeasySDK/Models/Shared/UsageSnippet.cs index 36e1ab57..4544b1c8 100644 --- a/src/SpeakeasySDK/Models/Shared/UsageSnippet.cs +++ b/src/SpeakeasySDK/Models/Shared/UsageSnippet.cs @@ -27,10 +27,22 @@ public class UsageSnippet [JsonProperty("language")] public string Language { get; set; } = default!; + /// + /// The HTTP method of the operation + /// + [JsonProperty("method")] + public object Method { get; set; } = default!; + /// /// The operation ID for the snippet /// [JsonProperty("operationId")] public string OperationId { get; set; } = default!; + + /// + /// The path of the operation + /// + [JsonProperty("path")] + public string Path { get; set; } = default!; } } \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/User.cs b/src/SpeakeasySDK/Models/Shared/User.cs index 990b3fb9..62882538 100644 --- a/src/SpeakeasySDK/Models/Shared/User.cs +++ b/src/SpeakeasySDK/Models/Shared/User.cs @@ -64,6 +64,12 @@ public class User [JsonProperty("github_handle")] public string? GithubHandle { get; set; } = null; + /// + /// Indicates whether the user has created an API key. Not always populated + /// + [JsonProperty("has_created_api_key")] + public bool? HasCreatedApiKey { get; set; } + /// /// Unique identifier for the user. /// @@ -88,6 +94,12 @@ public class User [JsonProperty("photo_url")] public string? PhotoUrl { get; set; } = null; + /// + /// Hash used for pylon identity verification returned on v1/user. + /// + [JsonProperty("pylon_identity_hash")] + public string? PylonIdentityHash { get; set; } + /// /// Timestamp of the user's last update. /// diff --git a/src/SpeakeasySDK/Models/Shared/Workspace.cs b/src/SpeakeasySDK/Models/Shared/Workspace.cs index 26b6d1d5..7c28f0f8 100644 --- a/src/SpeakeasySDK/Models/Shared/Workspace.cs +++ b/src/SpeakeasySDK/Models/Shared/Workspace.cs @@ -25,6 +25,9 @@ public class Workspace [JsonProperty("id")] public string Id { get; set; } = default!; + [JsonProperty("inactive")] + public bool? Inactive { get; set; } + [JsonProperty("name")] public string Name { get; set; } = default!; @@ -34,20 +37,17 @@ public class Workspace [JsonProperty("slug")] public string Slug { get; set; } = default!; - [JsonProperty("updated_at")] - public DateTime UpdatedAt { get; set; } = default!; - - [JsonProperty("verified")] - public bool Verified { get; set; } = default!; - - [JsonProperty("inactive")] - public bool? Inactive { get; set; } - /// /// Deprecated. Use organization.telemetry_disabled instead. /// [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("telemetry_disabled")] public bool? TelemetryDisabled { get; set; } + + [JsonProperty("updated_at")] + public DateTime UpdatedAt { get; set; } = default!; + + [JsonProperty("verified")] + public bool Verified { get; set; } = default!; } } \ No newline at end of file diff --git a/src/SpeakeasySDK/Models/Shared/WorkspaceToken.cs b/src/SpeakeasySDK/Models/Shared/WorkspaceToken.cs index 4c6b27ac..7dfc7140 100644 --- a/src/SpeakeasySDK/Models/Shared/WorkspaceToken.cs +++ b/src/SpeakeasySDK/Models/Shared/WorkspaceToken.cs @@ -28,6 +28,12 @@ public class WorkspaceToken [JsonProperty("created_by")] public string? CreatedBy { get; set; } = null; + [JsonProperty("created_by_name")] + public string? CreatedByName { get; set; } = null; + + [JsonProperty("created_by_photo_url")] + public string? CreatedByPhotoUrl { get; set; } = null; + [JsonProperty("email")] public string? Email { get; set; } = null; diff --git a/src/SpeakeasySDK/Organizations.cs b/src/SpeakeasySDK/Organizations.cs index e1a3903c..7eb1d33b 100644 --- a/src/SpeakeasySDK/Organizations.cs +++ b/src/SpeakeasySDK/Organizations.cs @@ -37,6 +37,11 @@ public interface IOrganizations /// Task CreateAsync(Organization request); + /// + /// Create billing add ons + /// + Task CreateBillingAddOnsAsync(OrganizationBillingAddOnRequest request); + /// /// Create a free trial for an organization /// @@ -46,6 +51,11 @@ public interface IOrganizations /// Task CreateFreeTrialAsync(); + /// + /// Delete billing add ons + /// + Task DeleteBillingAddOnAsync(DeleteBillingAddOnRequest request); + /// /// Get organization /// @@ -64,6 +74,11 @@ public interface IOrganizations /// Task GetAllAsync(); + /// + /// Get billing add ons + /// + Task GetBillingAddOnsAsync(); + /// /// Get billing usage summary for a particular organization /// @@ -81,10 +96,10 @@ public class Organizations: IOrganizations { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -117,7 +132,7 @@ public async Task CreateAsync(Organization request) httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("createOrganization", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "createOrganization", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -188,6 +203,97 @@ public async Task CreateAsync(Organization request) throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + public async Task CreateBillingAddOnsAsync(OrganizationBillingAddOnRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + + var urlString = baseUrl + "/v1/organization/add_ons"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "Request", "json", false, false); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "createBillingAddOns", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new CreateBillingAddOnsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.OrganizationBillingAddOnResponse = obj; + return response; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + public async Task CreateFreeTrialAsync() { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); @@ -202,7 +308,7 @@ public async Task CreateFreeTrialAsync() httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("createFreeTrial", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "createFreeTrial", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -265,6 +371,82 @@ public async Task CreateFreeTrialAsync() throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + public async Task DeleteBillingAddOnAsync(DeleteBillingAddOnRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/v1/organization/add_ons/{add_on}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "deleteBillingAddOn", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new DeleteBillingAddOnResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + public async Task GetAsync(GetOrganizationRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); @@ -278,7 +460,7 @@ public async Task GetAsync(GetOrganizationRequest reque httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getOrganization", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getOrganization", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -363,7 +545,7 @@ public async Task GetAllAsync() httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getOrganizations", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getOrganizations", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -434,6 +616,91 @@ public async Task GetAllAsync() throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + public async Task GetBillingAddOnsAsync() + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + + var urlString = baseUrl + "/v1/organization/add_ons"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "getBillingAddOns", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetBillingAddOnsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.OrganizationBillingAddOnResponse = obj; + return response; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + public async Task GetUsageAsync() { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); @@ -448,7 +715,7 @@ public async Task GetUsageAsync() httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getOrganizationUsage", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getOrganizationUsage", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); diff --git a/src/SpeakeasySDK/PublishingTokens.cs b/src/SpeakeasySDK/PublishingTokens.cs new file mode 100644 index 00000000..3f8f988a --- /dev/null +++ b/src/SpeakeasySDK/PublishingTokens.cs @@ -0,0 +1,697 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK +{ + using Newtonsoft.Json; + using SpeakeasySDK.Hooks; + using SpeakeasySDK.Models.Errors; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using SpeakeasySDK.Utils.Retries; + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Threading.Tasks; + + public interface IPublishingTokens + { + + /// + /// Create a publishing token for a workspace + /// + /// + /// Creates a publishing token for the current workspace + /// + /// + Task CreateAsync(CreatePublishingTokenRequestBody? request = null); + + /// + /// Delete a specific publishing token + /// + /// + /// Delete a particular publishing token. + /// + /// + Task DeleteAsync(DeletePublishingTokenRequest request); + + /// + /// Get a specific publishing token + /// + /// + /// Get information about a particular publishing token. + /// + /// + Task GetAsync(GetPublishingTokenByIDRequest request); + + /// + /// Get publishing tokens for a workspace + /// + /// + /// Returns a publishing token for the current workspace + /// + /// + Task ListAsync(); + + /// + /// Get metadata about the token + /// + /// + /// Get information about a particular publishing token. + /// + /// + Task ResolveMetadataAsync(GetPublishingTokenPublicMetadataRequest request); + + /// + /// Get a specific publishing token target + /// + /// + /// Get information about a particular publishing token target. + /// + /// + Task ResolveTargetAsync(GetPublishingTokenTargetByIDRequest request); + + /// + /// Updates the validitity period of a publishing token + /// + /// + /// Updates the validity period of a particular publishing token. + /// + /// + Task UpdateAsync(UpdatePublishingTokenExpirationRequest request); + } + + public class PublishingTokens: IPublishingTokens + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; + private const string _openapiDocVersion = "0.4.0"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _client; + private Func? _securitySource; + + public PublishingTokens(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) + { + _client = client; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task CreateAsync(CreatePublishingTokenRequestBody? request = null) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + + var urlString = baseUrl + "/v1/publishing-tokens"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "Request", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "createPublishingToken", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + var response = new CreatePublishingTokenResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PublishingToken = obj; + return response; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + public async Task DeleteAsync(DeletePublishingTokenRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/v1/publishing-tokens/{tokenID}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "deletePublishingToken", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new DeletePublishingTokenResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + public async Task GetAsync(GetPublishingTokenByIDRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/v1/publishing-tokens/{tokenID}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "getPublishingTokenByID", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetPublishingTokenByIDResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PublishingToken = obj; + return response; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + public async Task ListAsync() + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + + var urlString = baseUrl + "/v1/publishing-tokens"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "getPublishingToken", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetPublishingTokenResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Classes = obj; + return response; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + public async Task ResolveMetadataAsync(GetPublishingTokenPublicMetadataRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/v1/publishing-tokens/{tokenID}/metadata", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "getPublishingTokenPublicMetadata", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetPublishingTokenPublicMetadataResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + public async Task ResolveTargetAsync(GetPublishingTokenTargetByIDRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/v1/publishing-tokens/{tokenID}/target", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "getPublishingTokenTargetByID", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("text/plain", contentType)) + { + var response = new GetPublishingTokenTargetByIDResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Res = await httpResponse.Content.ReadAsStringAsync(); + return response; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + public async Task UpdateAsync(UpdatePublishingTokenExpirationRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/v1/publishing-tokens/{tokenID}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "updatePublishingTokenExpiration", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new UpdatePublishingTokenExpirationResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/Reports.cs b/src/SpeakeasySDK/Reports.cs index 1f287cac..1160a990 100644 --- a/src/SpeakeasySDK/Reports.cs +++ b/src/SpeakeasySDK/Reports.cs @@ -51,10 +51,10 @@ public class Reports: IReports { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -80,7 +80,7 @@ public async Task GetChangesReportSignedUrlAs httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getChangesReportSignedUrl", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getChangesReportSignedUrl", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -133,7 +133,11 @@ public async Task GetChangesReportSignedUrlAs throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) { throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } @@ -154,7 +158,7 @@ public async Task GetLintingReportSignedUrlAs httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getLintingReportSignedUrl", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getLintingReportSignedUrl", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -207,7 +211,11 @@ public async Task GetLintingReportSignedUrlAs throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) { throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } @@ -235,7 +243,7 @@ public async Task UploadReportAsync(UploadReportRequestBod httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("uploadReport", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "uploadReport", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -288,7 +296,11 @@ public async Task UploadReportAsync(UploadReportRequestBod throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) { throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } diff --git a/src/SpeakeasySDK/SDK.cs b/src/SpeakeasySDK/SDK.cs index a41cac0a..6f5aec11 100644 --- a/src/SpeakeasySDK/SDK.cs +++ b/src/SpeakeasySDK/SDK.cs @@ -52,11 +52,13 @@ public interface ISDK /// REST APIs for managing Organizations (speakeasy L1 Tenancy construct) /// public IOrganizations Organizations { get; } + public IPublishingTokens PublishingTokens { get; } /// /// REST APIs for managing reports (lint reports, change reports, etc) /// public IReports Reports { get; } + public ISchemaStore SchemaStore { get; } /// /// REST APIs for managing short URLs @@ -149,10 +151,10 @@ public class SDK: ISDK public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private SDKConfig.Server? _server = null; private ISpeakeasyHttpClient _client; @@ -162,7 +164,9 @@ public class SDK: ISDK public ICodeSamples CodeSamples { get; private set; } public IGithub Github { get; private set; } public IOrganizations Organizations { get; private set; } + public IPublishingTokens PublishingTokens { get; private set; } public IReports Reports { get; private set; } + public ISchemaStore SchemaStore { get; private set; } public IShortURLs ShortURLs { get; private set; } public ISubscriptions Subscriptions { get; private set; } public ISuggest Suggest { get; private set; } @@ -222,9 +226,15 @@ public SDK(SpeakeasySDK.Models.Shared.Security? security = null, Func +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace SpeakeasySDK +{ + using Newtonsoft.Json; + using SpeakeasySDK.Hooks; + using SpeakeasySDK.Models.Errors; + using SpeakeasySDK.Models.Operations; + using SpeakeasySDK.Models.Shared; + using SpeakeasySDK.Utils; + using SpeakeasySDK.Utils.Retries; + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Threading.Tasks; + + public interface ISchemaStore + { + + /// + /// Create a schema in the schema store + /// + Task CreateSchemaStoreItemAsync(CreateSchemaStoreItemRequestBody request); + + /// + /// Get a OAS schema from the schema store + /// + Task GetSchemaStoreItemAsync(GetSchemaStoreItemRequestBody? request = null); + } + + public class SchemaStore: ISchemaStore + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; + private const string _openapiDocVersion = "0.4.0"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _client; + private Func? _securitySource; + + public SchemaStore(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) + { + _client = client; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task CreateSchemaStoreItemAsync(CreateSchemaStoreItemRequestBody request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + + var urlString = baseUrl + "/v1/schema_store"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "Request", "json", false, false); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "createSchemaStoreItem", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode >= 200 && responseStatusCode < 300) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new CreateSchemaStoreItemResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.SchemaStoreItem = obj; + return response; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + public async Task GetSchemaStoreItemAsync(GetSchemaStoreItemRequestBody? request = null) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + + var urlString = baseUrl + "/v1/schema_store"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "Request", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(baseUrl, "getSchemaStoreItem", new List { }, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode >= 200 && responseStatusCode < 300) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + var response = new GetSchemaStoreItemResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.SchemaStoreItem = obj; + return response; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } +} \ No newline at end of file diff --git a/src/SpeakeasySDK/ShortURLs.cs b/src/SpeakeasySDK/ShortURLs.cs index 65c3f711..07e13668 100644 --- a/src/SpeakeasySDK/ShortURLs.cs +++ b/src/SpeakeasySDK/ShortURLs.cs @@ -41,10 +41,10 @@ public class ShortURLs: IShortURLs { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -77,7 +77,7 @@ public async Task CreateAsync(CreateRequestBody request) httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("create", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "create", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -130,7 +130,11 @@ public async Task CreateAsync(CreateRequestBody request) throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) { throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } diff --git a/src/SpeakeasySDK/SpeakeasySDK.csproj b/src/SpeakeasySDK/SpeakeasySDK.csproj index 142f8a2a..bb7026f2 100644 --- a/src/SpeakeasySDK/SpeakeasySDK.csproj +++ b/src/SpeakeasySDK/SpeakeasySDK.csproj @@ -3,7 +3,7 @@ true SpeakeasySDK - 5.12.0 + 5.13.0 net8.0 Speakeasy Copyright (c) Speakeasy 2025 diff --git a/src/SpeakeasySDK/Subscriptions.cs b/src/SpeakeasySDK/Subscriptions.cs index b2dcdbc7..4527b18b 100644 --- a/src/SpeakeasySDK/Subscriptions.cs +++ b/src/SpeakeasySDK/Subscriptions.cs @@ -46,10 +46,10 @@ public class Subscriptions: ISubscriptions { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -75,7 +75,7 @@ public async Task ActivateSubscriptionNam httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("activateSubscriptionNamespace", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "activateSubscriptionNamespace", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -151,7 +151,7 @@ public async Task IgnoreSubscriptionNamespa httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("ignoreSubscriptionNamespace", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "ignoreSubscriptionNamespace", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); diff --git a/src/SpeakeasySDK/Suggest.cs b/src/SpeakeasySDK/Suggest.cs index 241b4dfd..f913a031 100644 --- a/src/SpeakeasySDK/Suggest.cs +++ b/src/SpeakeasySDK/Suggest.cs @@ -68,10 +68,10 @@ public class Suggest: ISuggest { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -105,7 +105,7 @@ public async Task SuggestAsync(SuggestRequest request) httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("suggest", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "suggest", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -157,7 +157,11 @@ public async Task SuggestAsync(SuggestRequest request) throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) { throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } @@ -185,7 +189,7 @@ public async Task SuggestItemsAsync(SuggestItemsRequestBod httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("suggestItems", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "suggestItems", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -238,7 +242,11 @@ public async Task SuggestItemsAsync(SuggestItemsRequestBod throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) { throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } @@ -267,7 +275,7 @@ public async Task SuggestOpenAPIAsync(SuggestOpenAPIRequ httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("suggestOpenAPI", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "suggestOpenAPI", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -319,7 +327,11 @@ public async Task SuggestOpenAPIAsync(SuggestOpenAPIRequ throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) { throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } @@ -347,7 +359,7 @@ public async Task SuggestOpenAPIRegistryAsync(Su httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("suggestOpenAPIRegistry", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "suggestOpenAPIRegistry", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -399,7 +411,11 @@ public async Task SuggestOpenAPIRegistryAsync(Su throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) { throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } diff --git a/src/SpeakeasySDK/Utils/SecurityMetadata.cs b/src/SpeakeasySDK/Utils/SecurityMetadata.cs index d6f5982f..dafd3717 100644 --- a/src/SpeakeasySDK/Utils/SecurityMetadata.cs +++ b/src/SpeakeasySDK/Utils/SecurityMetadata.cs @@ -196,6 +196,8 @@ object value case "bearer": headerParams.Add(key, Utilities.PrefixBearer(valStr)); break; + case "custom": + break; default: throw new Exception($"Unknown http subType: {schemeMetadata.SubType}"); } diff --git a/src/SpeakeasySDK/Workspaces.cs b/src/SpeakeasySDK/Workspaces.cs index e390c6b2..b9598a34 100644 --- a/src/SpeakeasySDK/Workspaces.cs +++ b/src/SpeakeasySDK/Workspaces.cs @@ -139,10 +139,10 @@ public class Workspaces: IWorkspaces { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.12.0"; - private const string _sdkGenVersion = "2.493.4"; + private const string _sdkVersion = "5.13.0"; + private const string _sdkGenVersion = "2.593.4"; private const string _openapiDocVersion = "0.4.0"; - private const string _userAgent = "speakeasy-sdk/csharp 5.12.0 2.493.4 0.4.0 SpeakeasySDK"; + private const string _userAgent = "speakeasy-sdk/csharp 5.13.0 2.593.4 0.4.0 SpeakeasySDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -175,7 +175,7 @@ public async Task CreateAsync(Workspace request) httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("createWorkspace", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "createWorkspace", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -271,7 +271,7 @@ public async Task CreateTokenAsync(CreateWorkspace httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("createWorkspaceToken", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "createWorkspaceToken", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -353,7 +353,7 @@ public async Task DeleteTokenAsync(DeleteWorkspace httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("deleteWorkspaceToken", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "deleteWorkspaceToken", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -430,7 +430,7 @@ public async Task GetAsync() httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspaceByContext", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspaceByContext", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -515,7 +515,7 @@ public async Task GetAllAsync() httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspaces", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspaces", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -601,7 +601,7 @@ public async Task GetByIDAsync(GetWorkspaceRequest? reques httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspace", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspace", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -687,7 +687,7 @@ public async Task GetFeatureFlagsAsync(GetWork httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspaceFeatureFlags", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspaceFeatureFlags", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -773,7 +773,7 @@ public async Task GetSettingsAsync(GetWorkspaceSet httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspaceSettings", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspaceSettings", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -859,7 +859,7 @@ public async Task GetTeamAsync(GetWorkspaceTeamRequest httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspaceTeam", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspaceTeam", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -945,7 +945,7 @@ public async Task GetTokensAsync(GetWorkspaceTokensR httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWorkspaceTokens", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "getWorkspaceTokens", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -1035,7 +1035,7 @@ public async Task GrantAccessAsync(GrantUser httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("grantUserAccessToWorkspace", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "grantUserAccessToWorkspace", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -1125,7 +1125,7 @@ public async Task RevokeAccessAsync(RevokeU httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("revokeUserAccessToWorkspace", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "revokeUserAccessToWorkspace", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -1208,7 +1208,7 @@ public async Task SetFeatureFlagsAsync(Workspa httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("setWorkspaceFeatureFlags", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "setWorkspaceFeatureFlags", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -1304,7 +1304,7 @@ public async Task UpdateAsync(UpdateWorkspaceDet httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("updateWorkspaceDetails", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "updateWorkspaceDetails", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -1392,7 +1392,7 @@ public async Task UpdateSettingsAsync(UpdateWor httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("updateWorkspaceSettings", null, _securitySource); + var hookCtx = new HookContext(baseUrl, "updateWorkspaceSettings", new List { }, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);