From 25ab079315bee874e14063a2b6da0ec553999acc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 14:51:52 +0100 Subject: [PATCH] ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.274.1 (#262) Co-authored-by: speakeasybot --- platform/.speakeasy/gen.lock | 463 +++++++++-------- .../{CodatPlatform.sln => Codat.Platform.sln} | 2 +- .../Platform/Codat.Platform.csproj} | 2 +- .../Platform}/CodatPlatform.cs | 92 +++- .../Platform}/Companies.cs | 275 +++++----- .../Codat/Platform/ConnectionManagement.cs | 127 +++++ platform/Codat/Platform/Connections.cs | 473 ++++++++++++++++++ platform/Codat/Platform/CorsSettings.cs | 200 ++++++++ .../Platform}/CustomDataType.cs | 229 +++++---- .../Platform}/Groups.cs | 221 ++++---- platform/Codat/Platform/Integrations.cs | 258 ++++++++++ .../Platform/Models/Errors}/ErrorMessage.cs | 10 +- .../Platform/Models/Errors/SDKException.cs | 42 ++ .../Operations/AddCompanyToGroupRequest.cs | 0 .../Operations/AddCompanyToGroupResponse.cs | 6 +- .../ConfigureCustomDataTypeRequest.cs | 0 .../ConfigureCustomDataTypeResponse.cs | 6 +- .../ConfigureSupplementalDataRequest.cs | 1 + .../ConfigureSupplementalDataResponse.cs | 7 +- .../Models/Operations/CreateApiKeyResponse.cs | 8 +- .../Operations/CreateCompanyResponse.cs | 6 +- .../Operations/CreateConnectionRequest.cs | 1 + .../Operations/CreateConnectionRequestBody.cs | 1 + .../Operations/CreateConnectionResponse.cs | 6 +- .../Models/Operations/CreateGroupResponse.cs | 6 +- .../Models/Operations/CreateRuleResponse.cs | 6 +- .../CreateWebhookConsumerResponse.cs | 6 +- .../Platform}/Models/Operations/DataType.cs | 1 + .../Models/Operations/DeleteApiKeyRequest.cs | 0 .../Models/Operations/DeleteApiKeyResponse.cs | 3 +- .../Models/Operations/DeleteCompanyRequest.cs | 0 .../Operations/DeleteCompanyResponse.cs | 7 +- .../Operations/DeleteConnectionRequest.cs | 0 .../Operations/DeleteConnectionResponse.cs | 7 +- .../DeleteWebhookConsumerRequest.cs | 0 .../DeleteWebhookConsumerResponse.cs | 7 +- .../Operations/GetCompanyDataStatusRequest.cs | 0 .../GetCompanyDataStatusResponse.cs | 9 +- .../GetCompanyPushHistoryRequest.cs | 4 +- .../GetCompanyPushHistoryResponse.cs | 6 +- .../Models/Operations/GetCompanyRequest.cs | 0 .../Models/Operations/GetCompanyResponse.cs | 6 +- ...tConnectionManagementAccessTokenRequest.cs | 24 + ...ConnectionManagementAccessTokenResponse.cs | 41 ++ ...onnectionManagementCorsSettingsResponse.cs | 41 ++ .../Models/Operations/GetConnectionRequest.cs | 0 .../Operations/GetConnectionResponse.cs | 6 +- ...eateUpdateModelOptionsByDataTypeRequest.cs | 0 ...ateUpdateModelOptionsByDataTypeResponse.cs | 6 +- .../GetCustomDataTypeConfigurationRequest.cs | 0 .../GetCustomDataTypeConfigurationResponse.cs | 6 +- .../Operations/GetIntegrationRequest.cs | 0 .../Operations/GetIntegrationResponse.cs | 6 +- .../GetIntegrationsBrandingRequest.cs | 0 .../GetIntegrationsBrandingResponse.cs | 6 +- .../Models/Operations/GetProfileResponse.cs | 6 +- .../GetProfileSyncSettingsResponse.cs | 6 +- .../Operations/GetPullOperationRequest.cs | 0 .../Operations/GetPullOperationResponse.cs | 6 +- .../Operations/GetPushOperationRequest.cs | 0 .../Operations/GetPushOperationResponse.cs | 6 +- ...GetSupplementalDataConfigurationRequest.cs | 1 + ...etSupplementalDataConfigurationResponse.cs | 6 +- .../Models/Operations/GetWebhookRequest.cs | 0 .../Models/Operations/GetWebhookResponse.cs | 6 +- .../Models/Operations/ListApiKeysResponse.cs | 6 +- .../Models/Operations/ListCompaniesRequest.cs | 4 +- .../Operations/ListCompaniesResponse.cs | 6 +- .../Operations/ListConnectionsRequest.cs | 4 +- .../Operations/ListConnectionsResponse.cs | 6 +- .../ListCustomDataTypeRecordsRequest.cs | 4 +- .../ListCustomDataTypeRecordsResponse.cs | 6 +- .../Models/Operations/ListGroupsResponse.cs | 6 +- .../Operations/ListIntegrationsRequest.cs | 4 +- .../Operations/ListIntegrationsResponse.cs | 6 +- .../Operations/ListPullOperationsRequest.cs | 4 +- .../Operations/ListPullOperationsResponse.cs | 6 +- .../Models/Operations/ListRulesRequest.cs | 4 +- .../Models/Operations/ListRulesResponse.cs | 6 +- .../ListWebhookConsumersResponse.cs | 6 +- .../Models/Operations/PathParamDataType.cs | 1 + .../Operations/RefreshCompanyDataRequest.cs | 0 .../Operations/RefreshCompanyDataResponse.cs | 7 +- .../RefreshCustomDataTypeRequest.cs | 0 .../RefreshCustomDataTypeResponse.cs | 6 +- .../Operations/RefreshDataTypeRequest.cs | 0 .../Operations/RefreshDataTypeResponse.cs | 6 +- .../RemoveCompanyFromGroupRequest.cs | 0 .../RemoveCompanyFromGroupResponse.cs | 7 +- ...onnectionManagementCorsSettingsResponse.cs | 41 ++ .../Operations/UnlinkConnectionRequest.cs | 0 .../Operations/UnlinkConnectionResponse.cs | 6 +- .../Models/Operations/UpdateCompanyRequest.cs | 0 .../Operations/UpdateCompanyResponse.cs | 6 +- .../UpdateConnectionAuthorizationRequest.cs | 0 .../UpdateConnectionAuthorizationResponse.cs | 6 +- .../Operations/UpdateProfileResponse.cs | 6 +- .../UpdateProfileSyncSettingsRequestBody.cs | 3 +- .../UpdateProfileSyncSettingsResponse.cs | 7 +- .../Platform}/Models/Shared/ApiKeyDetails.cs | 3 +- .../Platform}/Models/Shared/ApiKeys.cs | 2 + .../Platform}/Models/Shared/Branding.cs | 2 + .../Platform}/Models/Shared/BrandingButton.cs | 2 + .../Platform}/Models/Shared/BrandingImage.cs | 2 + .../Platform}/Models/Shared/BrandingLogo.cs | 2 + .../Shared/ClientRateLimitReachedWebhook.cs | 4 + .../ClientRateLimitReachedWebhookData.cs | 1 + .../Shared/ClientRateLimitResetWebhook.cs | 4 + .../Shared/ClientRateLimitResetWebhookData.cs | 3 +- .../Platform}/Models/Shared/Companies.cs | 2 + .../Platform}/Models/Shared/Company.cs | 2 + .../Models/Shared/CompanyGroupAssignment.cs | 1 + .../Models/Shared/CompanyRequestBody.cs | 2 + .../Platform}/Models/Shared/Connection.cs | 2 + .../Shared/ConnectionManagementAccessToken.cs | 25 + .../ConnectionManagementAllowedOrigins.cs | 26 + .../Shared/ConnectionStatusChangedWebhook.cs | 4 + .../ConnectionStatusChangedWebhookData.cs | 2 + .../Platform}/Models/Shared/Connections.cs | 2 + .../Platform}/Models/Shared/Content.cs | 1 + .../Platform}/Models/Shared/CreateApiKey.cs | 3 +- .../Platform}/Models/Shared/CreateRule.cs | 2 + .../Shared/CustomDataTypeConfiguration.cs | 3 +- .../Models/Shared/CustomDataTypeRecord.cs | 2 + .../Models/Shared/CustomDataTypeRecords.cs | 2 + .../Models/Shared/DataConnectionError.cs | 1 + .../Models/Shared/DataConnectionStatus.cs | 1 + .../Platform}/Models/Shared/DataStatus.cs | 6 +- .../Platform/Models/Shared/DataStatuses.cs | 278 ++++++++++ .../Models/Shared/DataSyncCompletedWebhook.cs | 4 + .../Shared/DataSyncCompletedWebhookData.cs | 2 + .../Platform}/Models/Shared/DataType.cs | 1 + .../Models/Shared/DataTypeFeature.cs | 2 + .../Platform}/Models/Shared/DataTypes.cs | 1 + .../Shared/DatasetDataChangedWebhook.cs | 4 + .../Shared/DatasetDataChangedWebhookData.cs | 2 + .../Platform/Models/Shared/DatasetStatus.cs | 99 ++++ .../DatasetStatusChangedErrorWebhook.cs | 4 + .../DatasetStatusChangedErrorWebhookData.cs | 2 + .../Models/Shared/ErrorValidation.cs | 6 +- .../Models/Shared/ErrorValidationItem.cs | 7 +- .../Platform}/Models/Shared/FeatureState.cs | 1 + .../Platform}/Models/Shared/FeatureType.cs | 1 + .../Platform}/Models/Shared/Group.cs | 1 + .../Platform}/Models/Shared/GroupPrototype.cs | 1 + .../Platform}/Models/Shared/GroupRef.cs | 1 + .../Platform}/Models/Shared/Groups.cs | 2 + .../Platform}/Models/Shared/HalRef.cs | 1 + .../Platform}/Models/Shared/ImageReference.cs | 1 + .../Platform}/Models/Shared/Integration.cs | 2 + .../Platform}/Models/Shared/Integrations.cs | 2 + .../Platform}/Models/Shared/Links.cs | 2 + .../Platform}/Models/Shared/ModifiedDate.cs | 1 + .../Shared/NewCompanySynchronizedWebhook.cs | 4 + .../NewCompanySynchronizedWebhookData.cs | 1 + .../Platform}/Models/Shared/Profile.cs | 1 + .../Platform}/Models/Shared/PullOperation.cs | 10 +- .../Platform}/Models/Shared/PullOperations.cs | 2 + .../Platform}/Models/Shared/PushChangeType.cs | 1 + .../Models/Shared/PushFieldValidation.cs | 3 +- .../Platform}/Models/Shared/PushOperation.cs | 10 +- .../Models/Shared/PushOperationChange.cs | 4 +- .../Models/Shared/PushOperationRef.cs | 2 + .../Models/Shared/PushOperationStatus.cs | 1 + .../PushOperationStatusChangedWebhook.cs | 4 + .../PushOperationStatusChangedWebhookData.cs | 2 + .../Shared/PushOperationTimedOutWebhook.cs | 4 + .../PushOperationTimedOutWebhookData.cs | 2 + .../Platform}/Models/Shared/PushOperations.cs | 2 + .../Platform}/Models/Shared/PushOption.cs | 6 +- .../Models/Shared/PushOptionChoice.cs | 2 + .../Models/Shared/PushOptionProperty.cs | 6 +- .../Platform}/Models/Shared/PushOptionType.cs | 1 + .../Models/Shared/PushValidationInfo.cs | 6 +- .../Platform}/Models/Shared/SchemaDataType.cs | 1 + .../Platform}/Models/Shared/Security.cs | 0 .../Platform}/Models/Shared/SourceType.cs | 1 + .../Platform}/Models/Shared/Status.cs | 7 +- .../Shared/SupplementalDataConfiguration.cs | 2 + .../SupplementalDataSourceConfiguration.cs | 1 + .../Models/Shared/SupportedFeature.cs | 2 + .../Platform}/Models/Shared/SyncSetting.cs | 2 + .../Platform}/Models/Shared/SyncSettings.cs | 2 + .../Models/Shared/UpdateConnectionStatus.cs | 2 + .../Platform}/Models/Shared/Validation.cs | 6 +- .../Platform}/Models/Shared/ValidationItem.cs | 7 +- .../Platform}/Models/Shared/Webhook.cs | 2 + .../Models/Shared/WebhookConsumer.cs | 9 +- .../Models/Shared/WebhookConsumerPrototype.cs | 9 +- .../Models/Shared/WebhookConsumers.cs | 2 + .../Models/Shared/WebhookNotifier.cs | 1 + .../Platform}/Models/Shared/Webhooks.cs | 2 + .../ClientRateLimitReachedResponse.cs | 1 + .../Webhooks/ClientRateLimitResetResponse.cs | 1 + ...panyDataConnectionStatusChangedResponse.cs | 1 + .../Webhooks/DataSyncCompletedResponse.cs | 1 + .../Webhooks/DatasetDataChangedResponse.cs | 1 + ...tStatusHasChangedToAnErrorStateResponse.cs | 1 + .../NewCompanySynchronizedResponse.cs | 1 + .../PushOperationHasTimedOutResponse.cs | 1 + .../PushOperationStatusHasChangedResponse.cs | 1 + .../Platform}/PushData.cs | 175 ++++--- platform/Codat/Platform/RefreshData.cs | 390 +++++++++++++++ .../Platform}/Settings.cs | 379 ++++++++------ .../Platform}/SupplementalData.cs | 113 +++-- .../Codat/Platform/Utils/AnyDeserializer.cs | 92 ++++ .../Platform/Utils/BigIntStrConverter.cs} | 13 +- .../Platform/Utils/DecimalStrConverter.cs} | 11 +- .../Platform/Utils/EnumConverter.cs} | 16 +- .../Utils/FlexibleObjectDeserializer.cs | 0 .../Platform}/Utils/HeaderSerializer.cs | 0 .../Platform}/Utils/IsoDateTimeSerializer.cs | 0 .../Platform}/Utils/RequestBodySerializer.cs | 2 + .../Utils/ResponseBodyDeserializer.cs | 30 ++ .../Platform}/Utils/SecuritySerializer.cs | 0 .../Platform}/Utils/SpeakeasyHttpClient.cs | 0 .../Platform}/Utils/SpeakeasyMetadata.cs | 0 .../Platform}/Utils/URLBuilder.cs | 0 .../Platform}/Utils/Utilities.cs | 71 ++- .../Platform}/Webhooks.cs | 329 +++++++----- platform/CodatPlatform/Connections.cs | 418 ---------------- platform/CodatPlatform/Integrations.cs | 227 --------- platform/CodatPlatform/RefreshData.cs | 346 ------------- platform/README.md | 57 ++- platform/RELEASES.md | 12 +- .../Models/{Shared => Errors}/ErrorMessage.md | 2 + .../Operations/AddCompanyToGroupResponse.md | 1 - .../ConfigureCustomDataTypeResponse.md | 1 - .../ConfigureSupplementalDataResponse.md | 1 - .../Models/Operations/CreateApiKeyResponse.md | 1 - .../Operations/CreateCompanyResponse.md | 1 - .../Operations/CreateConnectionResponse.md | 1 - .../Models/Operations/CreateGroupResponse.md | 1 - .../Models/Operations/CreateRuleResponse.md | 1 - .../CreateWebhookConsumerResponse.md | 1 - .../Models/Operations/DeleteApiKeyResponse.md | 2 +- .../Operations/DeleteCompanyResponse.md | 1 - .../Operations/DeleteConnectionResponse.md | 1 - .../DeleteWebhookConsumerResponse.md | 1 - .../GetCompanyDataStatusResponse.md | 3 +- .../GetCompanyPushHistoryResponse.md | 1 - .../Models/Operations/GetCompanyResponse.md | 1 - ...tConnectionManagementAccessTokenRequest.md | 8 + ...ConnectionManagementAccessTokenResponse.md | 11 + ...onnectionManagementCorsSettingsResponse.md | 11 + .../Operations/GetConnectionResponse.md | 1 - ...ateUpdateModelOptionsByDataTypeResponse.md | 1 - .../GetCustomDataTypeConfigurationResponse.md | 1 - .../Operations/GetIntegrationResponse.md | 1 - .../GetIntegrationsBrandingResponse.md | 1 - .../Models/Operations/GetProfileResponse.md | 1 - .../GetProfileSyncSettingsResponse.md | 1 - .../Operations/GetPullOperationResponse.md | 1 - .../Operations/GetPushOperationResponse.md | 1 - ...etSupplementalDataConfigurationResponse.md | 1 - .../Models/Operations/GetWebhookResponse.md | 1 - .../Models/Operations/ListApiKeysResponse.md | 1 - .../Operations/ListCompaniesResponse.md | 1 - .../Operations/ListConnectionsResponse.md | 1 - .../ListCustomDataTypeRecordsResponse.md | 1 - .../Models/Operations/ListGroupsResponse.md | 1 - .../Operations/ListIntegrationsResponse.md | 1 - .../Operations/ListPullOperationsResponse.md | 1 - .../Models/Operations/ListRulesResponse.md | 1 - .../ListWebhookConsumersResponse.md | 1 - .../Operations/RefreshCompanyDataResponse.md | 1 - .../RefreshCustomDataTypeResponse.md | 1 - .../Operations/RefreshDataTypeResponse.md | 1 - .../RemoveCompanyFromGroupResponse.md | 1 - ...onnectionManagementCorsSettingsResponse.md | 11 + .../Operations/UnlinkConnectionResponse.md | 1 - .../Operations/UpdateCompanyResponse.md | 1 - .../UpdateConnectionAuthorizationResponse.md | 1 - .../Operations/UpdateProfileResponse.md | 1 - .../UpdateProfileSyncSettingsRequestBody.md | 2 +- .../UpdateProfileSyncSettingsResponse.md | 1 - .../Shared/ClientRateLimitReachedWebhook.md | 18 +- .../Shared/ClientRateLimitResetWebhook.md | 18 +- .../Shared/ConnectionManagementAccessToken.md | 8 + .../ConnectionManagementAllowedOrigins.md | 8 + .../Shared/ConnectionStatusChangedWebhook.md | 22 +- platform/docs/Models/Shared/DataStatus.md | 2 +- platform/docs/Models/Shared/DataStatuses.md | 50 ++ .../Models/Shared/DataSyncCompletedWebhook.md | 22 +- .../Shared/DatasetDataChangedWebhook.md | 22 +- platform/docs/Models/Shared/DatasetStatus.md | 30 ++ .../DatasetStatusChangedErrorWebhook.md | 22 +- .../Shared/NewCompanySynchronizedWebhook.md | 22 +- platform/docs/Models/Shared/PullOperation.md | 2 +- .../PushOperationStatusChangedWebhook.md | 22 +- .../Shared/PushOperationTimedOutWebhook.md | 22 +- platform/docs/Models/Shared/Status.md | 4 +- .../docs/Models/Shared/WebhookConsumer.md | 13 +- .../Models/Shared/WebhookConsumerPrototype.md | 11 +- platform/docs/sdks/codatplatform/README.md | 23 +- platform/docs/sdks/companies/README.md | 27 +- .../docs/sdks/connectionmanagement/README.md | 53 ++ platform/docs/sdks/connections/README.md | 32 +- platform/docs/sdks/corssettings/README.md | 88 ++++ platform/docs/sdks/customdatatype/README.md | 22 +- platform/docs/sdks/groups/README.md | 22 +- platform/docs/sdks/integrations/README.md | 17 +- platform/docs/sdks/pushdata/README.md | 19 +- platform/docs/sdks/refreshdata/README.md | 29 +- platform/docs/sdks/settings/README.md | 40 +- platform/docs/sdks/supplementaldata/README.md | 16 +- platform/docs/sdks/webhooks/README.md | 36 +- platform/gen.yaml | 6 +- 308 files changed, 4624 insertions(+), 2438 deletions(-) rename platform/{CodatPlatform.sln => Codat.Platform.sln} (89%) rename platform/{CodatPlatform/CodatPlatform.csproj => Codat/Platform/Codat.Platform.csproj} (96%) rename platform/{CodatPlatform => Codat/Platform}/CodatPlatform.cs (57%) rename platform/{CodatPlatform => Codat/Platform}/Companies.cs (56%) create mode 100644 platform/Codat/Platform/ConnectionManagement.cs create mode 100644 platform/Codat/Platform/Connections.cs create mode 100644 platform/Codat/Platform/CorsSettings.cs rename platform/{CodatPlatform => Codat/Platform}/CustomDataType.cs (54%) rename platform/{CodatPlatform => Codat/Platform}/Groups.cs (53%) create mode 100644 platform/Codat/Platform/Integrations.cs rename platform/{CodatPlatform/Models/Shared => Codat/Platform/Models/Errors}/ErrorMessage.cs (89%) create mode 100644 platform/Codat/Platform/Models/Errors/SDKException.cs rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/AddCompanyToGroupRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/AddCompanyToGroupResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ConfigureCustomDataTypeRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ConfigureCustomDataTypeResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ConfigureSupplementalDataRequest.cs (96%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ConfigureSupplementalDataResponse.cs (84%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/CreateApiKeyResponse.cs (86%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/CreateCompanyResponse.cs (89%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/CreateConnectionRequest.cs (95%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/CreateConnectionRequestBody.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/CreateConnectionResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/CreateGroupResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/CreateRuleResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/CreateWebhookConsumerResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/DataType.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/DeleteApiKeyRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/DeleteApiKeyResponse.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/DeleteCompanyRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/DeleteCompanyResponse.cs (84%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/DeleteConnectionRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/DeleteConnectionResponse.cs (84%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/DeleteWebhookConsumerRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/DeleteWebhookConsumerResponse.cs (84%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetCompanyDataStatusRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetCompanyDataStatusResponse.cs (81%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetCompanyPushHistoryRequest.cs (95%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetCompanyPushHistoryResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetCompanyRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetCompanyResponse.cs (88%) create mode 100644 platform/Codat/Platform/Models/Operations/GetConnectionManagementAccessTokenRequest.cs create mode 100644 platform/Codat/Platform/Models/Operations/GetConnectionManagementAccessTokenResponse.cs create mode 100644 platform/Codat/Platform/Models/Operations/GetConnectionManagementCorsSettingsResponse.cs rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetConnectionRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetConnectionResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetCreateUpdateModelOptionsByDataTypeRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetCustomDataTypeConfigurationRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetCustomDataTypeConfigurationResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetIntegrationRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetIntegrationResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetIntegrationsBrandingRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetIntegrationsBrandingResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetProfileResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetProfileSyncSettingsResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetPullOperationRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetPullOperationResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetPushOperationRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetPushOperationResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetSupplementalDataConfigurationRequest.cs (96%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetSupplementalDataConfigurationResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetWebhookRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/GetWebhookResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListApiKeysResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListCompaniesRequest.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListCompaniesResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListConnectionsRequest.cs (95%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListConnectionsResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListCustomDataTypeRecordsRequest.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListCustomDataTypeRecordsResponse.cs (89%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListGroupsResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListIntegrationsRequest.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListIntegrationsResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListPullOperationsRequest.cs (95%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListPullOperationsResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListRulesRequest.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListRulesResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/ListWebhookConsumersResponse.cs (89%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/PathParamDataType.cs (99%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/RefreshCompanyDataRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/RefreshCompanyDataResponse.cs (84%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/RefreshCustomDataTypeRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/RefreshCustomDataTypeResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/RefreshDataTypeRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/RefreshDataTypeResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/RemoveCompanyFromGroupRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/RemoveCompanyFromGroupResponse.cs (84%) create mode 100644 platform/Codat/Platform/Models/Operations/SetConnectionManagementCorsSettingsResponse.cs rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/UnlinkConnectionRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/UnlinkConnectionResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/UpdateCompanyRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/UpdateCompanyResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/UpdateConnectionAuthorizationRequest.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/UpdateConnectionAuthorizationResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/UpdateProfileResponse.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/UpdateProfileSyncSettingsRequestBody.cs (93%) rename platform/{CodatPlatform => Codat/Platform}/Models/Operations/UpdateProfileSyncSettingsResponse.cs (84%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ApiKeyDetails.cs (96%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ApiKeys.cs (90%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Branding.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/BrandingButton.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/BrandingImage.cs (90%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/BrandingLogo.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ClientRateLimitReachedWebhook.cs (89%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ClientRateLimitReachedWebhookData.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ClientRateLimitResetWebhook.cs (89%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ClientRateLimitResetWebhookData.cs (96%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Companies.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Company.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/CompanyGroupAssignment.cs (95%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/CompanyRequestBody.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Connection.cs (98%) create mode 100644 platform/Codat/Platform/Models/Shared/ConnectionManagementAccessToken.cs create mode 100644 platform/Codat/Platform/Models/Shared/ConnectionManagementAllowedOrigins.cs rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ConnectionStatusChangedWebhook.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ConnectionStatusChangedWebhookData.cs (95%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Connections.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Content.cs (93%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/CreateApiKey.cs (90%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/CreateRule.cs (93%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/CustomDataTypeConfiguration.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/CustomDataTypeRecord.cs (93%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/CustomDataTypeRecords.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DataConnectionError.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DataConnectionStatus.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DataStatus.cs (93%) create mode 100644 platform/Codat/Platform/Models/Shared/DataStatuses.cs rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DataSyncCompletedWebhook.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DataSyncCompletedWebhookData.cs (92%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DataType.cs (99%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DataTypeFeature.cs (93%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DataTypes.cs (99%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DatasetDataChangedWebhook.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DatasetDataChangedWebhookData.cs (92%) create mode 100644 platform/Codat/Platform/Models/Shared/DatasetStatus.cs rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DatasetStatusChangedErrorWebhook.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/DatasetStatusChangedErrorWebhookData.cs (93%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ErrorValidation.cs (85%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ErrorValidationItem.cs (82%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/FeatureState.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/FeatureType.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Group.cs (96%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/GroupPrototype.cs (96%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/GroupRef.cs (95%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Groups.cs (89%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/HalRef.cs (95%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ImageReference.cs (96%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Integration.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Integrations.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Links.cs (92%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ModifiedDate.cs (95%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/NewCompanySynchronizedWebhook.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/NewCompanySynchronizedWebhookData.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Profile.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PullOperation.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PullOperations.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushChangeType.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushFieldValidation.cs (92%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOperation.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOperationChange.cs (88%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOperationRef.cs (92%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOperationStatus.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOperationStatusChangedWebhook.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOperationStatusChangedWebhookData.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOperationTimedOutWebhook.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOperationTimedOutWebhookData.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOperations.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOption.cs (90%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOptionChoice.cs (95%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOptionProperty.cs (90%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushOptionType.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/PushValidationInfo.cs (89%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/SchemaDataType.cs (99%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Security.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/SourceType.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Status.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/SupplementalDataConfiguration.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/SupplementalDataSourceConfiguration.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/SupportedFeature.cs (92%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/SyncSetting.cs (98%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/SyncSettings.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/UpdateConnectionStatus.cs (91%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Validation.cs (80%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/ValidationItem.cs (82%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Webhook.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/WebhookConsumer.cs (81%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/WebhookConsumerPrototype.cs (75%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/WebhookConsumers.cs (90%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/WebhookNotifier.cs (96%) rename platform/{CodatPlatform => Codat/Platform}/Models/Shared/Webhooks.cs (94%) rename platform/{CodatPlatform => Codat/Platform}/Models/Webhooks/ClientRateLimitReachedResponse.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Webhooks/ClientRateLimitResetResponse.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Webhooks/CompanyDataConnectionStatusChangedResponse.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Webhooks/DataSyncCompletedResponse.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Webhooks/DatasetDataChangedResponse.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Webhooks/DatasetStatusHasChangedToAnErrorStateResponse.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Webhooks/NewCompanySynchronizedResponse.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Webhooks/PushOperationHasTimedOutResponse.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/Models/Webhooks/PushOperationStatusHasChangedResponse.cs (97%) rename platform/{CodatPlatform => Codat/Platform}/PushData.cs (53%) create mode 100644 platform/Codat/Platform/RefreshData.cs rename platform/{CodatPlatform => Codat/Platform}/Settings.cs (51%) rename platform/{CodatPlatform => Codat/Platform}/SupplementalData.cs (59%) create mode 100644 platform/Codat/Platform/Utils/AnyDeserializer.cs rename platform/{CodatPlatform/Utils/BigIntSerializer.cs => Codat/Platform/Utils/BigIntStrConverter.cs} (78%) rename platform/{CodatPlatform/Utils/DecimalSerializer.cs => Codat/Platform/Utils/DecimalStrConverter.cs} (81%) rename platform/{CodatPlatform/Utils/EnumSerializer.cs => Codat/Platform/Utils/EnumConverter.cs} (79%) rename platform/{CodatPlatform => Codat/Platform}/Utils/FlexibleObjectDeserializer.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Utils/HeaderSerializer.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Utils/IsoDateTimeSerializer.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Utils/RequestBodySerializer.cs (99%) create mode 100644 platform/Codat/Platform/Utils/ResponseBodyDeserializer.cs rename platform/{CodatPlatform => Codat/Platform}/Utils/SecuritySerializer.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Utils/SpeakeasyHttpClient.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Utils/SpeakeasyMetadata.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Utils/URLBuilder.cs (100%) rename platform/{CodatPlatform => Codat/Platform}/Utils/Utilities.cs (79%) rename platform/{CodatPlatform => Codat/Platform}/Webhooks.cs (50%) delete mode 100644 platform/CodatPlatform/Connections.cs delete mode 100644 platform/CodatPlatform/Integrations.cs delete mode 100644 platform/CodatPlatform/RefreshData.cs rename platform/docs/Models/{Shared => Errors}/ErrorMessage.md (99%) create mode 100644 platform/docs/Models/Operations/GetConnectionManagementAccessTokenRequest.md create mode 100644 platform/docs/Models/Operations/GetConnectionManagementAccessTokenResponse.md create mode 100644 platform/docs/Models/Operations/GetConnectionManagementCorsSettingsResponse.md create mode 100644 platform/docs/Models/Operations/SetConnectionManagementCorsSettingsResponse.md create mode 100644 platform/docs/Models/Shared/ConnectionManagementAccessToken.md create mode 100644 platform/docs/Models/Shared/ConnectionManagementAllowedOrigins.md create mode 100644 platform/docs/Models/Shared/DataStatuses.md create mode 100644 platform/docs/Models/Shared/DatasetStatus.md create mode 100644 platform/docs/sdks/connectionmanagement/README.md create mode 100644 platform/docs/sdks/corssettings/README.md diff --git a/platform/.speakeasy/gen.lock b/platform/.speakeasy/gen.lock index 941305163..61c2a58f0 100755 --- a/platform/.speakeasy/gen.lock +++ b/platform/.speakeasy/gen.lock @@ -1,233 +1,250 @@ lockVersion: 2.0.0 id: 803b84ac-e26a-4a5c-9224-dbc3d0c7712a management: - docChecksum: 6b9afa35a1ca4d8a1834643e80dd9a19 + docChecksum: 91b86a7707fc536ccbdc7b7345d775a0 docVersion: 3.0.0 - speakeasyVersion: internal - generationVersion: 2.277.0 - releaseVersion: 3.5.0 - configChecksum: 605930df391788cea1af3125ed3a7244 + speakeasyVersion: 1.274.1 + generationVersion: 2.314.0 + releaseVersion: 3.6.0 + configChecksum: da622ef0f54bd9e9d3a34c5694447ea5 repoURL: https://github.com/codatio/client-sdk-csharp.git repoSubDirectory: platform published: true features: csharp: - core: 3.4.3 + constsAndDefaults: 0.0.1 + core: 3.8.0 deprecations: 2.81.2 examples: 2.81.3 - globalSecurity: 2.83.3 - globalServerURLs: 2.82.2 + globalSecurity: 2.83.4 + globalServerURLs: 2.82.3 + groups: 2.81.2 + ignores: 2.81.1 inputOutputModels: 2.83.0 - nameOverrides: 2.81.1 + nameOverrides: 2.81.2 + responseFormat: 0.0.1 webhooks: 1.0.0 generatedFiles: - - CodatPlatform/Settings.cs - - CodatPlatform/Companies.cs - - CodatPlatform/Connections.cs - - CodatPlatform/CustomDataType.cs - - CodatPlatform/PushData.cs - - CodatPlatform/RefreshData.cs - - CodatPlatform/Groups.cs - - CodatPlatform/Integrations.cs - - CodatPlatform/SupplementalData.cs - - CodatPlatform/Webhooks.cs - - CodatPlatform/CodatPlatform.cs + - Codat/Platform/Settings.cs + - Codat/Platform/Companies.cs + - Codat/Platform/CorsSettings.cs + - Codat/Platform/ConnectionManagement.cs + - Codat/Platform/Connections.cs + - Codat/Platform/CustomDataType.cs + - Codat/Platform/PushData.cs + - Codat/Platform/RefreshData.cs + - Codat/Platform/Groups.cs + - Codat/Platform/Integrations.cs + - Codat/Platform/SupplementalData.cs + - Codat/Platform/Webhooks.cs + - Codat/Platform/CodatPlatform.cs - global.json - - CodatPlatform/Utils/BigIntSerializer.cs - - CodatPlatform/Utils/DecimalSerializer.cs - - CodatPlatform/Utils/EnumSerializer.cs - - CodatPlatform/Utils/FlexibleObjectDeserializer.cs - - CodatPlatform/Utils/HeaderSerializer.cs - - CodatPlatform/Utils/IsoDateTimeSerializer.cs - - CodatPlatform/Utils/RequestBodySerializer.cs - - CodatPlatform/Utils/SecuritySerializer.cs - - CodatPlatform/Utils/SpeakeasyHttpClient.cs - - CodatPlatform/Utils/SpeakeasyMetadata.cs - - CodatPlatform/Utils/URLBuilder.cs - - CodatPlatform/Utils/Utilities.cs - - CodatPlatform/CodatPlatform.csproj - - CodatPlatform.sln - - CodatPlatform/Models/Operations/CreateApiKeyResponse.cs - - CodatPlatform/Models/Operations/DeleteApiKeyRequest.cs - - CodatPlatform/Models/Operations/DeleteApiKeyResponse.cs - - CodatPlatform/Models/Operations/GetProfileResponse.cs - - CodatPlatform/Models/Operations/GetProfileSyncSettingsResponse.cs - - CodatPlatform/Models/Operations/ListApiKeysResponse.cs - - CodatPlatform/Models/Operations/UpdateProfileResponse.cs - - CodatPlatform/Models/Operations/UpdateProfileSyncSettingsRequestBody.cs - - CodatPlatform/Models/Operations/UpdateProfileSyncSettingsResponse.cs - - CodatPlatform/Models/Operations/CreateCompanyResponse.cs - - CodatPlatform/Models/Operations/DeleteCompanyRequest.cs - - CodatPlatform/Models/Operations/DeleteCompanyResponse.cs - - CodatPlatform/Models/Operations/GetCompanyRequest.cs - - CodatPlatform/Models/Operations/GetCompanyResponse.cs - - CodatPlatform/Models/Operations/ListCompaniesRequest.cs - - CodatPlatform/Models/Operations/ListCompaniesResponse.cs - - CodatPlatform/Models/Operations/UpdateCompanyRequest.cs - - CodatPlatform/Models/Operations/UpdateCompanyResponse.cs - - CodatPlatform/Models/Operations/CreateConnectionRequestBody.cs - - CodatPlatform/Models/Operations/CreateConnectionRequest.cs - - CodatPlatform/Models/Operations/CreateConnectionResponse.cs - - CodatPlatform/Models/Operations/DeleteConnectionRequest.cs - - CodatPlatform/Models/Operations/DeleteConnectionResponse.cs - - CodatPlatform/Models/Operations/GetConnectionRequest.cs - - CodatPlatform/Models/Operations/GetConnectionResponse.cs - - CodatPlatform/Models/Operations/ListConnectionsRequest.cs - - CodatPlatform/Models/Operations/ListConnectionsResponse.cs - - CodatPlatform/Models/Operations/UnlinkConnectionRequest.cs - - CodatPlatform/Models/Operations/UnlinkConnectionResponse.cs - - CodatPlatform/Models/Operations/UpdateConnectionAuthorizationRequest.cs - - CodatPlatform/Models/Operations/UpdateConnectionAuthorizationResponse.cs - - CodatPlatform/Models/Operations/ConfigureCustomDataTypeRequest.cs - - CodatPlatform/Models/Operations/ConfigureCustomDataTypeResponse.cs - - CodatPlatform/Models/Operations/GetCustomDataTypeConfigurationRequest.cs - - CodatPlatform/Models/Operations/GetCustomDataTypeConfigurationResponse.cs - - CodatPlatform/Models/Operations/ListCustomDataTypeRecordsRequest.cs - - CodatPlatform/Models/Operations/ListCustomDataTypeRecordsResponse.cs - - CodatPlatform/Models/Operations/RefreshCustomDataTypeRequest.cs - - CodatPlatform/Models/Operations/RefreshCustomDataTypeResponse.cs - - CodatPlatform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeRequest.cs - - CodatPlatform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.cs - - CodatPlatform/Models/Operations/GetPushOperationRequest.cs - - CodatPlatform/Models/Operations/GetPushOperationResponse.cs - - CodatPlatform/Models/Operations/GetCompanyPushHistoryRequest.cs - - CodatPlatform/Models/Operations/GetCompanyPushHistoryResponse.cs - - CodatPlatform/Models/Operations/RefreshCompanyDataRequest.cs - - CodatPlatform/Models/Operations/RefreshCompanyDataResponse.cs - - CodatPlatform/Models/Operations/RefreshDataTypeRequest.cs - - CodatPlatform/Models/Operations/RefreshDataTypeResponse.cs - - CodatPlatform/Models/Operations/GetCompanyDataStatusRequest.cs - - CodatPlatform/Models/Operations/GetCompanyDataStatusResponse.cs - - CodatPlatform/Models/Operations/GetPullOperationRequest.cs - - CodatPlatform/Models/Operations/GetPullOperationResponse.cs - - CodatPlatform/Models/Operations/ListPullOperationsRequest.cs - - CodatPlatform/Models/Operations/ListPullOperationsResponse.cs - - CodatPlatform/Models/Operations/AddCompanyToGroupRequest.cs - - CodatPlatform/Models/Operations/AddCompanyToGroupResponse.cs - - CodatPlatform/Models/Operations/CreateGroupResponse.cs - - CodatPlatform/Models/Operations/ListGroupsResponse.cs - - CodatPlatform/Models/Operations/RemoveCompanyFromGroupRequest.cs - - CodatPlatform/Models/Operations/RemoveCompanyFromGroupResponse.cs - - CodatPlatform/Models/Operations/GetIntegrationRequest.cs - - CodatPlatform/Models/Operations/GetIntegrationResponse.cs - - CodatPlatform/Models/Operations/GetIntegrationsBrandingRequest.cs - - CodatPlatform/Models/Operations/GetIntegrationsBrandingResponse.cs - - CodatPlatform/Models/Operations/ListIntegrationsRequest.cs - - CodatPlatform/Models/Operations/ListIntegrationsResponse.cs - - CodatPlatform/Models/Operations/DataType.cs - - CodatPlatform/Models/Operations/ConfigureSupplementalDataRequest.cs - - CodatPlatform/Models/Operations/ConfigureSupplementalDataResponse.cs - - CodatPlatform/Models/Operations/PathParamDataType.cs - - CodatPlatform/Models/Operations/GetSupplementalDataConfigurationRequest.cs - - CodatPlatform/Models/Operations/GetSupplementalDataConfigurationResponse.cs - - CodatPlatform/Models/Operations/CreateRuleResponse.cs - - CodatPlatform/Models/Operations/CreateWebhookConsumerResponse.cs - - CodatPlatform/Models/Operations/DeleteWebhookConsumerRequest.cs - - CodatPlatform/Models/Operations/DeleteWebhookConsumerResponse.cs - - CodatPlatform/Models/Operations/GetWebhookRequest.cs - - CodatPlatform/Models/Operations/GetWebhookResponse.cs - - CodatPlatform/Models/Operations/ListRulesRequest.cs - - CodatPlatform/Models/Operations/ListRulesResponse.cs - - CodatPlatform/Models/Operations/ListWebhookConsumersResponse.cs - - CodatPlatform/Models/Shared/ErrorMessage.cs - - CodatPlatform/Models/Shared/ErrorValidation.cs - - CodatPlatform/Models/Shared/ErrorValidationItem.cs - - CodatPlatform/Models/Shared/ApiKeyDetails.cs - - CodatPlatform/Models/Shared/CreateApiKey.cs - - CodatPlatform/Models/Shared/Profile.cs - - CodatPlatform/Models/Shared/SyncSettings.cs - - CodatPlatform/Models/Shared/SyncSetting.cs - - CodatPlatform/Models/Shared/DataType.cs - - CodatPlatform/Models/Shared/ApiKeys.cs - - CodatPlatform/Models/Shared/Company.cs - - CodatPlatform/Models/Shared/GroupRef.cs - - CodatPlatform/Models/Shared/Connection.cs - - CodatPlatform/Models/Shared/DataConnectionStatus.cs - - CodatPlatform/Models/Shared/SourceType.cs - - CodatPlatform/Models/Shared/DataConnectionError.cs - - CodatPlatform/Models/Shared/CompanyRequestBody.cs - - CodatPlatform/Models/Shared/Companies.cs - - CodatPlatform/Models/Shared/Links.cs - - CodatPlatform/Models/Shared/HalRef.cs - - CodatPlatform/Models/Shared/Connections.cs - - CodatPlatform/Models/Shared/UpdateConnectionStatus.cs - - CodatPlatform/Models/Shared/CustomDataTypeConfiguration.cs - - CodatPlatform/Models/Shared/CustomDataTypeRecords.cs - - CodatPlatform/Models/Shared/Content.cs - - CodatPlatform/Models/Shared/ModifiedDate.cs - - CodatPlatform/Models/Shared/CustomDataTypeRecord.cs - - CodatPlatform/Models/Shared/Status.cs - - CodatPlatform/Models/Shared/PullOperation.cs - - CodatPlatform/Models/Shared/PushOption.cs - - CodatPlatform/Models/Shared/PushValidationInfo.cs - - CodatPlatform/Models/Shared/PushFieldValidation.cs - - CodatPlatform/Models/Shared/PushOptionType.cs - - CodatPlatform/Models/Shared/PushOptionProperty.cs - - CodatPlatform/Models/Shared/PushOptionChoice.cs - - CodatPlatform/Models/Shared/SchemaDataType.cs - - CodatPlatform/Models/Shared/PushOperation.cs - - CodatPlatform/Models/Shared/Validation.cs - - CodatPlatform/Models/Shared/ValidationItem.cs - - CodatPlatform/Models/Shared/PushOperationStatus.cs - - CodatPlatform/Models/Shared/PushOperationChange.cs - - CodatPlatform/Models/Shared/PushChangeType.cs - - CodatPlatform/Models/Shared/PushOperationRef.cs - - CodatPlatform/Models/Shared/PushOperations.cs - - CodatPlatform/Models/Shared/DataTypes.cs - - CodatPlatform/Models/Shared/DataStatus.cs - - CodatPlatform/Models/Shared/PullOperations.cs - - CodatPlatform/Models/Shared/CompanyGroupAssignment.cs - - CodatPlatform/Models/Shared/Group.cs - - CodatPlatform/Models/Shared/GroupPrototype.cs - - CodatPlatform/Models/Shared/Groups.cs - - CodatPlatform/Models/Shared/Integration.cs - - CodatPlatform/Models/Shared/DataTypeFeature.cs - - CodatPlatform/Models/Shared/SupportedFeature.cs - - CodatPlatform/Models/Shared/FeatureType.cs - - CodatPlatform/Models/Shared/FeatureState.cs - - CodatPlatform/Models/Shared/Branding.cs - - CodatPlatform/Models/Shared/BrandingLogo.cs - - CodatPlatform/Models/Shared/BrandingImage.cs - - CodatPlatform/Models/Shared/ImageReference.cs - - CodatPlatform/Models/Shared/BrandingButton.cs - - CodatPlatform/Models/Shared/Integrations.cs - - CodatPlatform/Models/Shared/SupplementalDataSourceConfiguration.cs - - CodatPlatform/Models/Shared/SupplementalDataConfiguration.cs - - CodatPlatform/Models/Shared/Webhook.cs - - CodatPlatform/Models/Shared/WebhookNotifier.cs - - CodatPlatform/Models/Shared/CreateRule.cs - - CodatPlatform/Models/Shared/WebhookConsumer.cs - - CodatPlatform/Models/Shared/WebhookConsumerPrototype.cs - - CodatPlatform/Models/Shared/Webhooks.cs - - CodatPlatform/Models/Shared/WebhookConsumers.cs - - CodatPlatform/Models/Shared/Security.cs - - CodatPlatform/Models/Shared/ClientRateLimitReachedWebhook.cs - - CodatPlatform/Models/Shared/ClientRateLimitReachedWebhookData.cs - - CodatPlatform/Models/Shared/ClientRateLimitResetWebhook.cs - - CodatPlatform/Models/Shared/ClientRateLimitResetWebhookData.cs - - CodatPlatform/Models/Shared/ConnectionStatusChangedWebhook.cs - - CodatPlatform/Models/Shared/ConnectionStatusChangedWebhookData.cs - - CodatPlatform/Models/Shared/DataSyncCompletedWebhook.cs - - CodatPlatform/Models/Shared/DataSyncCompletedWebhookData.cs - - CodatPlatform/Models/Shared/DatasetDataChangedWebhookData.cs - - CodatPlatform/Models/Shared/DatasetDataChangedWebhook.cs - - CodatPlatform/Models/Shared/DatasetStatusChangedErrorWebhook.cs - - CodatPlatform/Models/Shared/DatasetStatusChangedErrorWebhookData.cs - - CodatPlatform/Models/Shared/NewCompanySynchronizedWebhook.cs - - CodatPlatform/Models/Shared/NewCompanySynchronizedWebhookData.cs - - CodatPlatform/Models/Shared/PushOperationTimedOutWebhook.cs - - CodatPlatform/Models/Shared/PushOperationTimedOutWebhookData.cs - - CodatPlatform/Models/Shared/PushOperationStatusChangedWebhook.cs - - CodatPlatform/Models/Shared/PushOperationStatusChangedWebhookData.cs - - CodatPlatform/Models/Webhooks/ClientRateLimitReachedResponse.cs - - CodatPlatform/Models/Webhooks/ClientRateLimitResetResponse.cs - - CodatPlatform/Models/Webhooks/CompanyDataConnectionStatusChangedResponse.cs - - CodatPlatform/Models/Webhooks/DataSyncCompletedResponse.cs - - CodatPlatform/Models/Webhooks/DatasetDataChangedResponse.cs - - CodatPlatform/Models/Webhooks/DatasetStatusHasChangedToAnErrorStateResponse.cs - - CodatPlatform/Models/Webhooks/NewCompanySynchronizedResponse.cs - - CodatPlatform/Models/Webhooks/PushOperationHasTimedOutResponse.cs - - CodatPlatform/Models/Webhooks/PushOperationStatusHasChangedResponse.cs + - Codat.Platform.sln + - Codat/Platform/Utils/AnyDeserializer.cs + - Codat/Platform/Utils/BigIntStrConverter.cs + - Codat/Platform/Utils/DecimalStrConverter.cs + - Codat/Platform/Utils/EnumConverter.cs + - Codat/Platform/Utils/FlexibleObjectDeserializer.cs + - Codat/Platform/Utils/HeaderSerializer.cs + - Codat/Platform/Utils/IsoDateTimeSerializer.cs + - Codat/Platform/Utils/RequestBodySerializer.cs + - Codat/Platform/Utils/ResponseBodyDeserializer.cs + - Codat/Platform/Utils/SecuritySerializer.cs + - Codat/Platform/Utils/SpeakeasyHttpClient.cs + - Codat/Platform/Utils/SpeakeasyMetadata.cs + - Codat/Platform/Utils/URLBuilder.cs + - Codat/Platform/Utils/Utilities.cs + - Codat/Platform/Codat.Platform.csproj + - Codat/Platform/Models/Errors/SDKException.cs + - Codat/Platform/Models/Operations/CreateApiKeyResponse.cs + - Codat/Platform/Models/Operations/DeleteApiKeyRequest.cs + - Codat/Platform/Models/Operations/DeleteApiKeyResponse.cs + - Codat/Platform/Models/Operations/GetProfileResponse.cs + - Codat/Platform/Models/Operations/GetProfileSyncSettingsResponse.cs + - Codat/Platform/Models/Operations/ListApiKeysResponse.cs + - Codat/Platform/Models/Operations/UpdateProfileResponse.cs + - Codat/Platform/Models/Operations/UpdateProfileSyncSettingsRequestBody.cs + - Codat/Platform/Models/Operations/UpdateProfileSyncSettingsResponse.cs + - Codat/Platform/Models/Operations/CreateCompanyResponse.cs + - Codat/Platform/Models/Operations/DeleteCompanyRequest.cs + - Codat/Platform/Models/Operations/DeleteCompanyResponse.cs + - Codat/Platform/Models/Operations/GetCompanyRequest.cs + - Codat/Platform/Models/Operations/GetCompanyResponse.cs + - Codat/Platform/Models/Operations/ListCompaniesRequest.cs + - Codat/Platform/Models/Operations/ListCompaniesResponse.cs + - Codat/Platform/Models/Operations/UpdateCompanyRequest.cs + - Codat/Platform/Models/Operations/UpdateCompanyResponse.cs + - Codat/Platform/Models/Operations/GetConnectionManagementAccessTokenRequest.cs + - Codat/Platform/Models/Operations/GetConnectionManagementAccessTokenResponse.cs + - Codat/Platform/Models/Operations/GetConnectionManagementCorsSettingsResponse.cs + - Codat/Platform/Models/Operations/SetConnectionManagementCorsSettingsResponse.cs + - Codat/Platform/Models/Operations/CreateConnectionRequestBody.cs + - Codat/Platform/Models/Operations/CreateConnectionRequest.cs + - Codat/Platform/Models/Operations/CreateConnectionResponse.cs + - Codat/Platform/Models/Operations/DeleteConnectionRequest.cs + - Codat/Platform/Models/Operations/DeleteConnectionResponse.cs + - Codat/Platform/Models/Operations/GetConnectionRequest.cs + - Codat/Platform/Models/Operations/GetConnectionResponse.cs + - Codat/Platform/Models/Operations/ListConnectionsRequest.cs + - Codat/Platform/Models/Operations/ListConnectionsResponse.cs + - Codat/Platform/Models/Operations/UnlinkConnectionRequest.cs + - Codat/Platform/Models/Operations/UnlinkConnectionResponse.cs + - Codat/Platform/Models/Operations/UpdateConnectionAuthorizationRequest.cs + - Codat/Platform/Models/Operations/UpdateConnectionAuthorizationResponse.cs + - Codat/Platform/Models/Operations/ConfigureCustomDataTypeRequest.cs + - Codat/Platform/Models/Operations/ConfigureCustomDataTypeResponse.cs + - Codat/Platform/Models/Operations/GetCustomDataTypeConfigurationRequest.cs + - Codat/Platform/Models/Operations/GetCustomDataTypeConfigurationResponse.cs + - Codat/Platform/Models/Operations/ListCustomDataTypeRecordsRequest.cs + - Codat/Platform/Models/Operations/ListCustomDataTypeRecordsResponse.cs + - Codat/Platform/Models/Operations/RefreshCustomDataTypeRequest.cs + - Codat/Platform/Models/Operations/RefreshCustomDataTypeResponse.cs + - Codat/Platform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeRequest.cs + - Codat/Platform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.cs + - Codat/Platform/Models/Operations/GetPushOperationRequest.cs + - Codat/Platform/Models/Operations/GetPushOperationResponse.cs + - Codat/Platform/Models/Operations/GetCompanyPushHistoryRequest.cs + - Codat/Platform/Models/Operations/GetCompanyPushHistoryResponse.cs + - Codat/Platform/Models/Operations/RefreshCompanyDataRequest.cs + - Codat/Platform/Models/Operations/RefreshCompanyDataResponse.cs + - Codat/Platform/Models/Operations/RefreshDataTypeRequest.cs + - Codat/Platform/Models/Operations/RefreshDataTypeResponse.cs + - Codat/Platform/Models/Operations/GetCompanyDataStatusRequest.cs + - Codat/Platform/Models/Operations/GetCompanyDataStatusResponse.cs + - Codat/Platform/Models/Operations/GetPullOperationRequest.cs + - Codat/Platform/Models/Operations/GetPullOperationResponse.cs + - Codat/Platform/Models/Operations/ListPullOperationsRequest.cs + - Codat/Platform/Models/Operations/ListPullOperationsResponse.cs + - Codat/Platform/Models/Operations/AddCompanyToGroupRequest.cs + - Codat/Platform/Models/Operations/AddCompanyToGroupResponse.cs + - Codat/Platform/Models/Operations/CreateGroupResponse.cs + - Codat/Platform/Models/Operations/ListGroupsResponse.cs + - Codat/Platform/Models/Operations/RemoveCompanyFromGroupRequest.cs + - Codat/Platform/Models/Operations/RemoveCompanyFromGroupResponse.cs + - Codat/Platform/Models/Operations/GetIntegrationRequest.cs + - Codat/Platform/Models/Operations/GetIntegrationResponse.cs + - Codat/Platform/Models/Operations/GetIntegrationsBrandingRequest.cs + - Codat/Platform/Models/Operations/GetIntegrationsBrandingResponse.cs + - Codat/Platform/Models/Operations/ListIntegrationsRequest.cs + - Codat/Platform/Models/Operations/ListIntegrationsResponse.cs + - Codat/Platform/Models/Operations/DataType.cs + - Codat/Platform/Models/Operations/ConfigureSupplementalDataRequest.cs + - Codat/Platform/Models/Operations/ConfigureSupplementalDataResponse.cs + - Codat/Platform/Models/Operations/PathParamDataType.cs + - Codat/Platform/Models/Operations/GetSupplementalDataConfigurationRequest.cs + - Codat/Platform/Models/Operations/GetSupplementalDataConfigurationResponse.cs + - Codat/Platform/Models/Operations/CreateRuleResponse.cs + - Codat/Platform/Models/Operations/CreateWebhookConsumerResponse.cs + - Codat/Platform/Models/Operations/DeleteWebhookConsumerRequest.cs + - Codat/Platform/Models/Operations/DeleteWebhookConsumerResponse.cs + - Codat/Platform/Models/Operations/GetWebhookRequest.cs + - Codat/Platform/Models/Operations/GetWebhookResponse.cs + - Codat/Platform/Models/Operations/ListRulesRequest.cs + - Codat/Platform/Models/Operations/ListRulesResponse.cs + - Codat/Platform/Models/Operations/ListWebhookConsumersResponse.cs + - Codat/Platform/Models/Shared/ApiKeyDetails.cs + - Codat/Platform/Models/Shared/ErrorValidation.cs + - Codat/Platform/Models/Shared/ErrorValidationItem.cs + - Codat/Platform/Models/Shared/CreateApiKey.cs + - Codat/Platform/Models/Shared/Profile.cs + - Codat/Platform/Models/Shared/SyncSettings.cs + - Codat/Platform/Models/Shared/SyncSetting.cs + - Codat/Platform/Models/Shared/DataType.cs + - Codat/Platform/Models/Shared/ApiKeys.cs + - Codat/Platform/Models/Shared/Company.cs + - Codat/Platform/Models/Shared/GroupRef.cs + - Codat/Platform/Models/Shared/Connection.cs + - Codat/Platform/Models/Shared/DataConnectionStatus.cs + - Codat/Platform/Models/Shared/SourceType.cs + - Codat/Platform/Models/Shared/DataConnectionError.cs + - Codat/Platform/Models/Shared/CompanyRequestBody.cs + - Codat/Platform/Models/Shared/Companies.cs + - Codat/Platform/Models/Shared/Links.cs + - Codat/Platform/Models/Shared/HalRef.cs + - Codat/Platform/Models/Shared/ConnectionManagementAccessToken.cs + - Codat/Platform/Models/Shared/ConnectionManagementAllowedOrigins.cs + - Codat/Platform/Models/Shared/Connections.cs + - Codat/Platform/Models/Shared/UpdateConnectionStatus.cs + - Codat/Platform/Models/Shared/CustomDataTypeConfiguration.cs + - Codat/Platform/Models/Shared/CustomDataTypeRecords.cs + - Codat/Platform/Models/Shared/Content.cs + - Codat/Platform/Models/Shared/ModifiedDate.cs + - Codat/Platform/Models/Shared/CustomDataTypeRecord.cs + - Codat/Platform/Models/Shared/DatasetStatus.cs + - Codat/Platform/Models/Shared/PullOperation.cs + - Codat/Platform/Models/Shared/PushOption.cs + - Codat/Platform/Models/Shared/PushValidationInfo.cs + - Codat/Platform/Models/Shared/PushFieldValidation.cs + - Codat/Platform/Models/Shared/PushOptionType.cs + - Codat/Platform/Models/Shared/PushOptionProperty.cs + - Codat/Platform/Models/Shared/PushOptionChoice.cs + - Codat/Platform/Models/Shared/SchemaDataType.cs + - Codat/Platform/Models/Shared/PushOperation.cs + - Codat/Platform/Models/Shared/Validation.cs + - Codat/Platform/Models/Shared/ValidationItem.cs + - Codat/Platform/Models/Shared/PushOperationStatus.cs + - Codat/Platform/Models/Shared/PushOperationChange.cs + - Codat/Platform/Models/Shared/PushChangeType.cs + - Codat/Platform/Models/Shared/PushOperationRef.cs + - Codat/Platform/Models/Shared/PushOperations.cs + - Codat/Platform/Models/Shared/DataStatuses.cs + - Codat/Platform/Models/Shared/DataTypes.cs + - Codat/Platform/Models/Shared/DataStatus.cs + - Codat/Platform/Models/Shared/Status.cs + - Codat/Platform/Models/Shared/PullOperations.cs + - Codat/Platform/Models/Shared/CompanyGroupAssignment.cs + - Codat/Platform/Models/Shared/Group.cs + - Codat/Platform/Models/Shared/GroupPrototype.cs + - Codat/Platform/Models/Shared/Groups.cs + - Codat/Platform/Models/Shared/Integration.cs + - Codat/Platform/Models/Shared/DataTypeFeature.cs + - Codat/Platform/Models/Shared/SupportedFeature.cs + - Codat/Platform/Models/Shared/FeatureType.cs + - Codat/Platform/Models/Shared/FeatureState.cs + - Codat/Platform/Models/Shared/Branding.cs + - Codat/Platform/Models/Shared/BrandingLogo.cs + - Codat/Platform/Models/Shared/BrandingImage.cs + - Codat/Platform/Models/Shared/ImageReference.cs + - Codat/Platform/Models/Shared/BrandingButton.cs + - Codat/Platform/Models/Shared/Integrations.cs + - Codat/Platform/Models/Shared/SupplementalDataSourceConfiguration.cs + - Codat/Platform/Models/Shared/SupplementalDataConfiguration.cs + - Codat/Platform/Models/Shared/Webhook.cs + - Codat/Platform/Models/Shared/WebhookNotifier.cs + - Codat/Platform/Models/Shared/CreateRule.cs + - Codat/Platform/Models/Shared/WebhookConsumer.cs + - Codat/Platform/Models/Shared/WebhookConsumerPrototype.cs + - Codat/Platform/Models/Shared/Webhooks.cs + - Codat/Platform/Models/Shared/WebhookConsumers.cs + - Codat/Platform/Models/Shared/Security.cs + - Codat/Platform/Models/Shared/ClientRateLimitReachedWebhook.cs + - Codat/Platform/Models/Shared/ClientRateLimitReachedWebhookData.cs + - Codat/Platform/Models/Shared/ClientRateLimitResetWebhook.cs + - Codat/Platform/Models/Shared/ClientRateLimitResetWebhookData.cs + - Codat/Platform/Models/Shared/ConnectionStatusChangedWebhook.cs + - Codat/Platform/Models/Shared/ConnectionStatusChangedWebhookData.cs + - Codat/Platform/Models/Shared/DataSyncCompletedWebhook.cs + - Codat/Platform/Models/Shared/DataSyncCompletedWebhookData.cs + - Codat/Platform/Models/Shared/DatasetDataChangedWebhookData.cs + - Codat/Platform/Models/Shared/DatasetDataChangedWebhook.cs + - Codat/Platform/Models/Shared/DatasetStatusChangedErrorWebhook.cs + - Codat/Platform/Models/Shared/DatasetStatusChangedErrorWebhookData.cs + - Codat/Platform/Models/Shared/NewCompanySynchronizedWebhook.cs + - Codat/Platform/Models/Shared/NewCompanySynchronizedWebhookData.cs + - Codat/Platform/Models/Shared/PushOperationTimedOutWebhook.cs + - Codat/Platform/Models/Shared/PushOperationTimedOutWebhookData.cs + - Codat/Platform/Models/Shared/PushOperationStatusChangedWebhook.cs + - Codat/Platform/Models/Shared/PushOperationStatusChangedWebhookData.cs + - Codat/Platform/Models/Errors/ErrorMessage.cs + - Codat/Platform/Models/Webhooks/ClientRateLimitReachedResponse.cs + - Codat/Platform/Models/Webhooks/ClientRateLimitResetResponse.cs + - Codat/Platform/Models/Webhooks/CompanyDataConnectionStatusChangedResponse.cs + - Codat/Platform/Models/Webhooks/DataSyncCompletedResponse.cs + - Codat/Platform/Models/Webhooks/DatasetDataChangedResponse.cs + - Codat/Platform/Models/Webhooks/DatasetStatusHasChangedToAnErrorStateResponse.cs + - Codat/Platform/Models/Webhooks/NewCompanySynchronizedResponse.cs + - Codat/Platform/Models/Webhooks/PushOperationHasTimedOutResponse.cs + - Codat/Platform/Models/Webhooks/PushOperationStatusHasChangedResponse.cs - docs/Models/Operations/CreateApiKeyResponse.md - docs/Models/Operations/DeleteApiKeyRequest.md - docs/Models/Operations/DeleteApiKeyResponse.md @@ -246,6 +263,10 @@ generatedFiles: - docs/Models/Operations/ListCompaniesResponse.md - docs/Models/Operations/UpdateCompanyRequest.md - docs/Models/Operations/UpdateCompanyResponse.md + - docs/Models/Operations/GetConnectionManagementAccessTokenRequest.md + - docs/Models/Operations/GetConnectionManagementAccessTokenResponse.md + - docs/Models/Operations/GetConnectionManagementCorsSettingsResponse.md + - docs/Models/Operations/SetConnectionManagementCorsSettingsResponse.md - docs/Models/Operations/CreateConnectionRequestBody.md - docs/Models/Operations/CreateConnectionRequest.md - docs/Models/Operations/CreateConnectionResponse.md @@ -310,10 +331,9 @@ generatedFiles: - docs/Models/Operations/ListRulesRequest.md - docs/Models/Operations/ListRulesResponse.md - docs/Models/Operations/ListWebhookConsumersResponse.md - - docs/Models/Shared/ErrorMessage.md + - docs/Models/Shared/ApiKeyDetails.md - docs/Models/Shared/ErrorValidation.md - docs/Models/Shared/ErrorValidationItem.md - - docs/Models/Shared/ApiKeyDetails.md - docs/Models/Shared/CreateApiKey.md - docs/Models/Shared/Profile.md - docs/Models/Shared/SyncSettings.md @@ -330,6 +350,8 @@ generatedFiles: - docs/Models/Shared/Companies.md - docs/Models/Shared/Links.md - docs/Models/Shared/HalRef.md + - docs/Models/Shared/ConnectionManagementAccessToken.md + - docs/Models/Shared/ConnectionManagementAllowedOrigins.md - docs/Models/Shared/Connections.md - docs/Models/Shared/UpdateConnectionStatus.md - docs/Models/Shared/CustomDataTypeConfiguration.md @@ -337,7 +359,7 @@ generatedFiles: - docs/Models/Shared/Content.md - docs/Models/Shared/ModifiedDate.md - docs/Models/Shared/CustomDataTypeRecord.md - - docs/Models/Shared/Status.md + - docs/Models/Shared/DatasetStatus.md - docs/Models/Shared/PullOperation.md - docs/Models/Shared/PushOption.md - docs/Models/Shared/PushValidationInfo.md @@ -354,8 +376,10 @@ generatedFiles: - docs/Models/Shared/PushChangeType.md - docs/Models/Shared/PushOperationRef.md - docs/Models/Shared/PushOperations.md + - docs/Models/Shared/DataStatuses.md - docs/Models/Shared/DataTypes.md - docs/Models/Shared/DataStatus.md + - docs/Models/Shared/Status.md - docs/Models/Shared/PullOperations.md - docs/Models/Shared/CompanyGroupAssignment.md - docs/Models/Shared/Group.md @@ -400,6 +424,7 @@ generatedFiles: - docs/Models/Shared/PushOperationTimedOutWebhookData.md - docs/Models/Shared/PushOperationStatusChangedWebhook.md - docs/Models/Shared/PushOperationStatusChangedWebhookData.md + - docs/Models/Errors/ErrorMessage.md - docs/Models/Webhooks/ClientRateLimitReachedResponse.md - docs/Models/Webhooks/ClientRateLimitResetResponse.md - docs/Models/Webhooks/CompanyDataConnectionStatusChangedResponse.md @@ -412,6 +437,8 @@ generatedFiles: - docs/sdks/codatplatform/README.md - docs/sdks/settings/README.md - docs/sdks/companies/README.md + - docs/sdks/connectionmanagement/README.md + - docs/sdks/corssettings/README.md - docs/sdks/connections/README.md - docs/sdks/customdatatype/README.md - docs/sdks/pushdata/README.md diff --git a/platform/CodatPlatform.sln b/platform/Codat.Platform.sln similarity index 89% rename from platform/CodatPlatform.sln rename to platform/Codat.Platform.sln index 2c8f1e8ff..0d8a10341 100644 --- a/platform/CodatPlatform.sln +++ b/platform/Codat.Platform.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codat.Platform", "CodatPlatform\CodatPlatform.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codat.Platform", "Codat\Platform\Codat.Platform.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}" EndProject Global diff --git a/platform/CodatPlatform/CodatPlatform.csproj b/platform/Codat/Platform/Codat.Platform.csproj similarity index 96% rename from platform/CodatPlatform/CodatPlatform.csproj rename to platform/Codat/Platform/Codat.Platform.csproj index 4ce356087..599df99b2 100644 --- a/platform/CodatPlatform/CodatPlatform.csproj +++ b/platform/Codat/Platform/Codat.Platform.csproj @@ -2,7 +2,7 @@ true Codat.Platform - 3.5.0 + 3.6.0 Codat net6.0 enable diff --git a/platform/CodatPlatform/CodatPlatform.cs b/platform/Codat/Platform/CodatPlatform.cs similarity index 57% rename from platform/CodatPlatform/CodatPlatform.cs rename to platform/Codat/Platform/CodatPlatform.cs index fb20d1887..e9616af6b 100644 --- a/platform/CodatPlatform/CodatPlatform.cs +++ b/platform/Codat/Platform/CodatPlatform.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform { + using Codat.Platform.Models.Errors; using Codat.Platform.Models.Shared; using Codat.Platform.Utils; using Newtonsoft.Json; @@ -18,8 +19,6 @@ namespace Codat.Platform using System.Threading.Tasks; using System; - - /// /// Platform API: Platform API /// @@ -28,72 +27,96 @@ namespace Codat.Platform ///
/// These end points cover creating and managing your companies, data connections, and integrations.
///
- /// Read about the building blocks of Codat...
+ /// Read about the building blocks of Codat... | See our OpenAPI spec
///
- /// See our OpenAPI spec + /// ---
+ /// <!-- Start Codat Tags Table -->
+ /// ## Endpoints
+ ///
+ /// | Endpoints | Description |
+ /// | :- |:- |
+ /// | Companies | Create and manage your SMB users' companies. |
+ /// | Connections | Create new and manage existing data connections for a company. |
+ /// | Connection management | Configure connection management UI and retrieve access tokens for authentication. |
+ /// | Groups | Define and manage sets of companies based on a chosen characteristic. |
+ /// | Webhooks | Create and manage webhooks that listen to Codat's events. |
+ /// | Integrations | Get a list of integrations supported by Codat and their logos. |
+ /// | Refresh data | Initiate data refreshes, view pull status and history. |
+ /// | Settings | Manage company profile configuration, sync settings, and API keys. |
+ /// | Push data | Initiate and monitor Create, Update, and Delete operations. |
+ /// | Supplemental data | Configure and pull additional data you can include in Codat's standard data types. |
+ /// | Custom data type | Configure and pull additional data types that are not included in Codat's standardized data model. |
+ /// <!-- End Codat Tags Table --> /// ///
public interface ICodatPlatform { /// - /// Manage your Codat instance. + /// Manage company profile configuration, sync settings, and API keys. /// public ISettings Settings { get; } /// - /// Create and manage your Codat companies. + /// Create and manage your SMB users' companies. /// public ICompanies Companies { get; } /// - /// Manage your companies' data connections. + /// Configure connection management UI and retrieve access tokens for authentication. + /// + public IConnectionManagement ConnectionManagement { get; } + + /// + /// Create new and manage existing data connections for a company. /// public IConnections Connections { get; } /// - /// View and configure custom data types for supported integrations. + /// Configure and pull additional data types that are not included in Codat's standardized data model. /// public ICustomDataType CustomDataType { get; } /// - /// View push options and get push statuses. + /// Initiate and monitor Create, Update, and Delete operations. /// public IPushData PushData { get; } /// - /// Asynchronously retrieve data from an integration to refresh data in Codat. + /// Initiate data refreshes, view pull status and history. /// public IRefreshData RefreshData { get; } /// - /// Create groups and link them to your Codat companies. + /// Define and manage sets of companies based on a chosen characteristic. /// public IGroups Groups { get; } /// - /// View and manage your available integrations in Codat. + /// Get a list of integrations supported by Codat and their logos. /// public IIntegrations Integrations { get; } /// - /// View and configure supplemental data for supported data types. + /// Configure and pull additional data you can include in Codat's standard data types. /// public ISupplementalData SupplementalData { get; } /// - /// Manage webhooks, rules, and events. + /// Create and manage webhooks that listen to Codat's events. /// public IWebhooks Webhooks { get; } } - + public class SDKConfig { - public static string[] ServerList = new string[] - { + /// + /// List of server URLs available to the SDK. + /// + public static readonly string[] ServerList = { "https://api.codat.io", }; - /// Contains the list of servers available to the SDK + public string serverUrl = ""; public int serverIndex = 0; @@ -115,9 +138,26 @@ public string GetTemplatedServerDetails() ///
/// These end points cover creating and managing your companies, data connections, and integrations.
///
- /// Read about the building blocks of Codat...
+ /// Read about the building blocks of Codat... | See our OpenAPI spec
///
- /// See our OpenAPI spec + /// ---
+ /// <!-- Start Codat Tags Table -->
+ /// ## Endpoints
+ ///
+ /// | Endpoints | Description |
+ /// | :- |:- |
+ /// | Companies | Create and manage your SMB users' companies. |
+ /// | Connections | Create new and manage existing data connections for a company. |
+ /// | Connection management | Configure connection management UI and retrieve access tokens for authentication. |
+ /// | Groups | Define and manage sets of companies based on a chosen characteristic. |
+ /// | Webhooks | Create and manage webhooks that listen to Codat's events. |
+ /// | Integrations | Get a list of integrations supported by Codat and their logos. |
+ /// | Refresh data | Initiate data refreshes, view pull status and history. |
+ /// | Settings | Manage company profile configuration, sync settings, and API keys. |
+ /// | Push data | Initiate and monitor Create, Update, and Delete operations. |
+ /// | Supplemental data | Configure and pull additional data you can include in Codat's standard data types. |
+ /// | Custom data type | Configure and pull additional data types that are not included in Codat's standardized data model. |
+ /// <!-- End Codat Tags Table --> /// /// public class CodatPlatform: ICodatPlatform @@ -125,16 +165,17 @@ public class CodatPlatform: ICodatPlatform public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; private string _serverUrl = ""; private int _serverIndex = 0; private ISpeakeasyHttpClient _defaultClient; private Func? _securitySource; public ISettings Settings { get; private set; } public ICompanies Companies { get; private set; } + public IConnectionManagement ConnectionManagement { get; private set; } public IConnections Connections { get; private set; } public ICustomDataType CustomDataType { get; private set; } public IPushData PushData { get; private set; } @@ -148,6 +189,10 @@ public CodatPlatform(Security? security = null, Func? securitySource = { if (serverIndex != null) { + if (serverIndex.Value < 0 || serverIndex.Value >= SDKConfig.ServerList.Length) + { + throw new Exception($"Invalid server index {serverIndex.Value}"); + } _serverIndex = serverIndex.Value; } @@ -183,6 +228,7 @@ public CodatPlatform(Security? security = null, Func? securitySource = Settings = new Settings(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); Companies = new Companies(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + ConnectionManagement = new ConnectionManagement(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); Connections = new Connections(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); CustomDataType = new CustomDataType(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); PushData = new PushData(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); diff --git a/platform/CodatPlatform/Companies.cs b/platform/Codat/Platform/Companies.cs similarity index 56% rename from platform/CodatPlatform/Companies.cs rename to platform/Codat/Platform/Companies.cs index acde07670..8ee4e1640 100644 --- a/platform/CodatPlatform/Companies.cs +++ b/platform/Codat/Platform/Companies.cs @@ -10,17 +10,19 @@ #nullable enable namespace Codat.Platform { + using Codat.Platform.Models.Errors; using Codat.Platform.Models.Operations; using Codat.Platform.Models.Shared; using Codat.Platform.Utils; using Newtonsoft.Json; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; using System; /// - /// Create and manage your Codat companies. + /// Create and manage your SMB users' companies. /// public interface ICompanies { @@ -92,16 +94,16 @@ public interface ICompanies } /// - /// Create and manage your Codat companies. + /// Create and manage your SMB users' companies. /// public class Companies: ICompanies { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private Func? _securitySource; @@ -113,7 +115,6 @@ public Companies(ISpeakeasyHttpClient defaultClient, Func? securitySou _serverUrl = serverUrl; SDKConfiguration = config; } - public async Task CreateAsync(CompanyRequestBody? request = null) { @@ -139,38 +140,48 @@ public async Task CreateAsync(CompanyRequestBody? request var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new CreateCompanyResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + var response = new CreateCompanyResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Company = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{400, 401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } } - - public async Task DeleteAsync(DeleteCompanyRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -188,34 +199,38 @@ public async Task DeleteAsync(DeleteCompanyRequest reques var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new DeleteCompanyResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 204)) - { - - return response; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 204) + { + return new DeleteCompanyResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task GetAsync(GetCompanyRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -233,38 +248,48 @@ public async Task GetAsync(GetCompanyRequest request) var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetCompanyResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetCompanyResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Company = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task ListAsync(ListCompaniesRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -282,38 +307,48 @@ public async Task ListAsync(ListCompaniesRequest request) var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListCompaniesResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Companies = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListCompaniesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Companies = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task UpdateAsync(UpdateCompanyRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -337,36 +372,46 @@ public async Task UpdateAsync(UpdateCompanyRequest reques var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new UpdateCompanyResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new UpdateCompanyResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Company = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } } - - } } \ No newline at end of file diff --git a/platform/Codat/Platform/ConnectionManagement.cs b/platform/Codat/Platform/ConnectionManagement.cs new file mode 100644 index 000000000..d062589d6 --- /dev/null +++ b/platform/Codat/Platform/ConnectionManagement.cs @@ -0,0 +1,127 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform +{ + using Codat.Platform.Models.Errors; + using Codat.Platform.Models.Operations; + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Configure connection management UI and retrieve access tokens for authentication. + /// + public interface IConnectionManagement + { + public ICorsSettings CorsSettings { get; } + + /// + /// Get access token + /// + /// + /// Use the *Get access token* endpoint to retrieve a new access token for use by the connection management UI.
+ ///
+ /// The embedded connection management UI lets your customers control access to their data by allowing them to manage their existing connections. + ///
+ ///
+ Task GetAccessTokenAsync(GetConnectionManagementAccessTokenRequest request); + } + + /// + /// Configure connection management UI and retrieve access tokens for authentication. + /// + public class ConnectionManagement: IConnectionManagement + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + public ICorsSettings CorsSettings { get; private set; } + + public ConnectionManagement(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + CorsSettings = new CorsSettings(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + } + + public async Task GetAccessTokenAsync(GetConnectionManagementAccessTokenRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connectionManagement/accessToken", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 GetConnectionManagementAccessTokenResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.ConnectionManagementAccessToken = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/platform/Codat/Platform/Connections.cs b/platform/Codat/Platform/Connections.cs new file mode 100644 index 000000000..703aa2de5 --- /dev/null +++ b/platform/Codat/Platform/Connections.cs @@ -0,0 +1,473 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform +{ + using Codat.Platform.Models.Errors; + using Codat.Platform.Models.Operations; + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Create new and manage existing data connections for a company. + /// + public interface IConnections + { + + /// + /// Create connection + /// + /// + /// Creates a connection for the company by providing a valid `platformKey`.
+ ///
+ /// Use the List Integrations endpoint to access valid platform keys. + ///
+ ///
+ Task CreateAsync(CreateConnectionRequest request); + + /// + /// Delete connection + /// + /// + /// Revoke and remove a connection from a company.
+ /// This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. + ///
+ ///
+ Task DeleteAsync(DeleteConnectionRequest request); + + /// + /// Get connection + /// + /// + /// Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. + /// + /// + Task GetAsync(GetConnectionRequest request); + + /// + /// List connections + /// + /// + /// List the connections for a company. + /// + /// + Task ListAsync(ListConnectionsRequest request); + + /// + /// Unlink connection + /// + /// + /// This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. + /// + /// + Task UnlinkAsync(UnlinkConnectionRequest request); + + /// + /// Update authorization + /// + /// + /// Update data connection's authorization. + /// + /// + Task UpdateAuthorizationAsync(UpdateConnectionAuthorizationRequest request); + } + + /// + /// Create new and manage existing data connections for a company. + /// + public class Connections: IConnections + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public Connections(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task CreateAsync(CreateConnectionRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections", 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; + } + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 CreateConnectionResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Connection = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task DeleteAsync(DeleteConnectionRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new DeleteConnectionResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetAsync(GetConnectionRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 GetConnectionResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Connection = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListAsync(ListConnectionsRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 ListConnectionsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Connections = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task UnlinkAsync(UnlinkConnectionRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "UpdateConnectionStatus", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 UnlinkConnectionResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Connection = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task UpdateAuthorizationAsync(UpdateConnectionAuthorizationRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/authorization", 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; + } + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 UpdateConnectionAuthorizationResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Connection = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/platform/Codat/Platform/CorsSettings.cs b/platform/Codat/Platform/CorsSettings.cs new file mode 100644 index 000000000..e0a4927f0 --- /dev/null +++ b/platform/Codat/Platform/CorsSettings.cs @@ -0,0 +1,200 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform +{ + using Codat.Platform.Models.Errors; + using Codat.Platform.Models.Operations; + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + public interface ICorsSettings + { + + /// + /// Get CORS settings + /// + /// + /// The *Get CORS settings* endpoint returns the allowed origins (i.e. your domains) you want to allow cross-origin resource sharing (CORS) with Codat.
+ ///
+ /// Enabling CORS with Codat is required by our embedded connection management UI to access Codat's API endpoints.
+ ///
+ /// The embedded connection management UI lets your customers control access to their data by allowing them to manage their existing connections. + ///
+ ///
+ Task GetAsync(); + + /// + /// Set CORS settings + /// + /// + /// The *Set CORS settings* endpoint allows you to register allowed origins (i.e. your domains) for use in cross-origin resource sharing (CORS).
+ ///
+ /// Enabling CORS with Codat is required by our embedded connection management UI to access Codat's API endpoints.
+ ///
+ /// The embedded connection management UI lets your customers control access to their data by allowing them to manage their existing connections. + ///
+ ///
+ Task SetAsync(ConnectionManagementAllowedOrigins? request = null); + } + + public class CorsSettings: ICorsSettings + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public CorsSettings(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task GetAsync() + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + + var urlString = baseUrl + "/connectionManagement/corsSettings"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 GetConnectionManagementCorsSettingsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.ConnectionManagementAllowedOrigins = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task SetAsync(ConnectionManagementAllowedOrigins? request = null) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + + var urlString = baseUrl + "/connectionManagement/corsSettings"; + + 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; + } + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 SetConnectionManagementCorsSettingsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.ConnectionManagementAllowedOrigins = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/platform/CodatPlatform/CustomDataType.cs b/platform/Codat/Platform/CustomDataType.cs similarity index 54% rename from platform/CodatPlatform/CustomDataType.cs rename to platform/Codat/Platform/CustomDataType.cs index c9b5794b8..c6fa01b49 100644 --- a/platform/CodatPlatform/CustomDataType.cs +++ b/platform/Codat/Platform/CustomDataType.cs @@ -10,17 +10,19 @@ #nullable enable namespace Codat.Platform { + using Codat.Platform.Models.Errors; using Codat.Platform.Models.Operations; using Codat.Platform.Models.Shared; using Codat.Platform.Utils; using Newtonsoft.Json; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; using System; /// - /// View and configure custom data types for supported integrations. + /// Configure and pull additional data types that are not included in Codat's standardized data model. /// public interface ICustomDataType { @@ -77,16 +79,16 @@ public interface ICustomDataType } /// - /// View and configure custom data types for supported integrations. + /// Configure and pull additional data types that are not included in Codat's standardized data model. /// public class CustomDataType: ICustomDataType { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private Func? _securitySource; @@ -98,7 +100,6 @@ public CustomDataType(ISpeakeasyHttpClient defaultClient, Func? securi _serverUrl = serverUrl; SDKConfiguration = config; } - public async Task ConfigureAsync(ConfigureCustomDataTypeRequest request) { @@ -123,38 +124,48 @@ public async Task ConfigureAsync(ConfigureCusto var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ConfigureCustomDataTypeResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.CustomDataTypeConfiguration = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ConfigureCustomDataTypeResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.CustomDataTypeConfiguration = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task GetConfigurationAsync(GetCustomDataTypeConfigurationRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -172,38 +183,48 @@ public async Task GetConfigurationAsync( var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetCustomDataTypeConfigurationResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.CustomDataTypeRecords = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetCustomDataTypeConfigurationResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.CustomDataTypeRecords = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task ListAsync(ListCustomDataTypeRecordsRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -221,38 +242,48 @@ public async Task ListAsync(ListCustomDataTyp var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListCustomDataTypeRecordsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.CustomDataTypeRecords = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListCustomDataTypeRecordsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.CustomDataTypeRecords = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 451) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{400, 401, 402, 403, 404, 429, 451, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task RefreshAsync(RefreshCustomDataTypeRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -270,36 +301,46 @@ public async Task RefreshAsync(RefreshCustomDataT var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new RefreshCustomDataTypeResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.PullOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new RefreshCustomDataTypeResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PullOperation = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 451) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 451, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - } } \ No newline at end of file diff --git a/platform/CodatPlatform/Groups.cs b/platform/Codat/Platform/Groups.cs similarity index 53% rename from platform/CodatPlatform/Groups.cs rename to platform/Codat/Platform/Groups.cs index b92a9b94d..0b26172d9 100644 --- a/platform/CodatPlatform/Groups.cs +++ b/platform/Codat/Platform/Groups.cs @@ -10,17 +10,19 @@ #nullable enable namespace Codat.Platform { + using Codat.Platform.Models.Errors; using Codat.Platform.Models.Operations; using Codat.Platform.Models.Shared; using Codat.Platform.Utils; using Newtonsoft.Json; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; using System; /// - /// Create groups and link them to your Codat companies. + /// Define and manage sets of companies based on a chosen characteristic. /// public interface IGroups { @@ -76,16 +78,16 @@ public interface IGroups } /// - /// Create groups and link them to your Codat companies. + /// Define and manage sets of companies based on a chosen characteristic. /// public class Groups: IGroups { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private Func? _securitySource; @@ -97,7 +99,6 @@ public Groups(ISpeakeasyHttpClient defaultClient, Func? securitySource _serverUrl = serverUrl; SDKConfiguration = config; } - public async Task AddCompanyAsync(AddCompanyToGroupRequest request) { @@ -122,38 +123,48 @@ public async Task AddCompanyAsync(AddCompanyToGroupRe var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new AddCompanyToGroupResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new AddCompanyToGroupResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Company = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task CreateAsync(GroupPrototype? request = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -178,38 +189,48 @@ public async Task CreateAsync(GroupPrototype? request = nul var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new CreateGroupResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Group = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + var response = new CreateGroupResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Group = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 409, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task ListAsync() { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -228,38 +249,48 @@ public async Task ListAsync() var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListGroupsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Groups = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListGroupsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Groups = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task RemoveCompanyAsync(RemoveCompanyFromGroupRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -277,32 +308,36 @@ public async Task RemoveCompanyAsync(RemoveCompa var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new RemoveCompanyFromGroupResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 204)) - { - - return response; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 204) + { + return new RemoveCompanyFromGroupResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - } } \ No newline at end of file diff --git a/platform/Codat/Platform/Integrations.cs b/platform/Codat/Platform/Integrations.cs new file mode 100644 index 000000000..24562e00b --- /dev/null +++ b/platform/Codat/Platform/Integrations.cs @@ -0,0 +1,258 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform +{ + using Codat.Platform.Models.Errors; + using Codat.Platform.Models.Operations; + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Get a list of integrations supported by Codat and their logos. + /// + public interface IIntegrations + { + + /// + /// Get integration + /// + /// + /// Get single integration, by platformKey + /// + /// + Task GetAsync(GetIntegrationRequest request); + + /// + /// Get branding + /// + /// + /// Get branding for platform. + /// + /// + Task GetBrandingAsync(GetIntegrationsBrandingRequest request); + + /// + /// List integrations + /// + /// + /// List your available integrations + /// + /// + Task ListAsync(ListIntegrationsRequest request); + } + + /// + /// Get a list of integrations supported by Codat and their logos. + /// + public class Integrations: IIntegrations + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public Integrations(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task GetAsync(GetIntegrationRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/integrations/{platformKey}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 GetIntegrationResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Integration = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetBrandingAsync(GetIntegrationsBrandingRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/integrations/{platformKey}/branding", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 GetIntegrationsBrandingResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Branding = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListAsync(ListIntegrationsRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/integrations", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 ListIntegrationsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Integrations = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/ErrorMessage.cs b/platform/Codat/Platform/Models/Errors/ErrorMessage.cs similarity index 89% rename from platform/CodatPlatform/Models/Shared/ErrorMessage.cs rename to platform/Codat/Platform/Models/Errors/ErrorMessage.cs index 9006fd9c3..4ff7ad45e 100644 --- a/platform/CodatPlatform/Models/Shared/ErrorMessage.cs +++ b/platform/Codat/Platform/Models/Errors/ErrorMessage.cs @@ -8,11 +8,17 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace Codat.Platform.Models.Shared +namespace Codat.Platform.Models.Errors { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; + using System; - public class ErrorMessage + /// + /// Bad Request + /// + public class ErrorMessage : Exception { /// diff --git a/platform/Codat/Platform/Models/Errors/SDKException.cs b/platform/Codat/Platform/Models/Errors/SDKException.cs new file mode 100644 index 000000000..2b07da1fa --- /dev/null +++ b/platform/Codat/Platform/Models/Errors/SDKException.cs @@ -0,0 +1,42 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Models.Errors +{ + using System; + using System.Net.Http; + + public class SDKException : Exception + { + + public override string Message { get; } + public int StatusCode { get; set; } + public string Body { get; set; } + public HttpResponseMessage RawResponse { get; set; } = default!; + public SDKException(string message, int statusCode, string body, HttpResponseMessage rawResponse) + { + Message = message; + this.StatusCode = statusCode; + StatusCode = statusCode; + Body = body; + RawResponse = rawResponse; + } + + public override string ToString(){ + var body = ""; + if (Body.Length > 0) + { + body += $"\n{Body}"; + } + return Message + ": Status " + StatusCode + body; + } + + } +} diff --git a/platform/CodatPlatform/Models/Operations/AddCompanyToGroupRequest.cs b/platform/Codat/Platform/Models/Operations/AddCompanyToGroupRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/AddCompanyToGroupRequest.cs rename to platform/Codat/Platform/Models/Operations/AddCompanyToGroupRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/AddCompanyToGroupResponse.cs b/platform/Codat/Platform/Models/Operations/AddCompanyToGroupResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/AddCompanyToGroupResponse.cs rename to platform/Codat/Platform/Models/Operations/AddCompanyToGroupResponse.cs index 27f895e16..f5fc6d6d0 100644 --- a/platform/CodatPlatform/Models/Operations/AddCompanyToGroupResponse.cs +++ b/platform/Codat/Platform/Models/Operations/AddCompanyToGroupResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class AddCompanyToGroupResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/ConfigureCustomDataTypeRequest.cs b/platform/Codat/Platform/Models/Operations/ConfigureCustomDataTypeRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/ConfigureCustomDataTypeRequest.cs rename to platform/Codat/Platform/Models/Operations/ConfigureCustomDataTypeRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/ConfigureCustomDataTypeResponse.cs b/platform/Codat/Platform/Models/Operations/ConfigureCustomDataTypeResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/ConfigureCustomDataTypeResponse.cs rename to platform/Codat/Platform/Models/Operations/ConfigureCustomDataTypeResponse.cs index 2ccfb3935..1482fcb43 100644 --- a/platform/CodatPlatform/Models/Operations/ConfigureCustomDataTypeResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ConfigureCustomDataTypeResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class ConfigureCustomDataTypeResponse /// public CustomDataTypeConfiguration? CustomDataTypeConfiguration { get; set; } - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/ConfigureSupplementalDataRequest.cs b/platform/Codat/Platform/Models/Operations/ConfigureSupplementalDataRequest.cs similarity index 96% rename from platform/CodatPlatform/Models/Operations/ConfigureSupplementalDataRequest.cs rename to platform/Codat/Platform/Models/Operations/ConfigureSupplementalDataRequest.cs index d6a26078b..707d731c8 100644 --- a/platform/CodatPlatform/Models/Operations/ConfigureSupplementalDataRequest.cs +++ b/platform/Codat/Platform/Models/Operations/ConfigureSupplementalDataRequest.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { + using Codat.Platform.Models.Operations; using Codat.Platform.Models.Shared; using Codat.Platform.Utils; diff --git a/platform/CodatPlatform/Models/Operations/ConfigureSupplementalDataResponse.cs b/platform/Codat/Platform/Models/Operations/ConfigureSupplementalDataResponse.cs similarity index 84% rename from platform/CodatPlatform/Models/Operations/ConfigureSupplementalDataResponse.cs rename to platform/Codat/Platform/Models/Operations/ConfigureSupplementalDataResponse.cs index a040a98f5..1816f77cd 100644 --- a/platform/CodatPlatform/Models/Operations/ConfigureSupplementalDataResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ConfigureSupplementalDataResponse.cs @@ -10,7 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { - using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +22,6 @@ public class ConfigureSupplementalDataResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/CreateApiKeyResponse.cs b/platform/Codat/Platform/Models/Operations/CreateApiKeyResponse.cs similarity index 86% rename from platform/CodatPlatform/Models/Operations/CreateApiKeyResponse.cs rename to platform/Codat/Platform/Models/Operations/CreateApiKeyResponse.cs index 14ba4a197..eb29e68b7 100644 --- a/platform/CodatPlatform/Models/Operations/CreateApiKeyResponse.cs +++ b/platform/Codat/Platform/Models/Operations/CreateApiKeyResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -20,18 +21,13 @@ public class CreateApiKeyResponse /// /// Success /// - public ApiKeyDetails? ApiKeyDetails { get; set; } + public ApiKeyDetails? ApiKeyDetails { get; set; } = null; /// /// HTTP response content type for this operation /// public string? ContentType { get; set; } = default!; - /// - /// Bad Request - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/CreateCompanyResponse.cs b/platform/Codat/Platform/Models/Operations/CreateCompanyResponse.cs similarity index 89% rename from platform/CodatPlatform/Models/Operations/CreateCompanyResponse.cs rename to platform/Codat/Platform/Models/Operations/CreateCompanyResponse.cs index efc371917..ca4721f1e 100644 --- a/platform/CodatPlatform/Models/Operations/CreateCompanyResponse.cs +++ b/platform/Codat/Platform/Models/Operations/CreateCompanyResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class CreateCompanyResponse /// public string? ContentType { get; set; } = default!; - /// - /// The request made is not valid. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/CreateConnectionRequest.cs b/platform/Codat/Platform/Models/Operations/CreateConnectionRequest.cs similarity index 95% rename from platform/CodatPlatform/Models/Operations/CreateConnectionRequest.cs rename to platform/Codat/Platform/Models/Operations/CreateConnectionRequest.cs index 029912356..348883c1f 100644 --- a/platform/CodatPlatform/Models/Operations/CreateConnectionRequest.cs +++ b/platform/Codat/Platform/Models/Operations/CreateConnectionRequest.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { + using Codat.Platform.Models.Operations; using Codat.Platform.Utils; public class CreateConnectionRequest diff --git a/platform/CodatPlatform/Models/Operations/CreateConnectionRequestBody.cs b/platform/Codat/Platform/Models/Operations/CreateConnectionRequestBody.cs similarity index 97% rename from platform/CodatPlatform/Models/Operations/CreateConnectionRequestBody.cs rename to platform/Codat/Platform/Models/Operations/CreateConnectionRequestBody.cs index 1bb894a88..cc787972a 100644 --- a/platform/CodatPlatform/Models/Operations/CreateConnectionRequestBody.cs +++ b/platform/Codat/Platform/Models/Operations/CreateConnectionRequestBody.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { + using Codat.Platform.Utils; using Newtonsoft.Json; public class CreateConnectionRequestBody diff --git a/platform/CodatPlatform/Models/Operations/CreateConnectionResponse.cs b/platform/Codat/Platform/Models/Operations/CreateConnectionResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/CreateConnectionResponse.cs rename to platform/Codat/Platform/Models/Operations/CreateConnectionResponse.cs index b229dd547..5a92d45a7 100644 --- a/platform/CodatPlatform/Models/Operations/CreateConnectionResponse.cs +++ b/platform/Codat/Platform/Models/Operations/CreateConnectionResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class CreateConnectionResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/CreateGroupResponse.cs b/platform/Codat/Platform/Models/Operations/CreateGroupResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/CreateGroupResponse.cs rename to platform/Codat/Platform/Models/Operations/CreateGroupResponse.cs index edca7d123..007eb8b31 100644 --- a/platform/CodatPlatform/Models/Operations/CreateGroupResponse.cs +++ b/platform/Codat/Platform/Models/Operations/CreateGroupResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class CreateGroupResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// Success /// diff --git a/platform/CodatPlatform/Models/Operations/CreateRuleResponse.cs b/platform/Codat/Platform/Models/Operations/CreateRuleResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/CreateRuleResponse.cs rename to platform/Codat/Platform/Models/Operations/CreateRuleResponse.cs index b8352e4d8..2c3e00f61 100644 --- a/platform/CodatPlatform/Models/Operations/CreateRuleResponse.cs +++ b/platform/Codat/Platform/Models/Operations/CreateRuleResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class CreateRuleResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/CreateWebhookConsumerResponse.cs b/platform/Codat/Platform/Models/Operations/CreateWebhookConsumerResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/CreateWebhookConsumerResponse.cs rename to platform/Codat/Platform/Models/Operations/CreateWebhookConsumerResponse.cs index 1273204e0..45ad246d8 100644 --- a/platform/CodatPlatform/Models/Operations/CreateWebhookConsumerResponse.cs +++ b/platform/Codat/Platform/Models/Operations/CreateWebhookConsumerResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class CreateWebhookConsumerResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/DataType.cs b/platform/Codat/Platform/Models/Operations/DataType.cs similarity index 98% rename from platform/CodatPlatform/Models/Operations/DataType.cs rename to platform/Codat/Platform/Models/Operations/DataType.cs index 8d0611bac..105709263 100644 --- a/platform/CodatPlatform/Models/Operations/DataType.cs +++ b/platform/Codat/Platform/Models/Operations/DataType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Operations/DeleteApiKeyRequest.cs b/platform/Codat/Platform/Models/Operations/DeleteApiKeyRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/DeleteApiKeyRequest.cs rename to platform/Codat/Platform/Models/Operations/DeleteApiKeyRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/DeleteApiKeyResponse.cs b/platform/Codat/Platform/Models/Operations/DeleteApiKeyResponse.cs similarity index 94% rename from platform/CodatPlatform/Models/Operations/DeleteApiKeyResponse.cs rename to platform/Codat/Platform/Models/Operations/DeleteApiKeyResponse.cs index d12a8f076..c1d7f7167 100644 --- a/platform/CodatPlatform/Models/Operations/DeleteApiKeyResponse.cs +++ b/platform/Codat/Platform/Models/Operations/DeleteApiKeyResponse.cs @@ -10,7 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Operations { - using Codat.Platform.Models.Shared; + using Codat.Platform.Models.Errors; + using Codat.Platform.Utils; using System.Net.Http; using System; diff --git a/platform/CodatPlatform/Models/Operations/DeleteCompanyRequest.cs b/platform/Codat/Platform/Models/Operations/DeleteCompanyRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/DeleteCompanyRequest.cs rename to platform/Codat/Platform/Models/Operations/DeleteCompanyRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/DeleteCompanyResponse.cs b/platform/Codat/Platform/Models/Operations/DeleteCompanyResponse.cs similarity index 84% rename from platform/CodatPlatform/Models/Operations/DeleteCompanyResponse.cs rename to platform/Codat/Platform/Models/Operations/DeleteCompanyResponse.cs index 88c4c04c6..b65bf44cb 100644 --- a/platform/CodatPlatform/Models/Operations/DeleteCompanyResponse.cs +++ b/platform/Codat/Platform/Models/Operations/DeleteCompanyResponse.cs @@ -10,7 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { - using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +22,6 @@ public class DeleteCompanyResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/DeleteConnectionRequest.cs b/platform/Codat/Platform/Models/Operations/DeleteConnectionRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/DeleteConnectionRequest.cs rename to platform/Codat/Platform/Models/Operations/DeleteConnectionRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/DeleteConnectionResponse.cs b/platform/Codat/Platform/Models/Operations/DeleteConnectionResponse.cs similarity index 84% rename from platform/CodatPlatform/Models/Operations/DeleteConnectionResponse.cs rename to platform/Codat/Platform/Models/Operations/DeleteConnectionResponse.cs index 65b0ea9bd..3b4430e4c 100644 --- a/platform/CodatPlatform/Models/Operations/DeleteConnectionResponse.cs +++ b/platform/Codat/Platform/Models/Operations/DeleteConnectionResponse.cs @@ -10,7 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { - using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +22,6 @@ public class DeleteConnectionResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/DeleteWebhookConsumerRequest.cs b/platform/Codat/Platform/Models/Operations/DeleteWebhookConsumerRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/DeleteWebhookConsumerRequest.cs rename to platform/Codat/Platform/Models/Operations/DeleteWebhookConsumerRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/DeleteWebhookConsumerResponse.cs b/platform/Codat/Platform/Models/Operations/DeleteWebhookConsumerResponse.cs similarity index 84% rename from platform/CodatPlatform/Models/Operations/DeleteWebhookConsumerResponse.cs rename to platform/Codat/Platform/Models/Operations/DeleteWebhookConsumerResponse.cs index fc111f39e..f8a272926 100644 --- a/platform/CodatPlatform/Models/Operations/DeleteWebhookConsumerResponse.cs +++ b/platform/Codat/Platform/Models/Operations/DeleteWebhookConsumerResponse.cs @@ -10,7 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { - using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +22,6 @@ public class DeleteWebhookConsumerResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/GetCompanyDataStatusRequest.cs b/platform/Codat/Platform/Models/Operations/GetCompanyDataStatusRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/GetCompanyDataStatusRequest.cs rename to platform/Codat/Platform/Models/Operations/GetCompanyDataStatusRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/GetCompanyDataStatusResponse.cs b/platform/Codat/Platform/Models/Operations/GetCompanyDataStatusResponse.cs similarity index 81% rename from platform/CodatPlatform/Models/Operations/GetCompanyDataStatusResponse.cs rename to platform/Codat/Platform/Models/Operations/GetCompanyDataStatusResponse.cs index 5c8a83f1d..3241145ef 100644 --- a/platform/CodatPlatform/Models/Operations/GetCompanyDataStatusResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetCompanyDataStatusResponse.cs @@ -11,7 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; - using System.Collections.Generic; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -26,12 +26,7 @@ public class GetCompanyDataStatusResponse /// /// OK /// - public Dictionary? DataStatuses { get; set; } - - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } + public DataStatuses? DataStatuses { get; set; } /// /// HTTP response status code for this operation diff --git a/platform/CodatPlatform/Models/Operations/GetCompanyPushHistoryRequest.cs b/platform/Codat/Platform/Models/Operations/GetCompanyPushHistoryRequest.cs similarity index 95% rename from platform/CodatPlatform/Models/Operations/GetCompanyPushHistoryRequest.cs rename to platform/Codat/Platform/Models/Operations/GetCompanyPushHistoryRequest.cs index a8ffb3eba..b39025fba 100644 --- a/platform/CodatPlatform/Models/Operations/GetCompanyPushHistoryRequest.cs +++ b/platform/Codat/Platform/Models/Operations/GetCompanyPushHistoryRequest.cs @@ -31,13 +31,13 @@ public class GetCompanyPushHistoryRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/platform/CodatPlatform/Models/Operations/GetCompanyPushHistoryResponse.cs b/platform/Codat/Platform/Models/Operations/GetCompanyPushHistoryResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetCompanyPushHistoryResponse.cs rename to platform/Codat/Platform/Models/Operations/GetCompanyPushHistoryResponse.cs index 357fd2838..8183cc9d0 100644 --- a/platform/CodatPlatform/Models/Operations/GetCompanyPushHistoryResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetCompanyPushHistoryResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetCompanyPushHistoryResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/GetCompanyRequest.cs b/platform/Codat/Platform/Models/Operations/GetCompanyRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/GetCompanyRequest.cs rename to platform/Codat/Platform/Models/Operations/GetCompanyRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/GetCompanyResponse.cs b/platform/Codat/Platform/Models/Operations/GetCompanyResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetCompanyResponse.cs rename to platform/Codat/Platform/Models/Operations/GetCompanyResponse.cs index 8aa2af99f..e916e835b 100644 --- a/platform/CodatPlatform/Models/Operations/GetCompanyResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetCompanyResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class GetCompanyResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/Codat/Platform/Models/Operations/GetConnectionManagementAccessTokenRequest.cs b/platform/Codat/Platform/Models/Operations/GetConnectionManagementAccessTokenRequest.cs new file mode 100644 index 000000000..ae783af84 --- /dev/null +++ b/platform/Codat/Platform/Models/Operations/GetConnectionManagementAccessTokenRequest.cs @@ -0,0 +1,24 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Models.Operations +{ + using Codat.Platform.Utils; + + public class GetConnectionManagementAccessTokenRequest + { + + /// + /// Unique identifier for a company. + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } = default!; + } +} \ No newline at end of file diff --git a/platform/Codat/Platform/Models/Operations/GetConnectionManagementAccessTokenResponse.cs b/platform/Codat/Platform/Models/Operations/GetConnectionManagementAccessTokenResponse.cs new file mode 100644 index 000000000..56587d53b --- /dev/null +++ b/platform/Codat/Platform/Models/Operations/GetConnectionManagementAccessTokenResponse.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Models.Operations +{ + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; + using System.Net.Http; + using System; + + public class GetConnectionManagementAccessTokenResponse + { + + /// + /// Success + /// + public ConnectionManagementAccessToken? ConnectionManagementAccessToken { get; set; } + + /// + /// 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/platform/Codat/Platform/Models/Operations/GetConnectionManagementCorsSettingsResponse.cs b/platform/Codat/Platform/Models/Operations/GetConnectionManagementCorsSettingsResponse.cs new file mode 100644 index 000000000..dd8e656ab --- /dev/null +++ b/platform/Codat/Platform/Models/Operations/GetConnectionManagementCorsSettingsResponse.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Models.Operations +{ + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; + using System.Net.Http; + using System; + + public class GetConnectionManagementCorsSettingsResponse + { + + /// + /// Success + /// + public ConnectionManagementAllowedOrigins? ConnectionManagementAllowedOrigins { get; set; } + + /// + /// 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/platform/CodatPlatform/Models/Operations/GetConnectionRequest.cs b/platform/Codat/Platform/Models/Operations/GetConnectionRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/GetConnectionRequest.cs rename to platform/Codat/Platform/Models/Operations/GetConnectionRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/GetConnectionResponse.cs b/platform/Codat/Platform/Models/Operations/GetConnectionResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetConnectionResponse.cs rename to platform/Codat/Platform/Models/Operations/GetConnectionResponse.cs index 2c0ce3376..367f014af 100644 --- a/platform/CodatPlatform/Models/Operations/GetConnectionResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetConnectionResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class GetConnectionResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeRequest.cs b/platform/Codat/Platform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeRequest.cs rename to platform/Codat/Platform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.cs b/platform/Codat/Platform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.cs rename to platform/Codat/Platform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.cs index 61633421e..f4c9a4257 100644 --- a/platform/CodatPlatform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetCreateUpdateModelOptionsByDataTypeResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/GetCustomDataTypeConfigurationRequest.cs b/platform/Codat/Platform/Models/Operations/GetCustomDataTypeConfigurationRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/GetCustomDataTypeConfigurationRequest.cs rename to platform/Codat/Platform/Models/Operations/GetCustomDataTypeConfigurationRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/GetCustomDataTypeConfigurationResponse.cs b/platform/Codat/Platform/Models/Operations/GetCustomDataTypeConfigurationResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetCustomDataTypeConfigurationResponse.cs rename to platform/Codat/Platform/Models/Operations/GetCustomDataTypeConfigurationResponse.cs index 91af13215..a32b51bf8 100644 --- a/platform/CodatPlatform/Models/Operations/GetCustomDataTypeConfigurationResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetCustomDataTypeConfigurationResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class GetCustomDataTypeConfigurationResponse /// public CustomDataTypeRecords? CustomDataTypeRecords { get; set; } - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/GetIntegrationRequest.cs b/platform/Codat/Platform/Models/Operations/GetIntegrationRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/GetIntegrationRequest.cs rename to platform/Codat/Platform/Models/Operations/GetIntegrationRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/GetIntegrationResponse.cs b/platform/Codat/Platform/Models/Operations/GetIntegrationResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetIntegrationResponse.cs rename to platform/Codat/Platform/Models/Operations/GetIntegrationResponse.cs index 5ba1ce012..7c89fade3 100644 --- a/platform/CodatPlatform/Models/Operations/GetIntegrationResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetIntegrationResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetIntegrationResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/GetIntegrationsBrandingRequest.cs b/platform/Codat/Platform/Models/Operations/GetIntegrationsBrandingRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/GetIntegrationsBrandingRequest.cs rename to platform/Codat/Platform/Models/Operations/GetIntegrationsBrandingRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/GetIntegrationsBrandingResponse.cs b/platform/Codat/Platform/Models/Operations/GetIntegrationsBrandingResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetIntegrationsBrandingResponse.cs rename to platform/Codat/Platform/Models/Operations/GetIntegrationsBrandingResponse.cs index 821d2fa20..06bbed489 100644 --- a/platform/CodatPlatform/Models/Operations/GetIntegrationsBrandingResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetIntegrationsBrandingResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class GetIntegrationsBrandingResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/GetProfileResponse.cs b/platform/Codat/Platform/Models/Operations/GetProfileResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetProfileResponse.cs rename to platform/Codat/Platform/Models/Operations/GetProfileResponse.cs index c5c040bda..b236754ab 100644 --- a/platform/CodatPlatform/Models/Operations/GetProfileResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetProfileResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetProfileResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/GetProfileSyncSettingsResponse.cs b/platform/Codat/Platform/Models/Operations/GetProfileSyncSettingsResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetProfileSyncSettingsResponse.cs rename to platform/Codat/Platform/Models/Operations/GetProfileSyncSettingsResponse.cs index 10d5c1f61..6f4f97570 100644 --- a/platform/CodatPlatform/Models/Operations/GetProfileSyncSettingsResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetProfileSyncSettingsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetProfileSyncSettingsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/GetPullOperationRequest.cs b/platform/Codat/Platform/Models/Operations/GetPullOperationRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/GetPullOperationRequest.cs rename to platform/Codat/Platform/Models/Operations/GetPullOperationRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/GetPullOperationResponse.cs b/platform/Codat/Platform/Models/Operations/GetPullOperationResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetPullOperationResponse.cs rename to platform/Codat/Platform/Models/Operations/GetPullOperationResponse.cs index e149448b5..7614bf181 100644 --- a/platform/CodatPlatform/Models/Operations/GetPullOperationResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetPullOperationResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetPullOperationResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/GetPushOperationRequest.cs b/platform/Codat/Platform/Models/Operations/GetPushOperationRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/GetPushOperationRequest.cs rename to platform/Codat/Platform/Models/Operations/GetPushOperationRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/GetPushOperationResponse.cs b/platform/Codat/Platform/Models/Operations/GetPushOperationResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetPushOperationResponse.cs rename to platform/Codat/Platform/Models/Operations/GetPushOperationResponse.cs index e40420396..29d3624ae 100644 --- a/platform/CodatPlatform/Models/Operations/GetPushOperationResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetPushOperationResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetPushOperationResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/GetSupplementalDataConfigurationRequest.cs b/platform/Codat/Platform/Models/Operations/GetSupplementalDataConfigurationRequest.cs similarity index 96% rename from platform/CodatPlatform/Models/Operations/GetSupplementalDataConfigurationRequest.cs rename to platform/Codat/Platform/Models/Operations/GetSupplementalDataConfigurationRequest.cs index 96be781f4..b5c7ec48c 100644 --- a/platform/CodatPlatform/Models/Operations/GetSupplementalDataConfigurationRequest.cs +++ b/platform/Codat/Platform/Models/Operations/GetSupplementalDataConfigurationRequest.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { + using Codat.Platform.Models.Operations; using Codat.Platform.Utils; public class GetSupplementalDataConfigurationRequest diff --git a/platform/CodatPlatform/Models/Operations/GetSupplementalDataConfigurationResponse.cs b/platform/Codat/Platform/Models/Operations/GetSupplementalDataConfigurationResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetSupplementalDataConfigurationResponse.cs rename to platform/Codat/Platform/Models/Operations/GetSupplementalDataConfigurationResponse.cs index a5d1c4d23..322cde268 100644 --- a/platform/CodatPlatform/Models/Operations/GetSupplementalDataConfigurationResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetSupplementalDataConfigurationResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetSupplementalDataConfigurationResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/GetWebhookRequest.cs b/platform/Codat/Platform/Models/Operations/GetWebhookRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/GetWebhookRequest.cs rename to platform/Codat/Platform/Models/Operations/GetWebhookRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/GetWebhookResponse.cs b/platform/Codat/Platform/Models/Operations/GetWebhookResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/GetWebhookResponse.cs rename to platform/Codat/Platform/Models/Operations/GetWebhookResponse.cs index 80c7f5e54..fbecaa698 100644 --- a/platform/CodatPlatform/Models/Operations/GetWebhookResponse.cs +++ b/platform/Codat/Platform/Models/Operations/GetWebhookResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetWebhookResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/ListApiKeysResponse.cs b/platform/Codat/Platform/Models/Operations/ListApiKeysResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/ListApiKeysResponse.cs rename to platform/Codat/Platform/Models/Operations/ListApiKeysResponse.cs index 7d6c5f274..eadb206c1 100644 --- a/platform/CodatPlatform/Models/Operations/ListApiKeysResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ListApiKeysResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class ListApiKeysResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/ListCompaniesRequest.cs b/platform/Codat/Platform/Models/Operations/ListCompaniesRequest.cs similarity index 94% rename from platform/CodatPlatform/Models/Operations/ListCompaniesRequest.cs rename to platform/Codat/Platform/Models/Operations/ListCompaniesRequest.cs index 33169a925..c4bb80807 100644 --- a/platform/CodatPlatform/Models/Operations/ListCompaniesRequest.cs +++ b/platform/Codat/Platform/Models/Operations/ListCompaniesRequest.cs @@ -25,13 +25,13 @@ public class ListCompaniesRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/platform/CodatPlatform/Models/Operations/ListCompaniesResponse.cs b/platform/Codat/Platform/Models/Operations/ListCompaniesResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/ListCompaniesResponse.cs rename to platform/Codat/Platform/Models/Operations/ListCompaniesResponse.cs index 2924eadbe..eb46169de 100644 --- a/platform/CodatPlatform/Models/Operations/ListCompaniesResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ListCompaniesResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class ListCompaniesResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/ListConnectionsRequest.cs b/platform/Codat/Platform/Models/Operations/ListConnectionsRequest.cs similarity index 95% rename from platform/CodatPlatform/Models/Operations/ListConnectionsRequest.cs rename to platform/Codat/Platform/Models/Operations/ListConnectionsRequest.cs index fd0d5b45e..01a10bebb 100644 --- a/platform/CodatPlatform/Models/Operations/ListConnectionsRequest.cs +++ b/platform/Codat/Platform/Models/Operations/ListConnectionsRequest.cs @@ -31,13 +31,13 @@ public class ListConnectionsRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/platform/CodatPlatform/Models/Operations/ListConnectionsResponse.cs b/platform/Codat/Platform/Models/Operations/ListConnectionsResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/ListConnectionsResponse.cs rename to platform/Codat/Platform/Models/Operations/ListConnectionsResponse.cs index 458311604..c6d899d39 100644 --- a/platform/CodatPlatform/Models/Operations/ListConnectionsResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ListConnectionsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class ListConnectionsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/ListCustomDataTypeRecordsRequest.cs b/platform/Codat/Platform/Models/Operations/ListCustomDataTypeRecordsRequest.cs similarity index 94% rename from platform/CodatPlatform/Models/Operations/ListCustomDataTypeRecordsRequest.cs rename to platform/Codat/Platform/Models/Operations/ListCustomDataTypeRecordsRequest.cs index 0849d14c9..aefd706d4 100644 --- a/platform/CodatPlatform/Models/Operations/ListCustomDataTypeRecordsRequest.cs +++ b/platform/Codat/Platform/Models/Operations/ListCustomDataTypeRecordsRequest.cs @@ -37,12 +37,12 @@ public class ListCustomDataTypeRecordsRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Operations/ListCustomDataTypeRecordsResponse.cs b/platform/Codat/Platform/Models/Operations/ListCustomDataTypeRecordsResponse.cs similarity index 89% rename from platform/CodatPlatform/Models/Operations/ListCustomDataTypeRecordsResponse.cs rename to platform/Codat/Platform/Models/Operations/ListCustomDataTypeRecordsResponse.cs index 1924e9399..624a81754 100644 --- a/platform/CodatPlatform/Models/Operations/ListCustomDataTypeRecordsResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ListCustomDataTypeRecordsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class ListCustomDataTypeRecordsResponse /// public CustomDataTypeRecords? CustomDataTypeRecords { get; set; } - /// - /// The request made is not valid. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/ListGroupsResponse.cs b/platform/Codat/Platform/Models/Operations/ListGroupsResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/ListGroupsResponse.cs rename to platform/Codat/Platform/Models/Operations/ListGroupsResponse.cs index 73378c3f2..1144b0a3a 100644 --- a/platform/CodatPlatform/Models/Operations/ListGroupsResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ListGroupsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class ListGroupsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/ListIntegrationsRequest.cs b/platform/Codat/Platform/Models/Operations/ListIntegrationsRequest.cs similarity index 94% rename from platform/CodatPlatform/Models/Operations/ListIntegrationsRequest.cs rename to platform/Codat/Platform/Models/Operations/ListIntegrationsRequest.cs index a03a1f1a8..87c291f85 100644 --- a/platform/CodatPlatform/Models/Operations/ListIntegrationsRequest.cs +++ b/platform/Codat/Platform/Models/Operations/ListIntegrationsRequest.cs @@ -25,13 +25,13 @@ public class ListIntegrationsRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/platform/CodatPlatform/Models/Operations/ListIntegrationsResponse.cs b/platform/Codat/Platform/Models/Operations/ListIntegrationsResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/ListIntegrationsResponse.cs rename to platform/Codat/Platform/Models/Operations/ListIntegrationsResponse.cs index 026b2a5ec..4492b0afa 100644 --- a/platform/CodatPlatform/Models/Operations/ListIntegrationsResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ListIntegrationsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class ListIntegrationsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/ListPullOperationsRequest.cs b/platform/Codat/Platform/Models/Operations/ListPullOperationsRequest.cs similarity index 95% rename from platform/CodatPlatform/Models/Operations/ListPullOperationsRequest.cs rename to platform/Codat/Platform/Models/Operations/ListPullOperationsRequest.cs index 2febceb21..2d6d8c14e 100644 --- a/platform/CodatPlatform/Models/Operations/ListPullOperationsRequest.cs +++ b/platform/Codat/Platform/Models/Operations/ListPullOperationsRequest.cs @@ -31,13 +31,13 @@ public class ListPullOperationsRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/platform/CodatPlatform/Models/Operations/ListPullOperationsResponse.cs b/platform/Codat/Platform/Models/Operations/ListPullOperationsResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/ListPullOperationsResponse.cs rename to platform/Codat/Platform/Models/Operations/ListPullOperationsResponse.cs index 60bd97c82..14919ec32 100644 --- a/platform/CodatPlatform/Models/Operations/ListPullOperationsResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ListPullOperationsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class ListPullOperationsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/ListRulesRequest.cs b/platform/Codat/Platform/Models/Operations/ListRulesRequest.cs similarity index 94% rename from platform/CodatPlatform/Models/Operations/ListRulesRequest.cs rename to platform/Codat/Platform/Models/Operations/ListRulesRequest.cs index fce484075..e49f04203 100644 --- a/platform/CodatPlatform/Models/Operations/ListRulesRequest.cs +++ b/platform/Codat/Platform/Models/Operations/ListRulesRequest.cs @@ -25,13 +25,13 @@ public class ListRulesRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/platform/CodatPlatform/Models/Operations/ListRulesResponse.cs b/platform/Codat/Platform/Models/Operations/ListRulesResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/ListRulesResponse.cs rename to platform/Codat/Platform/Models/Operations/ListRulesResponse.cs index 0656a431f..c76fd1ccf 100644 --- a/platform/CodatPlatform/Models/Operations/ListRulesResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ListRulesResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class ListRulesResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/ListWebhookConsumersResponse.cs b/platform/Codat/Platform/Models/Operations/ListWebhookConsumersResponse.cs similarity index 89% rename from platform/CodatPlatform/Models/Operations/ListWebhookConsumersResponse.cs rename to platform/Codat/Platform/Models/Operations/ListWebhookConsumersResponse.cs index 08b28b235..1287e79a1 100644 --- a/platform/CodatPlatform/Models/Operations/ListWebhookConsumersResponse.cs +++ b/platform/Codat/Platform/Models/Operations/ListWebhookConsumersResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class ListWebhookConsumersResponse /// public string? ContentType { get; set; } = default!; - /// - /// The request made is not valid. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/PathParamDataType.cs b/platform/Codat/Platform/Models/Operations/PathParamDataType.cs similarity index 99% rename from platform/CodatPlatform/Models/Operations/PathParamDataType.cs rename to platform/Codat/Platform/Models/Operations/PathParamDataType.cs index 4300824b8..568976380 100644 --- a/platform/CodatPlatform/Models/Operations/PathParamDataType.cs +++ b/platform/Codat/Platform/Models/Operations/PathParamDataType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Operations/RefreshCompanyDataRequest.cs b/platform/Codat/Platform/Models/Operations/RefreshCompanyDataRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/RefreshCompanyDataRequest.cs rename to platform/Codat/Platform/Models/Operations/RefreshCompanyDataRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/RefreshCompanyDataResponse.cs b/platform/Codat/Platform/Models/Operations/RefreshCompanyDataResponse.cs similarity index 84% rename from platform/CodatPlatform/Models/Operations/RefreshCompanyDataResponse.cs rename to platform/Codat/Platform/Models/Operations/RefreshCompanyDataResponse.cs index a56796f2b..d472439e0 100644 --- a/platform/CodatPlatform/Models/Operations/RefreshCompanyDataResponse.cs +++ b/platform/Codat/Platform/Models/Operations/RefreshCompanyDataResponse.cs @@ -10,7 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { - using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +22,6 @@ public class RefreshCompanyDataResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/RefreshCustomDataTypeRequest.cs b/platform/Codat/Platform/Models/Operations/RefreshCustomDataTypeRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/RefreshCustomDataTypeRequest.cs rename to platform/Codat/Platform/Models/Operations/RefreshCustomDataTypeRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/RefreshCustomDataTypeResponse.cs b/platform/Codat/Platform/Models/Operations/RefreshCustomDataTypeResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/RefreshCustomDataTypeResponse.cs rename to platform/Codat/Platform/Models/Operations/RefreshCustomDataTypeResponse.cs index 28007da9c..82aa55113 100644 --- a/platform/CodatPlatform/Models/Operations/RefreshCustomDataTypeResponse.cs +++ b/platform/Codat/Platform/Models/Operations/RefreshCustomDataTypeResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class RefreshCustomDataTypeResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/RefreshDataTypeRequest.cs b/platform/Codat/Platform/Models/Operations/RefreshDataTypeRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/RefreshDataTypeRequest.cs rename to platform/Codat/Platform/Models/Operations/RefreshDataTypeRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/RefreshDataTypeResponse.cs b/platform/Codat/Platform/Models/Operations/RefreshDataTypeResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/RefreshDataTypeResponse.cs rename to platform/Codat/Platform/Models/Operations/RefreshDataTypeResponse.cs index 99b140207..9760e47ff 100644 --- a/platform/CodatPlatform/Models/Operations/RefreshDataTypeResponse.cs +++ b/platform/Codat/Platform/Models/Operations/RefreshDataTypeResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class RefreshDataTypeResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/RemoveCompanyFromGroupRequest.cs b/platform/Codat/Platform/Models/Operations/RemoveCompanyFromGroupRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/RemoveCompanyFromGroupRequest.cs rename to platform/Codat/Platform/Models/Operations/RemoveCompanyFromGroupRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/RemoveCompanyFromGroupResponse.cs b/platform/Codat/Platform/Models/Operations/RemoveCompanyFromGroupResponse.cs similarity index 84% rename from platform/CodatPlatform/Models/Operations/RemoveCompanyFromGroupResponse.cs rename to platform/Codat/Platform/Models/Operations/RemoveCompanyFromGroupResponse.cs index 2d1f39c2d..c3926603c 100644 --- a/platform/CodatPlatform/Models/Operations/RemoveCompanyFromGroupResponse.cs +++ b/platform/Codat/Platform/Models/Operations/RemoveCompanyFromGroupResponse.cs @@ -10,7 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { - using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +22,6 @@ public class RemoveCompanyFromGroupResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/Codat/Platform/Models/Operations/SetConnectionManagementCorsSettingsResponse.cs b/platform/Codat/Platform/Models/Operations/SetConnectionManagementCorsSettingsResponse.cs new file mode 100644 index 000000000..579146c6d --- /dev/null +++ b/platform/Codat/Platform/Models/Operations/SetConnectionManagementCorsSettingsResponse.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Models.Operations +{ + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; + using System.Net.Http; + using System; + + public class SetConnectionManagementCorsSettingsResponse + { + + /// + /// Success + /// + public ConnectionManagementAllowedOrigins? ConnectionManagementAllowedOrigins { get; set; } + + /// + /// 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/platform/CodatPlatform/Models/Operations/UnlinkConnectionRequest.cs b/platform/Codat/Platform/Models/Operations/UnlinkConnectionRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/UnlinkConnectionRequest.cs rename to platform/Codat/Platform/Models/Operations/UnlinkConnectionRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/UnlinkConnectionResponse.cs b/platform/Codat/Platform/Models/Operations/UnlinkConnectionResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/UnlinkConnectionResponse.cs rename to platform/Codat/Platform/Models/Operations/UnlinkConnectionResponse.cs index 28c97d4fa..56323758a 100644 --- a/platform/CodatPlatform/Models/Operations/UnlinkConnectionResponse.cs +++ b/platform/Codat/Platform/Models/Operations/UnlinkConnectionResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class UnlinkConnectionResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/UpdateCompanyRequest.cs b/platform/Codat/Platform/Models/Operations/UpdateCompanyRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/UpdateCompanyRequest.cs rename to platform/Codat/Platform/Models/Operations/UpdateCompanyRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/UpdateCompanyResponse.cs b/platform/Codat/Platform/Models/Operations/UpdateCompanyResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/UpdateCompanyResponse.cs rename to platform/Codat/Platform/Models/Operations/UpdateCompanyResponse.cs index 11e7141e7..363506e15 100644 --- a/platform/CodatPlatform/Models/Operations/UpdateCompanyResponse.cs +++ b/platform/Codat/Platform/Models/Operations/UpdateCompanyResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class UpdateCompanyResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/UpdateConnectionAuthorizationRequest.cs b/platform/Codat/Platform/Models/Operations/UpdateConnectionAuthorizationRequest.cs similarity index 100% rename from platform/CodatPlatform/Models/Operations/UpdateConnectionAuthorizationRequest.cs rename to platform/Codat/Platform/Models/Operations/UpdateConnectionAuthorizationRequest.cs diff --git a/platform/CodatPlatform/Models/Operations/UpdateConnectionAuthorizationResponse.cs b/platform/Codat/Platform/Models/Operations/UpdateConnectionAuthorizationResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/UpdateConnectionAuthorizationResponse.cs rename to platform/Codat/Platform/Models/Operations/UpdateConnectionAuthorizationResponse.cs index 90552ca59..e6b98f6f7 100644 --- a/platform/CodatPlatform/Models/Operations/UpdateConnectionAuthorizationResponse.cs +++ b/platform/Codat/Platform/Models/Operations/UpdateConnectionAuthorizationResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class UpdateConnectionAuthorizationResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Operations/UpdateProfileResponse.cs b/platform/Codat/Platform/Models/Operations/UpdateProfileResponse.cs similarity index 88% rename from platform/CodatPlatform/Models/Operations/UpdateProfileResponse.cs rename to platform/Codat/Platform/Models/Operations/UpdateProfileResponse.cs index 2457b68b7..3bdc6cf88 100644 --- a/platform/CodatPlatform/Models/Operations/UpdateProfileResponse.cs +++ b/platform/Codat/Platform/Models/Operations/UpdateProfileResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class UpdateProfileResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/platform/CodatPlatform/Models/Operations/UpdateProfileSyncSettingsRequestBody.cs b/platform/Codat/Platform/Models/Operations/UpdateProfileSyncSettingsRequestBody.cs similarity index 93% rename from platform/CodatPlatform/Models/Operations/UpdateProfileSyncSettingsRequestBody.cs rename to platform/Codat/Platform/Models/Operations/UpdateProfileSyncSettingsRequestBody.cs index 0967d1210..a53f06cad 100644 --- a/platform/CodatPlatform/Models/Operations/UpdateProfileSyncSettingsRequestBody.cs +++ b/platform/Codat/Platform/Models/Operations/UpdateProfileSyncSettingsRequestBody.cs @@ -11,6 +11,7 @@ namespace Codat.Platform.Models.Operations { using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -34,7 +35,7 @@ public class UpdateProfileSyncSettingsRequestBody /// Set to `True` if you want to override default sync settings. /// [JsonProperty("overridesDefaults")] - public bool OverridesDefaults { get; set; } = default!; + public bool? OverridesDefaults { get; set; } = true; [JsonProperty("settings")] public List Settings { get; set; } = default!; diff --git a/platform/CodatPlatform/Models/Operations/UpdateProfileSyncSettingsResponse.cs b/platform/Codat/Platform/Models/Operations/UpdateProfileSyncSettingsResponse.cs similarity index 84% rename from platform/CodatPlatform/Models/Operations/UpdateProfileSyncSettingsResponse.cs rename to platform/Codat/Platform/Models/Operations/UpdateProfileSyncSettingsResponse.cs index 9155b6b86..02dce2ed0 100644 --- a/platform/CodatPlatform/Models/Operations/UpdateProfileSyncSettingsResponse.cs +++ b/platform/Codat/Platform/Models/Operations/UpdateProfileSyncSettingsResponse.cs @@ -10,7 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Operations { - using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using System.Net.Http; using System; @@ -22,11 +22,6 @@ public class UpdateProfileSyncSettingsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/platform/CodatPlatform/Models/Shared/ApiKeyDetails.cs b/platform/Codat/Platform/Models/Shared/ApiKeyDetails.cs similarity index 96% rename from platform/CodatPlatform/Models/Shared/ApiKeyDetails.cs rename to platform/Codat/Platform/Models/Shared/ApiKeyDetails.cs index b58271fee..622c7687d 100644 --- a/platform/CodatPlatform/Models/Shared/ApiKeyDetails.cs +++ b/platform/Codat/Platform/Models/Shared/ApiKeyDetails.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; /// @@ -61,6 +62,6 @@ public class ApiKeyDetails /// A meaningful name assigned to the API key. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/ApiKeys.cs b/platform/Codat/Platform/Models/Shared/ApiKeys.cs similarity index 90% rename from platform/CodatPlatform/Models/Shared/ApiKeys.cs rename to platform/Codat/Platform/Models/Shared/ApiKeys.cs index a445db944..d2ca69ed3 100644 --- a/platform/CodatPlatform/Models/Shared/ApiKeys.cs +++ b/platform/Codat/Platform/Models/Shared/ApiKeys.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/Branding.cs b/platform/Codat/Platform/Models/Shared/Branding.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/Branding.cs rename to platform/Codat/Platform/Models/Shared/Branding.cs index fb87d9113..f807f0220 100644 --- a/platform/CodatPlatform/Models/Shared/Branding.cs +++ b/platform/Codat/Platform/Models/Shared/Branding.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class Branding diff --git a/platform/CodatPlatform/Models/Shared/BrandingButton.cs b/platform/Codat/Platform/Models/Shared/BrandingButton.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/BrandingButton.cs rename to platform/Codat/Platform/Models/Shared/BrandingButton.cs index e8e79ae4e..8c7f9f237 100644 --- a/platform/CodatPlatform/Models/Shared/BrandingButton.cs +++ b/platform/Codat/Platform/Models/Shared/BrandingButton.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; /// diff --git a/platform/CodatPlatform/Models/Shared/BrandingImage.cs b/platform/Codat/Platform/Models/Shared/BrandingImage.cs similarity index 90% rename from platform/CodatPlatform/Models/Shared/BrandingImage.cs rename to platform/Codat/Platform/Models/Shared/BrandingImage.cs index 0fcb9c4fa..3d6a6ba19 100644 --- a/platform/CodatPlatform/Models/Shared/BrandingImage.cs +++ b/platform/Codat/Platform/Models/Shared/BrandingImage.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class BrandingImage diff --git a/platform/CodatPlatform/Models/Shared/BrandingLogo.cs b/platform/Codat/Platform/Models/Shared/BrandingLogo.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/BrandingLogo.cs rename to platform/Codat/Platform/Models/Shared/BrandingLogo.cs index 3ebb7ea5a..b7b62d7cd 100644 --- a/platform/CodatPlatform/Models/Shared/BrandingLogo.cs +++ b/platform/Codat/Platform/Models/Shared/BrandingLogo.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; /// diff --git a/platform/CodatPlatform/Models/Shared/ClientRateLimitReachedWebhook.cs b/platform/Codat/Platform/Models/Shared/ClientRateLimitReachedWebhook.cs similarity index 89% rename from platform/CodatPlatform/Models/Shared/ClientRateLimitReachedWebhook.cs rename to platform/Codat/Platform/Models/Shared/ClientRateLimitReachedWebhook.cs index f00606a0f..9fa10d137 100644 --- a/platform/CodatPlatform/Models/Shared/ClientRateLimitReachedWebhook.cs +++ b/platform/Codat/Platform/Models/Shared/ClientRateLimitReachedWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body for a client that has reached their rate limit. @@ -48,6 +51,7 @@ public class ClientRateLimitReachedWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/platform/CodatPlatform/Models/Shared/ClientRateLimitReachedWebhookData.cs b/platform/Codat/Platform/Models/Shared/ClientRateLimitReachedWebhookData.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/ClientRateLimitReachedWebhookData.cs rename to platform/Codat/Platform/Models/Shared/ClientRateLimitReachedWebhookData.cs index 05f17006c..ed447bc86 100644 --- a/platform/CodatPlatform/Models/Shared/ClientRateLimitReachedWebhookData.cs +++ b/platform/Codat/Platform/Models/Shared/ClientRateLimitReachedWebhookData.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; public class ClientRateLimitReachedWebhookData diff --git a/platform/CodatPlatform/Models/Shared/ClientRateLimitResetWebhook.cs b/platform/Codat/Platform/Models/Shared/ClientRateLimitResetWebhook.cs similarity index 89% rename from platform/CodatPlatform/Models/Shared/ClientRateLimitResetWebhook.cs rename to platform/Codat/Platform/Models/Shared/ClientRateLimitResetWebhook.cs index 6a507003a..e08850582 100644 --- a/platform/CodatPlatform/Models/Shared/ClientRateLimitResetWebhook.cs +++ b/platform/Codat/Platform/Models/Shared/ClientRateLimitResetWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body for a client that has had their rate limit reset. @@ -48,6 +51,7 @@ public class ClientRateLimitResetWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/platform/CodatPlatform/Models/Shared/ClientRateLimitResetWebhookData.cs b/platform/Codat/Platform/Models/Shared/ClientRateLimitResetWebhookData.cs similarity index 96% rename from platform/CodatPlatform/Models/Shared/ClientRateLimitResetWebhookData.cs rename to platform/Codat/Platform/Models/Shared/ClientRateLimitResetWebhookData.cs index d420a3ad3..d5d309351 100644 --- a/platform/CodatPlatform/Models/Shared/ClientRateLimitResetWebhookData.cs +++ b/platform/Codat/Platform/Models/Shared/ClientRateLimitResetWebhookData.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; public class ClientRateLimitResetWebhookData @@ -52,7 +53,7 @@ public class ClientRateLimitResetWebhookData /// Total number of requests remaining for your client. /// [JsonProperty("QuotaRemaining")] - public long? QuotaRemaining { get; set; } + public long? QuotaRemaining { get; set; } = null; /// /// The reason for your rate limit quota being reset. diff --git a/platform/CodatPlatform/Models/Shared/Companies.cs b/platform/Codat/Platform/Models/Shared/Companies.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/Companies.cs rename to platform/Codat/Platform/Models/Shared/Companies.cs index a6e90e4d2..9ded9b529 100644 --- a/platform/CodatPlatform/Models/Shared/Companies.cs +++ b/platform/Codat/Platform/Models/Shared/Companies.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/Company.cs b/platform/Codat/Platform/Models/Shared/Company.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/Company.cs rename to platform/Codat/Platform/Models/Shared/Company.cs index ed5c2ca60..7aa14ff0e 100644 --- a/platform/CodatPlatform/Models/Shared/Company.cs +++ b/platform/Codat/Platform/Models/Shared/Company.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; using System; diff --git a/platform/CodatPlatform/Models/Shared/CompanyGroupAssignment.cs b/platform/Codat/Platform/Models/Shared/CompanyGroupAssignment.cs similarity index 95% rename from platform/CodatPlatform/Models/Shared/CompanyGroupAssignment.cs rename to platform/Codat/Platform/Models/Shared/CompanyGroupAssignment.cs index 21847c0ea..8e71b03b0 100644 --- a/platform/CodatPlatform/Models/Shared/CompanyGroupAssignment.cs +++ b/platform/Codat/Platform/Models/Shared/CompanyGroupAssignment.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; public class CompanyGroupAssignment diff --git a/platform/CodatPlatform/Models/Shared/CompanyRequestBody.cs b/platform/Codat/Platform/Models/Shared/CompanyRequestBody.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/CompanyRequestBody.cs rename to platform/Codat/Platform/Models/Shared/CompanyRequestBody.cs index 3c7029354..e820ef350 100644 --- a/platform/CodatPlatform/Models/Shared/CompanyRequestBody.cs +++ b/platform/Codat/Platform/Models/Shared/CompanyRequestBody.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/Connection.cs b/platform/Codat/Platform/Models/Shared/Connection.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/Connection.cs rename to platform/Codat/Platform/Models/Shared/Connection.cs index 1881fc4dc..00458af1f 100644 --- a/platform/CodatPlatform/Models/Shared/Connection.cs +++ b/platform/Codat/Platform/Models/Shared/Connection.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/Codat/Platform/Models/Shared/ConnectionManagementAccessToken.cs b/platform/Codat/Platform/Models/Shared/ConnectionManagementAccessToken.cs new file mode 100644 index 000000000..82505fb2b --- /dev/null +++ b/platform/Codat/Platform/Models/Shared/ConnectionManagementAccessToken.cs @@ -0,0 +1,25 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Models.Shared +{ + using Codat.Platform.Utils; + using Newtonsoft.Json; + + public class ConnectionManagementAccessToken + { + + /// + /// Access token that allows SMBs to manage connections that have access to their data. + /// + [JsonProperty("accessToken")] + public string? AccessToken { get; set; } + } +} \ No newline at end of file diff --git a/platform/Codat/Platform/Models/Shared/ConnectionManagementAllowedOrigins.cs b/platform/Codat/Platform/Models/Shared/ConnectionManagementAllowedOrigins.cs new file mode 100644 index 000000000..c16da1543 --- /dev/null +++ b/platform/Codat/Platform/Models/Shared/ConnectionManagementAllowedOrigins.cs @@ -0,0 +1,26 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Models.Shared +{ + using Codat.Platform.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + + public class ConnectionManagementAllowedOrigins + { + + /// + /// An array of allowed origins (i.e. your domains) to permit cross-origin resource sharing (CORS).n resource sharing (CORS). + /// + [JsonProperty("allowedOrigins")] + public List? AllowedOrigins { get; set; } + } +} \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/ConnectionStatusChangedWebhook.cs b/platform/Codat/Platform/Models/Shared/ConnectionStatusChangedWebhook.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/ConnectionStatusChangedWebhook.cs rename to platform/Codat/Platform/Models/Shared/ConnectionStatusChangedWebhook.cs index 195b589f1..f8a0f7e2b 100644 --- a/platform/CodatPlatform/Models/Shared/ConnectionStatusChangedWebhook.cs +++ b/platform/Codat/Platform/Models/Shared/ConnectionStatusChangedWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body for a company's data connection status changed. @@ -60,6 +63,7 @@ public class ConnectionStatusChangedWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/platform/CodatPlatform/Models/Shared/ConnectionStatusChangedWebhookData.cs b/platform/Codat/Platform/Models/Shared/ConnectionStatusChangedWebhookData.cs similarity index 95% rename from platform/CodatPlatform/Models/Shared/ConnectionStatusChangedWebhookData.cs rename to platform/Codat/Platform/Models/Shared/ConnectionStatusChangedWebhookData.cs index a6373f7c8..02d11b12f 100644 --- a/platform/CodatPlatform/Models/Shared/ConnectionStatusChangedWebhookData.cs +++ b/platform/Codat/Platform/Models/Shared/ConnectionStatusChangedWebhookData.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class ConnectionStatusChangedWebhookData diff --git a/platform/CodatPlatform/Models/Shared/Connections.cs b/platform/Codat/Platform/Models/Shared/Connections.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/Connections.cs rename to platform/Codat/Platform/Models/Shared/Connections.cs index ef7d76297..0d5c37ebd 100644 --- a/platform/CodatPlatform/Models/Shared/Connections.cs +++ b/platform/Codat/Platform/Models/Shared/Connections.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/Content.cs b/platform/Codat/Platform/Models/Shared/Content.cs similarity index 93% rename from platform/CodatPlatform/Models/Shared/Content.cs rename to platform/Codat/Platform/Models/Shared/Content.cs index c36d17c12..49eb41b3e 100644 --- a/platform/CodatPlatform/Models/Shared/Content.cs +++ b/platform/Codat/Platform/Models/Shared/Content.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; public class Content { diff --git a/platform/CodatPlatform/Models/Shared/CreateApiKey.cs b/platform/Codat/Platform/Models/Shared/CreateApiKey.cs similarity index 90% rename from platform/CodatPlatform/Models/Shared/CreateApiKey.cs rename to platform/Codat/Platform/Models/Shared/CreateApiKey.cs index 07d9bd43f..930daba8c 100644 --- a/platform/CodatPlatform/Models/Shared/CreateApiKey.cs +++ b/platform/Codat/Platform/Models/Shared/CreateApiKey.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; /// @@ -22,6 +23,6 @@ public class CreateApiKey /// A meaningful name assigned to the API key. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/CreateRule.cs b/platform/Codat/Platform/Models/Shared/CreateRule.cs similarity index 93% rename from platform/CodatPlatform/Models/Shared/CreateRule.cs rename to platform/Codat/Platform/Models/Shared/CreateRule.cs index 680397a97..e030e62fe 100644 --- a/platform/CodatPlatform/Models/Shared/CreateRule.cs +++ b/platform/Codat/Platform/Models/Shared/CreateRule.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; /// diff --git a/platform/CodatPlatform/Models/Shared/CustomDataTypeConfiguration.cs b/platform/Codat/Platform/Models/Shared/CustomDataTypeConfiguration.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/CustomDataTypeConfiguration.cs rename to platform/Codat/Platform/Models/Shared/CustomDataTypeConfiguration.cs index 2c0ebcab7..a93e7211b 100644 --- a/platform/CodatPlatform/Models/Shared/CustomDataTypeConfiguration.cs +++ b/platform/Codat/Platform/Models/Shared/CustomDataTypeConfiguration.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -41,6 +42,6 @@ public class CustomDataTypeConfiguration /// Property in the source platform nominated by the client that defines the date when a record was last modified there. This value is not validated by Codat. /// [JsonProperty("sourceModifiedDate")] - public List? SourceModifiedDate { get; set; } + public List? SourceModifiedDate { get; set; } = null; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/CustomDataTypeRecord.cs b/platform/Codat/Platform/Models/Shared/CustomDataTypeRecord.cs similarity index 93% rename from platform/CodatPlatform/Models/Shared/CustomDataTypeRecord.cs rename to platform/Codat/Platform/Models/Shared/CustomDataTypeRecord.cs index d4e9446e1..02a8629c2 100644 --- a/platform/CodatPlatform/Models/Shared/CustomDataTypeRecord.cs +++ b/platform/Codat/Platform/Models/Shared/CustomDataTypeRecord.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/CustomDataTypeRecords.cs b/platform/Codat/Platform/Models/Shared/CustomDataTypeRecords.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/CustomDataTypeRecords.cs rename to platform/Codat/Platform/Models/Shared/CustomDataTypeRecords.cs index ff8bdde6f..54330f3ea 100644 --- a/platform/CodatPlatform/Models/Shared/CustomDataTypeRecords.cs +++ b/platform/Codat/Platform/Models/Shared/CustomDataTypeRecords.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/DataConnectionError.cs b/platform/Codat/Platform/Models/Shared/DataConnectionError.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/DataConnectionError.cs rename to platform/Codat/Platform/Models/Shared/DataConnectionError.cs index 449adc08e..055dada6a 100644 --- a/platform/CodatPlatform/Models/Shared/DataConnectionError.cs +++ b/platform/Codat/Platform/Models/Shared/DataConnectionError.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; public class DataConnectionError diff --git a/platform/CodatPlatform/Models/Shared/DataConnectionStatus.cs b/platform/Codat/Platform/Models/Shared/DataConnectionStatus.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/DataConnectionStatus.cs rename to platform/Codat/Platform/Models/Shared/DataConnectionStatus.cs index e6e2d870d..70cb5ca66 100644 --- a/platform/CodatPlatform/Models/Shared/DataConnectionStatus.cs +++ b/platform/Codat/Platform/Models/Shared/DataConnectionStatus.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Shared/DataStatus.cs b/platform/Codat/Platform/Models/Shared/DataStatus.cs similarity index 93% rename from platform/CodatPlatform/Models/Shared/DataStatus.cs rename to platform/Codat/Platform/Models/Shared/DataStatus.cs index c494b52ee..7a95c83e2 100644 --- a/platform/CodatPlatform/Models/Shared/DataStatus.cs +++ b/platform/Codat/Platform/Models/Shared/DataStatus.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; /// @@ -19,10 +21,10 @@ public class DataStatus { /// - /// The current status of the dataset in Codat's cache. + /// The current status of the dataset. /// [JsonProperty("currentStatus")] - public string CurrentStatus { get; set; } = default!; + public Status CurrentStatus { get; set; } = default!; /// /// Available data types diff --git a/platform/Codat/Platform/Models/Shared/DataStatuses.cs b/platform/Codat/Platform/Models/Shared/DataStatuses.cs new file mode 100644 index 000000000..b4a7e5c4c --- /dev/null +++ b/platform/Codat/Platform/Models/Shared/DataStatuses.cs @@ -0,0 +1,278 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Models.Shared +{ + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; + using Newtonsoft.Json; + + public class DataStatuses + { + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("accountTransactions")] + public DataStatus? AccountTransactions { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("balanceSheet")] + public DataStatus? BalanceSheet { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("bankAccounts")] + public DataStatus? BankAccounts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("bankTransactions")] + public DataStatus? BankTransactions { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("banking-accountBalances")] + public DataStatus? BankingAccountBalances { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("banking-accounts")] + public DataStatus? BankingAccounts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("banking-transactionCategories")] + public DataStatus? BankingTransactionCategories { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("banking-transactions")] + public DataStatus? BankingTransactions { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("billCreditNotes")] + public DataStatus? BillCreditNotes { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("billPayments")] + public DataStatus? BillPayments { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("bills")] + public DataStatus? Bills { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("cashFlowStatement")] + public DataStatus? CashFlowStatement { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("chartOfAccounts")] + public DataStatus? ChartOfAccounts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-companyInfo")] + public DataStatus? CommerceCompanyInfo { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-customers")] + public DataStatus? CommerceCustomers { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-disputes")] + public DataStatus? CommerceDisputes { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-locations")] + public DataStatus? CommerceLocations { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-orders")] + public DataStatus? CommerceOrders { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-paymentMethods")] + public DataStatus? CommercePaymentMethods { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-payments")] + public DataStatus? CommercePayments { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-productCategories")] + public DataStatus? CommerceProductCategories { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-products")] + public DataStatus? CommerceProducts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-taxComponents")] + public DataStatus? CommerceTaxComponents { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-transactions")] + public DataStatus? CommerceTransactions { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("company")] + public DataStatus? Company { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("creditNotes")] + public DataStatus? CreditNotes { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("customers")] + public DataStatus? Customers { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("directCosts")] + public DataStatus? DirectCosts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("directIncomes")] + public DataStatus? DirectIncomes { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("invoices")] + public DataStatus? Invoices { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("itemReceipts")] + public DataStatus? ItemReceipts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("items")] + public DataStatus? Items { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("journalEntries")] + public DataStatus? JournalEntries { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("journals")] + public DataStatus? Journals { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("paymentMethods")] + public DataStatus? PaymentMethods { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("payments")] + public DataStatus? Payments { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("profitAndLoss")] + public DataStatus? ProfitAndLoss { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("purchaseOrders")] + public DataStatus? PurchaseOrders { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("salesOrders")] + public DataStatus? SalesOrders { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("suppliers")] + public DataStatus? Suppliers { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("taxRates")] + public DataStatus? TaxRates { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("trackingCategories")] + public DataStatus? TrackingCategories { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("transfers")] + public DataStatus? Transfers { get; set; } + } +} \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/DataSyncCompletedWebhook.cs b/platform/Codat/Platform/Models/Shared/DataSyncCompletedWebhook.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/DataSyncCompletedWebhook.cs rename to platform/Codat/Platform/Models/Shared/DataSyncCompletedWebhook.cs index 8d070a25e..835841e60 100644 --- a/platform/CodatPlatform/Models/Shared/DataSyncCompletedWebhook.cs +++ b/platform/Codat/Platform/Models/Shared/DataSyncCompletedWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body to notify the completion of a data sync. @@ -60,6 +63,7 @@ public class DataSyncCompletedWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/platform/CodatPlatform/Models/Shared/DataSyncCompletedWebhookData.cs b/platform/Codat/Platform/Models/Shared/DataSyncCompletedWebhookData.cs similarity index 92% rename from platform/CodatPlatform/Models/Shared/DataSyncCompletedWebhookData.cs rename to platform/Codat/Platform/Models/Shared/DataSyncCompletedWebhookData.cs index 6689d5662..5a5584473 100644 --- a/platform/CodatPlatform/Models/Shared/DataSyncCompletedWebhookData.cs +++ b/platform/Codat/Platform/Models/Shared/DataSyncCompletedWebhookData.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class DataSyncCompletedWebhookData diff --git a/platform/CodatPlatform/Models/Shared/DataType.cs b/platform/Codat/Platform/Models/Shared/DataType.cs similarity index 99% rename from platform/CodatPlatform/Models/Shared/DataType.cs rename to platform/Codat/Platform/Models/Shared/DataType.cs index 4914e79b3..48543502f 100644 --- a/platform/CodatPlatform/Models/Shared/DataType.cs +++ b/platform/Codat/Platform/Models/Shared/DataType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Shared/DataTypeFeature.cs b/platform/Codat/Platform/Models/Shared/DataTypeFeature.cs similarity index 93% rename from platform/CodatPlatform/Models/Shared/DataTypeFeature.cs rename to platform/Codat/Platform/Models/Shared/DataTypeFeature.cs index 809e9ba77..bb6dce19d 100644 --- a/platform/CodatPlatform/Models/Shared/DataTypeFeature.cs +++ b/platform/Codat/Platform/Models/Shared/DataTypeFeature.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/DataTypes.cs b/platform/Codat/Platform/Models/Shared/DataTypes.cs similarity index 99% rename from platform/CodatPlatform/Models/Shared/DataTypes.cs rename to platform/Codat/Platform/Models/Shared/DataTypes.cs index 5bc1d61ec..7ecb9dd33 100644 --- a/platform/CodatPlatform/Models/Shared/DataTypes.cs +++ b/platform/Codat/Platform/Models/Shared/DataTypes.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Shared/DatasetDataChangedWebhook.cs b/platform/Codat/Platform/Models/Shared/DatasetDataChangedWebhook.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/DatasetDataChangedWebhook.cs rename to platform/Codat/Platform/Models/Shared/DatasetDataChangedWebhook.cs index 69f5063a9..bcc903d44 100644 --- a/platform/CodatPlatform/Models/Shared/DatasetDataChangedWebhook.cs +++ b/platform/Codat/Platform/Models/Shared/DatasetDataChangedWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body to notify that a data synchronization has completed. @@ -60,6 +63,7 @@ public class DatasetDataChangedWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/platform/CodatPlatform/Models/Shared/DatasetDataChangedWebhookData.cs b/platform/Codat/Platform/Models/Shared/DatasetDataChangedWebhookData.cs similarity index 92% rename from platform/CodatPlatform/Models/Shared/DatasetDataChangedWebhookData.cs rename to platform/Codat/Platform/Models/Shared/DatasetDataChangedWebhookData.cs index 380e47fea..fe96d5e36 100644 --- a/platform/CodatPlatform/Models/Shared/DatasetDataChangedWebhookData.cs +++ b/platform/Codat/Platform/Models/Shared/DatasetDataChangedWebhookData.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class DatasetDataChangedWebhookData diff --git a/platform/Codat/Platform/Models/Shared/DatasetStatus.cs b/platform/Codat/Platform/Models/Shared/DatasetStatus.cs new file mode 100644 index 000000000..27019278f --- /dev/null +++ b/platform/Codat/Platform/Models/Shared/DatasetStatus.cs @@ -0,0 +1,99 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Models.Shared +{ + using Codat.Platform.Utils; + using Newtonsoft.Json; + using System; + + /// + /// The current status of the dataset. + /// + public enum DatasetStatus + { + [JsonProperty("Initial")] + Initial, + [JsonProperty("Queued")] + Queued, + [JsonProperty("Fetching")] + Fetching, + [JsonProperty("MapQueued")] + MapQueued, + [JsonProperty("Mapping")] + Mapping, + [JsonProperty("Complete")] + Complete, + [JsonProperty("FetchError")] + FetchError, + [JsonProperty("MapError")] + MapError, + [JsonProperty("InternalError")] + InternalError, + [JsonProperty("ProcessingQueued")] + ProcessingQueued, + [JsonProperty("Processing")] + Processing, + [JsonProperty("ProcessingError")] + ProcessingError, + [JsonProperty("ValidationQueued")] + ValidationQueued, + [JsonProperty("Validating")] + Validating, + [JsonProperty("ValidationError")] + ValidationError, + [JsonProperty("AuthError")] + AuthError, + [JsonProperty("Cancelled")] + Cancelled, + [JsonProperty("NotSupported")] + NotSupported, + [JsonProperty("RateLimitError")] + RateLimitError, + [JsonProperty("PermissionsError")] + PermissionsError, + [JsonProperty("PrerequisiteNotMet")] + PrerequisiteNotMet, + } + + public static class DatasetStatusExtension + { + public static string Value(this DatasetStatus value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static DatasetStatus ToEnum(this string value) + { + foreach(var field in typeof(DatasetStatus).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 DatasetStatus) + { + return (DatasetStatus)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum DatasetStatus"); + } + } + +} \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/DatasetStatusChangedErrorWebhook.cs b/platform/Codat/Platform/Models/Shared/DatasetStatusChangedErrorWebhook.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/DatasetStatusChangedErrorWebhook.cs rename to platform/Codat/Platform/Models/Shared/DatasetStatusChangedErrorWebhook.cs index 7b122a896..7da6c6ff7 100644 --- a/platform/CodatPlatform/Models/Shared/DatasetStatusChangedErrorWebhook.cs +++ b/platform/Codat/Platform/Models/Shared/DatasetStatusChangedErrorWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body to notify that a data synchronization has completed. @@ -60,6 +63,7 @@ public class DatasetStatusChangedErrorWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/platform/CodatPlatform/Models/Shared/DatasetStatusChangedErrorWebhookData.cs b/platform/Codat/Platform/Models/Shared/DatasetStatusChangedErrorWebhookData.cs similarity index 93% rename from platform/CodatPlatform/Models/Shared/DatasetStatusChangedErrorWebhookData.cs rename to platform/Codat/Platform/Models/Shared/DatasetStatusChangedErrorWebhookData.cs index 11a4a4ab9..6c4defe7b 100644 --- a/platform/CodatPlatform/Models/Shared/DatasetStatusChangedErrorWebhookData.cs +++ b/platform/Codat/Platform/Models/Shared/DatasetStatusChangedErrorWebhookData.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class DatasetStatusChangedErrorWebhookData diff --git a/platform/CodatPlatform/Models/Shared/ErrorValidation.cs b/platform/Codat/Platform/Models/Shared/ErrorValidation.cs similarity index 85% rename from platform/CodatPlatform/Models/Shared/ErrorValidation.cs rename to platform/Codat/Platform/Models/Shared/ErrorValidation.cs index d20a6a9e5..e85a7bb00 100644 --- a/platform/CodatPlatform/Models/Shared/ErrorValidation.cs +++ b/platform/Codat/Platform/Models/Shared/ErrorValidation.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -20,9 +22,9 @@ public class ErrorValidation { [JsonProperty("errors")] - public List? Errors { get; set; } + public List? Errors { get; set; } = null; [JsonProperty("warnings")] - public List? Warnings { get; set; } + public List? Warnings { get; set; } = null; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/ErrorValidationItem.cs b/platform/Codat/Platform/Models/Shared/ErrorValidationItem.cs similarity index 82% rename from platform/CodatPlatform/Models/Shared/ErrorValidationItem.cs rename to platform/Codat/Platform/Models/Shared/ErrorValidationItem.cs index 93144bf69..db7cfb480 100644 --- a/platform/CodatPlatform/Models/Shared/ErrorValidationItem.cs +++ b/platform/Codat/Platform/Models/Shared/ErrorValidationItem.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; public class ErrorValidationItem @@ -19,18 +20,18 @@ public class ErrorValidationItem /// Unique identifier for a validation item. /// [JsonProperty("itemId")] - public string? ItemId { get; set; } + public string? ItemId { get; set; } = null; /// /// A message outlining validation item's issue. /// [JsonProperty("message")] - public string? Message { get; set; } + public string? Message { get; set; } = null; /// /// Name of validator. /// [JsonProperty("validatorName")] - public string? ValidatorName { get; set; } + public string? ValidatorName { get; set; } = null; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/FeatureState.cs b/platform/Codat/Platform/Models/Shared/FeatureState.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/FeatureState.cs rename to platform/Codat/Platform/Models/Shared/FeatureState.cs index ee6b893f8..9d1cd44e4 100644 --- a/platform/CodatPlatform/Models/Shared/FeatureState.cs +++ b/platform/Codat/Platform/Models/Shared/FeatureState.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Shared/FeatureType.cs b/platform/Codat/Platform/Models/Shared/FeatureType.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/FeatureType.cs rename to platform/Codat/Platform/Models/Shared/FeatureType.cs index 88f373def..ed83db49a 100644 --- a/platform/CodatPlatform/Models/Shared/FeatureType.cs +++ b/platform/Codat/Platform/Models/Shared/FeatureType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Shared/Group.cs b/platform/Codat/Platform/Models/Shared/Group.cs similarity index 96% rename from platform/CodatPlatform/Models/Shared/Group.cs rename to platform/Codat/Platform/Models/Shared/Group.cs index 89c2b5095..050873760 100644 --- a/platform/CodatPlatform/Models/Shared/Group.cs +++ b/platform/Codat/Platform/Models/Shared/Group.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; /// diff --git a/platform/CodatPlatform/Models/Shared/GroupPrototype.cs b/platform/Codat/Platform/Models/Shared/GroupPrototype.cs similarity index 96% rename from platform/CodatPlatform/Models/Shared/GroupPrototype.cs rename to platform/Codat/Platform/Models/Shared/GroupPrototype.cs index c9d68d2dc..0ace7f044 100644 --- a/platform/CodatPlatform/Models/Shared/GroupPrototype.cs +++ b/platform/Codat/Platform/Models/Shared/GroupPrototype.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; /// diff --git a/platform/CodatPlatform/Models/Shared/GroupRef.cs b/platform/Codat/Platform/Models/Shared/GroupRef.cs similarity index 95% rename from platform/CodatPlatform/Models/Shared/GroupRef.cs rename to platform/Codat/Platform/Models/Shared/GroupRef.cs index 20fb79c01..ab662378d 100644 --- a/platform/CodatPlatform/Models/Shared/GroupRef.cs +++ b/platform/Codat/Platform/Models/Shared/GroupRef.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; public class GroupRef diff --git a/platform/CodatPlatform/Models/Shared/Groups.cs b/platform/Codat/Platform/Models/Shared/Groups.cs similarity index 89% rename from platform/CodatPlatform/Models/Shared/Groups.cs rename to platform/Codat/Platform/Models/Shared/Groups.cs index 227893c8f..0579bd600 100644 --- a/platform/CodatPlatform/Models/Shared/Groups.cs +++ b/platform/Codat/Platform/Models/Shared/Groups.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/HalRef.cs b/platform/Codat/Platform/Models/Shared/HalRef.cs similarity index 95% rename from platform/CodatPlatform/Models/Shared/HalRef.cs rename to platform/Codat/Platform/Models/Shared/HalRef.cs index eb511b31c..78ead0774 100644 --- a/platform/CodatPlatform/Models/Shared/HalRef.cs +++ b/platform/Codat/Platform/Models/Shared/HalRef.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; public class HalRef diff --git a/platform/CodatPlatform/Models/Shared/ImageReference.cs b/platform/Codat/Platform/Models/Shared/ImageReference.cs similarity index 96% rename from platform/CodatPlatform/Models/Shared/ImageReference.cs rename to platform/Codat/Platform/Models/Shared/ImageReference.cs index 1e7339415..4ec3930cf 100644 --- a/platform/CodatPlatform/Models/Shared/ImageReference.cs +++ b/platform/Codat/Platform/Models/Shared/ImageReference.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; /// diff --git a/platform/CodatPlatform/Models/Shared/Integration.cs b/platform/Codat/Platform/Models/Shared/Integration.cs similarity index 97% rename from platform/CodatPlatform/Models/Shared/Integration.cs rename to platform/Codat/Platform/Models/Shared/Integration.cs index 7061b5873..1426ebf73 100644 --- a/platform/CodatPlatform/Models/Shared/Integration.cs +++ b/platform/Codat/Platform/Models/Shared/Integration.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/Integrations.cs b/platform/Codat/Platform/Models/Shared/Integrations.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/Integrations.cs rename to platform/Codat/Platform/Models/Shared/Integrations.cs index 3df828292..ec7d5854a 100644 --- a/platform/CodatPlatform/Models/Shared/Integrations.cs +++ b/platform/Codat/Platform/Models/Shared/Integrations.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/Links.cs b/platform/Codat/Platform/Models/Shared/Links.cs similarity index 92% rename from platform/CodatPlatform/Models/Shared/Links.cs rename to platform/Codat/Platform/Models/Shared/Links.cs index a802bd52a..c2df44535 100644 --- a/platform/CodatPlatform/Models/Shared/Links.cs +++ b/platform/Codat/Platform/Models/Shared/Links.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class Links diff --git a/platform/CodatPlatform/Models/Shared/ModifiedDate.cs b/platform/Codat/Platform/Models/Shared/ModifiedDate.cs similarity index 95% rename from platform/CodatPlatform/Models/Shared/ModifiedDate.cs rename to platform/Codat/Platform/Models/Shared/ModifiedDate.cs index 1c209f317..19871b57b 100644 --- a/platform/CodatPlatform/Models/Shared/ModifiedDate.cs +++ b/platform/Codat/Platform/Models/Shared/ModifiedDate.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; public class ModifiedDate diff --git a/platform/CodatPlatform/Models/Shared/NewCompanySynchronizedWebhook.cs b/platform/Codat/Platform/Models/Shared/NewCompanySynchronizedWebhook.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/NewCompanySynchronizedWebhook.cs rename to platform/Codat/Platform/Models/Shared/NewCompanySynchronizedWebhook.cs index 05e962f3f..abbac6416 100644 --- a/platform/CodatPlatform/Models/Shared/NewCompanySynchronizedWebhook.cs +++ b/platform/Codat/Platform/Models/Shared/NewCompanySynchronizedWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body to notify that a new company has successfully synchronized at least one dataType for the first time. @@ -60,6 +63,7 @@ public class NewCompanySynchronizedWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/platform/CodatPlatform/Models/Shared/NewCompanySynchronizedWebhookData.cs b/platform/Codat/Platform/Models/Shared/NewCompanySynchronizedWebhookData.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/NewCompanySynchronizedWebhookData.cs rename to platform/Codat/Platform/Models/Shared/NewCompanySynchronizedWebhookData.cs index 131fa69a2..378c6c331 100644 --- a/platform/CodatPlatform/Models/Shared/NewCompanySynchronizedWebhookData.cs +++ b/platform/Codat/Platform/Models/Shared/NewCompanySynchronizedWebhookData.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; public class NewCompanySynchronizedWebhookData { diff --git a/platform/CodatPlatform/Models/Shared/Profile.cs b/platform/Codat/Platform/Models/Shared/Profile.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/Profile.cs rename to platform/Codat/Platform/Models/Shared/Profile.cs index 8a6d5bd36..159c9a1e8 100644 --- a/platform/CodatPlatform/Models/Shared/Profile.cs +++ b/platform/Codat/Platform/Models/Shared/Profile.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; using System; diff --git a/platform/CodatPlatform/Models/Shared/PullOperation.cs b/platform/Codat/Platform/Models/Shared/PullOperation.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/PullOperation.cs rename to platform/Codat/Platform/Models/Shared/PullOperation.cs index ebad6c09b..98c0a6d06 100644 --- a/platform/CodatPlatform/Models/Shared/PullOperation.cs +++ b/platform/Codat/Platform/Models/Shared/PullOperation.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; /// @@ -71,7 +73,7 @@ public class PullOperation /// A message about a transient or persistent error. /// [JsonProperty("errorMessage")] - public string? ErrorMessage { get; set; } + public string? ErrorMessage { get; set; } = null; /// /// Unique identifier of the pull operation. @@ -125,15 +127,15 @@ public class PullOperation public string Requested { get; set; } = default!; /// - /// The current status of the pull operation. + /// The current status of the dataset. /// [JsonProperty("status")] - public Status Status { get; set; } = default!; + public DatasetStatus Status { get; set; } = default!; /// /// Additional information about the dataset status. /// [JsonProperty("statusDescription")] - public string? StatusDescription { get; set; } + public string? StatusDescription { get; set; } = null; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/PullOperations.cs b/platform/Codat/Platform/Models/Shared/PullOperations.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/PullOperations.cs rename to platform/Codat/Platform/Models/Shared/PullOperations.cs index 6472c616d..37334c5ee 100644 --- a/platform/CodatPlatform/Models/Shared/PullOperations.cs +++ b/platform/Codat/Platform/Models/Shared/PullOperations.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/PushChangeType.cs b/platform/Codat/Platform/Models/Shared/PushChangeType.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/PushChangeType.cs rename to platform/Codat/Platform/Models/Shared/PushChangeType.cs index 5a3b2bda4..c9d754cb8 100644 --- a/platform/CodatPlatform/Models/Shared/PushChangeType.cs +++ b/platform/Codat/Platform/Models/Shared/PushChangeType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Shared/PushFieldValidation.cs b/platform/Codat/Platform/Models/Shared/PushFieldValidation.cs similarity index 92% rename from platform/CodatPlatform/Models/Shared/PushFieldValidation.cs rename to platform/Codat/Platform/Models/Shared/PushFieldValidation.cs index 0b545d3e4..c42dfac23 100644 --- a/platform/CodatPlatform/Models/Shared/PushFieldValidation.cs +++ b/platform/Codat/Platform/Models/Shared/PushFieldValidation.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; public class PushFieldValidation @@ -31,6 +32,6 @@ public class PushFieldValidation /// Unique reference identifier for the validation issue. /// [JsonProperty("ref")] - public string? Ref { get; set; } + public string? Ref { get; set; } = null; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/PushOperation.cs b/platform/Codat/Platform/Models/Shared/PushOperation.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/PushOperation.cs rename to platform/Codat/Platform/Models/Shared/PushOperation.cs index 458b80a18..493744ff1 100644 --- a/platform/CodatPlatform/Models/Shared/PushOperation.cs +++ b/platform/Codat/Platform/Models/Shared/PushOperation.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; using System; @@ -21,7 +23,7 @@ public class PushOperation /// Contains a single entry that communicates which record has changed and the manner in which it changed. /// [JsonProperty("changes")] - public List? Changes { get; set; } + public List? Changes { get; set; } = null; /// /// Unique identifier for your SMB in Codat. @@ -72,7 +74,7 @@ public class PushOperation /// A message about the error. /// [JsonProperty("errorMessage")] - public string? ErrorMessage { get; set; } + public string? ErrorMessage { get; set; } = null; /// /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. @@ -123,14 +125,14 @@ public class PushOperation /// Number of minutes the push operation must complete within before it times out. /// [JsonProperty("timeoutInMinutes")] - public int? TimeoutInMinutes { get; set; } + public int? TimeoutInMinutes { get; set; } = null; /// /// Number of seconds the push operation must complete within before it times out. /// [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("timeoutInSeconds")] - public int? TimeoutInSeconds { get; set; } + public int? TimeoutInSeconds { get; set; } = null; /// /// A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. diff --git a/platform/CodatPlatform/Models/Shared/PushOperationChange.cs b/platform/Codat/Platform/Models/Shared/PushOperationChange.cs similarity index 88% rename from platform/CodatPlatform/Models/Shared/PushOperationChange.cs rename to platform/Codat/Platform/Models/Shared/PushOperationChange.cs index 9ca00d538..67292abe9 100644 --- a/platform/CodatPlatform/Models/Shared/PushOperationChange.cs +++ b/platform/Codat/Platform/Models/Shared/PushOperationChange.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class PushOperationChange @@ -19,7 +21,7 @@ public class PushOperationChange /// Unique identifier for the attachment created otherwise null. /// [JsonProperty("attachmentId")] - public string? AttachmentId { get; set; } + public string? AttachmentId { get; set; } = null; [JsonProperty("recordRef")] public PushOperationRef? RecordRef { get; set; } diff --git a/platform/CodatPlatform/Models/Shared/PushOperationRef.cs b/platform/Codat/Platform/Models/Shared/PushOperationRef.cs similarity index 92% rename from platform/CodatPlatform/Models/Shared/PushOperationRef.cs rename to platform/Codat/Platform/Models/Shared/PushOperationRef.cs index 5eb18076f..b1c19bedd 100644 --- a/platform/CodatPlatform/Models/Shared/PushOperationRef.cs +++ b/platform/Codat/Platform/Models/Shared/PushOperationRef.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class PushOperationRef diff --git a/platform/CodatPlatform/Models/Shared/PushOperationStatus.cs b/platform/Codat/Platform/Models/Shared/PushOperationStatus.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/PushOperationStatus.cs rename to platform/Codat/Platform/Models/Shared/PushOperationStatus.cs index aa7d40420..6a28f1e94 100644 --- a/platform/CodatPlatform/Models/Shared/PushOperationStatus.cs +++ b/platform/Codat/Platform/Models/Shared/PushOperationStatus.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Shared/PushOperationStatusChangedWebhook.cs b/platform/Codat/Platform/Models/Shared/PushOperationStatusChangedWebhook.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/PushOperationStatusChangedWebhook.cs rename to platform/Codat/Platform/Models/Shared/PushOperationStatusChangedWebhook.cs index d7748948a..9c6deaa55 100644 --- a/platform/CodatPlatform/Models/Shared/PushOperationStatusChangedWebhook.cs +++ b/platform/Codat/Platform/Models/Shared/PushOperationStatusChangedWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body for a push operation status change. @@ -60,6 +63,7 @@ public class PushOperationStatusChangedWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/platform/CodatPlatform/Models/Shared/PushOperationStatusChangedWebhookData.cs b/platform/Codat/Platform/Models/Shared/PushOperationStatusChangedWebhookData.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/PushOperationStatusChangedWebhookData.cs rename to platform/Codat/Platform/Models/Shared/PushOperationStatusChangedWebhookData.cs index a3054bbdd..99658231c 100644 --- a/platform/CodatPlatform/Models/Shared/PushOperationStatusChangedWebhookData.cs +++ b/platform/Codat/Platform/Models/Shared/PushOperationStatusChangedWebhookData.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class PushOperationStatusChangedWebhookData diff --git a/platform/CodatPlatform/Models/Shared/PushOperationTimedOutWebhook.cs b/platform/Codat/Platform/Models/Shared/PushOperationTimedOutWebhook.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/PushOperationTimedOutWebhook.cs rename to platform/Codat/Platform/Models/Shared/PushOperationTimedOutWebhook.cs index e9c2bd393..405f65812 100644 --- a/platform/CodatPlatform/Models/Shared/PushOperationTimedOutWebhook.cs +++ b/platform/Codat/Platform/Models/Shared/PushOperationTimedOutWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body notifying that a push push operation has timed out. @@ -60,6 +63,7 @@ public class PushOperationTimedOutWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/platform/CodatPlatform/Models/Shared/PushOperationTimedOutWebhookData.cs b/platform/Codat/Platform/Models/Shared/PushOperationTimedOutWebhookData.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/PushOperationTimedOutWebhookData.cs rename to platform/Codat/Platform/Models/Shared/PushOperationTimedOutWebhookData.cs index 33b7c24b8..689592a19 100644 --- a/platform/CodatPlatform/Models/Shared/PushOperationTimedOutWebhookData.cs +++ b/platform/Codat/Platform/Models/Shared/PushOperationTimedOutWebhookData.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class PushOperationTimedOutWebhookData diff --git a/platform/CodatPlatform/Models/Shared/PushOperations.cs b/platform/Codat/Platform/Models/Shared/PushOperations.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/PushOperations.cs rename to platform/Codat/Platform/Models/Shared/PushOperations.cs index a2f239fa2..f8d5f1fef 100644 --- a/platform/CodatPlatform/Models/Shared/PushOperations.cs +++ b/platform/Codat/Platform/Models/Shared/PushOperations.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/PushOption.cs b/platform/Codat/Platform/Models/Shared/PushOption.cs similarity index 90% rename from platform/CodatPlatform/Models/Shared/PushOption.cs rename to platform/Codat/Platform/Models/Shared/PushOption.cs index 9a3566ddc..c0dc2b187 100644 --- a/platform/CodatPlatform/Models/Shared/PushOption.cs +++ b/platform/Codat/Platform/Models/Shared/PushOption.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -29,10 +31,10 @@ public class PushOption public string DisplayName { get; set; } = default!; [JsonProperty("options")] - public List? Options { get; set; } + public List? Options { get; set; } = null; [JsonProperty("properties")] - public Dictionary? Properties { get; set; } + public Dictionary? Properties { get; set; } = null; /// /// The property is required if `True`. diff --git a/platform/CodatPlatform/Models/Shared/PushOptionChoice.cs b/platform/Codat/Platform/Models/Shared/PushOptionChoice.cs similarity index 95% rename from platform/CodatPlatform/Models/Shared/PushOptionChoice.cs rename to platform/Codat/Platform/Models/Shared/PushOptionChoice.cs index 0693a6778..cdb4b6c1b 100644 --- a/platform/CodatPlatform/Models/Shared/PushOptionChoice.cs +++ b/platform/Codat/Platform/Models/Shared/PushOptionChoice.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class PushOptionChoice diff --git a/platform/CodatPlatform/Models/Shared/PushOptionProperty.cs b/platform/Codat/Platform/Models/Shared/PushOptionProperty.cs similarity index 90% rename from platform/CodatPlatform/Models/Shared/PushOptionProperty.cs rename to platform/Codat/Platform/Models/Shared/PushOptionProperty.cs index a93a8931b..b49d1fedf 100644 --- a/platform/CodatPlatform/Models/Shared/PushOptionProperty.cs +++ b/platform/Codat/Platform/Models/Shared/PushOptionProperty.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -29,10 +31,10 @@ public class PushOptionProperty public string DisplayName { get; set; } = default!; [JsonProperty("options")] - public List? Options { get; set; } + public List? Options { get; set; } = null; [JsonProperty("properties")] - public Dictionary? Properties { get; set; } + public Dictionary? Properties { get; set; } = null; /// /// The property is required if `True`. diff --git a/platform/CodatPlatform/Models/Shared/PushOptionType.cs b/platform/Codat/Platform/Models/Shared/PushOptionType.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/PushOptionType.cs rename to platform/Codat/Platform/Models/Shared/PushOptionType.cs index ec3bb8113..8cb4ec52d 100644 --- a/platform/CodatPlatform/Models/Shared/PushOptionType.cs +++ b/platform/Codat/Platform/Models/Shared/PushOptionType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Shared/PushValidationInfo.cs b/platform/Codat/Platform/Models/Shared/PushValidationInfo.cs similarity index 89% rename from platform/CodatPlatform/Models/Shared/PushValidationInfo.cs rename to platform/Codat/Platform/Models/Shared/PushValidationInfo.cs index 3976768f8..94ceab947 100644 --- a/platform/CodatPlatform/Models/Shared/PushValidationInfo.cs +++ b/platform/Codat/Platform/Models/Shared/PushValidationInfo.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -17,9 +19,9 @@ public class PushValidationInfo { [JsonProperty("information")] - public List? Information { get; set; } + public List? Information { get; set; } = null; [JsonProperty("warnings")] - public List? Warnings { get; set; } + public List? Warnings { get; set; } = null; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/SchemaDataType.cs b/platform/Codat/Platform/Models/Shared/SchemaDataType.cs similarity index 99% rename from platform/CodatPlatform/Models/Shared/SchemaDataType.cs rename to platform/Codat/Platform/Models/Shared/SchemaDataType.cs index c40372cba..ae1a6bbd4 100644 --- a/platform/CodatPlatform/Models/Shared/SchemaDataType.cs +++ b/platform/Codat/Platform/Models/Shared/SchemaDataType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Shared/Security.cs b/platform/Codat/Platform/Models/Shared/Security.cs similarity index 100% rename from platform/CodatPlatform/Models/Shared/Security.cs rename to platform/Codat/Platform/Models/Shared/Security.cs diff --git a/platform/CodatPlatform/Models/Shared/SourceType.cs b/platform/Codat/Platform/Models/Shared/SourceType.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/SourceType.cs rename to platform/Codat/Platform/Models/Shared/SourceType.cs index 022e0aeb3..bc0ffbfbf 100644 --- a/platform/CodatPlatform/Models/Shared/SourceType.cs +++ b/platform/Codat/Platform/Models/Shared/SourceType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; diff --git a/platform/CodatPlatform/Models/Shared/Status.cs b/platform/Codat/Platform/Models/Shared/Status.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/Status.cs rename to platform/Codat/Platform/Models/Shared/Status.cs index f695d50e7..de118e9fc 100644 --- a/platform/CodatPlatform/Models/Shared/Status.cs +++ b/platform/Codat/Platform/Models/Shared/Status.cs @@ -10,11 +10,12 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System; /// - /// The current status of the pull operation. + /// The current status of the dataset. /// public enum Status { @@ -52,10 +53,6 @@ public enum Status AuthError, [JsonProperty("Cancelled")] Cancelled, - [JsonProperty("Routing")] - Routing, - [JsonProperty("RoutingError")] - RoutingError, [JsonProperty("NotSupported")] NotSupported, [JsonProperty("RateLimitError")] diff --git a/platform/CodatPlatform/Models/Shared/SupplementalDataConfiguration.cs b/platform/Codat/Platform/Models/Shared/SupplementalDataConfiguration.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/SupplementalDataConfiguration.cs rename to platform/Codat/Platform/Models/Shared/SupplementalDataConfiguration.cs index 09c77d199..d114dbbfb 100644 --- a/platform/CodatPlatform/Models/Shared/SupplementalDataConfiguration.cs +++ b/platform/Codat/Platform/Models/Shared/SupplementalDataConfiguration.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/SupplementalDataSourceConfiguration.cs b/platform/Codat/Platform/Models/Shared/SupplementalDataSourceConfiguration.cs similarity index 97% rename from platform/CodatPlatform/Models/Shared/SupplementalDataSourceConfiguration.cs rename to platform/Codat/Platform/Models/Shared/SupplementalDataSourceConfiguration.cs index cfdac4980..a0bc15c14 100644 --- a/platform/CodatPlatform/Models/Shared/SupplementalDataSourceConfiguration.cs +++ b/platform/Codat/Platform/Models/Shared/SupplementalDataSourceConfiguration.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/SupportedFeature.cs b/platform/Codat/Platform/Models/Shared/SupportedFeature.cs similarity index 92% rename from platform/CodatPlatform/Models/Shared/SupportedFeature.cs rename to platform/Codat/Platform/Models/Shared/SupportedFeature.cs index 9a22db7c1..2bffc4084 100644 --- a/platform/CodatPlatform/Models/Shared/SupportedFeature.cs +++ b/platform/Codat/Platform/Models/Shared/SupportedFeature.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class SupportedFeature diff --git a/platform/CodatPlatform/Models/Shared/SyncSetting.cs b/platform/Codat/Platform/Models/Shared/SyncSetting.cs similarity index 98% rename from platform/CodatPlatform/Models/Shared/SyncSetting.cs rename to platform/Codat/Platform/Models/Shared/SyncSetting.cs index d37a60ec1..8cf3471c9 100644 --- a/platform/CodatPlatform/Models/Shared/SyncSetting.cs +++ b/platform/Codat/Platform/Models/Shared/SyncSetting.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; /// diff --git a/platform/CodatPlatform/Models/Shared/SyncSettings.cs b/platform/Codat/Platform/Models/Shared/SyncSettings.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/SyncSettings.cs rename to platform/Codat/Platform/Models/Shared/SyncSettings.cs index bb929e981..983874b9c 100644 --- a/platform/CodatPlatform/Models/Shared/SyncSettings.cs +++ b/platform/Codat/Platform/Models/Shared/SyncSettings.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/UpdateConnectionStatus.cs b/platform/Codat/Platform/Models/Shared/UpdateConnectionStatus.cs similarity index 91% rename from platform/CodatPlatform/Models/Shared/UpdateConnectionStatus.cs rename to platform/Codat/Platform/Models/Shared/UpdateConnectionStatus.cs index a93594bf3..2e3995afb 100644 --- a/platform/CodatPlatform/Models/Shared/UpdateConnectionStatus.cs +++ b/platform/Codat/Platform/Models/Shared/UpdateConnectionStatus.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; public class UpdateConnectionStatus diff --git a/platform/CodatPlatform/Models/Shared/Validation.cs b/platform/Codat/Platform/Models/Shared/Validation.cs similarity index 80% rename from platform/CodatPlatform/Models/Shared/Validation.cs rename to platform/Codat/Platform/Models/Shared/Validation.cs index f74cb2105..020c4e446 100644 --- a/platform/CodatPlatform/Models/Shared/Validation.cs +++ b/platform/Codat/Platform/Models/Shared/Validation.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -20,9 +22,9 @@ public class Validation { [JsonProperty("errors")] - public List? Errors { get; set; } + public List? Errors { get; set; } = null; [JsonProperty("warnings")] - public List? Warnings { get; set; } + public List? Warnings { get; set; } = null; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/ValidationItem.cs b/platform/Codat/Platform/Models/Shared/ValidationItem.cs similarity index 82% rename from platform/CodatPlatform/Models/Shared/ValidationItem.cs rename to platform/Codat/Platform/Models/Shared/ValidationItem.cs index 8cc8f994e..5ed547f3a 100644 --- a/platform/CodatPlatform/Models/Shared/ValidationItem.cs +++ b/platform/Codat/Platform/Models/Shared/ValidationItem.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; public class ValidationItem @@ -19,18 +20,18 @@ public class ValidationItem /// Unique identifier for a validation item. /// [JsonProperty("itemId")] - public string? ItemId { get; set; } + public string? ItemId { get; set; } = null; /// /// A message outlining validation item's issue. /// [JsonProperty("message")] - public string? Message { get; set; } + public string? Message { get; set; } = null; /// /// Name of validator. /// [JsonProperty("validatorName")] - public string? ValidatorName { get; set; } + public string? ValidatorName { get; set; } = null; } } \ No newline at end of file diff --git a/platform/CodatPlatform/Models/Shared/Webhook.cs b/platform/Codat/Platform/Models/Shared/Webhook.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/Webhook.cs rename to platform/Codat/Platform/Models/Shared/Webhook.cs index 6cc3f4b13..fd4624ace 100644 --- a/platform/CodatPlatform/Models/Shared/Webhook.cs +++ b/platform/Codat/Platform/Models/Shared/Webhook.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; /// diff --git a/platform/CodatPlatform/Models/Shared/WebhookConsumer.cs b/platform/Codat/Platform/Models/Shared/WebhookConsumer.cs similarity index 81% rename from platform/CodatPlatform/Models/Shared/WebhookConsumer.cs rename to platform/Codat/Platform/Models/Shared/WebhookConsumer.cs index 059586ada..df0508701 100644 --- a/platform/CodatPlatform/Models/Shared/WebhookConsumer.cs +++ b/platform/Codat/Platform/Models/Shared/WebhookConsumer.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -25,11 +26,17 @@ namespace Codat.Platform.Models.Shared public class WebhookConsumer { + /// + /// Unique identifier of the company to indicate company-specific events. The associated webhook consumer will receive events only for the specified ID. + /// + [JsonProperty("companyId")] + public string? CompanyId { get; set; } = null; + /// /// Flag that enables or disables the endpoint from receiving events. Disabled when set to `true`. /// [JsonProperty("disabled")] - public bool? Disabled { get; set; } + public bool? Disabled { get; set; } = false; /// /// An array of event types the webhook consumer subscribes to. diff --git a/platform/CodatPlatform/Models/Shared/WebhookConsumerPrototype.cs b/platform/Codat/Platform/Models/Shared/WebhookConsumerPrototype.cs similarity index 75% rename from platform/CodatPlatform/Models/Shared/WebhookConsumerPrototype.cs rename to platform/Codat/Platform/Models/Shared/WebhookConsumerPrototype.cs index c81727123..ecdf3e61d 100644 --- a/platform/CodatPlatform/Models/Shared/WebhookConsumerPrototype.cs +++ b/platform/Codat/Platform/Models/Shared/WebhookConsumerPrototype.cs @@ -10,17 +10,24 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; public class WebhookConsumerPrototype { + /// + /// Unique identifier of the company to indicate company-specific events. The associated webhook consumer will receive events only for the specified ID. + /// + [JsonProperty("companyId")] + public string? CompanyId { get; set; } = null; + /// /// Flag that enables or disables the endpoint from receiving events. Disabled when set to `true`. /// [JsonProperty("disabled")] - public bool? Disabled { get; set; } + public bool? Disabled { get; set; } = false; /// /// An array of event types the webhook consumer subscribes to. diff --git a/platform/CodatPlatform/Models/Shared/WebhookConsumers.cs b/platform/Codat/Platform/Models/Shared/WebhookConsumers.cs similarity index 90% rename from platform/CodatPlatform/Models/Shared/WebhookConsumers.cs rename to platform/Codat/Platform/Models/Shared/WebhookConsumers.cs index f08ff6743..f3e3168f6 100644 --- a/platform/CodatPlatform/Models/Shared/WebhookConsumers.cs +++ b/platform/Codat/Platform/Models/Shared/WebhookConsumers.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/WebhookNotifier.cs b/platform/Codat/Platform/Models/Shared/WebhookNotifier.cs similarity index 96% rename from platform/CodatPlatform/Models/Shared/WebhookNotifier.cs rename to platform/Codat/Platform/Models/Shared/WebhookNotifier.cs index c8e1d377d..59b5287b4 100644 --- a/platform/CodatPlatform/Models/Shared/WebhookNotifier.cs +++ b/platform/Codat/Platform/Models/Shared/WebhookNotifier.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Shared/Webhooks.cs b/platform/Codat/Platform/Models/Shared/Webhooks.cs similarity index 94% rename from platform/CodatPlatform/Models/Shared/Webhooks.cs rename to platform/Codat/Platform/Models/Shared/Webhooks.cs index cbb1429b8..79b9258de 100644 --- a/platform/CodatPlatform/Models/Shared/Webhooks.cs +++ b/platform/Codat/Platform/Models/Shared/Webhooks.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Platform.Models.Shared { + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/platform/CodatPlatform/Models/Webhooks/ClientRateLimitReachedResponse.cs b/platform/Codat/Platform/Models/Webhooks/ClientRateLimitReachedResponse.cs similarity index 97% rename from platform/CodatPlatform/Models/Webhooks/ClientRateLimitReachedResponse.cs rename to platform/Codat/Platform/Models/Webhooks/ClientRateLimitReachedResponse.cs index 1a4e17e24..aacb94993 100644 --- a/platform/CodatPlatform/Models/Webhooks/ClientRateLimitReachedResponse.cs +++ b/platform/Codat/Platform/Models/Webhooks/ClientRateLimitReachedResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Webhooks { + using Codat.Platform.Utils; using System.Net.Http; using System; diff --git a/platform/CodatPlatform/Models/Webhooks/ClientRateLimitResetResponse.cs b/platform/Codat/Platform/Models/Webhooks/ClientRateLimitResetResponse.cs similarity index 97% rename from platform/CodatPlatform/Models/Webhooks/ClientRateLimitResetResponse.cs rename to platform/Codat/Platform/Models/Webhooks/ClientRateLimitResetResponse.cs index 84127d00a..13bc518d6 100644 --- a/platform/CodatPlatform/Models/Webhooks/ClientRateLimitResetResponse.cs +++ b/platform/Codat/Platform/Models/Webhooks/ClientRateLimitResetResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Webhooks { + using Codat.Platform.Utils; using System.Net.Http; using System; diff --git a/platform/CodatPlatform/Models/Webhooks/CompanyDataConnectionStatusChangedResponse.cs b/platform/Codat/Platform/Models/Webhooks/CompanyDataConnectionStatusChangedResponse.cs similarity index 97% rename from platform/CodatPlatform/Models/Webhooks/CompanyDataConnectionStatusChangedResponse.cs rename to platform/Codat/Platform/Models/Webhooks/CompanyDataConnectionStatusChangedResponse.cs index f9519a692..4be0b5a4d 100644 --- a/platform/CodatPlatform/Models/Webhooks/CompanyDataConnectionStatusChangedResponse.cs +++ b/platform/Codat/Platform/Models/Webhooks/CompanyDataConnectionStatusChangedResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Webhooks { + using Codat.Platform.Utils; using System.Net.Http; using System; diff --git a/platform/CodatPlatform/Models/Webhooks/DataSyncCompletedResponse.cs b/platform/Codat/Platform/Models/Webhooks/DataSyncCompletedResponse.cs similarity index 97% rename from platform/CodatPlatform/Models/Webhooks/DataSyncCompletedResponse.cs rename to platform/Codat/Platform/Models/Webhooks/DataSyncCompletedResponse.cs index 5012d13ad..e01813092 100644 --- a/platform/CodatPlatform/Models/Webhooks/DataSyncCompletedResponse.cs +++ b/platform/Codat/Platform/Models/Webhooks/DataSyncCompletedResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Webhooks { + using Codat.Platform.Utils; using System.Net.Http; using System; diff --git a/platform/CodatPlatform/Models/Webhooks/DatasetDataChangedResponse.cs b/platform/Codat/Platform/Models/Webhooks/DatasetDataChangedResponse.cs similarity index 97% rename from platform/CodatPlatform/Models/Webhooks/DatasetDataChangedResponse.cs rename to platform/Codat/Platform/Models/Webhooks/DatasetDataChangedResponse.cs index ca2acad84..1cef281e2 100644 --- a/platform/CodatPlatform/Models/Webhooks/DatasetDataChangedResponse.cs +++ b/platform/Codat/Platform/Models/Webhooks/DatasetDataChangedResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Webhooks { + using Codat.Platform.Utils; using System.Net.Http; using System; diff --git a/platform/CodatPlatform/Models/Webhooks/DatasetStatusHasChangedToAnErrorStateResponse.cs b/platform/Codat/Platform/Models/Webhooks/DatasetStatusHasChangedToAnErrorStateResponse.cs similarity index 97% rename from platform/CodatPlatform/Models/Webhooks/DatasetStatusHasChangedToAnErrorStateResponse.cs rename to platform/Codat/Platform/Models/Webhooks/DatasetStatusHasChangedToAnErrorStateResponse.cs index cc6b75877..4bde0db27 100644 --- a/platform/CodatPlatform/Models/Webhooks/DatasetStatusHasChangedToAnErrorStateResponse.cs +++ b/platform/Codat/Platform/Models/Webhooks/DatasetStatusHasChangedToAnErrorStateResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Webhooks { + using Codat.Platform.Utils; using System.Net.Http; using System; diff --git a/platform/CodatPlatform/Models/Webhooks/NewCompanySynchronizedResponse.cs b/platform/Codat/Platform/Models/Webhooks/NewCompanySynchronizedResponse.cs similarity index 97% rename from platform/CodatPlatform/Models/Webhooks/NewCompanySynchronizedResponse.cs rename to platform/Codat/Platform/Models/Webhooks/NewCompanySynchronizedResponse.cs index c4e5cee00..d49a1b060 100644 --- a/platform/CodatPlatform/Models/Webhooks/NewCompanySynchronizedResponse.cs +++ b/platform/Codat/Platform/Models/Webhooks/NewCompanySynchronizedResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Webhooks { + using Codat.Platform.Utils; using System.Net.Http; using System; diff --git a/platform/CodatPlatform/Models/Webhooks/PushOperationHasTimedOutResponse.cs b/platform/Codat/Platform/Models/Webhooks/PushOperationHasTimedOutResponse.cs similarity index 97% rename from platform/CodatPlatform/Models/Webhooks/PushOperationHasTimedOutResponse.cs rename to platform/Codat/Platform/Models/Webhooks/PushOperationHasTimedOutResponse.cs index dae1a1b66..ba7211e20 100644 --- a/platform/CodatPlatform/Models/Webhooks/PushOperationHasTimedOutResponse.cs +++ b/platform/Codat/Platform/Models/Webhooks/PushOperationHasTimedOutResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Webhooks { + using Codat.Platform.Utils; using System.Net.Http; using System; diff --git a/platform/CodatPlatform/Models/Webhooks/PushOperationStatusHasChangedResponse.cs b/platform/Codat/Platform/Models/Webhooks/PushOperationStatusHasChangedResponse.cs similarity index 97% rename from platform/CodatPlatform/Models/Webhooks/PushOperationStatusHasChangedResponse.cs rename to platform/Codat/Platform/Models/Webhooks/PushOperationStatusHasChangedResponse.cs index a62d5e075..65f63d1dd 100644 --- a/platform/CodatPlatform/Models/Webhooks/PushOperationStatusHasChangedResponse.cs +++ b/platform/Codat/Platform/Models/Webhooks/PushOperationStatusHasChangedResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Platform.Models.Webhooks { + using Codat.Platform.Utils; using System.Net.Http; using System; diff --git a/platform/CodatPlatform/PushData.cs b/platform/Codat/Platform/PushData.cs similarity index 53% rename from platform/CodatPlatform/PushData.cs rename to platform/Codat/Platform/PushData.cs index 8605ec2b8..81e1e9dee 100644 --- a/platform/CodatPlatform/PushData.cs +++ b/platform/Codat/Platform/PushData.cs @@ -10,17 +10,19 @@ #nullable enable namespace Codat.Platform { + using Codat.Platform.Models.Errors; using Codat.Platform.Models.Operations; using Codat.Platform.Models.Shared; using Codat.Platform.Utils; using Newtonsoft.Json; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; using System; /// - /// View push options and get push statuses. + /// Initiate and monitor Create, Update, and Delete operations. /// public interface IPushData { @@ -63,16 +65,16 @@ public interface IPushData } /// - /// View push options and get push statuses. + /// Initiate and monitor Create, Update, and Delete operations. /// public class PushData: IPushData { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private Func? _securitySource; @@ -84,7 +86,6 @@ public PushData(ISpeakeasyHttpClient defaultClient, Func? securitySour _serverUrl = serverUrl; SDKConfiguration = config; } - public async Task GetModelOptionsAsync(GetCreateUpdateModelOptionsByDataTypeRequest request) { @@ -103,38 +104,48 @@ public async Task GetModelOptions var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetCreateUpdateModelOptionsByDataTypeResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.PushOption = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetCreateUpdateModelOptionsByDataTypeResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PushOption = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task GetOperationAsync(GetPushOperationRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -152,38 +163,48 @@ public async Task GetOperationAsync(GetPushOperationRe var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetPushOperationResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.PushOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetPushOperationResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PushOperation = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task ListOperationsAsync(GetCompanyPushHistoryRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -201,36 +222,46 @@ public async Task ListOperationsAsync(GetCompanyP var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetCompanyPushHistoryResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.PushOperations = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetCompanyPushHistoryResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PushOperations = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } } - - } } \ No newline at end of file diff --git a/platform/Codat/Platform/RefreshData.cs b/platform/Codat/Platform/RefreshData.cs new file mode 100644 index 000000000..e514298ce --- /dev/null +++ b/platform/Codat/Platform/RefreshData.cs @@ -0,0 +1,390 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform +{ + using Codat.Platform.Models.Errors; + using Codat.Platform.Models.Operations; + using Codat.Platform.Models.Shared; + using Codat.Platform.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Initiate data refreshes, view pull status and history. + /// + public interface IRefreshData + { + + /// + /// Refresh all data + /// + /// + /// Refreshes all data types with `fetch on first link` set to `true` for a given company.
+ ///
+ /// This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.
+ ///
+ /// Read more about data type settings and `fetch on first link`. + ///
+ ///
+ Task AllAsync(RefreshCompanyDataRequest request); + + /// + /// Refresh data type + /// + /// + /// Refreshes a given data type for a given company.
+ ///
+ /// This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + ///
+ ///
+ Task ByDataTypeAsync(RefreshDataTypeRequest request); + + /// + /// Get data status + /// + /// + /// Get the state of each data type for a company + /// + /// + Task GetAsync(GetCompanyDataStatusRequest request); + + /// + /// Get pull operation + /// + /// + /// Retrieve information about a single dataset or pull operation. + /// + /// + Task GetPullOperationAsync(GetPullOperationRequest request); + + /// + /// List pull operations + /// + /// + /// Gets the pull operation history (datasets) for a given company. + /// + /// + Task ListPullOperationsAsync(ListPullOperationsRequest request); + } + + /// + /// Initiate data refreshes, view pull status and history. + /// + public class RefreshData: IRefreshData + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public RefreshData(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task AllAsync(RefreshCompanyDataRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/all", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 204) + { + return new RefreshCompanyDataResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ByDataTypeAsync(RefreshDataTypeRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/queue/{dataType}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 RefreshDataTypeResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PullOperation = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetAsync(GetCompanyDataStatusRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/dataStatus", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 GetCompanyDataStatusResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.DataStatuses = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetPullOperationAsync(GetPullOperationRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/history/{datasetId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 GetPullOperationResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PullOperation = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListPullOperationsAsync(ListPullOperationsRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/history", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + + var httpResponse = await client.SendAsync(httpRequest); + + 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 ListPullOperationsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PullOperations = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/platform/CodatPlatform/Settings.cs b/platform/Codat/Platform/Settings.cs similarity index 51% rename from platform/CodatPlatform/Settings.cs rename to platform/Codat/Platform/Settings.cs index 0b5e904c5..d67cd97d0 100644 --- a/platform/CodatPlatform/Settings.cs +++ b/platform/Codat/Platform/Settings.cs @@ -10,17 +10,19 @@ #nullable enable namespace Codat.Platform { + using Codat.Platform.Models.Errors; using Codat.Platform.Models.Operations; using Codat.Platform.Models.Shared; using Codat.Platform.Utils; using Newtonsoft.Json; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; using System; /// - /// Manage your Codat instance. + /// Manage company profile configuration, sync settings, and API keys. /// public interface ISettings { @@ -113,16 +115,16 @@ public interface ISettings } /// - /// Manage your Codat instance. + /// Manage company profile configuration, sync settings, and API keys. /// public class Settings: ISettings { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private Func? _securitySource; @@ -134,7 +136,6 @@ public Settings(ISpeakeasyHttpClient defaultClient, Func? securitySour _serverUrl = serverUrl; SDKConfiguration = config; } - public async Task CreateApiKeyAsync(CreateApiKey? request = null) { @@ -160,38 +161,48 @@ public async Task CreateApiKeyAsync(CreateApiKey? request var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new CreateApiKeyResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 201)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 201) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ApiKeyDetails = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + var response = new CreateApiKeyResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.ApiKeyDetails = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{400, 401, 402, 403, 409, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task DeleteApiKeyAsync(DeleteApiKeyRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -209,28 +220,48 @@ public async Task DeleteApiKeyAsync(DeleteApiKeyRequest re var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new DeleteApiKeyResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 204) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 204) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new DeleteApiKeyResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.ErrorMessage = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task GetProfileAsync() { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -249,38 +280,48 @@ public async Task GetProfileAsync() var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetProfileResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Profile = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetProfileResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Profile = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } } - - public async Task GetSyncSettingsAsync() { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -299,38 +340,48 @@ public async Task GetSyncSettingsAsync() var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetProfileSyncSettingsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.SyncSettings = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetProfileSyncSettingsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.SyncSettings = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task ListApiKeysAsync() { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -349,38 +400,48 @@ public async Task ListApiKeysAsync() var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListApiKeysResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ApiKeys = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListApiKeysResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.ApiKeys = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } } - - public async Task UpdateProfileAsync(Profile? request = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -405,38 +466,48 @@ public async Task UpdateProfileAsync(Profile? request = n var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new UpdateProfileResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Profile = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + var response = new UpdateProfileResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Profile = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } } - - public async Task UpdateSyncSettingsAsync(UpdateProfileSyncSettingsRequestBody? request = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -461,32 +532,36 @@ public async Task UpdateSyncSettingsAsync(Upd var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new UpdateProfileSyncSettingsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 204)) - { - - return response; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 204) + { + return new UpdateProfileSyncSettingsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - } } \ No newline at end of file diff --git a/platform/CodatPlatform/SupplementalData.cs b/platform/Codat/Platform/SupplementalData.cs similarity index 59% rename from platform/CodatPlatform/SupplementalData.cs rename to platform/Codat/Platform/SupplementalData.cs index d481362f1..6f5e63676 100644 --- a/platform/CodatPlatform/SupplementalData.cs +++ b/platform/Codat/Platform/SupplementalData.cs @@ -10,17 +10,19 @@ #nullable enable namespace Codat.Platform { + using Codat.Platform.Models.Errors; using Codat.Platform.Models.Operations; using Codat.Platform.Models.Shared; using Codat.Platform.Utils; using Newtonsoft.Json; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; using System; /// - /// View and configure supplemental data for supported data types. + /// Configure and pull additional data you can include in Codat's standard data types. /// public interface ISupplementalData { @@ -52,16 +54,16 @@ public interface ISupplementalData } /// - /// View and configure supplemental data for supported data types. + /// Configure and pull additional data you can include in Codat's standard data types. /// public class SupplementalData: ISupplementalData { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private Func? _securitySource; @@ -73,7 +75,6 @@ public SupplementalData(ISpeakeasyHttpClient defaultClient, Func? secu _serverUrl = serverUrl; SDKConfiguration = config; } - public async Task ConfigureAsync(ConfigureSupplementalDataRequest request) { @@ -98,34 +99,38 @@ public async Task ConfigureAsync(ConfigureSup var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ConfigureSupplementalDataResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - - return response; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new ConfigureSupplementalDataResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task GetConfigurationAsync(GetSupplementalDataConfigurationRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -143,36 +148,46 @@ public async Task GetConfigurationAsyn var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetSupplementalDataConfigurationResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.SupplementalDataConfiguration = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetSupplementalDataConfigurationResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.SupplementalDataConfiguration = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - } } \ No newline at end of file diff --git a/platform/Codat/Platform/Utils/AnyDeserializer.cs b/platform/Codat/Platform/Utils/AnyDeserializer.cs new file mode 100644 index 000000000..2958cfb90 --- /dev/null +++ b/platform/Codat/Platform/Utils/AnyDeserializer.cs @@ -0,0 +1,92 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Utils +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + + public class AnyDeserializer : JsonConverter + { + public override bool CanConvert(Type objectType) + { + return (objectType == typeof(Dictionary)); + } + + public override bool CanWrite => false; + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + throw new NotSupportedException(); + } + + public override object ReadJson( + JsonReader reader, + Type objectType, + object? existingValue, + JsonSerializer serializer + ) + { + return ParseTokenIntoDictionary(JToken.Load(reader)); + } + + private Dictionary ParseTokenIntoDictionary(JToken token) + { + var dict = new Dictionary(); + + foreach (var child in token.Children()) + { + + object? val = null; + if (child.Value is JObject) + { + val = ParseTokenIntoDictionary(child.Value); + } + else if (child.Value is JArray) + { + val = ParseTokenIntoList(child.Value); + } + else if (child.Value != null) + { + val = ((JValue)child.Value).Value; + } + + dict[child.Name] = val; + } + + return dict; + } + + private List ParseTokenIntoList(JToken token) + { + var list = new List(); + + foreach (var child in token.Children()) + { + if (child is JObject) + { + list.Add((object)ParseTokenIntoDictionary(child)); + } + else if (child is JArray) + { + list.Add((object)ParseTokenIntoList(child)); + } + else + { + list.Add(((JValue)child).Value); + } + } + + return list; + } + } +} \ No newline at end of file diff --git a/platform/CodatPlatform/Utils/BigIntSerializer.cs b/platform/Codat/Platform/Utils/BigIntStrConverter.cs similarity index 78% rename from platform/CodatPlatform/Utils/BigIntSerializer.cs rename to platform/Codat/Platform/Utils/BigIntStrConverter.cs index b7979522c..5fbb978b5 100644 --- a/platform/CodatPlatform/Utils/BigIntSerializer.cs +++ b/platform/Codat/Platform/Utils/BigIntStrConverter.cs @@ -14,12 +14,13 @@ namespace Codat.Platform.Utils using System.Globalization; using System.Numerics; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; - internal class BigIntSerializer : JsonConverter + internal class BigIntStrConverter : JsonConverter { public override bool CanConvert(Type objectType) { - var nullableType = Nullable.GetUnderlyingType(objectType); + var nullableType = Nullable.GetUnderlyingType(objectType); if (nullableType != null) { return nullableType == typeof(BigInteger); @@ -28,8 +29,6 @@ public override bool CanConvert(Type objectType) return objectType == typeof(BigInteger); } - public override bool CanRead => true; - public override object? ReadJson( JsonReader reader, Type objectType, @@ -42,7 +41,11 @@ JsonSerializer serializer return null; } - return BigInteger.Parse(reader.Value.ToString()!); + try { + return BigInteger.Parse(reader.Value.ToString()!); + } catch (System.FormatException ex) { + throw new Newtonsoft.Json.JsonSerializationException("Could not parse BigInteger", ex); + } } public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) diff --git a/platform/CodatPlatform/Utils/DecimalSerializer.cs b/platform/Codat/Platform/Utils/DecimalStrConverter.cs similarity index 81% rename from platform/CodatPlatform/Utils/DecimalSerializer.cs rename to platform/Codat/Platform/Utils/DecimalStrConverter.cs index e1e9cef69..bf4bc10a8 100644 --- a/platform/CodatPlatform/Utils/DecimalSerializer.cs +++ b/platform/Codat/Platform/Utils/DecimalStrConverter.cs @@ -13,8 +13,9 @@ namespace Codat.Platform.Utils using System; using System.Globalization; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; - internal class DecimalSerializer : JsonConverter + internal class DecimalStrConverter : JsonConverter { public override bool CanConvert(Type objectType) { @@ -27,8 +28,6 @@ public override bool CanConvert(Type objectType) return objectType == typeof(Decimal); } - public override bool CanRead => true; - public override object? ReadJson( JsonReader reader, Type objectType, @@ -41,7 +40,11 @@ JsonSerializer serializer return null; } - return Decimal.Parse(reader.Value.ToString()!); + try { + return Decimal.Parse(reader.Value.ToString()!); + } catch (System.FormatException ex) { + throw new Newtonsoft.Json.JsonSerializationException("Could not parse Decimal", ex); + } } public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) diff --git a/platform/CodatPlatform/Utils/EnumSerializer.cs b/platform/Codat/Platform/Utils/EnumConverter.cs similarity index 79% rename from platform/CodatPlatform/Utils/EnumSerializer.cs rename to platform/Codat/Platform/Utils/EnumConverter.cs index f481249f4..99ebe5b1b 100644 --- a/platform/CodatPlatform/Utils/EnumSerializer.cs +++ b/platform/Codat/Platform/Utils/EnumConverter.cs @@ -13,7 +13,7 @@ namespace Codat.Platform.Utils { - internal class EnumSerializer : JsonConverter + internal class EnumConverter : JsonConverter { public override bool CanConvert(System.Type objectType) { @@ -26,8 +26,6 @@ public override bool CanConvert(System.Type objectType) return objectType.IsEnum; } - public override bool CanRead => true; - public override object? ReadJson( JsonReader reader, System.Type objectType, @@ -41,6 +39,11 @@ JsonSerializer serializer } var extensionType = System.Type.GetType(objectType.FullName + "Extension"); + + if (Nullable.GetUnderlyingType(objectType) != null) { + extensionType = System.Type.GetType(Nullable.GetUnderlyingType(objectType)!.FullName + "Extension"); + } + if (extensionType == null) { return Enum.ToObject(objectType, reader.Value); @@ -52,7 +55,12 @@ JsonSerializer serializer throw new Exception($"Unable to find ToEnum method on {extensionType.FullName}"); } - return method.Invoke(null, new[] { (string)reader.Value }); + try { + return method.Invoke(null, new[] { (string)reader.Value }); + } catch(System.Reflection.TargetInvocationException e) { + throw new Newtonsoft.Json.JsonSerializationException("Unable to convert value to enum", e); + } + } public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) diff --git a/platform/CodatPlatform/Utils/FlexibleObjectDeserializer.cs b/platform/Codat/Platform/Utils/FlexibleObjectDeserializer.cs similarity index 100% rename from platform/CodatPlatform/Utils/FlexibleObjectDeserializer.cs rename to platform/Codat/Platform/Utils/FlexibleObjectDeserializer.cs diff --git a/platform/CodatPlatform/Utils/HeaderSerializer.cs b/platform/Codat/Platform/Utils/HeaderSerializer.cs similarity index 100% rename from platform/CodatPlatform/Utils/HeaderSerializer.cs rename to platform/Codat/Platform/Utils/HeaderSerializer.cs diff --git a/platform/CodatPlatform/Utils/IsoDateTimeSerializer.cs b/platform/Codat/Platform/Utils/IsoDateTimeSerializer.cs similarity index 100% rename from platform/CodatPlatform/Utils/IsoDateTimeSerializer.cs rename to platform/Codat/Platform/Utils/IsoDateTimeSerializer.cs diff --git a/platform/CodatPlatform/Utils/RequestBodySerializer.cs b/platform/Codat/Platform/Utils/RequestBodySerializer.cs similarity index 99% rename from platform/CodatPlatform/Utils/RequestBodySerializer.cs rename to platform/Codat/Platform/Utils/RequestBodySerializer.cs index 4d2df60e1..725339723 100644 --- a/platform/CodatPlatform/Utils/RequestBodySerializer.cs +++ b/platform/Codat/Platform/Utils/RequestBodySerializer.cs @@ -17,8 +17,10 @@ namespace Codat.Platform.Utils using System.Reflection; using System.Text; + internal class RequestBodySerializer { + public static HttpContent? Serialize( object? request, string requestFieldName, diff --git a/platform/Codat/Platform/Utils/ResponseBodyDeserializer.cs b/platform/Codat/Platform/Utils/ResponseBodyDeserializer.cs new file mode 100644 index 000000000..bc3a4db9c --- /dev/null +++ b/platform/Codat/Platform/Utils/ResponseBodyDeserializer.cs @@ -0,0 +1,30 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Platform.Utils +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Reflection; + using System.Text; + using Newtonsoft.Json; + + + internal class ResponseBodyDeserializer + { + + public static T? Deserialize(string json, NullValueHandling nullValueHandling=NullValueHandling.Ignore, MissingMemberHandling missingMemberHandling=MissingMemberHandling.Ignore) + { + return JsonConvert.DeserializeObject(json, new JsonSerializerSettings(){ NullValueHandling = nullValueHandling, MissingMemberHandling = missingMemberHandling, Converters = Utilities.GetJsonDeserializers(typeof(T))}); + } + } +} \ No newline at end of file diff --git a/platform/CodatPlatform/Utils/SecuritySerializer.cs b/platform/Codat/Platform/Utils/SecuritySerializer.cs similarity index 100% rename from platform/CodatPlatform/Utils/SecuritySerializer.cs rename to platform/Codat/Platform/Utils/SecuritySerializer.cs diff --git a/platform/CodatPlatform/Utils/SpeakeasyHttpClient.cs b/platform/Codat/Platform/Utils/SpeakeasyHttpClient.cs similarity index 100% rename from platform/CodatPlatform/Utils/SpeakeasyHttpClient.cs rename to platform/Codat/Platform/Utils/SpeakeasyHttpClient.cs diff --git a/platform/CodatPlatform/Utils/SpeakeasyMetadata.cs b/platform/Codat/Platform/Utils/SpeakeasyMetadata.cs similarity index 100% rename from platform/CodatPlatform/Utils/SpeakeasyMetadata.cs rename to platform/Codat/Platform/Utils/SpeakeasyMetadata.cs diff --git a/platform/CodatPlatform/Utils/URLBuilder.cs b/platform/Codat/Platform/Utils/URLBuilder.cs similarity index 100% rename from platform/CodatPlatform/Utils/URLBuilder.cs rename to platform/Codat/Platform/Utils/URLBuilder.cs diff --git a/platform/CodatPlatform/Utils/Utilities.cs b/platform/Codat/Platform/Utils/Utilities.cs similarity index 79% rename from platform/CodatPlatform/Utils/Utilities.cs rename to platform/Codat/Platform/Utils/Utilities.cs index 3fadceac8..3addba92f 100644 --- a/platform/CodatPlatform/Utils/Utilities.cs +++ b/platform/Codat/Platform/Utils/Utilities.cs @@ -22,25 +22,73 @@ namespace Codat.Platform.Utils public class Utilities { - public static JsonConverter[] GetJsonConverters(Type type, string format = "") + public static JsonConverter[] GetDefaultJsonSerializers() + { + return new JsonConverter[] + { + new IsoDateTimeSerializer(), + new EnumConverter() + }; + } + + public static JsonConverter[] GetDefaultJsonDeserializers() + { + return new JsonConverter[] { + new FlexibleObjectDeserializer(), + new EnumConverter(), + new AnyDeserializer() + }; + } + + public static JsonSerializerSettings GetDefaultJsonSerializerSettings() + { + return new JsonSerializerSettings() + { + NullValueHandling = NullValueHandling.Ignore, + Converters = GetDefaultJsonSerializers() + }; + } + + public static JsonSerializerSettings GetDefaultJsonDeserializerSettings() + { + return new JsonSerializerSettings() + { + NullValueHandling = NullValueHandling.Ignore, + Converters = GetDefaultJsonDeserializers() + }; + } + + public static JsonConverter[] GetJsonSerializers(Type type, string format = "") { if (format == "string") { if (type == typeof(BigInteger)) { - return new JsonConverter[] { new BigIntSerializer() }; + return new JsonConverter[] { new BigIntStrConverter() }; } + if (type == typeof(Decimal)) { - return new JsonConverter[] { new DecimalSerializer() }; + return new JsonConverter[] { new DecimalStrConverter() }; } } - return new JsonConverter[] + return GetDefaultJsonSerializers(); + } + + public static JsonConverter[] GetJsonDeserializers(Type type) + { + if (type == typeof(BigInteger)) { - new IsoDateTimeSerializer(), - new EnumSerializer(), - }; + return new JsonConverter[] { new BigIntStrConverter() }; + } + + if (type == typeof(Decimal)) + { + return new JsonConverter[] { new DecimalStrConverter() }; + } + + return GetDefaultJsonDeserializers(); } public static string SerializeJSON(object obj, string format = "") @@ -60,7 +108,7 @@ public static string SerializeJSON(object obj, string format = "") new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, - Converters = GetJsonConverters(type, format) + Converters = GetJsonSerializers(type, format) } ); } @@ -200,9 +248,12 @@ public static string ToString(object? obj) if (IsDate(obj)) { - return StripSurroundingQuotes(JsonConvert.SerializeObject(obj, new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new IsoDateTimeSerializer(), new EnumSerializer() }})); + return StripSurroundingQuotes( + JsonConvert.SerializeObject(obj, GetDefaultJsonSerializerSettings()) + ); } - return JsonConvert.SerializeObject(obj, new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new IsoDateTimeSerializer(), new EnumSerializer() }}); + + return JsonConvert.SerializeObject(obj, GetDefaultJsonSerializerSettings()); } public static bool IsContentTypeMatch(string expected, string? actual) diff --git a/platform/CodatPlatform/Webhooks.cs b/platform/Codat/Platform/Webhooks.cs similarity index 50% rename from platform/CodatPlatform/Webhooks.cs rename to platform/Codat/Platform/Webhooks.cs index 9f174bdf7..85d91ce33 100644 --- a/platform/CodatPlatform/Webhooks.cs +++ b/platform/Codat/Platform/Webhooks.cs @@ -10,17 +10,19 @@ #nullable enable namespace Codat.Platform { + using Codat.Platform.Models.Errors; using Codat.Platform.Models.Operations; using Codat.Platform.Models.Shared; using Codat.Platform.Utils; using Newtonsoft.Json; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; using System; /// - /// Manage webhooks, rules, and events. + /// Create and manage webhooks that listen to Codat's events. /// public interface IWebhooks { @@ -87,16 +89,16 @@ public interface IWebhooks } /// - /// Manage webhooks, rules, and events. + /// Create and manage webhooks that listen to Codat's events. /// public class Webhooks: IWebhooks { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; + private const string _sdkVersion = "3.6.0"; + private const string _sdkGenVersion = "2.314.0"; private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; + private const string _userAgent = "speakeasy-sdk/csharp 3.6.0 2.314.0 3.0.0 Codat.Platform"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private Func? _securitySource; @@ -108,7 +110,6 @@ public Webhooks(ISpeakeasyHttpClient defaultClient, Func? securitySour _serverUrl = serverUrl; SDKConfiguration = config; } - [Obsolete("This method will be removed in a future release, please migrate away from it as soon as possible")] public async Task CreateAsync(CreateRule? request = null) @@ -135,38 +136,48 @@ public async Task CreateAsync(CreateRule? request = null) var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new CreateRuleResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Webhook = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + var response = new CreateRuleResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Webhook = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task CreateConsumerAsync(WebhookConsumerPrototype? request = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -191,38 +202,48 @@ public async Task CreateConsumerAsync(WebhookCons var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new CreateWebhookConsumerResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 201)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 201) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.WebhookConsumer = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + var response = new CreateWebhookConsumerResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.WebhookConsumer = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Include, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task DeleteConsumerAsync(DeleteWebhookConsumerRequest request) { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -240,34 +261,38 @@ public async Task DeleteConsumerAsync(DeleteWebho var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new DeleteWebhookConsumerResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 204)) - { - - return response; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 204) + { + return new DeleteWebhookConsumerResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } } - - [Obsolete("This method will be removed in a future release, please migrate away from it as soon as possible")] public async Task GetAsync(GetWebhookRequest request) { @@ -286,38 +311,48 @@ public async Task GetAsync(GetWebhookRequest request) var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetWebhookResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Webhook = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetWebhookResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Webhook = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - [Obsolete("This method will be removed in a future release, please migrate away from it as soon as possible")] public async Task ListAsync(ListRulesRequest request) { @@ -336,38 +371,48 @@ public async Task ListAsync(ListRulesRequest request) var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListRulesResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Webhooks = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListRulesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Webhooks = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; } - - return response; + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - return response; } - - public async Task ListConsumersAsync() { string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); @@ -386,36 +431,46 @@ public async Task ListConsumersAsync() var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListWebhookConsumersResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.WebhookConsumers = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListWebhookConsumersResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.WebhookConsumers = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) + else if(new List{400, 401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } } - - } } \ No newline at end of file diff --git a/platform/CodatPlatform/Connections.cs b/platform/CodatPlatform/Connections.cs deleted file mode 100644 index 08b0a5642..000000000 --- a/platform/CodatPlatform/Connections.cs +++ /dev/null @@ -1,418 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Platform -{ - using Codat.Platform.Models.Operations; - using Codat.Platform.Models.Shared; - using Codat.Platform.Utils; - using Newtonsoft.Json; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// Manage your companies' data connections. - /// - public interface IConnections - { - - /// - /// Create connection - /// - /// - /// Creates a connection for the company by providing a valid `platformKey`.
- ///
- /// Use the List Integrations endpoint to access valid platform keys. - ///
- ///
- Task CreateAsync(CreateConnectionRequest request); - - /// - /// Delete connection - /// - /// - /// Revoke and remove a connection from a company.
- /// This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. - ///
- ///
- Task DeleteAsync(DeleteConnectionRequest request); - - /// - /// Get connection - /// - /// - /// Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. - /// - /// - Task GetAsync(GetConnectionRequest request); - - /// - /// List connections - /// - /// - /// List the connections for a company. - /// - /// - Task ListAsync(ListConnectionsRequest request); - - /// - /// Unlink connection - /// - /// - /// This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. - /// - /// - Task UnlinkAsync(UnlinkConnectionRequest request); - - /// - /// Update authorization - /// - /// - /// Update data connection's authorization. - /// - /// - Task UpdateAuthorizationAsync(UpdateConnectionAuthorizationRequest request); - } - - /// - /// Manage your companies' data connections. - /// - public class Connections: IConnections - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public Connections(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task CreateAsync(CreateConnectionRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections", 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; - } - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new CreateConnectionResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task DeleteAsync(DeleteConnectionRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new DeleteConnectionResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetAsync(GetConnectionRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetConnectionResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListAsync(ListConnectionsRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListConnectionsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Connections = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task UnlinkAsync(UnlinkConnectionRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var serializedBody = RequestBodySerializer.Serialize(request, "UpdateConnectionStatus", "json", false, true); - if (serializedBody != null) - { - httpRequest.Content = serializedBody; - } - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new UnlinkConnectionResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task UpdateAuthorizationAsync(UpdateConnectionAuthorizationRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/authorization", 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; - } - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new UpdateConnectionAuthorizationResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/platform/CodatPlatform/Integrations.cs b/platform/CodatPlatform/Integrations.cs deleted file mode 100644 index 1f37a9dcb..000000000 --- a/platform/CodatPlatform/Integrations.cs +++ /dev/null @@ -1,227 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Platform -{ - using Codat.Platform.Models.Operations; - using Codat.Platform.Models.Shared; - using Codat.Platform.Utils; - using Newtonsoft.Json; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// View and manage your available integrations in Codat. - /// - public interface IIntegrations - { - - /// - /// Get integration - /// - /// - /// Get single integration, by platformKey - /// - /// - Task GetAsync(GetIntegrationRequest request); - - /// - /// Get branding - /// - /// - /// Get branding for platform. - /// - /// - Task GetBrandingAsync(GetIntegrationsBrandingRequest request); - - /// - /// List integrations - /// - /// - /// List your available integrations - /// - /// - Task ListAsync(ListIntegrationsRequest request); - } - - /// - /// View and manage your available integrations in Codat. - /// - public class Integrations: IIntegrations - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public Integrations(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task GetAsync(GetIntegrationRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/integrations/{platformKey}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetIntegrationResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Integration = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetBrandingAsync(GetIntegrationsBrandingRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/integrations/{platformKey}/branding", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetIntegrationsBrandingResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Branding = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListAsync(ListIntegrationsRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/integrations", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListIntegrationsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Integrations = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/platform/CodatPlatform/RefreshData.cs b/platform/CodatPlatform/RefreshData.cs deleted file mode 100644 index f581ec6a8..000000000 --- a/platform/CodatPlatform/RefreshData.cs +++ /dev/null @@ -1,346 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Platform -{ - using Codat.Platform.Models.Operations; - using Codat.Platform.Models.Shared; - using Codat.Platform.Utils; - using Newtonsoft.Json; - using System.Collections.Generic; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// Asynchronously retrieve data from an integration to refresh data in Codat. - /// - public interface IRefreshData - { - - /// - /// Refresh all data - /// - /// - /// Refreshes all data types with `fetch on first link` set to `true` for a given company.
- ///
- /// This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.
- ///
- /// Read more about data type settings and `fetch on first link`. - ///
- ///
- Task AllAsync(RefreshCompanyDataRequest request); - - /// - /// Refresh data type - /// - /// - /// Refreshes a given data type for a given company.
- ///
- /// This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. - ///
- ///
- Task ByDataTypeAsync(RefreshDataTypeRequest request); - - /// - /// Get data status - /// - /// - /// Get the state of each data type for a company - /// - /// - Task GetAsync(GetCompanyDataStatusRequest request); - - /// - /// Get pull operation - /// - /// - /// Retrieve information about a single dataset or pull operation. - /// - /// - Task GetPullOperationAsync(GetPullOperationRequest request); - - /// - /// List pull operations - /// - /// - /// Gets the pull operation history (datasets) for a given company. - /// - /// - Task ListPullOperationsAsync(ListPullOperationsRequest request); - } - - /// - /// Asynchronously retrieve data from an integration to refresh data in Codat. - /// - public class RefreshData: IRefreshData - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.5.0"; - private const string _sdkGenVersion = "2.277.0"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.5.0 2.277.0 3.0.0 Codat.Platform"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public RefreshData(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task AllAsync(RefreshCompanyDataRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/all", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new RefreshCompanyDataResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 204)) - { - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ByDataTypeAsync(RefreshDataTypeRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/queue/{dataType}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new RefreshDataTypeResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PullOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetAsync(GetCompanyDataStatusRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/dataStatus", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetCompanyDataStatusResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.DataStatuses = JsonConvert.DeserializeObject>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetPullOperationAsync(GetPullOperationRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/history/{datasetId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetPullOperationResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PullOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListPullOperationsAsync(ListPullOperationsRequest request) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/history", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListPullOperationsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PullOperations = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/platform/README.md b/platform/README.md index df620f8b1..8389d5a73 100644 --- a/platform/README.md +++ b/platform/README.md @@ -59,6 +59,15 @@ var res = await sdk.Settings.CreateApiKeyAsync(req); * [List](docs/sdks/companies/README.md#list) - List companies * [Update](docs/sdks/companies/README.md#update) - Update company +### [ConnectionManagement](docs/sdks/connectionmanagement/README.md) + +* [GetAccessToken](docs/sdks/connectionmanagement/README.md#getaccesstoken) - Get access token + +### [ConnectionManagement.CorsSettings](docs/sdks/corssettings/README.md) + +* [Get](docs/sdks/corssettings/README.md#get) - Get CORS settings +* [Set](docs/sdks/corssettings/README.md#set) - Set CORS settings + ### [Connections](docs/sdks/connections/README.md) * [Create](docs/sdks/connections/README.md#create) - Create connection @@ -120,8 +129,6 @@ var res = await sdk.Settings.CreateApiKeyAsync(req); ## Server Selection -## Server Selection - ### Select Server by Index You can override the default server globally by passing a server index to the `serverIndex: number` 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 indexes associated with the available servers: @@ -168,6 +175,52 @@ var res = await sdk.Settings.CreateApiKeyAsync(req); ``` + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or thow an exception. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate type. + +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,409,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | + +### Example + +```csharp +using Codat.Platform; +using Codat.Platform.Models.Shared; +using System; +using Codat.Platform.Models.Errors; + +var sdk = new CodatPlatform(security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + }); + +CreateApiKey req = new CreateApiKey() { + Name = "azure-invoice-finance-processor", +}; + +try +{ + var res = await sdk.Settings.CreateApiKeyAsync(req); + // handle response +} +catch (Exception ex) +{ + if (ex is ErrorMessage) + { + // handle exception + } + else if (ex is Codat.Platform.Models.Errors.SDKException) + { + // handle exception + } +} + +``` + + diff --git a/platform/RELEASES.md b/platform/RELEASES.md index 8d1a74f8d..2f47d6d36 100644 --- a/platform/RELEASES.md +++ b/platform/RELEASES.md @@ -136,4 +136,14 @@ Based on: ### Generated - [csharp v3.5.0] platform ### Releases -- [NuGet v3.5.0] https://www.nuget.org/packages/Codat.Platform/3.5.0 - platform \ No newline at end of file +- [NuGet v3.5.0] https://www.nuget.org/packages/Codat.Platform/3.5.0 - platform + +## 2024-04-26 13:47:43 +### Changes +Based on: +- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Platform.yaml +- Speakeasy CLI 1.274.1 (2.314.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v3.6.0] platform +### Releases +- [NuGet v3.6.0] https://www.nuget.org/packages/Codat.Platform/3.6.0 - platform \ No newline at end of file diff --git a/platform/docs/Models/Shared/ErrorMessage.md b/platform/docs/Models/Errors/ErrorMessage.md similarity index 99% rename from platform/docs/Models/Shared/ErrorMessage.md rename to platform/docs/Models/Errors/ErrorMessage.md index b771df488..a978bbd61 100644 --- a/platform/docs/Models/Shared/ErrorMessage.md +++ b/platform/docs/Models/Errors/ErrorMessage.md @@ -1,5 +1,7 @@ # ErrorMessage +Bad Request + ## Fields diff --git a/platform/docs/Models/Operations/AddCompanyToGroupResponse.md b/platform/docs/Models/Operations/AddCompanyToGroupResponse.md index 63984541e..518d8ad2e 100644 --- a/platform/docs/Models/Operations/AddCompanyToGroupResponse.md +++ b/platform/docs/Models/Operations/AddCompanyToGroupResponse.md @@ -7,6 +7,5 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | Success | {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "string",
"platform": "string",
"redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739",
"lastSync": "2022-01-01T12:00:00.000Z",
"created": "2022-01-01T12:00:00.000Z",
"createdByUserName": "string",
"dataConnections": [
{
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
}
],
"groups": [
{
"id": "d7a6c4b4-dc87-45f6-b803-62f466398680"
}
]
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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/platform/docs/Models/Operations/ConfigureCustomDataTypeResponse.md b/platform/docs/Models/Operations/ConfigureCustomDataTypeResponse.md index b49a7e00f..84606847e 100644 --- a/platform/docs/Models/Operations/ConfigureCustomDataTypeResponse.md +++ b/platform/docs/Models/Operations/ConfigureCustomDataTypeResponse.md @@ -7,6 +7,5 @@ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | | `CustomDataTypeConfiguration` | [CustomDataTypeConfiguration](../../Models/Shared/CustomDataTypeConfiguration.md) | :heavy_minus_sign: | OK | {
"dataSource": "api/purchaseOrders?$filter=currencyCode eq 'NOK'",
"requiredData": {
"currencyCode": "$[*].currencyCode",
"id": "$[*].id",
"number": "$[*].number",
"orderDate": "$[*].orderDate",
"totalAmountExcludingTax": "$[*].totalAmountExcludingTax",
"totalTaxAmount": "$[*].totalTaxAmount",
"vendorName": "$[*].number"
},
"keyBy": [
"$[*].id"
],
"sourceModifiedDate": [
"$[*].lastModifiedDateTime"
]
} | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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/platform/docs/Models/Operations/ConfigureSupplementalDataResponse.md b/platform/docs/Models/Operations/ConfigureSupplementalDataResponse.md index f99c368bc..79cf88fac 100644 --- a/platform/docs/Models/Operations/ConfigureSupplementalDataResponse.md +++ b/platform/docs/Models/Operations/ConfigureSupplementalDataResponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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/platform/docs/Models/Operations/CreateApiKeyResponse.md b/platform/docs/Models/Operations/CreateApiKeyResponse.md index 7ca8ce852..0f7e7d976 100644 --- a/platform/docs/Models/Operations/CreateApiKeyResponse.md +++ b/platform/docs/Models/Operations/CreateApiKeyResponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ApiKeyDetails` | [ApiKeyDetails](../../Models/Shared/ApiKeyDetails.md) | :heavy_minus_sign: | Success | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Bad Request | | `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/platform/docs/Models/Operations/CreateCompanyResponse.md b/platform/docs/Models/Operations/CreateCompanyResponse.md index 2c383daee..e55617d26 100644 --- a/platform/docs/Models/Operations/CreateCompanyResponse.md +++ b/platform/docs/Models/Operations/CreateCompanyResponse.md @@ -7,6 +7,5 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "string",
"platform": "string",
"redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739",
"lastSync": "2022-01-01T12:00:00.000Z",
"created": "2022-01-01T12:00:00.000Z",
"createdByUserName": "string",
"dataConnections": [
{
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
}
],
"groups": [
{
"id": "d7a6c4b4-dc87-45f6-b803-62f466398680"
}
]
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | | | `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/platform/docs/Models/Operations/CreateConnectionResponse.md b/platform/docs/Models/Operations/CreateConnectionResponse.md index c4c251ca0..d80303d9d 100644 --- a/platform/docs/Models/Operations/CreateConnectionResponse.md +++ b/platform/docs/Models/Operations/CreateConnectionResponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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/platform/docs/Models/Operations/CreateGroupResponse.md b/platform/docs/Models/Operations/CreateGroupResponse.md index ffd837ffc..fcc100262 100644 --- a/platform/docs/Models/Operations/CreateGroupResponse.md +++ b/platform/docs/Models/Operations/CreateGroupResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `Group` | [Group](../../Models/Shared/Group.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/platform/docs/Models/Operations/CreateRuleResponse.md b/platform/docs/Models/Operations/CreateRuleResponse.md index b6130d5e2..403ef4b92 100644 --- a/platform/docs/Models/Operations/CreateRuleResponse.md +++ b/platform/docs/Models/Operations/CreateRuleResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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 | | | `Webhook` | [Webhook](../../Models/Shared/Webhook.md) | :heavy_minus_sign: | OK | {
"type": "DataConnectionStatusChanged",
"companyId": "39b73b17-cc2e-429e-915d-71654e9dcd1e",
"notifiers": {
"emails": [
"info@client.com"
],
"webhook": "https://webhook.client.com"
}
} | \ No newline at end of file diff --git a/platform/docs/Models/Operations/CreateWebhookConsumerResponse.md b/platform/docs/Models/Operations/CreateWebhookConsumerResponse.md index cc5d6da9e..6bc52aa0b 100644 --- a/platform/docs/Models/Operations/CreateWebhookConsumerResponse.md +++ b/platform/docs/Models/Operations/CreateWebhookConsumerResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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 | | `WebhookConsumer` | [WebhookConsumer](../../Models/Shared/WebhookConsumer.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/platform/docs/Models/Operations/DeleteApiKeyResponse.md b/platform/docs/Models/Operations/DeleteApiKeyResponse.md index dd2eb116e..98a8ef97e 100644 --- a/platform/docs/Models/Operations/DeleteApiKeyResponse.md +++ b/platform/docs/Models/Operations/DeleteApiKeyResponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Too many requests were made in a given amount of time. Wait a short period and then try again. | +| `ErrorMessage` | *ErrorMessage* | :heavy_minus_sign: | Too many requests were made in a given amount of time. Wait a short period and then try again. | | `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/platform/docs/Models/Operations/DeleteCompanyResponse.md b/platform/docs/Models/Operations/DeleteCompanyResponse.md index 588514844..503ad0221 100644 --- a/platform/docs/Models/Operations/DeleteCompanyResponse.md +++ b/platform/docs/Models/Operations/DeleteCompanyResponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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/platform/docs/Models/Operations/DeleteConnectionResponse.md b/platform/docs/Models/Operations/DeleteConnectionResponse.md index e3485fe46..ce373caba 100644 --- a/platform/docs/Models/Operations/DeleteConnectionResponse.md +++ b/platform/docs/Models/Operations/DeleteConnectionResponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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/platform/docs/Models/Operations/DeleteWebhookConsumerResponse.md b/platform/docs/Models/Operations/DeleteWebhookConsumerResponse.md index dde12d788..aa9372b79 100644 --- a/platform/docs/Models/Operations/DeleteWebhookConsumerResponse.md +++ b/platform/docs/Models/Operations/DeleteWebhookConsumerResponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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/platform/docs/Models/Operations/GetCompanyDataStatusResponse.md b/platform/docs/Models/Operations/GetCompanyDataStatusResponse.md index f146ec1f5..aa074e855 100644 --- a/platform/docs/Models/Operations/GetCompanyDataStatusResponse.md +++ b/platform/docs/Models/Operations/GetCompanyDataStatusResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `DataStatuses` | Dictionary | :heavy_minus_sign: | OK | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `DataStatuses` | [DataStatuses](../../Models/Shared/DataStatuses.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/platform/docs/Models/Operations/GetCompanyPushHistoryResponse.md b/platform/docs/Models/Operations/GetCompanyPushHistoryResponse.md index 035780212..be1b11364 100644 --- a/platform/docs/Models/Operations/GetCompanyPushHistoryResponse.md +++ b/platform/docs/Models/Operations/GetCompanyPushHistoryResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | | `PushOperations` | [PushOperations](../../Models/Shared/PushOperations.md) | :heavy_minus_sign: | OK | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | | `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/platform/docs/Models/Operations/GetCompanyResponse.md b/platform/docs/Models/Operations/GetCompanyResponse.md index 951610895..b900d0525 100644 --- a/platform/docs/Models/Operations/GetCompanyResponse.md +++ b/platform/docs/Models/Operations/GetCompanyResponse.md @@ -7,6 +7,5 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "string",
"platform": "string",
"redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739",
"lastSync": "2022-01-01T12:00:00.000Z",
"created": "2022-01-01T12:00:00.000Z",
"createdByUserName": "string",
"dataConnections": [
{
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
}
],
"groups": [
{
"id": "d7a6c4b4-dc87-45f6-b803-62f466398680"
}
]
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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/platform/docs/Models/Operations/GetConnectionManagementAccessTokenRequest.md b/platform/docs/Models/Operations/GetConnectionManagementAccessTokenRequest.md new file mode 100644 index 000000000..07cf33431 --- /dev/null +++ b/platform/docs/Models/Operations/GetConnectionManagementAccessTokenRequest.md @@ -0,0 +1,8 @@ +# GetConnectionManagementAccessTokenRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `CompanyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/platform/docs/Models/Operations/GetConnectionManagementAccessTokenResponse.md b/platform/docs/Models/Operations/GetConnectionManagementAccessTokenResponse.md new file mode 100644 index 000000000..0098bcb01 --- /dev/null +++ b/platform/docs/Models/Operations/GetConnectionManagementAccessTokenResponse.md @@ -0,0 +1,11 @@ +# GetConnectionManagementAccessTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ConnectionManagementAccessToken` | [ConnectionManagementAccessToken](../../Models/Shared/ConnectionManagementAccessToken.md) | :heavy_minus_sign: | Success | +| `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/platform/docs/Models/Operations/GetConnectionManagementCorsSettingsResponse.md b/platform/docs/Models/Operations/GetConnectionManagementCorsSettingsResponse.md new file mode 100644 index 000000000..ca8ac5414 --- /dev/null +++ b/platform/docs/Models/Operations/GetConnectionManagementCorsSettingsResponse.md @@ -0,0 +1,11 @@ +# GetConnectionManagementCorsSettingsResponse + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ConnectionManagementAllowedOrigins` | [ConnectionManagementAllowedOrigins](../../Models/Shared/ConnectionManagementAllowedOrigins.md) | :heavy_minus_sign: | Success | {
"allowedOrigins": [
"https://www.bank-of-dave.com"
]
} | +| `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/platform/docs/Models/Operations/GetConnectionResponse.md b/platform/docs/Models/Operations/GetConnectionResponse.md index 8511802dd..76a252015 100644 --- a/platform/docs/Models/Operations/GetConnectionResponse.md +++ b/platform/docs/Models/Operations/GetConnectionResponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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/platform/docs/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.md b/platform/docs/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.md index 85c47faa2..077945b58 100644 --- a/platform/docs/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.md +++ b/platform/docs/Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `PushOption` | [PushOption](../../Models/Shared/PushOption.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/platform/docs/Models/Operations/GetCustomDataTypeConfigurationResponse.md b/platform/docs/Models/Operations/GetCustomDataTypeConfigurationResponse.md index 7c97ed4c2..81aa1806c 100644 --- a/platform/docs/Models/Operations/GetCustomDataTypeConfigurationResponse.md +++ b/platform/docs/Models/Operations/GetCustomDataTypeConfigurationResponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `CustomDataTypeRecords` | [CustomDataTypeRecords](../../Models/Shared/CustomDataTypeRecords.md) | :heavy_minus_sign: | OK | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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/platform/docs/Models/Operations/GetIntegrationResponse.md b/platform/docs/Models/Operations/GetIntegrationResponse.md index 567c28cba..5184bb480 100644 --- a/platform/docs/Models/Operations/GetIntegrationResponse.md +++ b/platform/docs/Models/Operations/GetIntegrationResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `Integration` | [Integration](../../Models/Shared/Integration.md) | :heavy_minus_sign: | OK | {
"key": "gbol",
"logoUrl": "http://example.com",
"name": "Xero",
"enabled": true,
"sourceId": "accounting",
"sourceType": "8193a927-ab7a-45a3-9dc2-d357a4932dfe",
"integrationId": "497a18ca-284e-40c0-985d-f72be35d468e",
"isOfflineConnector": true,
"isBeta": true,
"dataProvidedBy": "string",
"datatypeFeatures": [
{
"datatype": "invoices",
"supportedFeatures": [
{
"featureType": "get",
"featureState": "release"
}
]
}
]
} | | `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/platform/docs/Models/Operations/GetIntegrationsBrandingResponse.md b/platform/docs/Models/Operations/GetIntegrationsBrandingResponse.md index c1aeaa01b..483ddec2d 100644 --- a/platform/docs/Models/Operations/GetIntegrationsBrandingResponse.md +++ b/platform/docs/Models/Operations/GetIntegrationsBrandingResponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `Branding` | [Branding](../../Models/Shared/Branding.md) | :heavy_minus_sign: | OK | {
"logo": {
"full": {
"image": {
"src": "https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png",
"alt": "xero full icon"
}
},
"square": {
"image": {
"src": "https://static.codat.io/public/officialLogos/Square/8A156A5A-39CB-4F9D-856E-76EF9B2W3607.png",
"alt": "xero square icon"
}
}
},
"button": {
"default": {
"image": {
"src": "https://static.codat.io/public/officialButtons/Full/8A156A5A-39CB-4F9D-856E-76EF9Q7A9607.png",
"alt": "xero default button icon"
}
},
"hover": {
"image": {
"src": "https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png",
"alt": "xero hover button icon"
}
}
},
"sourceId": "35b92968-9851-4095-ad60-395c95cbcba4"
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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/platform/docs/Models/Operations/GetProfileResponse.md b/platform/docs/Models/Operations/GetProfileResponse.md index 37c2a2db9..869281770 100644 --- a/platform/docs/Models/Operations/GetProfileResponse.md +++ b/platform/docs/Models/Operations/GetProfileResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `Profile` | [Profile](../../Models/Shared/Profile.md) | :heavy_minus_sign: | OK | {
"name": "Bob's Burgers",
"logoUrl": "https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png",
"iconUrl": "https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico",
"redirectUrl": "https://bobs-burgers.{countrySuffix}/{companyId}",
"whiteListUrls": [
"https://bobs-burgers.com",
"https://bobs-burgers.co.uk"
],
"confirmCompanyName": true
} | | `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/platform/docs/Models/Operations/GetProfileSyncSettingsResponse.md b/platform/docs/Models/Operations/GetProfileSyncSettingsResponse.md index c78e9d1db..99937ec76 100644 --- a/platform/docs/Models/Operations/GetProfileSyncSettingsResponse.md +++ b/platform/docs/Models/Operations/GetProfileSyncSettingsResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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 | | `SyncSettings` | [SyncSettings](../../Models/Shared/SyncSettings.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/platform/docs/Models/Operations/GetPullOperationResponse.md b/platform/docs/Models/Operations/GetPullOperationResponse.md index 2f2350b79..1c7449ba5 100644 --- a/platform/docs/Models/Operations/GetPullOperationResponse.md +++ b/platform/docs/Models/Operations/GetPullOperationResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | {
"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b",
"companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5",
"connectionId": "51baa045-4836-4317-a42e-3542e991e581",
"dataType": "invoices",
"status": "Initial",
"statusDescription": "Paused until 2022-10-23T00:00:00.000Z",
"requested": "2022-11-14T11:18:37.2798351Z",
"progress": 10,
"isCompleted": false,
"isErrored": false
} | | `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/platform/docs/Models/Operations/GetPushOperationResponse.md b/platform/docs/Models/Operations/GetPushOperationResponse.md index d2b5de6b1..3781b7f46 100644 --- a/platform/docs/Models/Operations/GetPushOperationResponse.md +++ b/platform/docs/Models/Operations/GetPushOperationResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `PushOperation` | [PushOperation](../../Models/Shared/PushOperation.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/platform/docs/Models/Operations/GetSupplementalDataConfigurationResponse.md b/platform/docs/Models/Operations/GetSupplementalDataConfigurationResponse.md index e2e6eca43..fff3b7129 100644 --- a/platform/docs/Models/Operations/GetSupplementalDataConfigurationResponse.md +++ b/platform/docs/Models/Operations/GetSupplementalDataConfigurationResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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 | | | `SupplementalDataConfiguration` | [SupplementalDataConfiguration](../../Models/Shared/SupplementalDataConfiguration.md) | :heavy_minus_sign: | OK | {
"supplementalDataConfig": {
"orders-supplemental-data": {
"dataSource": "/orders",
"pullData": {
"orderNumber": "order_num"
},
"pushData": {
"orderNumber": "order_num"
}
}
}
} | \ No newline at end of file diff --git a/platform/docs/Models/Operations/GetWebhookResponse.md b/platform/docs/Models/Operations/GetWebhookResponse.md index 06f25d6e6..330f779f6 100644 --- a/platform/docs/Models/Operations/GetWebhookResponse.md +++ b/platform/docs/Models/Operations/GetWebhookResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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 | | | `Webhook` | [Webhook](../../Models/Shared/Webhook.md) | :heavy_minus_sign: | OK | {
"type": "DataConnectionStatusChanged",
"companyId": "39b73b17-cc2e-429e-915d-71654e9dcd1e",
"notifiers": {
"emails": [
"info@client.com"
],
"webhook": "https://webhook.client.com"
}
} | \ No newline at end of file diff --git a/platform/docs/Models/Operations/ListApiKeysResponse.md b/platform/docs/Models/Operations/ListApiKeysResponse.md index 945092c8f..92365bc29 100644 --- a/platform/docs/Models/Operations/ListApiKeysResponse.md +++ b/platform/docs/Models/Operations/ListApiKeysResponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ApiKeys` | [ApiKeys](../../Models/Shared/ApiKeys.md) | :heavy_minus_sign: | Success | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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/platform/docs/Models/Operations/ListCompaniesResponse.md b/platform/docs/Models/Operations/ListCompaniesResponse.md index 7c018be78..f4b4444b4 100644 --- a/platform/docs/Models/Operations/ListCompaniesResponse.md +++ b/platform/docs/Models/Operations/ListCompaniesResponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Companies` | [Models.Shared.Companies](../../Models/Shared/Companies.md) | :heavy_minus_sign: | OK | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | | `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/platform/docs/Models/Operations/ListConnectionsResponse.md b/platform/docs/Models/Operations/ListConnectionsResponse.md index 840f05911..92f97d81c 100644 --- a/platform/docs/Models/Operations/ListConnectionsResponse.md +++ b/platform/docs/Models/Operations/ListConnectionsResponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Connections` | [Models.Shared.Connections](../../Models/Shared/Connections.md) | :heavy_minus_sign: | OK | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | | `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/platform/docs/Models/Operations/ListCustomDataTypeRecordsResponse.md b/platform/docs/Models/Operations/ListCustomDataTypeRecordsResponse.md index 1c9703745..48c2a0db0 100644 --- a/platform/docs/Models/Operations/ListCustomDataTypeRecordsResponse.md +++ b/platform/docs/Models/Operations/ListCustomDataTypeRecordsResponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `CustomDataTypeRecords` | [CustomDataTypeRecords](../../Models/Shared/CustomDataTypeRecords.md) | :heavy_minus_sign: | OK | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | | `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/platform/docs/Models/Operations/ListGroupsResponse.md b/platform/docs/Models/Operations/ListGroupsResponse.md index d56d63367..5a15ea15e 100644 --- a/platform/docs/Models/Operations/ListGroupsResponse.md +++ b/platform/docs/Models/Operations/ListGroupsResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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 | | `Groups` | [Models.Shared.Groups](../../Models/Shared/Groups.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/platform/docs/Models/Operations/ListIntegrationsResponse.md b/platform/docs/Models/Operations/ListIntegrationsResponse.md index 43f486f9a..2b2a46dc0 100644 --- a/platform/docs/Models/Operations/ListIntegrationsResponse.md +++ b/platform/docs/Models/Operations/ListIntegrationsResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | | `Integrations` | [Models.Shared.Integrations](../../Models/Shared/Integrations.md) | :heavy_minus_sign: | OK | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | | `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/platform/docs/Models/Operations/ListPullOperationsResponse.md b/platform/docs/Models/Operations/ListPullOperationsResponse.md index 8ca007395..b541432d2 100644 --- a/platform/docs/Models/Operations/ListPullOperationsResponse.md +++ b/platform/docs/Models/Operations/ListPullOperationsResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | | `PullOperations` | [PullOperations](../../Models/Shared/PullOperations.md) | :heavy_minus_sign: | OK | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | | `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/platform/docs/Models/Operations/ListRulesResponse.md b/platform/docs/Models/Operations/ListRulesResponse.md index 5debdb6da..0d891807f 100644 --- a/platform/docs/Models/Operations/ListRulesResponse.md +++ b/platform/docs/Models/Operations/ListRulesResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | | `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 | | | `Webhooks` | [Models.Shared.Webhooks](../../Models/Shared/Webhooks.md) | :heavy_minus_sign: | OK | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | \ No newline at end of file diff --git a/platform/docs/Models/Operations/ListWebhookConsumersResponse.md b/platform/docs/Models/Operations/ListWebhookConsumersResponse.md index d62cf3944..07981e562 100644 --- a/platform/docs/Models/Operations/ListWebhookConsumersResponse.md +++ b/platform/docs/Models/Operations/ListWebhookConsumersResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | | `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 | | `WebhookConsumers` | [WebhookConsumers](../../Models/Shared/WebhookConsumers.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/platform/docs/Models/Operations/RefreshCompanyDataResponse.md b/platform/docs/Models/Operations/RefreshCompanyDataResponse.md index 8b2f8a443..17ebb07bf 100644 --- a/platform/docs/Models/Operations/RefreshCompanyDataResponse.md +++ b/platform/docs/Models/Operations/RefreshCompanyDataResponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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/platform/docs/Models/Operations/RefreshCustomDataTypeResponse.md b/platform/docs/Models/Operations/RefreshCustomDataTypeResponse.md index 327456112..e05dc4578 100644 --- a/platform/docs/Models/Operations/RefreshCustomDataTypeResponse.md +++ b/platform/docs/Models/Operations/RefreshCustomDataTypeResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | {
"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b",
"companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5",
"connectionId": "51baa045-4836-4317-a42e-3542e991e581",
"dataType": "invoices",
"status": "Initial",
"statusDescription": "Paused until 2022-10-23T00:00:00.000Z",
"requested": "2022-11-14T11:18:37.2798351Z",
"progress": 10,
"isCompleted": false,
"isErrored": false
} | | `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/platform/docs/Models/Operations/RefreshDataTypeResponse.md b/platform/docs/Models/Operations/RefreshDataTypeResponse.md index 296373b55..2031cc7c6 100644 --- a/platform/docs/Models/Operations/RefreshDataTypeResponse.md +++ b/platform/docs/Models/Operations/RefreshDataTypeResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | {
"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b",
"companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5",
"connectionId": "51baa045-4836-4317-a42e-3542e991e581",
"dataType": "invoices",
"status": "Initial",
"statusDescription": "Paused until 2022-10-23T00:00:00.000Z",
"requested": "2022-11-14T11:18:37.2798351Z",
"progress": 10,
"isCompleted": false,
"isErrored": false
} | | `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/platform/docs/Models/Operations/RemoveCompanyFromGroupResponse.md b/platform/docs/Models/Operations/RemoveCompanyFromGroupResponse.md index e5204b2ab..2d946666a 100644 --- a/platform/docs/Models/Operations/RemoveCompanyFromGroupResponse.md +++ b/platform/docs/Models/Operations/RemoveCompanyFromGroupResponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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/platform/docs/Models/Operations/SetConnectionManagementCorsSettingsResponse.md b/platform/docs/Models/Operations/SetConnectionManagementCorsSettingsResponse.md new file mode 100644 index 000000000..bdd28ebc1 --- /dev/null +++ b/platform/docs/Models/Operations/SetConnectionManagementCorsSettingsResponse.md @@ -0,0 +1,11 @@ +# SetConnectionManagementCorsSettingsResponse + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ConnectionManagementAllowedOrigins` | [ConnectionManagementAllowedOrigins](../../Models/Shared/ConnectionManagementAllowedOrigins.md) | :heavy_minus_sign: | Success | {
"allowedOrigins": [
"https://www.bank-of-dave.com"
]
} | +| `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/platform/docs/Models/Operations/UnlinkConnectionResponse.md b/platform/docs/Models/Operations/UnlinkConnectionResponse.md index 7a057c441..a2620d44d 100644 --- a/platform/docs/Models/Operations/UnlinkConnectionResponse.md +++ b/platform/docs/Models/Operations/UnlinkConnectionResponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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/platform/docs/Models/Operations/UpdateCompanyResponse.md b/platform/docs/Models/Operations/UpdateCompanyResponse.md index 1708cc50e..173741a17 100644 --- a/platform/docs/Models/Operations/UpdateCompanyResponse.md +++ b/platform/docs/Models/Operations/UpdateCompanyResponse.md @@ -7,6 +7,5 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "string",
"platform": "string",
"redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739",
"lastSync": "2022-01-01T12:00:00.000Z",
"created": "2022-01-01T12:00:00.000Z",
"createdByUserName": "string",
"dataConnections": [
{
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
}
],
"groups": [
{
"id": "d7a6c4b4-dc87-45f6-b803-62f466398680"
}
]
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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/platform/docs/Models/Operations/UpdateConnectionAuthorizationResponse.md b/platform/docs/Models/Operations/UpdateConnectionAuthorizationResponse.md index e1ae9d19d..6b9c64965 100644 --- a/platform/docs/Models/Operations/UpdateConnectionAuthorizationResponse.md +++ b/platform/docs/Models/Operations/UpdateConnectionAuthorizationResponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
} | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `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/platform/docs/Models/Operations/UpdateProfileResponse.md b/platform/docs/Models/Operations/UpdateProfileResponse.md index 8b4e72e42..258848621 100644 --- a/platform/docs/Models/Operations/UpdateProfileResponse.md +++ b/platform/docs/Models/Operations/UpdateProfileResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | | `Profile` | [Profile](../../Models/Shared/Profile.md) | :heavy_minus_sign: | OK | {
"name": "Bob's Burgers",
"logoUrl": "https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png",
"iconUrl": "https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico",
"redirectUrl": "https://bobs-burgers.{countrySuffix}/{companyId}",
"whiteListUrls": [
"https://bobs-burgers.com",
"https://bobs-burgers.co.uk"
],
"confirmCompanyName": true
} | | `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/platform/docs/Models/Operations/UpdateProfileSyncSettingsRequestBody.md b/platform/docs/Models/Operations/UpdateProfileSyncSettingsRequestBody.md index e678870a4..e8f2d41f0 100644 --- a/platform/docs/Models/Operations/UpdateProfileSyncSettingsRequestBody.md +++ b/platform/docs/Models/Operations/UpdateProfileSyncSettingsRequestBody.md @@ -9,5 +9,5 @@ Include a `syncSetting` object for each data type. | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `ClientId` | *string* | :heavy_check_mark: | Unique identifier for your client in Codat. | -| `OverridesDefaults` | *bool* | :heavy_check_mark: | Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings). | +| `OverridesDefaults` | *bool* | :heavy_minus_sign: | Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings). | | `Settings` | List<[SyncSetting](../../Models/Shared/SyncSetting.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/platform/docs/Models/Operations/UpdateProfileSyncSettingsResponse.md b/platform/docs/Models/Operations/UpdateProfileSyncSettingsResponse.md index 6df3a7a1b..0a63cfe57 100644 --- a/platform/docs/Models/Operations/UpdateProfileSyncSettingsResponse.md +++ b/platform/docs/Models/Operations/UpdateProfileSyncSettingsResponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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/platform/docs/Models/Shared/ClientRateLimitReachedWebhook.md b/platform/docs/Models/Shared/ClientRateLimitReachedWebhook.md index 7de3762dc..190d22c68 100644 --- a/platform/docs/Models/Shared/ClientRateLimitReachedWebhook.md +++ b/platform/docs/Models/Shared/ClientRateLimitReachedWebhook.md @@ -5,12 +5,12 @@ Webhook request body for a client that has reached their rate limit. ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | -| `Data` | [ClientRateLimitReachedWebhookData](../../Models/Shared/ClientRateLimitReachedWebhookData.md) | :heavy_minus_sign: | N/A | -| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | +| `Data` | [ClientRateLimitReachedWebhookData](../../Models/Shared/ClientRateLimitReachedWebhookData.md) | :heavy_minus_sign: | N/A | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file diff --git a/platform/docs/Models/Shared/ClientRateLimitResetWebhook.md b/platform/docs/Models/Shared/ClientRateLimitResetWebhook.md index 345949c46..f2ab13131 100644 --- a/platform/docs/Models/Shared/ClientRateLimitResetWebhook.md +++ b/platform/docs/Models/Shared/ClientRateLimitResetWebhook.md @@ -5,12 +5,12 @@ Webhook request body for a client that has had their rate limit reset. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | -| `Data` | [ClientRateLimitResetWebhookData](../../Models/Shared/ClientRateLimitResetWebhookData.md) | :heavy_minus_sign: | N/A | -| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | +| `Data` | [ClientRateLimitResetWebhookData](../../Models/Shared/ClientRateLimitResetWebhookData.md) | :heavy_minus_sign: | N/A | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file diff --git a/platform/docs/Models/Shared/ConnectionManagementAccessToken.md b/platform/docs/Models/Shared/ConnectionManagementAccessToken.md new file mode 100644 index 000000000..b1dbd58db --- /dev/null +++ b/platform/docs/Models/Shared/ConnectionManagementAccessToken.md @@ -0,0 +1,8 @@ +# ConnectionManagementAccessToken + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AccessToken` | *string* | :heavy_minus_sign: | Access token that allows SMBs to manage connections that have access to their data. | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c | \ No newline at end of file diff --git a/platform/docs/Models/Shared/ConnectionManagementAllowedOrigins.md b/platform/docs/Models/Shared/ConnectionManagementAllowedOrigins.md new file mode 100644 index 000000000..d5b8ca271 --- /dev/null +++ b/platform/docs/Models/Shared/ConnectionManagementAllowedOrigins.md @@ -0,0 +1,8 @@ +# ConnectionManagementAllowedOrigins + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AllowedOrigins` | List<*string*> | :heavy_minus_sign: | An array of allowed origins (i.e. your domains) to permit cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).n resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)). | \ No newline at end of file diff --git a/platform/docs/Models/Shared/ConnectionStatusChangedWebhook.md b/platform/docs/Models/Shared/ConnectionStatusChangedWebhook.md index 55570a928..d6ff06be4 100644 --- a/platform/docs/Models/Shared/ConnectionStatusChangedWebhook.md +++ b/platform/docs/Models/Shared/ConnectionStatusChangedWebhook.md @@ -5,14 +5,14 @@ Webhook request body for a company's data connection status changed. ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | -| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `Data` | [ConnectionStatusChangedWebhookData](../../Models/Shared/ConnectionStatusChangedWebhookData.md) | :heavy_minus_sign: | N/A | | -| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | +| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `Data` | [ConnectionStatusChangedWebhookData](../../Models/Shared/ConnectionStatusChangedWebhookData.md) | :heavy_minus_sign: | N/A | | +| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/platform/docs/Models/Shared/DataStatus.md b/platform/docs/Models/Shared/DataStatus.md index 34a0dac05..f3e8b9a9b 100644 --- a/platform/docs/Models/Shared/DataStatus.md +++ b/platform/docs/Models/Shared/DataStatus.md @@ -7,7 +7,7 @@ Describes the state of data in the Codat cache for a company and data type | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `CurrentStatus` | *string* | :heavy_check_mark: | The current status of the dataset in Codat's cache. | | +| `CurrentStatus` | [Status](../../Models/Shared/Status.md) | :heavy_check_mark: | The current status of the dataset. | | | `DataType` | [DataTypes](../../Models/Shared/DataTypes.md) | :heavy_check_mark: | Available data types | invoices | | `LastSuccessfulSync` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `LatestSuccessfulSyncId` | *string* | :heavy_minus_sign: | Unique identifier for the most recent successful sync of data type. | 8220fc90-55b6-47bc-9417-48ac6ea93101 | diff --git a/platform/docs/Models/Shared/DataStatuses.md b/platform/docs/Models/Shared/DataStatuses.md new file mode 100644 index 000000000..fc29d2948 --- /dev/null +++ b/platform/docs/Models/Shared/DataStatuses.md @@ -0,0 +1,50 @@ +# DataStatuses + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AccountTransactions` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BalanceSheet` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankAccounts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankTransactions` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankingAccountBalances` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankingAccounts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankingTransactionCategories` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankingTransactions` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BillCreditNotes` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BillPayments` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Bills` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CashFlowStatement` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `ChartOfAccounts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceCompanyInfo` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceCustomers` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceDisputes` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceLocations` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceOrders` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommercePaymentMethods` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommercePayments` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceProductCategories` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceProducts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceTaxComponents` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceTransactions` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Company` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CreditNotes` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Customers` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `DirectCosts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `DirectIncomes` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Invoices` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `ItemReceipts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Items` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `JournalEntries` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Journals` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `PaymentMethods` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Payments` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `ProfitAndLoss` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `PurchaseOrders` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `SalesOrders` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Suppliers` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `TaxRates` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `TrackingCategories` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Transfers` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | \ No newline at end of file diff --git a/platform/docs/Models/Shared/DataSyncCompletedWebhook.md b/platform/docs/Models/Shared/DataSyncCompletedWebhook.md index 300aec7fb..82665062b 100644 --- a/platform/docs/Models/Shared/DataSyncCompletedWebhook.md +++ b/platform/docs/Models/Shared/DataSyncCompletedWebhook.md @@ -5,14 +5,14 @@ Webhook request body to notify the completion of a data sync. ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | -| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `Data` | [DataSyncCompletedWebhookData](../../Models/Shared/DataSyncCompletedWebhookData.md) | :heavy_minus_sign: | N/A | | -| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | +| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `Data` | [DataSyncCompletedWebhookData](../../Models/Shared/DataSyncCompletedWebhookData.md) | :heavy_minus_sign: | N/A | | +| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/platform/docs/Models/Shared/DatasetDataChangedWebhook.md b/platform/docs/Models/Shared/DatasetDataChangedWebhook.md index 2edd51189..415805073 100644 --- a/platform/docs/Models/Shared/DatasetDataChangedWebhook.md +++ b/platform/docs/Models/Shared/DatasetDataChangedWebhook.md @@ -5,14 +5,14 @@ Webhook request body to notify that a data synchronization has completed. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | -| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `Data` | [DatasetDataChangedWebhookData](../../Models/Shared/DatasetDataChangedWebhookData.md) | :heavy_minus_sign: | N/A | | -| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | +| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `Data` | [DatasetDataChangedWebhookData](../../Models/Shared/DatasetDataChangedWebhookData.md) | :heavy_minus_sign: | N/A | | +| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/platform/docs/Models/Shared/DatasetStatus.md b/platform/docs/Models/Shared/DatasetStatus.md new file mode 100644 index 000000000..d5bf9440f --- /dev/null +++ b/platform/docs/Models/Shared/DatasetStatus.md @@ -0,0 +1,30 @@ +# DatasetStatus + +The current status of the dataset. + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `Initial` | Initial | +| `Queued` | Queued | +| `Fetching` | Fetching | +| `MapQueued` | MapQueued | +| `Mapping` | Mapping | +| `Complete` | Complete | +| `FetchError` | FetchError | +| `MapError` | MapError | +| `InternalError` | InternalError | +| `ProcessingQueued` | ProcessingQueued | +| `Processing` | Processing | +| `ProcessingError` | ProcessingError | +| `ValidationQueued` | ValidationQueued | +| `Validating` | Validating | +| `ValidationError` | ValidationError | +| `AuthError` | AuthError | +| `Cancelled` | Cancelled | +| `NotSupported` | NotSupported | +| `RateLimitError` | RateLimitError | +| `PermissionsError` | PermissionsError | +| `PrerequisiteNotMet` | PrerequisiteNotMet | \ No newline at end of file diff --git a/platform/docs/Models/Shared/DatasetStatusChangedErrorWebhook.md b/platform/docs/Models/Shared/DatasetStatusChangedErrorWebhook.md index 9d0ba3fda..c6d1ecbce 100644 --- a/platform/docs/Models/Shared/DatasetStatusChangedErrorWebhook.md +++ b/platform/docs/Models/Shared/DatasetStatusChangedErrorWebhook.md @@ -5,14 +5,14 @@ Webhook request body to notify that a data synchronization has completed. ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | -| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `Data` | [DatasetStatusChangedErrorWebhookData](../../Models/Shared/DatasetStatusChangedErrorWebhookData.md) | :heavy_minus_sign: | N/A | | -| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | +| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `Data` | [DatasetStatusChangedErrorWebhookData](../../Models/Shared/DatasetStatusChangedErrorWebhookData.md) | :heavy_minus_sign: | N/A | | +| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/platform/docs/Models/Shared/NewCompanySynchronizedWebhook.md b/platform/docs/Models/Shared/NewCompanySynchronizedWebhook.md index dfc50dc50..db42fac69 100644 --- a/platform/docs/Models/Shared/NewCompanySynchronizedWebhook.md +++ b/platform/docs/Models/Shared/NewCompanySynchronizedWebhook.md @@ -5,14 +5,14 @@ Webhook request body to notify that a new company has successfully synchronized ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | -| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `Data` | [NewCompanySynchronizedWebhookData](../../Models/Shared/NewCompanySynchronizedWebhookData.md) | :heavy_minus_sign: | N/A | | -| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | +| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `Data` | [NewCompanySynchronizedWebhookData](../../Models/Shared/NewCompanySynchronizedWebhookData.md) | :heavy_minus_sign: | N/A | | +| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/platform/docs/Models/Shared/PullOperation.md b/platform/docs/Models/Shared/PullOperation.md index fa401e7b3..f48846ef9 100644 --- a/platform/docs/Models/Shared/PullOperation.md +++ b/platform/docs/Models/Shared/PullOperation.md @@ -18,5 +18,5 @@ Information about a queued, in progress or completed pull operation. | `IsErrored` | *bool* | :heavy_check_mark: | `True` if the pull operation entered an error state. | | | `Progress` | *long* | :heavy_check_mark: | An integer signifying the progress of the pull operation. | | | `Requested` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `Status` | [Status](../../Models/Shared/Status.md) | :heavy_check_mark: | The current status of the pull operation. | Complete | +| `Status` | [DatasetStatus](../../Models/Shared/DatasetStatus.md) | :heavy_check_mark: | The current status of the dataset. | | | `StatusDescription` | *string* | :heavy_minus_sign: | Additional information about the dataset status. | Paused until 2022-10-23T00:00:00.000Z | \ No newline at end of file diff --git a/platform/docs/Models/Shared/PushOperationStatusChangedWebhook.md b/platform/docs/Models/Shared/PushOperationStatusChangedWebhook.md index a94ccafca..ac302ff19 100644 --- a/platform/docs/Models/Shared/PushOperationStatusChangedWebhook.md +++ b/platform/docs/Models/Shared/PushOperationStatusChangedWebhook.md @@ -5,14 +5,14 @@ Webhook request body for a push operation status change. ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | -| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `Data` | [PushOperationStatusChangedWebhookData](../../Models/Shared/PushOperationStatusChangedWebhookData.md) | :heavy_minus_sign: | N/A | | -| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | +| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `Data` | [PushOperationStatusChangedWebhookData](../../Models/Shared/PushOperationStatusChangedWebhookData.md) | :heavy_minus_sign: | N/A | | +| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/platform/docs/Models/Shared/PushOperationTimedOutWebhook.md b/platform/docs/Models/Shared/PushOperationTimedOutWebhook.md index 767c73000..d409ee40c 100644 --- a/platform/docs/Models/Shared/PushOperationTimedOutWebhook.md +++ b/platform/docs/Models/Shared/PushOperationTimedOutWebhook.md @@ -5,14 +5,14 @@ Webhook request body notifying that a push push operation has timed out. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | -| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `Data` | [PushOperationTimedOutWebhookData](../../Models/Shared/PushOperationTimedOutWebhookData.md) | :heavy_minus_sign: | N/A | | -| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | +| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `Data` | [PushOperationTimedOutWebhookData](../../Models/Shared/PushOperationTimedOutWebhookData.md) | :heavy_minus_sign: | N/A | | +| `DataConnectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/platform/docs/Models/Shared/Status.md b/platform/docs/Models/Shared/Status.md index 6c3c498e1..c15395bab 100644 --- a/platform/docs/Models/Shared/Status.md +++ b/platform/docs/Models/Shared/Status.md @@ -1,6 +1,6 @@ # Status -The current status of the pull operation. +The current status of the dataset. ## Values @@ -24,8 +24,6 @@ The current status of the pull operation. | `ValidationError` | ValidationError | | `AuthError` | AuthError | | `Cancelled` | Cancelled | -| `Routing` | Routing | -| `RoutingError` | RoutingError | | `NotSupported` | NotSupported | | `RateLimitError` | RateLimitError | | `PermissionsError` | PermissionsError | diff --git a/platform/docs/Models/Shared/WebhookConsumer.md b/platform/docs/Models/Shared/WebhookConsumer.md index 0c2e4aa2b..3cdf8fc09 100644 --- a/platform/docs/Models/Shared/WebhookConsumer.md +++ b/platform/docs/Models/Shared/WebhookConsumer.md @@ -8,9 +8,10 @@ See our documentation for more details on [Codat's webhook service](https://docs ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `Disabled` | *bool* | :heavy_minus_sign: | Flag that enables or disables the endpoint from receiving events. Disabled when set to `true`. | | -| `EventTypes` | List<*string*> | :heavy_minus_sign: | An array of event types the webhook consumer subscribes to. | | -| `Id` | *string* | :heavy_minus_sign: | Unique identifier for the webhook consumer. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `Url` | *string* | :heavy_minus_sign: | The URL that will consume webhook events dispatched by Codat. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier of the company to indicate company-specific events. The associated webhook consumer will receive events only for the specified ID. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `Disabled` | *bool* | :heavy_minus_sign: | Flag that enables or disables the endpoint from receiving events. Disabled when set to `true`. | | +| `EventTypes` | List<*string*> | :heavy_minus_sign: | An array of event types the webhook consumer subscribes to. | | +| `Id` | *string* | :heavy_minus_sign: | Unique identifier for the webhook consumer. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `Url` | *string* | :heavy_minus_sign: | The URL that will consume webhook events dispatched by Codat. | | \ No newline at end of file diff --git a/platform/docs/Models/Shared/WebhookConsumerPrototype.md b/platform/docs/Models/Shared/WebhookConsumerPrototype.md index 8e77e5be9..0541fee78 100644 --- a/platform/docs/Models/Shared/WebhookConsumerPrototype.md +++ b/platform/docs/Models/Shared/WebhookConsumerPrototype.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `Disabled` | *bool* | :heavy_minus_sign: | Flag that enables or disables the endpoint from receiving events. Disabled when set to `true`. | -| `EventTypes` | List<*string*> | :heavy_minus_sign: | An array of event types the webhook consumer subscribes to. | -| `Url` | *string* | :heavy_minus_sign: | The URL that will consume webhook events dispatched by Codat. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `CompanyId` | *string* | :heavy_minus_sign: | Unique identifier of the company to indicate company-specific events. The associated webhook consumer will receive events only for the specified ID. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `Disabled` | *bool* | :heavy_minus_sign: | Flag that enables or disables the endpoint from receiving events. Disabled when set to `true`. | | +| `EventTypes` | List<*string*> | :heavy_minus_sign: | An array of event types the webhook consumer subscribes to. | | +| `Url` | *string* | :heavy_minus_sign: | The URL that will consume webhook events dispatched by Codat. | | \ No newline at end of file diff --git a/platform/docs/sdks/codatplatform/README.md b/platform/docs/sdks/codatplatform/README.md index 49e391bb9..76b134a7b 100644 --- a/platform/docs/sdks/codatplatform/README.md +++ b/platform/docs/sdks/codatplatform/README.md @@ -7,9 +7,26 @@ An API for the common components of all of Codat's products. These end points cover creating and managing your companies, data connections, and integrations. -[Read about the building blocks of Codat...](https://docs.codat.io/core-concepts/companies) - -[See our OpenAPI spec](https://github.com/codatio/oas) +[Read about the building blocks of Codat...](https://docs.codat.io/core-concepts/companies) | [See our OpenAPI spec](https://github.com/codatio/oas) + +--- + +## Endpoints + +| Endpoints | Description | +| :- |:- | +| Companies | Create and manage your SMB users' companies. | +| Connections | Create new and manage existing data connections for a company. | +| Connection management | Configure connection management UI and retrieve access tokens for authentication. | +| Groups | Define and manage sets of companies based on a chosen characteristic. | +| Webhooks | Create and manage webhooks that listen to Codat's events. | +| Integrations | Get a list of integrations supported by Codat and their logos. | +| Refresh data | Initiate data refreshes, view pull status and history. | +| Settings | Manage company profile configuration, sync settings, and API keys. | +| Push data | Initiate and monitor Create, Update, and Delete operations. | +| Supplemental data | Configure and pull additional data you can include in Codat's standard data types. | +| Custom data type | Configure and pull additional data types that are not included in Codat's standardized data model. | + ### Available Operations diff --git a/platform/docs/sdks/companies/README.md b/platform/docs/sdks/companies/README.md index 039fbed0b..f829b211f 100644 --- a/platform/docs/sdks/companies/README.md +++ b/platform/docs/sdks/companies/README.md @@ -3,7 +3,7 @@ ## Overview -Create and manage your Codat companies. +Create and manage your SMB users' companies. ### Available Operations @@ -53,7 +53,12 @@ var res = await sdk.Companies.CreateAsync(req); ### Response **[CreateCompanyResponse](../../Models/Operations/CreateCompanyResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## Delete @@ -93,7 +98,12 @@ var res = await sdk.Companies.DeleteAsync(req); ### Response **[DeleteCompanyResponse](../../Models/Operations/DeleteCompanyResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## Get @@ -133,7 +143,12 @@ var res = await sdk.Companies.GetAsync(req); ### Response **[GetCompanyResponse](../../Models/Operations/GetCompanyResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -174,7 +189,12 @@ var res = await sdk.Companies.ListAsync(req); ### Response **[ListCompaniesResponse](../../Models/Operations/ListCompaniesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## Update @@ -215,4 +235,9 @@ var res = await sdk.Companies.UpdateAsync(req); ### Response **[UpdateCompanyResponse](../../Models/Operations/UpdateCompanyResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/connectionmanagement/README.md b/platform/docs/sdks/connectionmanagement/README.md new file mode 100644 index 000000000..59816bd67 --- /dev/null +++ b/platform/docs/sdks/connectionmanagement/README.md @@ -0,0 +1,53 @@ +# ConnectionManagement +(*ConnectionManagement*) + +## Overview + +Configure connection management UI and retrieve access tokens for authentication. + +### Available Operations + +* [GetAccessToken](#getaccesstoken) - Get access token + +## GetAccessToken + +Use the *Get access token* endpoint to retrieve a new access token for use by the [connection management UI](https://docs.codat.io/auth-flow/optimize/connection-management). + +The embedded [connection management UI](https://docs.codat.io/auth-flow/optimize/connection-management) lets your customers control access to their data by allowing them to manage their existing connections. + +### Example Usage + +```csharp +using Codat.Platform; +using Codat.Platform.Models.Shared; +using Codat.Platform.Models.Operations; + +var sdk = new CodatPlatform(security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + }); + +GetConnectionManagementAccessTokenRequest req = new GetConnectionManagementAccessTokenRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", +}; + +var res = await sdk.ConnectionManagement.GetAccessTokenAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `request` | [GetConnectionManagementAccessTokenRequest](../../Models/Operations/GetConnectionManagementAccessTokenRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[GetConnectionManagementAccessTokenResponse](../../Models/Operations/GetConnectionManagementAccessTokenResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/connections/README.md b/platform/docs/sdks/connections/README.md index 1e7b040ab..fbbc8faaa 100644 --- a/platform/docs/sdks/connections/README.md +++ b/platform/docs/sdks/connections/README.md @@ -3,7 +3,7 @@ ## Overview -Manage your companies' data connections. +Create new and manage existing data connections for a company. ### Available Operations @@ -50,7 +50,12 @@ var res = await sdk.Connections.CreateAsync(req); ### Response **[CreateConnectionResponse](../../Models/Operations/CreateConnectionResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## Delete @@ -88,7 +93,12 @@ var res = await sdk.Connections.DeleteAsync(req); ### Response **[DeleteConnectionResponse](../../Models/Operations/DeleteConnectionResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## Get @@ -125,7 +135,12 @@ var res = await sdk.Connections.GetAsync(req); ### Response **[GetConnectionResponse](../../Models/Operations/GetConnectionResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -164,7 +179,12 @@ var res = await sdk.Connections.ListAsync(req); ### Response **[ListConnectionsResponse](../../Models/Operations/ListConnectionsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## Unlink @@ -201,7 +221,12 @@ var res = await sdk.Connections.UnlinkAsync(req); ### Response **[UnlinkConnectionResponse](../../Models/Operations/UnlinkConnectionResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## UpdateAuthorization @@ -239,4 +264,9 @@ var res = await sdk.Connections.UpdateAuthorizationAsync(req); ### Response **[UpdateConnectionAuthorizationResponse](../../Models/Operations/UpdateConnectionAuthorizationResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/corssettings/README.md b/platform/docs/sdks/corssettings/README.md new file mode 100644 index 000000000..39c318231 --- /dev/null +++ b/platform/docs/sdks/corssettings/README.md @@ -0,0 +1,88 @@ +# CorsSettings +(*ConnectionManagement.CorsSettings*) + +### Available Operations + +* [Get](#get) - Get CORS settings +* [Set](#set) - Set CORS settings + +## Get + +The *Get CORS settings* endpoint returns the allowed origins (i.e. your domains) you want to allow cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)) with Codat. + +Enabling CORS with Codat is required by our embedded [connection management UI](https://docs.codat.io/auth-flow/optimize/connection-management) to access Codat's API endpoints. + +The embedded [connection management UI](https://docs.codat.io/auth-flow/optimize/connection-management) lets your customers control access to their data by allowing them to manage their existing connections. + +### Example Usage + +```csharp +using Codat.Platform; +using Codat.Platform.Models.Shared; + +var sdk = new CodatPlatform(security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + }); + +var res = await sdk.ConnectionManagement.CorsSettings.GetAsync(); + +// handle response +``` + + +### Response + +**[GetConnectionManagementCorsSettingsResponse](../../Models/Operations/GetConnectionManagementCorsSettingsResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | + +## Set + +The *Set CORS settings* endpoint allows you to register allowed origins (i.e. your domains) for use in cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)). + +Enabling CORS with Codat is required by our embedded [connection management UI](https://docs.codat.io/auth-flow/optimize/connection-management) to access Codat's API endpoints. + +The embedded [connection management UI](https://docs.codat.io/auth-flow/optimize/connection-management) lets your customers control access to their data by allowing them to manage their existing connections. + +### Example Usage + +```csharp +using Codat.Platform; +using Codat.Platform.Models.Shared; +using System.Collections.Generic; + +var sdk = new CodatPlatform(security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + }); + +ConnectionManagementAllowedOrigins req = new ConnectionManagementAllowedOrigins() { + AllowedOrigins = new List() { + "https://www.bank-of-dave.com", + }, +}; + +var res = await sdk.ConnectionManagement.CorsSettings.SetAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `request` | [ConnectionManagementAllowedOrigins](../../Models/Shared/ConnectionManagementAllowedOrigins.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[SetConnectionManagementCorsSettingsResponse](../../Models/Operations/SetConnectionManagementCorsSettingsResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/customdatatype/README.md b/platform/docs/sdks/customdatatype/README.md index bf9104012..a6ace7879 100644 --- a/platform/docs/sdks/customdatatype/README.md +++ b/platform/docs/sdks/customdatatype/README.md @@ -3,7 +3,7 @@ ## Overview -View and configure custom data types for supported integrations. +Configure and pull additional data types that are not included in Codat's standardized data model. ### Available Operations @@ -76,7 +76,12 @@ var res = await sdk.CustomDataType.ConfigureAsync(req); ### Response **[ConfigureCustomDataTypeResponse](../../Models/Operations/ConfigureCustomDataTypeResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## GetConfiguration @@ -115,7 +120,12 @@ var res = await sdk.CustomDataType.GetConfigurationAsync(req); ### Response **[GetCustomDataTypeConfigurationResponse](../../Models/Operations/GetCustomDataTypeConfigurationResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -157,7 +167,12 @@ var res = await sdk.CustomDataType.ListAsync(req); ### Response **[ListCustomDataTypeRecordsResponse](../../Models/Operations/ListCustomDataTypeRecordsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,404,429,451,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## Refresh @@ -195,4 +210,9 @@ var res = await sdk.CustomDataType.RefreshAsync(req); ### Response **[RefreshCustomDataTypeResponse](../../Models/Operations/RefreshCustomDataTypeResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,451,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/groups/README.md b/platform/docs/sdks/groups/README.md index 4e0b6d2c3..d2e22daca 100644 --- a/platform/docs/sdks/groups/README.md +++ b/platform/docs/sdks/groups/README.md @@ -3,7 +3,7 @@ ## Overview -Create groups and link them to your Codat companies. +Define and manage sets of companies based on a chosen characteristic. ### Available Operations @@ -48,7 +48,12 @@ var res = await sdk.Groups.AddCompanyAsync(req); ### Response **[AddCompanyToGroupResponse](../../Models/Operations/AddCompanyToGroupResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## Create @@ -90,7 +95,12 @@ var res = await sdk.Groups.CreateAsync(req); ### Response **[CreateGroupResponse](../../Models/Operations/CreateGroupResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,409,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -117,7 +127,12 @@ var res = await sdk.Groups.ListAsync(); ### Response **[ListGroupsResponse](../../Models/Operations/ListGroupsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## RemoveCompany @@ -156,4 +171,9 @@ var res = await sdk.Groups.RemoveCompanyAsync(req); ### Response **[RemoveCompanyFromGroupResponse](../../Models/Operations/RemoveCompanyFromGroupResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/integrations/README.md b/platform/docs/sdks/integrations/README.md index 1a1c6cfae..5d6d29ed1 100644 --- a/platform/docs/sdks/integrations/README.md +++ b/platform/docs/sdks/integrations/README.md @@ -3,7 +3,7 @@ ## Overview -View and manage your available integrations in Codat. +Get a list of integrations supported by Codat and their logos. ### Available Operations @@ -45,7 +45,12 @@ var res = await sdk.Integrations.GetAsync(req); ### Response **[GetIntegrationResponse](../../Models/Operations/GetIntegrationResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## GetBranding @@ -81,7 +86,12 @@ var res = await sdk.Integrations.GetBrandingAsync(req); ### Response **[GetIntegrationsBrandingResponse](../../Models/Operations/GetIntegrationsBrandingResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -119,4 +129,9 @@ var res = await sdk.Integrations.ListAsync(req); ### Response **[ListIntegrationsResponse](../../Models/Operations/ListIntegrationsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/pushdata/README.md b/platform/docs/sdks/pushdata/README.md index adea1d204..242b91571 100644 --- a/platform/docs/sdks/pushdata/README.md +++ b/platform/docs/sdks/pushdata/README.md @@ -3,7 +3,7 @@ ## Overview -View push options and get push statuses. +Initiate and monitor Create, Update, and Delete operations. ### Available Operations @@ -38,7 +38,7 @@ var sdk = new CodatPlatform(security: new Security() { GetCreateUpdateModelOptionsByDataTypeRequest req = new GetCreateUpdateModelOptionsByDataTypeRequest() { CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", - DataType = SchemaDataType.Invoices, + DataType = Codat.Platform.Models.Shared.SchemaDataType.Invoices, }; var res = await sdk.PushData.GetModelOptionsAsync(req); @@ -56,7 +56,12 @@ var res = await sdk.PushData.GetModelOptionsAsync(req); ### Response **[GetCreateUpdateModelOptionsByDataTypeResponse](../../Models/Operations/GetCreateUpdateModelOptionsByDataTypeResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## GetOperation @@ -93,7 +98,12 @@ var res = await sdk.PushData.GetOperationAsync(req); ### Response **[GetPushOperationResponse](../../Models/Operations/GetPushOperationResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## ListOperations @@ -132,4 +142,9 @@ var res = await sdk.PushData.ListOperationsAsync(req); ### Response **[GetCompanyPushHistoryResponse](../../Models/Operations/GetCompanyPushHistoryResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/refreshdata/README.md b/platform/docs/sdks/refreshdata/README.md index 91e8115c7..d501abb81 100644 --- a/platform/docs/sdks/refreshdata/README.md +++ b/platform/docs/sdks/refreshdata/README.md @@ -3,7 +3,7 @@ ## Overview -Asynchronously retrieve data from an integration to refresh data in Codat. +Initiate data refreshes, view pull status and history. ### Available Operations @@ -51,7 +51,12 @@ var res = await sdk.RefreshData.AllAsync(req); ### Response **[RefreshCompanyDataResponse](../../Models/Operations/RefreshCompanyDataResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## ByDataType @@ -72,7 +77,7 @@ var sdk = new CodatPlatform(security: new Security() { RefreshDataTypeRequest req = new RefreshDataTypeRequest() { CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", - DataType = SchemaDataType.Invoices, + DataType = Codat.Platform.Models.Shared.SchemaDataType.Invoices, }; var res = await sdk.RefreshData.ByDataTypeAsync(req); @@ -90,7 +95,12 @@ var res = await sdk.RefreshData.ByDataTypeAsync(req); ### Response **[RefreshDataTypeResponse](../../Models/Operations/RefreshDataTypeResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## Get @@ -126,7 +136,12 @@ var res = await sdk.RefreshData.GetAsync(req); ### Response **[GetCompanyDataStatusResponse](../../Models/Operations/GetCompanyDataStatusResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## GetPullOperation @@ -163,7 +178,12 @@ var res = await sdk.RefreshData.GetPullOperationAsync(req); ### Response **[GetPullOperationResponse](../../Models/Operations/GetPullOperationResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## ListPullOperations @@ -202,4 +222,9 @@ var res = await sdk.RefreshData.ListPullOperationsAsync(req); ### Response **[ListPullOperationsResponse](../../Models/Operations/ListPullOperationsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/settings/README.md b/platform/docs/sdks/settings/README.md index 66b6269ab..d8613f9f6 100644 --- a/platform/docs/sdks/settings/README.md +++ b/platform/docs/sdks/settings/README.md @@ -3,7 +3,7 @@ ## Overview -Manage your Codat instance. +Manage company profile configuration, sync settings, and API keys. ### Available Operations @@ -58,7 +58,12 @@ var res = await sdk.Settings.CreateApiKeyAsync(req); ### Response **[CreateApiKeyResponse](../../Models/Operations/CreateApiKeyResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,409,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## DeleteApiKey @@ -103,7 +108,12 @@ var res = await sdk.Settings.DeleteApiKeyAsync(req); ### Response **[DeleteApiKeyResponse](../../Models/Operations/DeleteApiKeyResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## GetProfile @@ -128,7 +138,12 @@ var res = await sdk.Settings.GetProfileAsync(); ### Response **[GetProfileResponse](../../Models/Operations/GetProfileResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## GetSyncSettings @@ -153,7 +168,12 @@ var res = await sdk.Settings.GetSyncSettingsAsync(); ### Response **[GetProfileSyncSettingsResponse](../../Models/Operations/GetProfileSyncSettingsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## ListApiKeys @@ -182,7 +202,12 @@ var res = await sdk.Settings.ListApiKeysAsync(); ### Response **[ListApiKeysResponse](../../Models/Operations/ListApiKeysResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## UpdateProfile @@ -228,7 +253,12 @@ var res = await sdk.Settings.UpdateProfileAsync(req); ### Response **[UpdateProfileResponse](../../Models/Operations/UpdateProfileResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## UpdateSyncSettings @@ -248,10 +278,9 @@ var sdk = new CodatPlatform(security: new Security() { UpdateProfileSyncSettingsRequestBody req = new UpdateProfileSyncSettingsRequestBody() { ClientId = "ce429104-79f0-4085-a720-e2d40fcc800f", - OverridesDefaults = false, Settings = new List() { new SyncSetting() { - DataType = Models.Shared.DataType.Invoices, + DataType = Codat.Platform.Models.Shared.DataType.Invoices, FetchOnFirstLink = true, IsLocked = true, MonthsToSync = 24, @@ -278,4 +307,9 @@ var res = await sdk.Settings.UpdateSyncSettingsAsync(req); ### Response **[UpdateProfileSyncSettingsResponse](../../Models/Operations/UpdateProfileSyncSettingsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/supplementaldata/README.md b/platform/docs/sdks/supplementaldata/README.md index 2e8a9210c..3598ca593 100644 --- a/platform/docs/sdks/supplementaldata/README.md +++ b/platform/docs/sdks/supplementaldata/README.md @@ -3,7 +3,7 @@ ## Overview -View and configure supplemental data for supported data types. +Configure and pull additional data you can include in Codat's standard data types. ### Available Operations @@ -45,7 +45,7 @@ ConfigureSupplementalDataRequest req = new ConfigureSupplementalDataRequest() { } }, }, }, - DataType = Models.Operations.DataType.Invoices, + DataType = Codat.Platform.Models.Operations.DataType.Invoices, PlatformKey = "gbol", }; @@ -64,7 +64,12 @@ var res = await sdk.SupplementalData.ConfigureAsync(req); ### Response **[ConfigureSupplementalDataResponse](../../Models/Operations/ConfigureSupplementalDataResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## GetConfiguration @@ -84,7 +89,7 @@ var sdk = new CodatPlatform(security: new Security() { }); GetSupplementalDataConfigurationRequest req = new GetSupplementalDataConfigurationRequest() { - DataType = PathParamDataType.Invoices, + DataType = Codat.Platform.Models.Operations.PathParamDataType.Invoices, PlatformKey = "gbol", }; @@ -103,4 +108,9 @@ var res = await sdk.SupplementalData.GetConfigurationAsync(req); ### Response **[GetSupplementalDataConfigurationResponse](../../Models/Operations/GetSupplementalDataConfigurationResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/docs/sdks/webhooks/README.md b/platform/docs/sdks/webhooks/README.md index 29c2a608c..3c8b7a678 100644 --- a/platform/docs/sdks/webhooks/README.md +++ b/platform/docs/sdks/webhooks/README.md @@ -3,7 +3,7 @@ ## Overview -Manage webhooks, rules, and events. +Create and manage webhooks that listen to Codat's events. ### Available Operations @@ -57,7 +57,12 @@ var res = await sdk.Webhooks.CreateAsync(req); ### Response **[CreateRuleResponse](../../Models/Operations/CreateRuleResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## CreateConsumer @@ -76,7 +81,9 @@ var sdk = new CodatPlatform(security: new Security() { AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", }); -WebhookConsumerPrototype req = new WebhookConsumerPrototype() {}; +WebhookConsumerPrototype req = new WebhookConsumerPrototype() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", +}; var res = await sdk.Webhooks.CreateConsumerAsync(req); @@ -93,7 +100,12 @@ var res = await sdk.Webhooks.CreateConsumerAsync(req); ### Response **[CreateWebhookConsumerResponse](../../Models/Operations/CreateWebhookConsumerResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## DeleteConsumer @@ -131,7 +143,12 @@ var res = await sdk.Webhooks.DeleteConsumerAsync(req); ### Response **[DeleteWebhookConsumerResponse](../../Models/Operations/DeleteWebhookConsumerResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## ~~Get~~ @@ -169,7 +186,12 @@ var res = await sdk.Webhooks.GetAsync(req); ### Response **[GetWebhookResponse](../../Models/Operations/GetWebhookResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## ~~List~~ @@ -209,7 +231,12 @@ var res = await sdk.Webhooks.ListAsync(req); ### Response **[ListRulesResponse](../../Models/Operations/ListRulesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | ## ListConsumers @@ -236,4 +263,9 @@ var res = await sdk.Webhooks.ListConsumersAsync(); ### Response **[ListWebhookConsumersResponse](../../Models/Operations/ListWebhookConsumersResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| Codat.Platform.Models.Errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json | +| Codat.Platform.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/platform/gen.yaml b/platform/gen.yaml index 744aa2d91..4f0eb97c1 100644 --- a/platform/gen.yaml +++ b/platform/gen.yaml @@ -11,9 +11,12 @@ generation: oAuth2ClientCredentialsEnabled: false telemetryEnabled: true csharp: - version: 3.5.0 + version: 3.6.0 + additionalDependencies: [] author: Codat + clientServerStatusCodesAsErrors: true description: Manage the building blocks of Codat, including companies, connections, and more. + disableNamespacePascalCasingApr2024: false dotnetVersion: net6.0 flattenGlobalSecurity: false imports: @@ -28,3 +31,4 @@ csharp: maxMethodParams: 0 outputModelSuffix: output packageName: Codat.Platform + responseFormat: envelope