diff --git a/.openapi-generator/openapi.yaml-python-client.sha256 b/.openapi-generator/openapi.yaml-python-client.sha256 index ca22ba7..15c00e5 100644 --- a/.openapi-generator/openapi.yaml-python-client.sha256 +++ b/.openapi-generator/openapi.yaml-python-client.sha256 @@ -1 +1 @@ -7c89c1b6953f4b30c4a10716d9b9f773508e1cfd0eface936f04c5b8d2ad40c2 \ No newline at end of file +58e81a114cb4cf34839e8f8186608a4024a84adbfc4afd0a1386ac6d1466fd4e \ No newline at end of file diff --git a/README.md b/README.md index ee3a701..5f036ae 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AccountsApi(api_client) account_id = 'account_id_example' # str | Id of the account - account_onboarding_parameters = cm_python_openapi_sdk.AccountOnboardingParameters() # AccountOnboardingParameters | (optional) + account_onboarding_parameters = {"introShown":["/rest/projects/qkn86k5upo4m9b27/md/views/td9uijp62o8sa27b","/rest/projects/kfdkssvg7rjeri1c/md/views/ul81ijptko8s453t"],"tipsShown":["basicVisualization","extBlockRanking"]} # AccountOnboardingParameters | (optional) try: # Change account onboarding @@ -105,6 +105,7 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AccountsApi* | [**change_onboarding**](docs/AccountsApi.md#change_onboarding) | **PUT** /accounts/{accountId}/onboarding | Change account onboarding *AccountsApi* | [**change_preferences**](docs/AccountsApi.md#change_preferences) | **PUT** /accounts/{accountId}/preferences | Change account preferences +*AccountsApi* | [**create_pipedrive_account**](docs/AccountsApi.md#create_pipedrive_account) | **POST** /accounts/pipedrive | Create pipedrive account and save ID to Cognito profile *AccountsApi* | [**delete_account_by_id**](docs/AccountsApi.md#delete_account_by_id) | **DELETE** /accounts/{accountId} | Delete account. *AccountsApi* | [**get_account_by_account_id**](docs/AccountsApi.md#get_account_by_account_id) | **GET** /accounts/{accountId} | Get account by accountId *AccountsApi* | [**get_account_by_email**](docs/AccountsApi.md#get_account_by_email) | **GET** /accounts | Find if account with email exists. @@ -126,7 +127,7 @@ Class | Method | HTTP request | Description *DashboardsApi* | [**get_dashboard_by_id**](docs/DashboardsApi.md#get_dashboard_by_id) | **GET** /projects/{projectId}/md/dashboards/{id} | Gets dashboard by id *DashboardsApi* | [**get_dashboard_by_name**](docs/DashboardsApi.md#get_dashboard_by_name) | **GET** /projects/{projectId}/md/dashboards/{name} | Gets dashboard by name *DashboardsApi* | [**update_dashboard_by_id**](docs/DashboardsApi.md#update_dashboard_by_id) | **PUT** /projects/{projectId}/md/dashboards/{id} | Updates dashboard by id -*DataDumpApi* | [**get_data_dump**](docs/DataDumpApi.md#get_data_dump) | **GET** /projects/{projectId}/data/dumps/{dumpId} | Get data dump file +*DataDumpApi* | [**get_data_dump**](docs/DataDumpApi.md#get_data_dump) | **GET** /projects/{projectId}/dwh/data/dumps/{dumpId} | Get data dump file *DataPermissionsApi* | [**create_data_permission**](docs/DataPermissionsApi.md#create_data_permission) | **POST** /projects/{projectId}/md/dataPermissions | Creates new data permission *DataPermissionsApi* | [**delete_data_permission_by_id**](docs/DataPermissionsApi.md#delete_data_permission_by_id) | **DELETE** /projects/{projectId}/md/dataPermissions/{id} | Deletes data permission by id *DataPermissionsApi* | [**get_all_data_permissions**](docs/DataPermissionsApi.md#get_all_data_permissions) | **GET** /projects/{projectId}/md/dataPermissions | Returns paged collection of all data permissions in a project @@ -166,8 +167,11 @@ Class | Method | HTTP request | Description *IndicatorsApi* | [**get_indicator_by_id**](docs/IndicatorsApi.md#get_indicator_by_id) | **GET** /projects/{projectId}/md/indicators/{id} | Gets indicator by id *IndicatorsApi* | [**get_indicator_by_name**](docs/IndicatorsApi.md#get_indicator_by_name) | **GET** /projects/{projectId}/md/indicators/{name} | Gets indicator by name *IndicatorsApi* | [**update_indicator_by_id**](docs/IndicatorsApi.md#update_indicator_by_id) | **PUT** /projects/{projectId}/md/indicators/{id} | Updates indicator by id -*InvitationApi* | [**accept_project_invitation**](docs/InvitationApi.md#accept_project_invitation) | **POST** /invitations/{invitationHash} | Accept invitation. -*InvitationApi* | [**get_invitation**](docs/InvitationApi.md#get_invitation) | **GET** /invitations/{invitationHash} | Get detail of an invitation. +*InvitationsApi* | [**create_invitation**](docs/InvitationsApi.md#create_invitation) | **POST** /projects/{projectId}/invitations | Create new invitation to the project for a user. +*InvitationsApi* | [**delete_invitation**](docs/InvitationsApi.md#delete_invitation) | **DELETE** /projects/{projectId}/invitations/{invitationId} | Delete invitation. +*InvitationsApi* | [**get_invitation_by_id**](docs/InvitationsApi.md#get_invitation_by_id) | **GET** /projects/{projectId}/invitations/{invitationId} | Get detail of an invitation. +*InvitationsApi* | [**get_invitations**](docs/InvitationsApi.md#get_invitations) | **GET** /projects/{projectId}/invitations | Get list of project invitations. +*InvitationsApi* | [**update_invitation**](docs/InvitationsApi.md#update_invitation) | **PUT** /projects/{projectId}/invitations/{invitationId} | Update invitation. *IsochroneApi* | [**get_isochrone**](docs/IsochroneApi.md#get_isochrone) | **GET** /isochrone | Get isochrone *JobsApi* | [**get_job_status**](docs/JobsApi.md#get_job_status) | **GET** /jobs/{jobId} | Get job status *JobsApi* | [**get_jobs_history**](docs/JobsApi.md#get_jobs_history) | **GET** /jobs/history | Get jobs history @@ -197,6 +201,8 @@ Class | Method | HTTP request | Description *MembersApi* | [**update_membership**](docs/MembersApi.md#update_membership) | **PUT** /projects/{projectId}/members/{membershipId} | Update membership by changing role or status in project. *MetricRangesApi* | [**accept_metric_ranges**](docs/MetricRangesApi.md#accept_metric_ranges) | **POST** /projects/{projectId}/dwh/{dwhClusterId}/metricRanges | Accept metric ranges *MetricRangesApi* | [**get_metric_ranges**](docs/MetricRangesApi.md#get_metric_ranges) | **GET** /projects/{projectId}/dwh/{dwhClusterId}/metricRanges/{dwhCacheId} | Get metric ranges +*MetricValuesDistributionApi* | [**accept_metric_values_distributions**](docs/MetricValuesDistributionApi.md#accept_metric_values_distributions) | **POST** /projects/{projectId}/dwh/{dwhClusterId}/metricValuesDistributions | +*MetricValuesDistributionApi* | [**get_metric_values_distributions**](docs/MetricValuesDistributionApi.md#get_metric_values_distributions) | **GET** /projects/{projectId}/dwh/{dwhClusterId}/metricValuesDistributions/{dwhCacheId} | *MetricsApi* | [**create_metric**](docs/MetricsApi.md#create_metric) | **POST** /projects/{projectId}/md/metrics | Creates new metric. *MetricsApi* | [**delete_metric_by_id**](docs/MetricsApi.md#delete_metric_by_id) | **DELETE** /projects/{projectId}/md/metrics/{id} | Deletes metric by id *MetricsApi* | [**get_all_metrics**](docs/MetricsApi.md#get_all_metrics) | **GET** /projects/{projectId}/md/metrics | Returns paged collection of all Metrics in a project. @@ -210,11 +216,8 @@ Class | Method | HTTP request | Description *OrganizationsApi* | [**update_organization**](docs/OrganizationsApi.md#update_organization) | **PUT** /organizations/{organizationId} | Update organization. *OverlapsApi* | [**accept_overlaps**](docs/OverlapsApi.md#accept_overlaps) | **POST** /projects/{projectId}/dwh/{dwhClusterId}/overlaps | Accept overlaps *OverlapsApi* | [**get_overlaps**](docs/OverlapsApi.md#get_overlaps) | **GET** /projects/{projectId}/dwh/{dwhClusterId}/overlaps/{dwhCacheId} | Get overlaps -*ProjectInvitationsApi* | [**create_invitation**](docs/ProjectInvitationsApi.md#create_invitation) | **POST** /projects/{projectId}/invitations | Create new invitation to the project for a user. -*ProjectInvitationsApi* | [**delete_invitation**](docs/ProjectInvitationsApi.md#delete_invitation) | **DELETE** /projects/{projectId}/invitations/{invitationId} | Delete invitation. -*ProjectInvitationsApi* | [**get_invitation_by_id**](docs/ProjectInvitationsApi.md#get_invitation_by_id) | **GET** /projects/{projectId}/invitations/{invitationId} | Get detail of an invitation. -*ProjectInvitationsApi* | [**get_invitations**](docs/ProjectInvitationsApi.md#get_invitations) | **GET** /projects/{projectId}/invitations | Get list of project invitations. -*ProjectInvitationsApi* | [**update_invitation**](docs/ProjectInvitationsApi.md#update_invitation) | **PUT** /projects/{projectId}/invitations/{invitationId} | Update invitation. +*ProjectInvitationApi* | [**accept_project_invitation**](docs/ProjectInvitationApi.md#accept_project_invitation) | **POST** /invitations/{invitationHash} | Accept invitation. +*ProjectInvitationApi* | [**get_invitation**](docs/ProjectInvitationApi.md#get_invitation) | **GET** /invitations/{invitationHash} | Get detail of an invitation. *ProjectSettingsApi* | [**create_project_settings**](docs/ProjectSettingsApi.md#create_project_settings) | **POST** /projects/{projectId}/md/projectSettings | Creates new project settings *ProjectSettingsApi* | [**delete_project_settings_by_id**](docs/ProjectSettingsApi.md#delete_project_settings_by_id) | **DELETE** /projects/{projectId}/md/projectSettings/{id} | Deletes project settings by id *ProjectSettingsApi* | [**get_all_project_settings**](docs/ProjectSettingsApi.md#get_all_project_settings) | **GET** /projects/{projectId}/md/projectSettings | Returns paged collection of all Project Settings objects in a project. This page will always contain only one object. @@ -269,6 +272,8 @@ Class | Method | HTTP request | Description - [AuditLogPagedResourcePage](docs/AuditLogPagedResourcePage.md) - [AuditLogPagedResourcePageLastEvaluatedKey](docs/AuditLogPagedResourcePageLastEvaluatedKey.md) - [AuditLogSingleResource](docs/AuditLogSingleResource.md) + - [AuditLogSingleResource1](docs/AuditLogSingleResource1.md) + - [AvailableDatasetsForMetric](docs/AvailableDatasetsForMetric.md) - [AvailableDatasetsRequest](docs/AvailableDatasetsRequest.md) - [AvailableDatasetsResponse](docs/AvailableDatasetsResponse.md) - [AvailableDatasetsResponseContentInner](docs/AvailableDatasetsResponseContentInner.md) @@ -291,7 +296,9 @@ Class | Method | HTTP request | Description - [CreateInvitation](docs/CreateInvitation.md) - [CreateMembershipDTO](docs/CreateMembershipDTO.md) - [CreateOrganizationDTO](docs/CreateOrganizationDTO.md) + - [CreatePersonRequestDTO](docs/CreatePersonRequestDTO.md) - [CreateProjectDTO](docs/CreateProjectDTO.md) + - [CsvHeaderOverride](docs/CsvHeaderOverride.md) - [CuzkParcelInfoDTO](docs/CuzkParcelInfoDTO.md) - [DashboardContentDTO](docs/DashboardContentDTO.md) - [DashboardDTO](docs/DashboardDTO.md) @@ -342,15 +349,17 @@ Class | Method | HTTP request | Description - [DistributionDTO](docs/DistributionDTO.md) - [DoubleCountingWarnings](docs/DoubleCountingWarnings.md) - [DwhAbstractProperty](docs/DwhAbstractProperty.md) + - [DwhDateRangeFilter](docs/DwhDateRangeFilter.md) - [DwhDateRangeRequest](docs/DwhDateRangeRequest.md) - - [DwhDateRangeRequestFilter](docs/DwhDateRangeRequestFilter.md) - [DwhDateRangeResponse](docs/DwhDateRangeResponse.md) - [DwhDateRangeResponseContentInner](docs/DwhDateRangeResponseContentInner.md) - [DwhForeignKeyDTO](docs/DwhForeignKeyDTO.md) - [DwhGeometryDTO](docs/DwhGeometryDTO.md) - [DwhMetricRangeResponse](docs/DwhMetricRangeResponse.md) - [DwhMetricRangeResponseContentInner](docs/DwhMetricRangeResponseContentInner.md) + - [DwhMetricValuesDistributionRequest](docs/DwhMetricValuesDistributionRequest.md) - [DwhMetricValuesDistributionResponse](docs/DwhMetricValuesDistributionResponse.md) + - [DwhMetricValuesDistributionResponse1](docs/DwhMetricValuesDistributionResponse1.md) - [DwhMetricValuesDistributionResponseContentInner](docs/DwhMetricValuesDistributionResponseContentInner.md) - [DwhMetricValuesDistributionResponseContentInnerContentInner](docs/DwhMetricValuesDistributionResponseContentInnerContentInner.md) - [DwhOverlapsRequest](docs/DwhOverlapsRequest.md) @@ -405,9 +414,11 @@ Class | Method | HTTP request | Description - [FunctionDateTruncateOptions](docs/FunctionDateTruncateOptions.md) - [FunctionDistance](docs/FunctionDistance.md) - [FunctionDistanceOptions](docs/FunctionDistanceOptions.md) + - [FunctionGreatestLeastTypeGeneral](docs/FunctionGreatestLeastTypeGeneral.md) - [FunctionH3Grid](docs/FunctionH3Grid.md) - [FunctionH3GridOptions](docs/FunctionH3GridOptions.md) - [FunctionInterval](docs/FunctionInterval.md) + - [FunctionLogExpTypeGeneral](docs/FunctionLogExpTypeGeneral.md) - [FunctionNtile](docs/FunctionNtile.md) - [FunctionNtileOptions](docs/FunctionNtileOptions.md) - [FunctionPercentToTotalTypeGeneral](docs/FunctionPercentToTotalTypeGeneral.md) diff --git a/cm_python_openapi_sdk/__init__.py b/cm_python_openapi_sdk/__init__.py index 30031a1..1b16239 100644 --- a/cm_python_openapi_sdk/__init__.py +++ b/cm_python_openapi_sdk/__init__.py @@ -37,7 +37,7 @@ from cm_python_openapi_sdk.api.geosearch_api import GeosearchApi from cm_python_openapi_sdk.api.indicator_drills_api import IndicatorDrillsApi from cm_python_openapi_sdk.api.indicators_api import IndicatorsApi -from cm_python_openapi_sdk.api.invitation_api import InvitationApi +from cm_python_openapi_sdk.api.invitations_api import InvitationsApi from cm_python_openapi_sdk.api.isochrone_api import IsochroneApi from cm_python_openapi_sdk.api.jobs_api import JobsApi from cm_python_openapi_sdk.api.maps_api import MapsApi @@ -45,10 +45,11 @@ from cm_python_openapi_sdk.api.markers_api import MarkersApi from cm_python_openapi_sdk.api.members_api import MembersApi from cm_python_openapi_sdk.api.metric_ranges_api import MetricRangesApi +from cm_python_openapi_sdk.api.metric_values_distribution_api import MetricValuesDistributionApi from cm_python_openapi_sdk.api.metrics_api import MetricsApi from cm_python_openapi_sdk.api.organizations_api import OrganizationsApi from cm_python_openapi_sdk.api.overlaps_api import OverlapsApi -from cm_python_openapi_sdk.api.project_invitations_api import ProjectInvitationsApi +from cm_python_openapi_sdk.api.project_invitation_api import ProjectInvitationApi from cm_python_openapi_sdk.api.project_settings_api import ProjectSettingsApi from cm_python_openapi_sdk.api.projects_api import ProjectsApi from cm_python_openapi_sdk.api.property_values_api import PropertyValuesApi @@ -95,6 +96,8 @@ from cm_python_openapi_sdk.models.audit_log_paged_resource_page import AuditLogPagedResourcePage from cm_python_openapi_sdk.models.audit_log_paged_resource_page_last_evaluated_key import AuditLogPagedResourcePageLastEvaluatedKey from cm_python_openapi_sdk.models.audit_log_single_resource import AuditLogSingleResource +from cm_python_openapi_sdk.models.audit_log_single_resource1 import AuditLogSingleResource1 +from cm_python_openapi_sdk.models.available_datasets_for_metric import AvailableDatasetsForMetric from cm_python_openapi_sdk.models.available_datasets_request import AvailableDatasetsRequest from cm_python_openapi_sdk.models.available_datasets_response import AvailableDatasetsResponse from cm_python_openapi_sdk.models.available_datasets_response_content_inner import AvailableDatasetsResponseContentInner @@ -117,7 +120,9 @@ from cm_python_openapi_sdk.models.create_invitation import CreateInvitation from cm_python_openapi_sdk.models.create_membership_dto import CreateMembershipDTO from cm_python_openapi_sdk.models.create_organization_dto import CreateOrganizationDTO +from cm_python_openapi_sdk.models.create_person_request_dto import CreatePersonRequestDTO from cm_python_openapi_sdk.models.create_project_dto import CreateProjectDTO +from cm_python_openapi_sdk.models.csv_header_override import CsvHeaderOverride from cm_python_openapi_sdk.models.cuzk_parcel_info_dto import CuzkParcelInfoDTO from cm_python_openapi_sdk.models.dashboard_content_dto import DashboardContentDTO from cm_python_openapi_sdk.models.dashboard_dto import DashboardDTO @@ -168,15 +173,17 @@ from cm_python_openapi_sdk.models.distribution_dto import DistributionDTO from cm_python_openapi_sdk.models.double_counting_warnings import DoubleCountingWarnings from cm_python_openapi_sdk.models.dwh_abstract_property import DwhAbstractProperty +from cm_python_openapi_sdk.models.dwh_date_range_filter import DwhDateRangeFilter from cm_python_openapi_sdk.models.dwh_date_range_request import DwhDateRangeRequest -from cm_python_openapi_sdk.models.dwh_date_range_request_filter import DwhDateRangeRequestFilter from cm_python_openapi_sdk.models.dwh_date_range_response import DwhDateRangeResponse from cm_python_openapi_sdk.models.dwh_date_range_response_content_inner import DwhDateRangeResponseContentInner from cm_python_openapi_sdk.models.dwh_foreign_key_dto import DwhForeignKeyDTO from cm_python_openapi_sdk.models.dwh_geometry_dto import DwhGeometryDTO from cm_python_openapi_sdk.models.dwh_metric_range_response import DwhMetricRangeResponse from cm_python_openapi_sdk.models.dwh_metric_range_response_content_inner import DwhMetricRangeResponseContentInner +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_request import DwhMetricValuesDistributionRequest from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response import DwhMetricValuesDistributionResponse +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response1 import DwhMetricValuesDistributionResponse1 from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response_content_inner import DwhMetricValuesDistributionResponseContentInner from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response_content_inner_content_inner import DwhMetricValuesDistributionResponseContentInnerContentInner from cm_python_openapi_sdk.models.dwh_overlaps_request import DwhOverlapsRequest @@ -231,9 +238,11 @@ from cm_python_openapi_sdk.models.function_date_truncate_options import FunctionDateTruncateOptions from cm_python_openapi_sdk.models.function_distance import FunctionDistance from cm_python_openapi_sdk.models.function_distance_options import FunctionDistanceOptions +from cm_python_openapi_sdk.models.function_greatest_least_type_general import FunctionGreatestLeastTypeGeneral from cm_python_openapi_sdk.models.function_h3_grid import FunctionH3Grid from cm_python_openapi_sdk.models.function_h3_grid_options import FunctionH3GridOptions from cm_python_openapi_sdk.models.function_interval import FunctionInterval +from cm_python_openapi_sdk.models.function_log_exp_type_general import FunctionLogExpTypeGeneral from cm_python_openapi_sdk.models.function_ntile import FunctionNtile from cm_python_openapi_sdk.models.function_ntile_options import FunctionNtileOptions from cm_python_openapi_sdk.models.function_percent_to_total_type_general import FunctionPercentToTotalTypeGeneral diff --git a/cm_python_openapi_sdk/api/__init__.py b/cm_python_openapi_sdk/api/__init__.py index 76670f1..34f0e6b 100644 --- a/cm_python_openapi_sdk/api/__init__.py +++ b/cm_python_openapi_sdk/api/__init__.py @@ -20,7 +20,7 @@ from cm_python_openapi_sdk.api.geosearch_api import GeosearchApi from cm_python_openapi_sdk.api.indicator_drills_api import IndicatorDrillsApi from cm_python_openapi_sdk.api.indicators_api import IndicatorsApi -from cm_python_openapi_sdk.api.invitation_api import InvitationApi +from cm_python_openapi_sdk.api.invitations_api import InvitationsApi from cm_python_openapi_sdk.api.isochrone_api import IsochroneApi from cm_python_openapi_sdk.api.jobs_api import JobsApi from cm_python_openapi_sdk.api.maps_api import MapsApi @@ -28,10 +28,11 @@ from cm_python_openapi_sdk.api.markers_api import MarkersApi from cm_python_openapi_sdk.api.members_api import MembersApi from cm_python_openapi_sdk.api.metric_ranges_api import MetricRangesApi +from cm_python_openapi_sdk.api.metric_values_distribution_api import MetricValuesDistributionApi from cm_python_openapi_sdk.api.metrics_api import MetricsApi from cm_python_openapi_sdk.api.organizations_api import OrganizationsApi from cm_python_openapi_sdk.api.overlaps_api import OverlapsApi -from cm_python_openapi_sdk.api.project_invitations_api import ProjectInvitationsApi +from cm_python_openapi_sdk.api.project_invitation_api import ProjectInvitationApi from cm_python_openapi_sdk.api.project_settings_api import ProjectSettingsApi from cm_python_openapi_sdk.api.projects_api import ProjectsApi from cm_python_openapi_sdk.api.property_values_api import PropertyValuesApi diff --git a/cm_python_openapi_sdk/api/accounts_api.py b/cm_python_openapi_sdk/api/accounts_api.py index 3e55bf5..22a7d35 100644 --- a/cm_python_openapi_sdk/api/accounts_api.py +++ b/cm_python_openapi_sdk/api/accounts_api.py @@ -23,6 +23,7 @@ from cm_python_openapi_sdk.models.account_dto import AccountDTO from cm_python_openapi_sdk.models.account_onboarding_parameters import AccountOnboardingParameters from cm_python_openapi_sdk.models.account_preferences import AccountPreferences +from cm_python_openapi_sdk.models.create_person_request_dto import CreatePersonRequestDTO from cm_python_openapi_sdk.models.get_account_by_account_id200_response import GetAccountByAccountId200Response from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized @@ -610,6 +611,279 @@ def _change_preferences_serialize( + @validate_call + def create_pipedrive_account( + self, + create_person_request_dto: Optional[CreatePersonRequestDTO] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Create pipedrive account and save ID to Cognito profile + + Create pipedrive account for currently authenticated user and save ID to Cognito profile. + + :param create_person_request_dto: + :type create_person_request_dto: CreatePersonRequestDTO + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_pipedrive_account_serialize( + create_person_request_dto=create_person_request_dto, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '409': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_pipedrive_account_with_http_info( + self, + create_person_request_dto: Optional[CreatePersonRequestDTO] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Create pipedrive account and save ID to Cognito profile + + Create pipedrive account for currently authenticated user and save ID to Cognito profile. + + :param create_person_request_dto: + :type create_person_request_dto: CreatePersonRequestDTO + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_pipedrive_account_serialize( + create_person_request_dto=create_person_request_dto, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '409': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_pipedrive_account_without_preload_content( + self, + create_person_request_dto: Optional[CreatePersonRequestDTO] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create pipedrive account and save ID to Cognito profile + + Create pipedrive account for currently authenticated user and save ID to Cognito profile. + + :param create_person_request_dto: + :type create_person_request_dto: CreatePersonRequestDTO + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_pipedrive_account_serialize( + create_person_request_dto=create_person_request_dto, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '409': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_pipedrive_account_serialize( + self, + create_person_request_dto, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_person_request_dto is not None: + _body_params = create_person_request_dto + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/accounts/pipedrive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def delete_account_by_id( self, @@ -629,7 +903,7 @@ def delete_account_by_id( ) -> None: """Delete account. - Deletes user account from Okta. Destroys Okta session. Delete from Intercom. **Security:** User can delete only himself. + Deletes user account. **Security:** User can delete only himself. :param account_id: Id of the account (required) :type account_id: str @@ -696,7 +970,7 @@ def delete_account_by_id_with_http_info( ) -> ApiResponse[None]: """Delete account. - Deletes user account from Okta. Destroys Okta session. Delete from Intercom. **Security:** User can delete only himself. + Deletes user account. **Security:** User can delete only himself. :param account_id: Id of the account (required) :type account_id: str @@ -763,7 +1037,7 @@ def delete_account_by_id_without_preload_content( ) -> RESTResponseType: """Delete account. - Deletes user account from Okta. Destroys Okta session. Delete from Intercom. **Security:** User can delete only himself. + Deletes user account. **Security:** User can delete only himself. :param account_id: Id of the account (required) :type account_id: str diff --git a/cm_python_openapi_sdk/api/audit_log_api.py b/cm_python_openapi_sdk/api/audit_log_api.py index 37764e6..2a1d35e 100644 --- a/cm_python_openapi_sdk/api/audit_log_api.py +++ b/cm_python_openapi_sdk/api/audit_log_api.py @@ -21,7 +21,7 @@ from typing import Optional from typing_extensions import Annotated from cm_python_openapi_sdk.models.audit_log_paged_resource import AuditLogPagedResource -from cm_python_openapi_sdk.models.audit_log_single_resource import AuditLogSingleResource +from cm_python_openapi_sdk.models.audit_log_single_resource1 import AuditLogSingleResource1 from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -58,7 +58,7 @@ def get_audit_log_event( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AuditLogSingleResource: + ) -> AuditLogSingleResource1: """Get audit log event by eventId Get audit log event by event ID for project. **Security:** Resource return only audit log events for those projects where the authenticated user is Admin. @@ -99,7 +99,7 @@ def get_audit_log_event( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AuditLogSingleResource", + '200': "AuditLogSingleResource1", } response_data = self.api_client.call_api( *_param, @@ -129,7 +129,7 @@ def get_audit_log_event_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AuditLogSingleResource]: + ) -> ApiResponse[AuditLogSingleResource1]: """Get audit log event by eventId Get audit log event by event ID for project. **Security:** Resource return only audit log events for those projects where the authenticated user is Admin. @@ -170,7 +170,7 @@ def get_audit_log_event_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AuditLogSingleResource", + '200': "AuditLogSingleResource1", } response_data = self.api_client.call_api( *_param, @@ -241,7 +241,7 @@ def get_audit_log_event_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AuditLogSingleResource", + '200': "AuditLogSingleResource1", } response_data = self.api_client.call_api( *_param, @@ -323,7 +323,7 @@ def _get_audit_log_event_serialize( def get_audit_logs( self, project_id: Annotated[str, Field(strict=True, description="Id of the project, used as query parameter")], - account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters")] = None, + account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters for auditlog and jobs history.")] = None, event_types: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Event type")] = None, var_from: Annotated[Optional[StrictStr], Field(description="Timestamp lower bound (UTC timestamp format)")] = None, to: Annotated[Optional[StrictStr], Field(description="Timestamp upper bound (UTC timestamp format)")] = None, @@ -350,7 +350,7 @@ def get_audit_logs( :param project_id: Id of the project, used as query parameter (required) :type project_id: str - :param account_id: Id of the account, used in query parameters + :param account_id: Id of the account, used in query parameters for auditlog and jobs history. :type account_id: str :param event_types: Event type :type event_types: str @@ -422,7 +422,7 @@ def get_audit_logs( def get_audit_logs_with_http_info( self, project_id: Annotated[str, Field(strict=True, description="Id of the project, used as query parameter")], - account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters")] = None, + account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters for auditlog and jobs history.")] = None, event_types: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Event type")] = None, var_from: Annotated[Optional[StrictStr], Field(description="Timestamp lower bound (UTC timestamp format)")] = None, to: Annotated[Optional[StrictStr], Field(description="Timestamp upper bound (UTC timestamp format)")] = None, @@ -449,7 +449,7 @@ def get_audit_logs_with_http_info( :param project_id: Id of the project, used as query parameter (required) :type project_id: str - :param account_id: Id of the account, used in query parameters + :param account_id: Id of the account, used in query parameters for auditlog and jobs history. :type account_id: str :param event_types: Event type :type event_types: str @@ -521,7 +521,7 @@ def get_audit_logs_with_http_info( def get_audit_logs_without_preload_content( self, project_id: Annotated[str, Field(strict=True, description="Id of the project, used as query parameter")], - account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters")] = None, + account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters for auditlog and jobs history.")] = None, event_types: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Event type")] = None, var_from: Annotated[Optional[StrictStr], Field(description="Timestamp lower bound (UTC timestamp format)")] = None, to: Annotated[Optional[StrictStr], Field(description="Timestamp upper bound (UTC timestamp format)")] = None, @@ -548,7 +548,7 @@ def get_audit_logs_without_preload_content( :param project_id: Id of the project, used as query parameter (required) :type project_id: str - :param account_id: Id of the account, used in query parameters + :param account_id: Id of the account, used in query parameters for auditlog and jobs history. :type account_id: str :param event_types: Event type :type event_types: str diff --git a/cm_python_openapi_sdk/api/available_datasets_api.py b/cm_python_openapi_sdk/api/available_datasets_api.py index 66200ad..9f0af5e 100644 --- a/cm_python_openapi_sdk/api/available_datasets_api.py +++ b/cm_python_openapi_sdk/api/available_datasets_api.py @@ -50,7 +50,7 @@ def available_datasets( type: Annotated[Optional[StrictStr], Field(description="If the parameter present, only the datasets of given type(s) are returned. Parameter can be repeated.")] = None, subtype: Annotated[Optional[StrictStr], Field(description="If the parameter present, only the dwh datasets of given subtype(s) are returned. Parameter can be repeated, e.g. `?subtype=geometryLine&subtype=geometryPolygon` If a parameter `type=dwh` is present then a subtype parameter is ignored and all subtypes of dwh datasets are returned. ")] = None, expand: Annotated[Optional[StrictStr], Field(description="Expand datasets to minimalize roundtrips.")] = None, - var_from: Annotated[Optional[StrictStr], Field(description="Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alterantively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. ")] = None, + var_from: Annotated[Optional[StrictStr], Field(description="Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alternatively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -80,7 +80,7 @@ def available_datasets( :type subtype: str :param expand: Expand datasets to minimalize roundtrips. :type expand: str - :param var_from: Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alterantively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. + :param var_from: Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alternatively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. :type var_from: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -141,7 +141,7 @@ def available_datasets_with_http_info( type: Annotated[Optional[StrictStr], Field(description="If the parameter present, only the datasets of given type(s) are returned. Parameter can be repeated.")] = None, subtype: Annotated[Optional[StrictStr], Field(description="If the parameter present, only the dwh datasets of given subtype(s) are returned. Parameter can be repeated, e.g. `?subtype=geometryLine&subtype=geometryPolygon` If a parameter `type=dwh` is present then a subtype parameter is ignored and all subtypes of dwh datasets are returned. ")] = None, expand: Annotated[Optional[StrictStr], Field(description="Expand datasets to minimalize roundtrips.")] = None, - var_from: Annotated[Optional[StrictStr], Field(description="Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alterantively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. ")] = None, + var_from: Annotated[Optional[StrictStr], Field(description="Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alternatively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -171,7 +171,7 @@ def available_datasets_with_http_info( :type subtype: str :param expand: Expand datasets to minimalize roundtrips. :type expand: str - :param var_from: Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alterantively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. + :param var_from: Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alternatively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. :type var_from: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -232,7 +232,7 @@ def available_datasets_without_preload_content( type: Annotated[Optional[StrictStr], Field(description="If the parameter present, only the datasets of given type(s) are returned. Parameter can be repeated.")] = None, subtype: Annotated[Optional[StrictStr], Field(description="If the parameter present, only the dwh datasets of given subtype(s) are returned. Parameter can be repeated, e.g. `?subtype=geometryLine&subtype=geometryPolygon` If a parameter `type=dwh` is present then a subtype parameter is ignored and all subtypes of dwh datasets are returned. ")] = None, expand: Annotated[Optional[StrictStr], Field(description="Expand datasets to minimalize roundtrips.")] = None, - var_from: Annotated[Optional[StrictStr], Field(description="Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alterantively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. ")] = None, + var_from: Annotated[Optional[StrictStr], Field(description="Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alternatively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -262,7 +262,7 @@ def available_datasets_without_preload_content( :type subtype: str :param expand: Expand datasets to minimalize roundtrips. :type expand: str - :param var_from: Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alterantively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. + :param var_from: Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alternatively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. :type var_from: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/cm_python_openapi_sdk/api/data_dump_api.py b/cm_python_openapi_sdk/api/data_dump_api.py index 122932a..820ce3f 100644 --- a/cm_python_openapi_sdk/api/data_dump_api.py +++ b/cm_python_openapi_sdk/api/data_dump_api.py @@ -298,7 +298,7 @@ def _get_data_dump_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/projects/{projectId}/data/dumps/{dumpId}', + resource_path='/projects/{projectId}/dwh/data/dumps/{dumpId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/cm_python_openapi_sdk/api/data_upload_api.py b/cm_python_openapi_sdk/api/data_upload_api.py index 795585c..8487354 100644 --- a/cm_python_openapi_sdk/api/data_upload_api.py +++ b/cm_python_openapi_sdk/api/data_upload_api.py @@ -366,7 +366,7 @@ def data_upload( ) -> DataUpload200Response: """Upload CSV file to dataset - # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file**, compress each part with GZIP and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` + # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file**, compress each part with GZIP and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"f76on62tb6bpitbb\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"f76on62tb6bpitbb\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"f76on62tb6bpitbb\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` :param project_id: Id of the project (required) :type project_id: str @@ -437,7 +437,7 @@ def data_upload_with_http_info( ) -> ApiResponse[DataUpload200Response]: """Upload CSV file to dataset - # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file**, compress each part with GZIP and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` + # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file**, compress each part with GZIP and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"f76on62tb6bpitbb\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"f76on62tb6bpitbb\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"f76on62tb6bpitbb\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` :param project_id: Id of the project (required) :type project_id: str @@ -508,7 +508,7 @@ def data_upload_without_preload_content( ) -> RESTResponseType: """Upload CSV file to dataset - # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file**, compress each part with GZIP and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` + # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file**, compress each part with GZIP and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"f76on62tb6bpitbb\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"f76on62tb6bpitbb\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"f76on62tb6bpitbb\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` :param project_id: Id of the project (required) :type project_id: str diff --git a/cm_python_openapi_sdk/api/datasets_api.py b/cm_python_openapi_sdk/api/datasets_api.py index 34a0dce..bf844da 100644 --- a/cm_python_openapi_sdk/api/datasets_api.py +++ b/cm_python_openapi_sdk/api/datasets_api.py @@ -714,6 +714,7 @@ def generate_dataset_from_csv( '400': None, '409': None, '413': None, + '415': None, } response_data = self.api_client.call_api( *_param, @@ -816,6 +817,7 @@ def generate_dataset_from_csv_with_http_info( '400': None, '409': None, '413': None, + '415': None, } response_data = self.api_client.call_api( *_param, @@ -918,6 +920,7 @@ def generate_dataset_from_csv_without_preload_content( '400': None, '409': None, '413': None, + '415': None, } response_data = self.api_client.call_api( *_param, diff --git a/cm_python_openapi_sdk/api/explain_api.py b/cm_python_openapi_sdk/api/explain_api.py index 45f90b1..e53ea30 100644 --- a/cm_python_openapi_sdk/api/explain_api.py +++ b/cm_python_openapi_sdk/api/explain_api.py @@ -20,6 +20,7 @@ from pydantic import Field, StrictStr, field_validator from typing import Optional from typing_extensions import Annotated +from cm_python_openapi_sdk.models.dwh_query_request1 import DwhQueryRequest1 from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -44,6 +45,7 @@ def explain( self, project_id: Annotated[str, Field(strict=True, description="Id of the project")], dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dwh_query_request1: DwhQueryRequest1, page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, _request_timeout: Union[ @@ -67,6 +69,8 @@ def explain( :type project_id: str :param dwh_cluster_id: Id of the dwh cluster (required) :type dwh_cluster_id: str + :param dwh_query_request1: (required) + :type dwh_query_request1: DwhQueryRequest1 :param page: Number of the page :type page: int :param size: The count of records to return for one page @@ -96,6 +100,7 @@ def explain( _param = self._explain_serialize( project_id=project_id, dwh_cluster_id=dwh_cluster_id, + dwh_query_request1=dwh_query_request1, page=page, size=size, _request_auth=_request_auth, @@ -123,6 +128,7 @@ def explain_with_http_info( self, project_id: Annotated[str, Field(strict=True, description="Id of the project")], dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dwh_query_request1: DwhQueryRequest1, page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, _request_timeout: Union[ @@ -146,6 +152,8 @@ def explain_with_http_info( :type project_id: str :param dwh_cluster_id: Id of the dwh cluster (required) :type dwh_cluster_id: str + :param dwh_query_request1: (required) + :type dwh_query_request1: DwhQueryRequest1 :param page: Number of the page :type page: int :param size: The count of records to return for one page @@ -175,6 +183,7 @@ def explain_with_http_info( _param = self._explain_serialize( project_id=project_id, dwh_cluster_id=dwh_cluster_id, + dwh_query_request1=dwh_query_request1, page=page, size=size, _request_auth=_request_auth, @@ -202,6 +211,7 @@ def explain_without_preload_content( self, project_id: Annotated[str, Field(strict=True, description="Id of the project")], dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dwh_query_request1: DwhQueryRequest1, page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, _request_timeout: Union[ @@ -225,6 +235,8 @@ def explain_without_preload_content( :type project_id: str :param dwh_cluster_id: Id of the dwh cluster (required) :type dwh_cluster_id: str + :param dwh_query_request1: (required) + :type dwh_query_request1: DwhQueryRequest1 :param page: Number of the page :type page: int :param size: The count of records to return for one page @@ -254,6 +266,7 @@ def explain_without_preload_content( _param = self._explain_serialize( project_id=project_id, dwh_cluster_id=dwh_cluster_id, + dwh_query_request1=dwh_query_request1, page=page, size=size, _request_auth=_request_auth, @@ -276,6 +289,7 @@ def _explain_serialize( self, project_id, dwh_cluster_id, + dwh_query_request1, page, size, _request_auth, @@ -315,6 +329,8 @@ def _explain_serialize( # process the header parameters # process the form parameters # process the body parameter + if dwh_query_request1 is not None: + _body_params = dwh_query_request1 # set the HTTP header `Accept` @@ -325,6 +341,19 @@ def _explain_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/cm_python_openapi_sdk/api/geosearch_api.py b/cm_python_openapi_sdk/api/geosearch_api.py index fa81dab..c6a184e 100644 --- a/cm_python_openapi_sdk/api/geosearch_api.py +++ b/cm_python_openapi_sdk/api/geosearch_api.py @@ -48,7 +48,7 @@ def geographic_search( size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, country: Annotated[Optional[StrictStr], Field(description="Array of ISO 3166 alpha-2 country codes to limit the search.")] = None, language: Annotated[Optional[StrictStr], Field(description="Language to use for query results as defined by ISO 639-1.")] = None, - types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, locality, address, postcode]")] = None, + types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, street, locality, address, postcode]")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -76,7 +76,7 @@ def geographic_search( :type country: str :param language: Language to use for query results as defined by ISO 639-1. :type language: str - :param types: Array of place types, available types are [region, district, city, locality, address, postcode] + :param types: Array of place types, available types are [region, district, city, street, locality, address, postcode] :type types: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -135,7 +135,7 @@ def geographic_search_with_http_info( size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, country: Annotated[Optional[StrictStr], Field(description="Array of ISO 3166 alpha-2 country codes to limit the search.")] = None, language: Annotated[Optional[StrictStr], Field(description="Language to use for query results as defined by ISO 639-1.")] = None, - types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, locality, address, postcode]")] = None, + types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, street, locality, address, postcode]")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -163,7 +163,7 @@ def geographic_search_with_http_info( :type country: str :param language: Language to use for query results as defined by ISO 639-1. :type language: str - :param types: Array of place types, available types are [region, district, city, locality, address, postcode] + :param types: Array of place types, available types are [region, district, city, street, locality, address, postcode] :type types: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -222,7 +222,7 @@ def geographic_search_without_preload_content( size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, country: Annotated[Optional[StrictStr], Field(description="Array of ISO 3166 alpha-2 country codes to limit the search.")] = None, language: Annotated[Optional[StrictStr], Field(description="Language to use for query results as defined by ISO 639-1.")] = None, - types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, locality, address, postcode]")] = None, + types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, street, locality, address, postcode]")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -250,7 +250,7 @@ def geographic_search_without_preload_content( :type country: str :param language: Language to use for query results as defined by ISO 639-1. :type language: str - :param types: Array of place types, available types are [region, district, city, locality, address, postcode] + :param types: Array of place types, available types are [region, district, city, street, locality, address, postcode] :type types: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/cm_python_openapi_sdk/api/invitations_api.py b/cm_python_openapi_sdk/api/invitations_api.py new file mode 100644 index 0000000..56e391e --- /dev/null +++ b/cm_python_openapi_sdk/api/invitations_api.py @@ -0,0 +1,1520 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.create_invitation import CreateInvitation +from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO +from cm_python_openapi_sdk.models.invitation_paged_model_dto import InvitationPagedModelDTO +from cm_python_openapi_sdk.models.update_invitation import UpdateInvitation + +from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized +from cm_python_openapi_sdk.api_response import ApiResponse +from cm_python_openapi_sdk.rest import RESTResponseType + + +class InvitationsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_invitation( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + create_invitation: CreateInvitation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InvitationDTO: + """Create new invitation to the project for a user. + + User is specified by email address and invitation contains a project role. **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param create_invitation: (required) + :type create_invitation: CreateInvitation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_invitation_serialize( + project_id=project_id, + create_invitation=create_invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_invitation_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + create_invitation: CreateInvitation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InvitationDTO]: + """Create new invitation to the project for a user. + + User is specified by email address and invitation contains a project role. **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param create_invitation: (required) + :type create_invitation: CreateInvitation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_invitation_serialize( + project_id=project_id, + create_invitation=create_invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_invitation_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + create_invitation: CreateInvitation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create new invitation to the project for a user. + + User is specified by email address and invitation contains a project role. **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param create_invitation: (required) + :type create_invitation: CreateInvitation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_invitation_serialize( + project_id=project_id, + create_invitation=create_invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_invitation_serialize( + self, + project_id, + create_invitation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_invitation is not None: + _body_params = create_invitation + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/projects/{projectId}/invitations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_invitation( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + invitation_id: Annotated[str, Field(strict=True, description="Id of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InvitationDTO: + """Delete invitation. + + If an invitation has status `PENDING`, project Admin can cancel it by calling the `DELETE` method. Calling the `DELETE` method is equivalent to sending a `PUT` request with the status `CANCELED` as described above. **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param invitation_id: Id of the invitation (required) + :type invitation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_invitation_serialize( + project_id=project_id, + invitation_id=invitation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_invitation_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + invitation_id: Annotated[str, Field(strict=True, description="Id of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InvitationDTO]: + """Delete invitation. + + If an invitation has status `PENDING`, project Admin can cancel it by calling the `DELETE` method. Calling the `DELETE` method is equivalent to sending a `PUT` request with the status `CANCELED` as described above. **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param invitation_id: Id of the invitation (required) + :type invitation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_invitation_serialize( + project_id=project_id, + invitation_id=invitation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_invitation_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + invitation_id: Annotated[str, Field(strict=True, description="Id of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete invitation. + + If an invitation has status `PENDING`, project Admin can cancel it by calling the `DELETE` method. Calling the `DELETE` method is equivalent to sending a `PUT` request with the status `CANCELED` as described above. **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param invitation_id: Id of the invitation (required) + :type invitation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_invitation_serialize( + project_id=project_id, + invitation_id=invitation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_invitation_serialize( + self, + project_id, + invitation_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if invitation_id is not None: + _path_params['invitationId'] = invitation_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/projects/{projectId}/invitations/{invitationId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_invitation_by_id( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + invitation_id: Annotated[str, Field(strict=True, description="Id of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InvitationDTO: + """Get detail of an invitation. + + An invitation status value is one of: - PENDING - ACCEPTED - CANCELED - EXPIRED **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param invitation_id: Id of the invitation (required) + :type invitation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_invitation_by_id_serialize( + project_id=project_id, + invitation_id=invitation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_invitation_by_id_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + invitation_id: Annotated[str, Field(strict=True, description="Id of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InvitationDTO]: + """Get detail of an invitation. + + An invitation status value is one of: - PENDING - ACCEPTED - CANCELED - EXPIRED **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param invitation_id: Id of the invitation (required) + :type invitation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_invitation_by_id_serialize( + project_id=project_id, + invitation_id=invitation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_invitation_by_id_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + invitation_id: Annotated[str, Field(strict=True, description="Id of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get detail of an invitation. + + An invitation status value is one of: - PENDING - ACCEPTED - CANCELED - EXPIRED **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param invitation_id: Id of the invitation (required) + :type invitation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_invitation_by_id_serialize( + project_id=project_id, + invitation_id=invitation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_invitation_by_id_serialize( + self, + project_id, + invitation_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if invitation_id is not None: + _path_params['invitationId'] = invitation_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/invitations/{invitationId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_invitations( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Name of the attribute to use for sorting the results, together with direction (asc or desc)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter invitations by status attribute.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InvitationPagedModelDTO: + """Get list of project invitations. + + **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param size: The count of records to return for one page + :type size: int + :param page: Number of the page + :type page: int + :param sort: Name of the attribute to use for sorting the results, together with direction (asc or desc) + :type sort: str + :param status: Filter invitations by status attribute. + :type status: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_invitations_serialize( + project_id=project_id, + size=size, + page=page, + sort=sort, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationPagedModelDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_invitations_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Name of the attribute to use for sorting the results, together with direction (asc or desc)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter invitations by status attribute.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InvitationPagedModelDTO]: + """Get list of project invitations. + + **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param size: The count of records to return for one page + :type size: int + :param page: Number of the page + :type page: int + :param sort: Name of the attribute to use for sorting the results, together with direction (asc or desc) + :type sort: str + :param status: Filter invitations by status attribute. + :type status: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_invitations_serialize( + project_id=project_id, + size=size, + page=page, + sort=sort, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationPagedModelDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_invitations_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Name of the attribute to use for sorting the results, together with direction (asc or desc)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter invitations by status attribute.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get list of project invitations. + + **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param size: The count of records to return for one page + :type size: int + :param page: Number of the page + :type page: int + :param sort: Name of the attribute to use for sorting the results, together with direction (asc or desc) + :type sort: str + :param status: Filter invitations by status attribute. + :type status: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_invitations_serialize( + project_id=project_id, + size=size, + page=page, + sort=sort, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationPagedModelDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_invitations_serialize( + self, + project_id, + size, + page, + sort, + status, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + if size is not None: + + _query_params.append(('size', size)) + + if page is not None: + + _query_params.append(('page', page)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if status is not None: + + _query_params.append(('status', status)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/invitations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_invitation( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + invitation_id: Annotated[str, Field(strict=True, description="Id of the invitation")], + update_invitation: UpdateInvitation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InvitationDTO: + """Update invitation. + + Cancel or resend project invitation. If an invitation has status `PENDING`, project Admin can cancel it. If the invitation has status `CANCELED`, `EXPIRED` or `PENDING`, user can activate it or resend the invitation email by PUTing the status `PENDING`. Invitations with status `ACCEPTED` cannot be updated anymore. **Allowed status transitions:** | Original Status | PUT Request | New Status | |---------------|------------|------------| | CANCELED | PENDING | PENDING | | EXPIRED | PENDING | PENDING | | PENDING | CANCELED | CANCELED | **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param invitation_id: Id of the invitation (required) + :type invitation_id: str + :param update_invitation: (required) + :type update_invitation: UpdateInvitation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_invitation_serialize( + project_id=project_id, + invitation_id=invitation_id, + update_invitation=update_invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + '400': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_invitation_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + invitation_id: Annotated[str, Field(strict=True, description="Id of the invitation")], + update_invitation: UpdateInvitation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InvitationDTO]: + """Update invitation. + + Cancel or resend project invitation. If an invitation has status `PENDING`, project Admin can cancel it. If the invitation has status `CANCELED`, `EXPIRED` or `PENDING`, user can activate it or resend the invitation email by PUTing the status `PENDING`. Invitations with status `ACCEPTED` cannot be updated anymore. **Allowed status transitions:** | Original Status | PUT Request | New Status | |---------------|------------|------------| | CANCELED | PENDING | PENDING | | EXPIRED | PENDING | PENDING | | PENDING | CANCELED | CANCELED | **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param invitation_id: Id of the invitation (required) + :type invitation_id: str + :param update_invitation: (required) + :type update_invitation: UpdateInvitation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_invitation_serialize( + project_id=project_id, + invitation_id=invitation_id, + update_invitation=update_invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + '400': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_invitation_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + invitation_id: Annotated[str, Field(strict=True, description="Id of the invitation")], + update_invitation: UpdateInvitation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update invitation. + + Cancel or resend project invitation. If an invitation has status `PENDING`, project Admin can cancel it. If the invitation has status `CANCELED`, `EXPIRED` or `PENDING`, user can activate it or resend the invitation email by PUTing the status `PENDING`. Invitations with status `ACCEPTED` cannot be updated anymore. **Allowed status transitions:** | Original Status | PUT Request | New Status | |---------------|------------|------------| | CANCELED | PENDING | PENDING | | EXPIRED | PENDING | PENDING | | PENDING | CANCELED | CANCELED | **Security:** Restricted to ADMIN project role. + + :param project_id: Id of the project (required) + :type project_id: str + :param invitation_id: Id of the invitation (required) + :type invitation_id: str + :param update_invitation: (required) + :type update_invitation: UpdateInvitation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_invitation_serialize( + project_id=project_id, + invitation_id=invitation_id, + update_invitation=update_invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + '400': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_invitation_serialize( + self, + project_id, + invitation_id, + update_invitation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if invitation_id is not None: + _path_params['invitationId'] = invitation_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_invitation is not None: + _body_params = update_invitation + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/projects/{projectId}/invitations/{invitationId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/cm_python_openapi_sdk/api/jobs_api.py b/cm_python_openapi_sdk/api/jobs_api.py index a10ff0a..4a48944 100644 --- a/cm_python_openapi_sdk/api/jobs_api.py +++ b/cm_python_openapi_sdk/api/jobs_api.py @@ -324,7 +324,7 @@ def _get_job_status_serialize( def get_jobs_history( self, project_id: Annotated[str, Field(strict=True, description="Id of the project, used as query parameter")], - account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters")] = None, + account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters for auditlog and jobs history.")] = None, sort_direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, last_evaluated_timestamp: Annotated[Optional[StrictStr], Field(description="Last evaluated timestamp when requesting next page (UTC timestamp format)")] = None, type: Annotated[Optional[StrictStr], Field(description="Jobs type")] = None, @@ -348,7 +348,7 @@ def get_jobs_history( :param project_id: Id of the project, used as query parameter (required) :type project_id: str - :param account_id: Id of the account, used in query parameters + :param account_id: Id of the account, used in query parameters for auditlog and jobs history. :type account_id: str :param sort_direction: Sort direction :type sort_direction: str @@ -411,7 +411,7 @@ def get_jobs_history( def get_jobs_history_with_http_info( self, project_id: Annotated[str, Field(strict=True, description="Id of the project, used as query parameter")], - account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters")] = None, + account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters for auditlog and jobs history.")] = None, sort_direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, last_evaluated_timestamp: Annotated[Optional[StrictStr], Field(description="Last evaluated timestamp when requesting next page (UTC timestamp format)")] = None, type: Annotated[Optional[StrictStr], Field(description="Jobs type")] = None, @@ -435,7 +435,7 @@ def get_jobs_history_with_http_info( :param project_id: Id of the project, used as query parameter (required) :type project_id: str - :param account_id: Id of the account, used in query parameters + :param account_id: Id of the account, used in query parameters for auditlog and jobs history. :type account_id: str :param sort_direction: Sort direction :type sort_direction: str @@ -498,7 +498,7 @@ def get_jobs_history_with_http_info( def get_jobs_history_without_preload_content( self, project_id: Annotated[str, Field(strict=True, description="Id of the project, used as query parameter")], - account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters")] = None, + account_id: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Id of the account, used in query parameters for auditlog and jobs history.")] = None, sort_direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, last_evaluated_timestamp: Annotated[Optional[StrictStr], Field(description="Last evaluated timestamp when requesting next page (UTC timestamp format)")] = None, type: Annotated[Optional[StrictStr], Field(description="Jobs type")] = None, @@ -522,7 +522,7 @@ def get_jobs_history_without_preload_content( :param project_id: Id of the project, used as query parameter (required) :type project_id: str - :param account_id: Id of the account, used in query parameters + :param account_id: Id of the account, used in query parameters for auditlog and jobs history. :type account_id: str :param sort_direction: Sort direction :type sort_direction: str diff --git a/cm_python_openapi_sdk/api/accounts_reset_password_api.py b/cm_python_openapi_sdk/api/metric_values_distribution_api.py similarity index 53% rename from cm_python_openapi_sdk/api/accounts_reset_password_api.py rename to cm_python_openapi_sdk/api/metric_values_distribution_api.py index d124998..0935cb2 100644 --- a/cm_python_openapi_sdk/api/accounts_reset_password_api.py +++ b/cm_python_openapi_sdk/api/metric_values_distribution_api.py @@ -17,19 +17,18 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr -from typing import Optional +from pydantic import Field, field_validator from typing_extensions import Annotated -from cm_python_openapi_sdk.models.account_dto import AccountDTO -from cm_python_openapi_sdk.models.reset_password_dto import ResetPasswordDTO -from cm_python_openapi_sdk.models.send_reset_password_dto import SendResetPasswordDTO +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_request import DwhMetricValuesDistributionRequest +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response1 import DwhMetricValuesDistributionResponse1 +from cm_python_openapi_sdk.models.queries_response import QueriesResponse from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse from cm_python_openapi_sdk.rest import RESTResponseType -class AccountsResetPasswordApi: +class MetricValuesDistributionApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -43,10 +42,11 @@ def __init__(self, api_client=None) -> None: @validate_call - def reset_password_with_token( + def accept_metric_values_distributions( self, - password_reset_token: Annotated[StrictStr, Field(description="Password reset token")], - reset_password_dto: Optional[ResetPasswordDTO] = None, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dwh_metric_values_distribution_request: DwhMetricValuesDistributionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -59,15 +59,17 @@ def reset_password_with_token( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Finish reset password with token + ) -> QueriesResponse: + """accept_metric_values_distributions - Finish the process of resetting the password by sending a valid token and a new password. **Security:** Unauthorized resource, anonymous users are allowed to finish password reset. + Executes a multidimensional query and returns the data distribution of given metric. This resource is typically used for the histogram filter distribution. This request starts an asynchronous action, which computes the metric values distributions result and returns the location URI of the result in `location` response header. To get the result, client must make another GET request on this URI (see [getMetricValuesDistribution](#operation/getMetricValuesDistribution)). **Distribution methods** There are currently supported two distribution methods for counting number of elements. Each method has a custom parameter in request body (see request examples bellow): - buckets (int) - number of bucket for the dynamic splitting - breakpoints (array) - array of breakpoints for static segments **Dynamic buckets split** Metric range is split into required number of equal size buckets. The frequency is the count of occurrences of given metric in these buckets. The range values depends on a granularity - that is defined by query properties. **Static breakpoints for segments** Executes a multidimensional query and returns the number of records in each segment. Segments are defined as static breakpoints of the metric distribution. To the first segment are counted all regions whose value of metric is between . The interval for second segment is (breakpoint[1], breakpoint[2]>. And the last segment is (breakpoint[last-1], breakpoint[last]>. The minimal required number of breakpoints is 2, it returns count of elements in one segment. - :param password_reset_token: Password reset token (required) - :type password_reset_token: str - :param reset_password_dto: - :type reset_password_dto: ResetPasswordDTO + :param project_id: Id of the project (required) + :type project_id: str + :param dwh_cluster_id: Id of the dwh cluster (required) + :type dwh_cluster_id: str + :param dwh_metric_values_distribution_request: (required) + :type dwh_metric_values_distribution_request: DwhMetricValuesDistributionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -90,9 +92,10 @@ def reset_password_with_token( :return: Returns the result object. """ # noqa: E501 - _param = self._reset_password_with_token_serialize( - password_reset_token=password_reset_token, - reset_password_dto=reset_password_dto, + _param = self._accept_metric_values_distributions_serialize( + project_id=project_id, + dwh_cluster_id=dwh_cluster_id, + dwh_metric_values_distribution_request=dwh_metric_values_distribution_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -100,9 +103,7 @@ def reset_password_with_token( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': None, - '400': None, + '202': "QueriesResponse", } response_data = self.api_client.call_api( *_param, @@ -116,10 +117,11 @@ def reset_password_with_token( @validate_call - def reset_password_with_token_with_http_info( + def accept_metric_values_distributions_with_http_info( self, - password_reset_token: Annotated[StrictStr, Field(description="Password reset token")], - reset_password_dto: Optional[ResetPasswordDTO] = None, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dwh_metric_values_distribution_request: DwhMetricValuesDistributionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -132,15 +134,17 @@ def reset_password_with_token_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Finish reset password with token + ) -> ApiResponse[QueriesResponse]: + """accept_metric_values_distributions - Finish the process of resetting the password by sending a valid token and a new password. **Security:** Unauthorized resource, anonymous users are allowed to finish password reset. + Executes a multidimensional query and returns the data distribution of given metric. This resource is typically used for the histogram filter distribution. This request starts an asynchronous action, which computes the metric values distributions result and returns the location URI of the result in `location` response header. To get the result, client must make another GET request on this URI (see [getMetricValuesDistribution](#operation/getMetricValuesDistribution)). **Distribution methods** There are currently supported two distribution methods for counting number of elements. Each method has a custom parameter in request body (see request examples bellow): - buckets (int) - number of bucket for the dynamic splitting - breakpoints (array) - array of breakpoints for static segments **Dynamic buckets split** Metric range is split into required number of equal size buckets. The frequency is the count of occurrences of given metric in these buckets. The range values depends on a granularity - that is defined by query properties. **Static breakpoints for segments** Executes a multidimensional query and returns the number of records in each segment. Segments are defined as static breakpoints of the metric distribution. To the first segment are counted all regions whose value of metric is between . The interval for second segment is (breakpoint[1], breakpoint[2]>. And the last segment is (breakpoint[last-1], breakpoint[last]>. The minimal required number of breakpoints is 2, it returns count of elements in one segment. - :param password_reset_token: Password reset token (required) - :type password_reset_token: str - :param reset_password_dto: - :type reset_password_dto: ResetPasswordDTO + :param project_id: Id of the project (required) + :type project_id: str + :param dwh_cluster_id: Id of the dwh cluster (required) + :type dwh_cluster_id: str + :param dwh_metric_values_distribution_request: (required) + :type dwh_metric_values_distribution_request: DwhMetricValuesDistributionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -163,9 +167,10 @@ def reset_password_with_token_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._reset_password_with_token_serialize( - password_reset_token=password_reset_token, - reset_password_dto=reset_password_dto, + _param = self._accept_metric_values_distributions_serialize( + project_id=project_id, + dwh_cluster_id=dwh_cluster_id, + dwh_metric_values_distribution_request=dwh_metric_values_distribution_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -173,9 +178,7 @@ def reset_password_with_token_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': None, - '400': None, + '202': "QueriesResponse", } response_data = self.api_client.call_api( *_param, @@ -189,10 +192,11 @@ def reset_password_with_token_with_http_info( @validate_call - def reset_password_with_token_without_preload_content( + def accept_metric_values_distributions_without_preload_content( self, - password_reset_token: Annotated[StrictStr, Field(description="Password reset token")], - reset_password_dto: Optional[ResetPasswordDTO] = None, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dwh_metric_values_distribution_request: DwhMetricValuesDistributionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -206,14 +210,16 @@ def reset_password_with_token_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Finish reset password with token + """accept_metric_values_distributions - Finish the process of resetting the password by sending a valid token and a new password. **Security:** Unauthorized resource, anonymous users are allowed to finish password reset. + Executes a multidimensional query and returns the data distribution of given metric. This resource is typically used for the histogram filter distribution. This request starts an asynchronous action, which computes the metric values distributions result and returns the location URI of the result in `location` response header. To get the result, client must make another GET request on this URI (see [getMetricValuesDistribution](#operation/getMetricValuesDistribution)). **Distribution methods** There are currently supported two distribution methods for counting number of elements. Each method has a custom parameter in request body (see request examples bellow): - buckets (int) - number of bucket for the dynamic splitting - breakpoints (array) - array of breakpoints for static segments **Dynamic buckets split** Metric range is split into required number of equal size buckets. The frequency is the count of occurrences of given metric in these buckets. The range values depends on a granularity - that is defined by query properties. **Static breakpoints for segments** Executes a multidimensional query and returns the number of records in each segment. Segments are defined as static breakpoints of the metric distribution. To the first segment are counted all regions whose value of metric is between . The interval for second segment is (breakpoint[1], breakpoint[2]>. And the last segment is (breakpoint[last-1], breakpoint[last]>. The minimal required number of breakpoints is 2, it returns count of elements in one segment. - :param password_reset_token: Password reset token (required) - :type password_reset_token: str - :param reset_password_dto: - :type reset_password_dto: ResetPasswordDTO + :param project_id: Id of the project (required) + :type project_id: str + :param dwh_cluster_id: Id of the dwh cluster (required) + :type dwh_cluster_id: str + :param dwh_metric_values_distribution_request: (required) + :type dwh_metric_values_distribution_request: DwhMetricValuesDistributionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -236,9 +242,10 @@ def reset_password_with_token_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._reset_password_with_token_serialize( - password_reset_token=password_reset_token, - reset_password_dto=reset_password_dto, + _param = self._accept_metric_values_distributions_serialize( + project_id=project_id, + dwh_cluster_id=dwh_cluster_id, + dwh_metric_values_distribution_request=dwh_metric_values_distribution_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -246,9 +253,7 @@ def reset_password_with_token_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': None, - '400': None, + '202': "QueriesResponse", } response_data = self.api_client.call_api( *_param, @@ -257,10 +262,11 @@ def reset_password_with_token_without_preload_content( return response_data.response - def _reset_password_with_token_serialize( + def _accept_metric_values_distributions_serialize( self, - password_reset_token, - reset_password_dto, + project_id, + dwh_cluster_id, + dwh_metric_values_distribution_request, _request_auth, _content_type, _headers, @@ -282,285 +288,25 @@ def _reset_password_with_token_serialize( _body_params: Optional[bytes] = None # process the path parameters - if password_reset_token is not None: - _path_params['passwordResetToken'] = password_reset_token + if project_id is not None: + _path_params['projectId'] = project_id + if dwh_cluster_id is not None: + _path_params['dwhClusterId'] = dwh_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if reset_password_dto is not None: - _body_params = reset_password_dto - + if dwh_metric_values_distribution_request is not None: + _body_params = dwh_metric_values_distribution_request - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/accounts/passwordReset/{passwordResetToken}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def send_reset_password_token( - self, - send_reset_password_dto: Optional[SendResetPasswordDTO] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Ask for reset password token - - Create new request for resetting password. **Security:** Unauthorized resource, anonymous users are allowed to initiate password reset. - - :param send_reset_password_dto: - :type send_reset_password_dto: SendResetPasswordDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_reset_password_token_serialize( - send_reset_password_dto=send_reset_password_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def send_reset_password_token_with_http_info( - self, - send_reset_password_dto: Optional[SendResetPasswordDTO] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Ask for reset password token - - Create new request for resetting password. **Security:** Unauthorized resource, anonymous users are allowed to initiate password reset. - - :param send_reset_password_dto: - :type send_reset_password_dto: SendResetPasswordDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_reset_password_token_serialize( - send_reset_password_dto=send_reset_password_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def send_reset_password_token_without_preload_content( - self, - send_reset_password_dto: Optional[SendResetPasswordDTO] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Ask for reset password token - - Create new request for resetting password. **Security:** Unauthorized resource, anonymous users are allowed to initiate password reset. - - :param send_reset_password_dto: - :type send_reset_password_dto: SendResetPasswordDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_reset_password_token_serialize( - send_reset_password_dto=send_reset_password_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _send_reset_password_token_serialize( - self, - send_reset_password_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if send_reset_password_dto is not None: - _body_params = send_reset_password_dto - - # set the HTTP header `Content-Type` if _content_type: @@ -578,11 +324,12 @@ def _send_reset_password_token_serialize( # authentication setting _auth_settings: List[str] = [ + 'bearerAuth' ] return self.api_client.param_serialize( method='POST', - resource_path='/accounts/passwordReset', + resource_path='/projects/{projectId}/dwh/{dwhClusterId}/metricValuesDistributions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -599,9 +346,11 @@ def _send_reset_password_token_serialize( @validate_call - def verify_reset_password_token( + def get_metric_values_distributions( self, - password_reset_token: Annotated[StrictStr, Field(description="Password reset token")], + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dwh_cache_id: Annotated[str, Field(strict=True, description="Id of the dwh cache")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -614,13 +363,17 @@ def verify_reset_password_token( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AccountDTO: - """Verify reset password token is valid + ) -> DwhMetricValuesDistributionResponse1: + """get_metric_values_distributions - Test if given token exists and is valid. Returns account which password is resetting. **Security:** Unauthorized resource, anonymous users are allowed to verify password reset token. + Get the result of the asynchronous metric values distributions request submitted in [acceptMetricValuesDistribution](#operation/acceptMetricValuesDistribution). This endpoint implements long polling - see details in [getQueries](#operation/getQueries). - :param password_reset_token: Password reset token (required) - :type password_reset_token: str + :param project_id: Id of the project (required) + :type project_id: str + :param dwh_cluster_id: Id of the dwh cluster (required) + :type dwh_cluster_id: str + :param dwh_cache_id: Id of the dwh cache (required) + :type dwh_cache_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -643,8 +396,10 @@ def verify_reset_password_token( :return: Returns the result object. """ # noqa: E501 - _param = self._verify_reset_password_token_serialize( - password_reset_token=password_reset_token, + _param = self._get_metric_values_distributions_serialize( + project_id=project_id, + dwh_cluster_id=dwh_cluster_id, + dwh_cache_id=dwh_cache_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -652,7 +407,7 @@ def verify_reset_password_token( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountDTO", + '200': "DwhMetricValuesDistributionResponse1", '404': None, } response_data = self.api_client.call_api( @@ -667,9 +422,11 @@ def verify_reset_password_token( @validate_call - def verify_reset_password_token_with_http_info( + def get_metric_values_distributions_with_http_info( self, - password_reset_token: Annotated[StrictStr, Field(description="Password reset token")], + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dwh_cache_id: Annotated[str, Field(strict=True, description="Id of the dwh cache")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -682,13 +439,17 @@ def verify_reset_password_token_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AccountDTO]: - """Verify reset password token is valid + ) -> ApiResponse[DwhMetricValuesDistributionResponse1]: + """get_metric_values_distributions - Test if given token exists and is valid. Returns account which password is resetting. **Security:** Unauthorized resource, anonymous users are allowed to verify password reset token. + Get the result of the asynchronous metric values distributions request submitted in [acceptMetricValuesDistribution](#operation/acceptMetricValuesDistribution). This endpoint implements long polling - see details in [getQueries](#operation/getQueries). - :param password_reset_token: Password reset token (required) - :type password_reset_token: str + :param project_id: Id of the project (required) + :type project_id: str + :param dwh_cluster_id: Id of the dwh cluster (required) + :type dwh_cluster_id: str + :param dwh_cache_id: Id of the dwh cache (required) + :type dwh_cache_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -711,8 +472,10 @@ def verify_reset_password_token_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._verify_reset_password_token_serialize( - password_reset_token=password_reset_token, + _param = self._get_metric_values_distributions_serialize( + project_id=project_id, + dwh_cluster_id=dwh_cluster_id, + dwh_cache_id=dwh_cache_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -720,7 +483,7 @@ def verify_reset_password_token_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountDTO", + '200': "DwhMetricValuesDistributionResponse1", '404': None, } response_data = self.api_client.call_api( @@ -735,9 +498,11 @@ def verify_reset_password_token_with_http_info( @validate_call - def verify_reset_password_token_without_preload_content( + def get_metric_values_distributions_without_preload_content( self, - password_reset_token: Annotated[StrictStr, Field(description="Password reset token")], + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dwh_cache_id: Annotated[str, Field(strict=True, description="Id of the dwh cache")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -751,12 +516,16 @@ def verify_reset_password_token_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Verify reset password token is valid + """get_metric_values_distributions - Test if given token exists and is valid. Returns account which password is resetting. **Security:** Unauthorized resource, anonymous users are allowed to verify password reset token. + Get the result of the asynchronous metric values distributions request submitted in [acceptMetricValuesDistribution](#operation/acceptMetricValuesDistribution). This endpoint implements long polling - see details in [getQueries](#operation/getQueries). - :param password_reset_token: Password reset token (required) - :type password_reset_token: str + :param project_id: Id of the project (required) + :type project_id: str + :param dwh_cluster_id: Id of the dwh cluster (required) + :type dwh_cluster_id: str + :param dwh_cache_id: Id of the dwh cache (required) + :type dwh_cache_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -779,8 +548,10 @@ def verify_reset_password_token_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._verify_reset_password_token_serialize( - password_reset_token=password_reset_token, + _param = self._get_metric_values_distributions_serialize( + project_id=project_id, + dwh_cluster_id=dwh_cluster_id, + dwh_cache_id=dwh_cache_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -788,7 +559,7 @@ def verify_reset_password_token_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountDTO", + '200': "DwhMetricValuesDistributionResponse1", '404': None, } response_data = self.api_client.call_api( @@ -798,9 +569,11 @@ def verify_reset_password_token_without_preload_content( return response_data.response - def _verify_reset_password_token_serialize( + def _get_metric_values_distributions_serialize( self, - password_reset_token, + project_id, + dwh_cluster_id, + dwh_cache_id, _request_auth, _content_type, _headers, @@ -822,8 +595,12 @@ def _verify_reset_password_token_serialize( _body_params: Optional[bytes] = None # process the path parameters - if password_reset_token is not None: - _path_params['passwordResetToken'] = password_reset_token + if project_id is not None: + _path_params['projectId'] = project_id + if dwh_cluster_id is not None: + _path_params['dwhClusterId'] = dwh_cluster_id + if dwh_cache_id is not None: + _path_params['dwhCacheId'] = dwh_cache_id # process the query parameters # process the header parameters # process the form parameters @@ -841,11 +618,12 @@ def _verify_reset_password_token_serialize( # authentication setting _auth_settings: List[str] = [ + 'bearerAuth' ] return self.api_client.param_serialize( method='GET', - resource_path='/accounts/passwordReset/{passwordResetToken}', + resource_path='/projects/{projectId}/dwh/{dwhClusterId}/metricValuesDistributions/{dwhCacheId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/cm_python_openapi_sdk/api/organizations_api.py b/cm_python_openapi_sdk/api/organizations_api.py index 3392300..130387f 100644 --- a/cm_python_openapi_sdk/api/organizations_api.py +++ b/cm_python_openapi_sdk/api/organizations_api.py @@ -22,7 +22,6 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.create_organization_dto import CreateOrganizationDTO from cm_python_openapi_sdk.models.get_organizations200_response import GetOrganizations200Response -from cm_python_openapi_sdk.models.organization_paged_model_dto import OrganizationPagedModelDTO from cm_python_openapi_sdk.models.organization_response_dto import OrganizationResponseDTO from cm_python_openapi_sdk.models.update_organization_dto import UpdateOrganizationDTO @@ -60,7 +59,7 @@ def create_organization( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OrganizationPagedModelDTO: + ) -> OrganizationResponseDTO: """Creates a new organization. **Security:** Creating of organization is restricted to CleverMaps platform administrators. @@ -98,7 +97,7 @@ def create_organization( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationPagedModelDTO", + '200': "OrganizationResponseDTO", } response_data = self.api_client.call_api( *_param, @@ -127,7 +126,7 @@ def create_organization_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OrganizationPagedModelDTO]: + ) -> ApiResponse[OrganizationResponseDTO]: """Creates a new organization. **Security:** Creating of organization is restricted to CleverMaps platform administrators. @@ -165,7 +164,7 @@ def create_organization_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationPagedModelDTO", + '200': "OrganizationResponseDTO", } response_data = self.api_client.call_api( *_param, @@ -232,7 +231,7 @@ def create_organization_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationPagedModelDTO", + '200': "OrganizationResponseDTO", } response_data = self.api_client.call_api( *_param, diff --git a/cm_python_openapi_sdk/api/project_invitation_api.py b/cm_python_openapi_sdk/api/project_invitation_api.py new file mode 100644 index 0000000..6b04ad5 --- /dev/null +++ b/cm_python_openapi_sdk/api/project_invitation_api.py @@ -0,0 +1,570 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, field_validator +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO + +from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized +from cm_python_openapi_sdk.api_response import ApiResponse +from cm_python_openapi_sdk.rest import RESTResponseType + + +class ProjectInvitationApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def accept_project_invitation( + self, + invitation_hash: Annotated[str, Field(strict=True, description="Hash of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InvitationDTO: + """Accept invitation. + + This resource allows accepting an invitation by an invited user. The URL contains a secret `invitationHash` that is sent to the invited user by email. By clicking on the href link from the invitation email, the user is redirected into the CleverMaps application, and after authentication, the invitation is accepted. When a user accepts an invitation, they are added as a new Member of the Project in the role granted by the invitation. **Security:** Restricted to invited user. The authenticated user email must equal the email in the invitation. + + :param invitation_hash: Hash of the invitation (required) + :type invitation_hash: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_project_invitation_serialize( + invitation_hash=invitation_hash, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def accept_project_invitation_with_http_info( + self, + invitation_hash: Annotated[str, Field(strict=True, description="Hash of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InvitationDTO]: + """Accept invitation. + + This resource allows accepting an invitation by an invited user. The URL contains a secret `invitationHash` that is sent to the invited user by email. By clicking on the href link from the invitation email, the user is redirected into the CleverMaps application, and after authentication, the invitation is accepted. When a user accepts an invitation, they are added as a new Member of the Project in the role granted by the invitation. **Security:** Restricted to invited user. The authenticated user email must equal the email in the invitation. + + :param invitation_hash: Hash of the invitation (required) + :type invitation_hash: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_project_invitation_serialize( + invitation_hash=invitation_hash, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def accept_project_invitation_without_preload_content( + self, + invitation_hash: Annotated[str, Field(strict=True, description="Hash of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Accept invitation. + + This resource allows accepting an invitation by an invited user. The URL contains a secret `invitationHash` that is sent to the invited user by email. By clicking on the href link from the invitation email, the user is redirected into the CleverMaps application, and after authentication, the invitation is accepted. When a user accepts an invitation, they are added as a new Member of the Project in the role granted by the invitation. **Security:** Restricted to invited user. The authenticated user email must equal the email in the invitation. + + :param invitation_hash: Hash of the invitation (required) + :type invitation_hash: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_project_invitation_serialize( + invitation_hash=invitation_hash, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _accept_project_invitation_serialize( + self, + invitation_hash, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if invitation_hash is not None: + _path_params['invitationHash'] = invitation_hash + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/invitations/{invitationHash}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_invitation( + self, + invitation_hash: Annotated[str, Field(strict=True, description="Hash of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InvitationDTO: + """Get detail of an invitation. + + An invitation status value is one of: - PENDING - ACCEPTED - CANCELED - EXPIRED + + :param invitation_hash: Hash of the invitation (required) + :type invitation_hash: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_invitation_serialize( + invitation_hash=invitation_hash, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_invitation_with_http_info( + self, + invitation_hash: Annotated[str, Field(strict=True, description="Hash of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InvitationDTO]: + """Get detail of an invitation. + + An invitation status value is one of: - PENDING - ACCEPTED - CANCELED - EXPIRED + + :param invitation_hash: Hash of the invitation (required) + :type invitation_hash: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_invitation_serialize( + invitation_hash=invitation_hash, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_invitation_without_preload_content( + self, + invitation_hash: Annotated[str, Field(strict=True, description="Hash of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get detail of an invitation. + + An invitation status value is one of: - PENDING - ACCEPTED - CANCELED - EXPIRED + + :param invitation_hash: Hash of the invitation (required) + :type invitation_hash: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_invitation_serialize( + invitation_hash=invitation_hash, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_invitation_serialize( + self, + invitation_hash, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if invitation_hash is not None: + _path_params['invitationHash'] = invitation_hash + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json', + 'example' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/invitations/{invitationHash}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/cm_python_openapi_sdk/api/property_values_distribution_api.py b/cm_python_openapi_sdk/api/property_values_distribution_api.py index f832660..5f37fa6 100644 --- a/cm_python_openapi_sdk/api/property_values_distribution_api.py +++ b/cm_python_openapi_sdk/api/property_values_distribution_api.py @@ -62,7 +62,7 @@ def accept_property_values_distribution( ) -> QueriesResponse: """accept_property_values_distribution - Computes the distribution (frequency) of given fact (numeric dataset property). Result is splitted into required number of equal size buckets. The frequency is the count of occurencies of given metric in these buckets. This resource is typically used for the histogram filter distribution. This request starts an asynchronous action, which computes the property values distributions result and returns the location URI of the result in `location` response header. To get the result, client must make another GET request on this URI (see [getPropertyValuesDistribution](#operation/getPropertyValuesDistribution)). + Computes the distribution (frequency) of given fact (numeric dataset property). Result is split into required number of equal size buckets. The frequency is the count of occurrences of given metric in these buckets. This resource is typically used for the histogram filter distribution. This request starts an asynchronous action, which computes the property values distributions result and returns the location URI of the result in `location` response header. To get the result, client must make another GET request on this URI (see [getPropertyValuesDistribution](#operation/getPropertyValuesDistribution)). :param project_id: Id of the project (required) :type project_id: str @@ -137,7 +137,7 @@ def accept_property_values_distribution_with_http_info( ) -> ApiResponse[QueriesResponse]: """accept_property_values_distribution - Computes the distribution (frequency) of given fact (numeric dataset property). Result is splitted into required number of equal size buckets. The frequency is the count of occurencies of given metric in these buckets. This resource is typically used for the histogram filter distribution. This request starts an asynchronous action, which computes the property values distributions result and returns the location URI of the result in `location` response header. To get the result, client must make another GET request on this URI (see [getPropertyValuesDistribution](#operation/getPropertyValuesDistribution)). + Computes the distribution (frequency) of given fact (numeric dataset property). Result is split into required number of equal size buckets. The frequency is the count of occurrences of given metric in these buckets. This resource is typically used for the histogram filter distribution. This request starts an asynchronous action, which computes the property values distributions result and returns the location URI of the result in `location` response header. To get the result, client must make another GET request on this URI (see [getPropertyValuesDistribution](#operation/getPropertyValuesDistribution)). :param project_id: Id of the project (required) :type project_id: str @@ -212,7 +212,7 @@ def accept_property_values_distribution_without_preload_content( ) -> RESTResponseType: """accept_property_values_distribution - Computes the distribution (frequency) of given fact (numeric dataset property). Result is splitted into required number of equal size buckets. The frequency is the count of occurencies of given metric in these buckets. This resource is typically used for the histogram filter distribution. This request starts an asynchronous action, which computes the property values distributions result and returns the location URI of the result in `location` response header. To get the result, client must make another GET request on this URI (see [getPropertyValuesDistribution](#operation/getPropertyValuesDistribution)). + Computes the distribution (frequency) of given fact (numeric dataset property). Result is split into required number of equal size buckets. The frequency is the count of occurrences of given metric in these buckets. This resource is typically used for the histogram filter distribution. This request starts an asynchronous action, which computes the property values distributions result and returns the location URI of the result in `location` response header. To get the result, client must make another GET request on this URI (see [getPropertyValuesDistribution](#operation/getPropertyValuesDistribution)). :param project_id: Id of the project (required) :type project_id: str diff --git a/cm_python_openapi_sdk/models/__init__.py b/cm_python_openapi_sdk/models/__init__.py index 3d22de3..df78264 100644 --- a/cm_python_openapi_sdk/models/__init__.py +++ b/cm_python_openapi_sdk/models/__init__.py @@ -40,6 +40,8 @@ from cm_python_openapi_sdk.models.audit_log_paged_resource_page import AuditLogPagedResourcePage from cm_python_openapi_sdk.models.audit_log_paged_resource_page_last_evaluated_key import AuditLogPagedResourcePageLastEvaluatedKey from cm_python_openapi_sdk.models.audit_log_single_resource import AuditLogSingleResource +from cm_python_openapi_sdk.models.audit_log_single_resource1 import AuditLogSingleResource1 +from cm_python_openapi_sdk.models.available_datasets_for_metric import AvailableDatasetsForMetric from cm_python_openapi_sdk.models.available_datasets_request import AvailableDatasetsRequest from cm_python_openapi_sdk.models.available_datasets_response import AvailableDatasetsResponse from cm_python_openapi_sdk.models.available_datasets_response_content_inner import AvailableDatasetsResponseContentInner @@ -62,7 +64,9 @@ from cm_python_openapi_sdk.models.create_invitation import CreateInvitation from cm_python_openapi_sdk.models.create_membership_dto import CreateMembershipDTO from cm_python_openapi_sdk.models.create_organization_dto import CreateOrganizationDTO +from cm_python_openapi_sdk.models.create_person_request_dto import CreatePersonRequestDTO from cm_python_openapi_sdk.models.create_project_dto import CreateProjectDTO +from cm_python_openapi_sdk.models.csv_header_override import CsvHeaderOverride from cm_python_openapi_sdk.models.cuzk_parcel_info_dto import CuzkParcelInfoDTO from cm_python_openapi_sdk.models.dashboard_content_dto import DashboardContentDTO from cm_python_openapi_sdk.models.dashboard_dto import DashboardDTO @@ -113,15 +117,17 @@ from cm_python_openapi_sdk.models.distribution_dto import DistributionDTO from cm_python_openapi_sdk.models.double_counting_warnings import DoubleCountingWarnings from cm_python_openapi_sdk.models.dwh_abstract_property import DwhAbstractProperty +from cm_python_openapi_sdk.models.dwh_date_range_filter import DwhDateRangeFilter from cm_python_openapi_sdk.models.dwh_date_range_request import DwhDateRangeRequest -from cm_python_openapi_sdk.models.dwh_date_range_request_filter import DwhDateRangeRequestFilter from cm_python_openapi_sdk.models.dwh_date_range_response import DwhDateRangeResponse from cm_python_openapi_sdk.models.dwh_date_range_response_content_inner import DwhDateRangeResponseContentInner from cm_python_openapi_sdk.models.dwh_foreign_key_dto import DwhForeignKeyDTO from cm_python_openapi_sdk.models.dwh_geometry_dto import DwhGeometryDTO from cm_python_openapi_sdk.models.dwh_metric_range_response import DwhMetricRangeResponse from cm_python_openapi_sdk.models.dwh_metric_range_response_content_inner import DwhMetricRangeResponseContentInner +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_request import DwhMetricValuesDistributionRequest from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response import DwhMetricValuesDistributionResponse +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response1 import DwhMetricValuesDistributionResponse1 from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response_content_inner import DwhMetricValuesDistributionResponseContentInner from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response_content_inner_content_inner import DwhMetricValuesDistributionResponseContentInnerContentInner from cm_python_openapi_sdk.models.dwh_overlaps_request import DwhOverlapsRequest @@ -176,9 +182,11 @@ from cm_python_openapi_sdk.models.function_date_truncate_options import FunctionDateTruncateOptions from cm_python_openapi_sdk.models.function_distance import FunctionDistance from cm_python_openapi_sdk.models.function_distance_options import FunctionDistanceOptions +from cm_python_openapi_sdk.models.function_greatest_least_type_general import FunctionGreatestLeastTypeGeneral from cm_python_openapi_sdk.models.function_h3_grid import FunctionH3Grid from cm_python_openapi_sdk.models.function_h3_grid_options import FunctionH3GridOptions from cm_python_openapi_sdk.models.function_interval import FunctionInterval +from cm_python_openapi_sdk.models.function_log_exp_type_general import FunctionLogExpTypeGeneral from cm_python_openapi_sdk.models.function_ntile import FunctionNtile from cm_python_openapi_sdk.models.function_ntile_options import FunctionNtileOptions from cm_python_openapi_sdk.models.function_percent_to_total_type_general import FunctionPercentToTotalTypeGeneral diff --git a/cm_python_openapi_sdk/models/account_dto.py b/cm_python_openapi_sdk/models/account_dto.py index a34e6f7..7f017f0 100644 --- a/cm_python_openapi_sdk/models/account_dto.py +++ b/cm_python_openapi_sdk/models/account_dto.py @@ -35,12 +35,11 @@ class AccountDTO(BaseModel): email: StrictStr consent_granted: Optional[StrictBool] = Field(default=None, alias="consentGranted") status: Optional[StrictStr] = None - anonymous: Optional[StrictBool] = None - phone_number: Optional[Annotated[str, Field(min_length=6, strict=True, max_length=20)]] = Field(default=None, alias="phoneNumber") + phone_number: Optional[Annotated[str, Field(strict=True, max_length=20)]] = Field(default=None, alias="phoneNumber") preferences: Optional[AccountPreferences] = None onboarding: Optional[AccountOnboardingParameters] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - __properties: ClassVar[List[str]] = ["id", "fullName", "email", "consentGranted", "status", "anonymous", "phoneNumber", "preferences", "onboarding", "links"] + __properties: ClassVar[List[str]] = ["id", "fullName", "email", "consentGranted", "status", "phoneNumber", "preferences", "onboarding", "links"] @field_validator('status') def status_validate_enum(cls, value): @@ -114,7 +113,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "email": obj.get("email"), "consentGranted": obj.get("consentGranted"), "status": obj.get("status"), - "anonymous": obj.get("anonymous"), "phoneNumber": obj.get("phoneNumber"), "preferences": AccountPreferences.from_dict(obj["preferences"]) if obj.get("preferences") is not None else None, "onboarding": AccountOnboardingParameters.from_dict(obj["onboarding"]) if obj.get("onboarding") is not None else None, diff --git a/cm_python_openapi_sdk/models/account_preferences.py b/cm_python_openapi_sdk/models/account_preferences.py index 487d445..4381dcc 100644 --- a/cm_python_openapi_sdk/models/account_preferences.py +++ b/cm_python_openapi_sdk/models/account_preferences.py @@ -40,8 +40,8 @@ def last_active_project_validate_regular_expression(cls, value): if value is None: return value - if not re.match(r"^[a-z0-9]{16}$", value): - raise ValueError(r"must validate the regular expression /^[a-z0-9]{16}$/") + if not re.match(r"^\/rest\/projects\/[a-z0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^\/rest\/projects\/[a-z0-9]{16}$/") return value @field_validator('last_active_organization') diff --git a/cm_python_openapi_sdk/models/audit_log_single_resource1.py b/cm_python_openapi_sdk/models/audit_log_single_resource1.py new file mode 100644 index 0000000..dd3076c --- /dev/null +++ b/cm_python_openapi_sdk/models/audit_log_single_resource1.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AuditLogSingleResource1(BaseModel): + """ + AuditLogSingleResource1 + """ # noqa: E501 + event_id: Annotated[str, Field(strict=True)] = Field(alias="eventId") + account_id: Annotated[str, Field(strict=True)] = Field(alias="accountId") + request_id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, alias="requestId") + remote_host: Optional[StrictStr] = Field(default=None, alias="remoteHost") + project_id: Annotated[str, Field(strict=True)] = Field(alias="projectId") + event_type: Annotated[str, Field(strict=True)] = Field(alias="eventType") + timestamp: Annotated[str, Field(strict=True)] + content: Dict[str, Any] + links: List[Dict[str, Any]] = Field(description="define keys links and page that are mandatory for all pageble responses") + __properties: ClassVar[List[str]] = ["eventId", "accountId", "requestId", "remoteHost", "projectId", "eventType", "timestamp", "content", "links"] + + @field_validator('event_id') + def event_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^\d{56}$", value): + raise ValueError(r"must validate the regular expression /^\d{56}$/") + return value + + @field_validator('account_id') + def account_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-zA-Z0-9]{20}$", value): + raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9]{20}$/") + return value + + @field_validator('request_id') + def request_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[a-z0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^[a-z0-9]{16}$/") + return value + + @field_validator('project_id') + def project_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^[a-z0-9]{16}$/") + return value + + @field_validator('event_type') + def event_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"[a-zA-Z_]+", value): + raise ValueError(r"must validate the regular expression /[a-zA-Z_]+/") + return value + + @field_validator('timestamp') + def timestamp_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}),(\d{3})$", value): + raise ValueError(r"must validate the regular expression /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}),(\d{3})$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuditLogSingleResource1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuditLogSingleResource1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "eventId": obj.get("eventId"), + "accountId": obj.get("accountId"), + "requestId": obj.get("requestId"), + "remoteHost": obj.get("remoteHost"), + "projectId": obj.get("projectId"), + "eventType": obj.get("eventType"), + "timestamp": obj.get("timestamp"), + "content": obj.get("content"), + "links": obj.get("links") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/function_ntile_content_inner.py b/cm_python_openapi_sdk/models/available_datasets_for_metric.py similarity index 54% rename from cm_python_openapi_sdk/models/function_ntile_content_inner.py rename to cm_python_openapi_sdk/models/available_datasets_for_metric.py index 6e404e0..4ab77a8 100644 --- a/cm_python_openapi_sdk/models/function_ntile_content_inner.py +++ b/cm_python_openapi_sdk/models/available_datasets_for_metric.py @@ -17,28 +17,23 @@ import json import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from cm_python_openapi_sdk.models.function_agg_type_general import FunctionAggTypeGeneral -from cm_python_openapi_sdk.models.function_arithm_type_general import FunctionArithmTypeGeneral -from cm_python_openapi_sdk.models.function_round_type_general import FunctionRoundTypeGeneral +from typing import Any, Dict, List, Optional from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -FUNCTIONNTILECONTENTINNER_ONE_OF_SCHEMAS = ["FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionRoundTypeGeneral"] +AVAILABLEDATASETSFORMETRIC_ONE_OF_SCHEMAS = ["object", "str"] -class FunctionNtileContentInner(BaseModel): +class AvailableDatasetsForMetric(BaseModel): """ - FunctionNtileContentInner + AvailableDatasetsForMetric """ - # data type: FunctionAggTypeGeneral - oneof_schema_1_validator: Optional[FunctionAggTypeGeneral] = None - # data type: FunctionArithmTypeGeneral - oneof_schema_2_validator: Optional[FunctionArithmTypeGeneral] = None - # data type: FunctionRoundTypeGeneral - oneof_schema_3_validator: Optional[FunctionRoundTypeGeneral] = None - actual_instance: Optional[Union[FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral]] = None - one_of_schemas: Set[str] = { "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionRoundTypeGeneral" } + # data type: str + oneof_schema_1_validator: Optional[StrictStr] = None + # data type: object + oneof_schema_2_validator: Optional[Dict[str, Any]] = None + actual_instance: Optional[Union[object, str]] = None + one_of_schemas: Set[str] = { "object", "str" } model_config = ConfigDict( validate_assignment=True, @@ -58,30 +53,27 @@ def __init__(self, *args, **kwargs) -> None: @field_validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): - instance = FunctionNtileContentInner.model_construct() + instance = AvailableDatasetsForMetric.model_construct() error_messages = [] match = 0 - # validate data type: FunctionAggTypeGeneral - if not isinstance(v, FunctionAggTypeGeneral): - error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionAggTypeGeneral`") - else: - match += 1 - # validate data type: FunctionArithmTypeGeneral - if not isinstance(v, FunctionArithmTypeGeneral): - error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionArithmTypeGeneral`") - else: + # validate data type: str + try: + instance.oneof_schema_1_validator = v match += 1 - # validate data type: FunctionRoundTypeGeneral - if not isinstance(v, FunctionRoundTypeGeneral): - error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionRoundTypeGeneral`") - else: + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: object + try: + instance.oneof_schema_2_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in FunctionNtileContentInner with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in AvailableDatasetsForMetric with oneOf schemas: object, str. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in FunctionNtileContentInner with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in AvailableDatasetsForMetric with oneOf schemas: object, str. Details: " + ", ".join(error_messages)) else: return v @@ -96,31 +88,31 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 - # deserialize data into FunctionAggTypeGeneral - try: - instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into FunctionArithmTypeGeneral + # deserialize data into str try: - instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into FunctionRoundTypeGeneral + # deserialize data into object try: - instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into FunctionNtileContentInner with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into AvailableDatasetsForMetric with oneOf schemas: object, str. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into FunctionNtileContentInner with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into AvailableDatasetsForMetric with oneOf schemas: object, str. Details: " + ", ".join(error_messages)) else: return instance @@ -134,7 +126,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/cm_python_openapi_sdk/models/available_datasets_response_content_inner.py b/cm_python_openapi_sdk/models/available_datasets_response_content_inner.py index cefadb7..887d39e 100644 --- a/cm_python_openapi_sdk/models/available_datasets_response_content_inner.py +++ b/cm_python_openapi_sdk/models/available_datasets_response_content_inner.py @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from cm_python_openapi_sdk.models.available_datasets_for_metric import AvailableDatasetsForMetric from typing import Optional, Set from typing_extensions import Self @@ -28,7 +29,7 @@ class AvailableDatasetsResponseContentInner(BaseModel): AvailableDatasetsResponseContentInner """ # noqa: E501 metric_id: Optional[StrictStr] = Field(default=None, alias="metricId") - available_datasets: Optional[List[Dict[str, Any]]] = Field(default=None, alias="availableDatasets") + available_datasets: Optional[List[AvailableDatasetsForMetric]] = Field(default=None, alias="availableDatasets") __properties: ClassVar[List[str]] = ["metricId", "availableDatasets"] model_config = ConfigDict( @@ -70,6 +71,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in available_datasets (list) + _items = [] + if self.available_datasets: + for _item_available_datasets in self.available_datasets: + if _item_available_datasets: + _items.append(_item_available_datasets.to_dict()) + _dict['availableDatasets'] = _items return _dict @classmethod @@ -83,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "metricId": obj.get("metricId"), - "availableDatasets": obj.get("availableDatasets") + "availableDatasets": [AvailableDatasetsForMetric.from_dict(_item) for _item in obj["availableDatasets"]] if obj.get("availableDatasets") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/account_job_info.py b/cm_python_openapi_sdk/models/create_person_request_dto.py similarity index 70% rename from cm_python_openapi_sdk/models/account_job_info.py rename to cm_python_openapi_sdk/models/create_person_request_dto.py index 7574220..9655278 100644 --- a/cm_python_openapi_sdk/models/account_job_info.py +++ b/cm_python_openapi_sdk/models/create_person_request_dto.py @@ -18,20 +18,29 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self -class AccountJobInfo(BaseModel): +class CreatePersonRequestDTO(BaseModel): """ - AccountJobInfo + CreatePersonRequestDTO """ # noqa: E501 - company_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]] = Field(default=None, alias="companyName") - job_position: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]] = Field(default=None, alias="jobPosition") - industry: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]] = None - __properties: ClassVar[List[str]] = ["companyName", "jobPosition", "industry"] + language: Annotated[str, Field(strict=True, max_length=2)] + project_id_invitation: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, alias="projectIdInvitation") + __properties: ClassVar[List[str]] = ["language", "projectIdInvitation"] + + @field_validator('project_id_invitation') + def project_id_invitation_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[a-z0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^[a-z0-9]{16}$/") + return value model_config = ConfigDict( populate_by_name=True, @@ -51,7 +60,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AccountJobInfo from a JSON string""" + """Create an instance of CreatePersonRequestDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -76,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AccountJobInfo from a dict""" + """Create an instance of CreatePersonRequestDTO from a dict""" if obj is None: return None @@ -84,9 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "companyName": obj.get("companyName"), - "jobPosition": obj.get("jobPosition"), - "industry": obj.get("industry") + "language": obj.get("language"), + "projectIdInvitation": obj.get("projectIdInvitation") }) return _obj diff --git a/cm_python_openapi_sdk/models/update_membership.py b/cm_python_openapi_sdk/models/csv_header_override.py similarity index 82% rename from cm_python_openapi_sdk/models/update_membership.py rename to cm_python_openapi_sdk/models/csv_header_override.py index e50b9c3..2084293 100644 --- a/cm_python_openapi_sdk/models/update_membership.py +++ b/cm_python_openapi_sdk/models/csv_header_override.py @@ -18,18 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class UpdateMembership(BaseModel): +class CsvHeaderOverride(BaseModel): """ - UpdateMembership + CsvHeaderOverride """ # noqa: E501 - status: StrictStr - role: StrictStr - __properties: ClassVar[List[str]] = ["status", "role"] + query_dwh_property_id: StrictStr = Field(alias="queryDwhPropertyId") + title: StrictStr + __properties: ClassVar[List[str]] = ["queryDwhPropertyId", "title"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UpdateMembership from a JSON string""" + """Create an instance of CsvHeaderOverride from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UpdateMembership from a dict""" + """Create an instance of CsvHeaderOverride from a dict""" if obj is None: return None @@ -82,8 +82,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "status": obj.get("status"), - "role": obj.get("role") + "queryDwhPropertyId": obj.get("queryDwhPropertyId"), + "title": obj.get("title") }) return _obj diff --git a/cm_python_openapi_sdk/models/mandatory_keys_for_pagable_response.py b/cm_python_openapi_sdk/models/dwh_date_range_filter.py similarity index 67% rename from cm_python_openapi_sdk/models/mandatory_keys_for_pagable_response.py rename to cm_python_openapi_sdk/models/dwh_date_range_filter.py index 9219cea..620515f 100644 --- a/cm_python_openapi_sdk/models/mandatory_keys_for_pagable_response.py +++ b/cm_python_openapi_sdk/models/dwh_date_range_filter.py @@ -18,20 +18,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional +from cm_python_openapi_sdk.models.date_filter_default_value_type import DateFilterDefaultValueType from typing import Optional, Set from typing_extensions import Self -class MandatoryKeysForPagableResponse(BaseModel): +class DwhDateRangeFilter(BaseModel): """ - define keys links and page that are mandatory for all pageble responses + DwhDateRangeFilter """ # noqa: E501 - size: StrictInt - total_elements: Optional[Any] = Field(alias="totalElements") - total_pages: StrictInt = Field(alias="totalPages") - number: StrictInt - __properties: ClassVar[List[str]] = ["size", "totalElements", "totalPages", "number"] + start_date: Optional[DateFilterDefaultValueType] = Field(default=None, alias="startDate") + end_date: Optional[DateFilterDefaultValueType] = Field(default=None, alias="endDate") + __properties: ClassVar[List[str]] = ["startDate", "endDate"] model_config = ConfigDict( populate_by_name=True, @@ -51,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MandatoryKeysForPagableResponse from a JSON string""" + """Create an instance of DwhDateRangeFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,16 +71,17 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if total_elements (nullable) is None - # and model_fields_set contains the field - if self.total_elements is None and "total_elements" in self.model_fields_set: - _dict['totalElements'] = None - + # override the default output from pydantic by calling `to_dict()` of start_date + if self.start_date: + _dict['startDate'] = self.start_date.to_dict() + # override the default output from pydantic by calling `to_dict()` of end_date + if self.end_date: + _dict['endDate'] = self.end_date.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MandatoryKeysForPagableResponse from a dict""" + """Create an instance of DwhDateRangeFilter from a dict""" if obj is None: return None @@ -89,10 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "size": obj.get("size"), - "totalElements": obj.get("totalElements"), - "totalPages": obj.get("totalPages"), - "number": obj.get("number") + "startDate": DateFilterDefaultValueType.from_dict(obj["startDate"]) if obj.get("startDate") is not None else None, + "endDate": DateFilterDefaultValueType.from_dict(obj["endDate"]) if obj.get("endDate") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/dwh_date_range_request.py b/cm_python_openapi_sdk/models/dwh_date_range_request.py index bf49091..276f4c8 100644 --- a/cm_python_openapi_sdk/models/dwh_date_range_request.py +++ b/cm_python_openapi_sdk/models/dwh_date_range_request.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from cm_python_openapi_sdk.models.dwh_date_range_request_filter import DwhDateRangeRequestFilter +from cm_python_openapi_sdk.models.dwh_date_range_filter import DwhDateRangeFilter from cm_python_openapi_sdk.models.execution_context import ExecutionContext from typing import Optional, Set from typing_extensions import Self @@ -32,7 +32,7 @@ class DwhDateRangeRequest(BaseModel): """ # noqa: E501 execution_context: Optional[ExecutionContext] = Field(default=None, alias="executionContext") var_from: Annotated[str, Field(strict=True)] = Field(description="defines the date property in a fact table", alias="from") - filter: Optional[DwhDateRangeRequestFilter] = None + filter: Optional[DwhDateRangeFilter] = None __properties: ClassVar[List[str]] = ["executionContext", "from", "filter"] @field_validator('var_from') @@ -101,7 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "executionContext": ExecutionContext.from_dict(obj["executionContext"]) if obj.get("executionContext") is not None else None, "from": obj.get("from"), - "filter": DwhDateRangeRequestFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None + "filter": DwhDateRangeFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/account_utm_parameters.py b/cm_python_openapi_sdk/models/dwh_metric_values_distribution_request.py similarity index 69% rename from cm_python_openapi_sdk/models/account_utm_parameters.py rename to cm_python_openapi_sdk/models/dwh_metric_values_distribution_request.py index 03bccbb..c7ba8d0 100644 --- a/cm_python_openapi_sdk/models/account_utm_parameters.py +++ b/cm_python_openapi_sdk/models/dwh_metric_values_distribution_request.py @@ -18,20 +18,20 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from cm_python_openapi_sdk.models.dwh_query_request1 import DwhQueryRequest1 from typing import Optional, Set from typing_extensions import Self -class AccountUtmParameters(BaseModel): +class DwhMetricValuesDistributionRequest(BaseModel): """ - AccountUtmParameters + DwhMetricValuesDistributionRequest """ # noqa: E501 - medium: Optional[StrictStr] = None - source: Optional[StrictStr] = None - campaign: Optional[StrictStr] = None - referrer: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["medium", "source", "campaign", "referrer"] + buckets: Optional[StrictInt] = None + breakpoints: Optional[List[Union[StrictFloat, StrictInt]]] = None + query: DwhQueryRequest1 + __properties: ClassVar[List[str]] = ["buckets", "breakpoints", "query"] model_config = ConfigDict( populate_by_name=True, @@ -51,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AccountUtmParameters from a JSON string""" + """Create an instance of DwhMetricValuesDistributionRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,11 +72,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AccountUtmParameters from a dict""" + """Create an instance of DwhMetricValuesDistributionRequest from a dict""" if obj is None: return None @@ -84,10 +87,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "medium": obj.get("medium"), - "source": obj.get("source"), - "campaign": obj.get("campaign"), - "referrer": obj.get("referrer") + "buckets": obj.get("buckets"), + "breakpoints": obj.get("breakpoints"), + "query": DwhQueryRequest1.from_dict(obj["query"]) if obj.get("query") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/send_reset_password_dto.py b/cm_python_openapi_sdk/models/dwh_metric_values_distribution_response1.py similarity index 69% rename from cm_python_openapi_sdk/models/send_reset_password_dto.py rename to cm_python_openapi_sdk/models/dwh_metric_values_distribution_response1.py index 6ae267c..2186d27 100644 --- a/cm_python_openapi_sdk/models/send_reset_password_dto.py +++ b/cm_python_openapi_sdk/models/dwh_metric_values_distribution_response1.py @@ -18,18 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response_content_inner import DwhMetricValuesDistributionResponseContentInner from typing import Optional, Set from typing_extensions import Self -class SendResetPasswordDTO(BaseModel): +class DwhMetricValuesDistributionResponse1(BaseModel): """ - SendResetPasswordDTO + DwhMetricValuesDistributionResponse1 """ # noqa: E501 - email: StrictStr - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["email"] + content: List[DwhMetricValuesDistributionResponseContentInner] + __properties: ClassVar[List[str]] = ["content"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SendResetPasswordDTO from a JSON string""" + """Create an instance of DwhMetricValuesDistributionResponse1 from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -61,10 +61,8 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. - * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ - "additional_properties", ]) _dict = self.model_dump( @@ -72,16 +70,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - + # override the default output from pydantic by calling `to_dict()` of each item in content (list) + _items = [] + if self.content: + for _item_content in self.content: + if _item_content: + _items.append(_item_content.to_dict()) + _dict['content'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SendResetPasswordDTO from a dict""" + """Create an instance of DwhMetricValuesDistributionResponse1 from a dict""" if obj is None: return None @@ -89,13 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "email": obj.get("email") + "content": [DwhMetricValuesDistributionResponseContentInner.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/cm_python_openapi_sdk/models/dwh_query_function_types.py b/cm_python_openapi_sdk/models/dwh_query_function_types.py index f5637a2..c00a97e 100644 --- a/cm_python_openapi_sdk/models/dwh_query_function_types.py +++ b/cm_python_openapi_sdk/models/dwh_query_function_types.py @@ -27,8 +27,10 @@ from cm_python_openapi_sdk.models.function_condition_type_general import FunctionConditionTypeGeneral from cm_python_openapi_sdk.models.function_date_trunc import FunctionDateTrunc from cm_python_openapi_sdk.models.function_distance import FunctionDistance +from cm_python_openapi_sdk.models.function_greatest_least_type_general import FunctionGreatestLeastTypeGeneral from cm_python_openapi_sdk.models.function_h3_grid import FunctionH3Grid from cm_python_openapi_sdk.models.function_interval import FunctionInterval +from cm_python_openapi_sdk.models.function_log_exp_type_general import FunctionLogExpTypeGeneral from cm_python_openapi_sdk.models.function_ntile import FunctionNtile from cm_python_openapi_sdk.models.function_percent_to_total_type_general import FunctionPercentToTotalTypeGeneral from cm_python_openapi_sdk.models.function_percentile import FunctionPercentile @@ -40,7 +42,7 @@ from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -DWHQUERYFUNCTIONTYPES_ONE_OF_SCHEMAS = ["DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionH3Grid", "FunctionInterval", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday"] +DWHQUERYFUNCTIONTYPES_ONE_OF_SCHEMAS = ["DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionGreatestLeastTypeGeneral", "FunctionH3Grid", "FunctionInterval", "FunctionLogExpTypeGeneral", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday"] class DwhQueryFunctionTypes(BaseModel): """ @@ -70,20 +72,24 @@ class DwhQueryFunctionTypes(BaseModel): oneof_schema_11_validator: Optional[FunctionPercentile] = None # data type: FunctionRowNumber oneof_schema_12_validator: Optional[FunctionRowNumber] = None + # data type: FunctionGreatestLeastTypeGeneral + oneof_schema_13_validator: Optional[FunctionGreatestLeastTypeGeneral] = None + # data type: FunctionLogExpTypeGeneral + oneof_schema_14_validator: Optional[FunctionLogExpTypeGeneral] = None # data type: FunctionRoundTypeGeneral - oneof_schema_13_validator: Optional[FunctionRoundTypeGeneral] = None + oneof_schema_15_validator: Optional[FunctionRoundTypeGeneral] = None # data type: FunctionToday - oneof_schema_14_validator: Optional[FunctionToday] = None + oneof_schema_16_validator: Optional[FunctionToday] = None # data type: FunctionDateTrunc - oneof_schema_15_validator: Optional[FunctionDateTrunc] = None + oneof_schema_17_validator: Optional[FunctionDateTrunc] = None # data type: FunctionInterval - oneof_schema_16_validator: Optional[FunctionInterval] = None + oneof_schema_18_validator: Optional[FunctionInterval] = None # data type: FunctionH3Grid - oneof_schema_17_validator: Optional[FunctionH3Grid] = None + oneof_schema_19_validator: Optional[FunctionH3Grid] = None # data type: FunctionDistance - oneof_schema_18_validator: Optional[FunctionDistance] = None - actual_instance: Optional[Union[DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]] = None - one_of_schemas: Set[str] = { "DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionH3Grid", "FunctionInterval", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday" } + oneof_schema_20_validator: Optional[FunctionDistance] = None + actual_instance: Optional[Union[DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]] = None + one_of_schemas: Set[str] = { "DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionGreatestLeastTypeGeneral", "FunctionH3Grid", "FunctionInterval", "FunctionLogExpTypeGeneral", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday" } model_config = ConfigDict( validate_assignment=True, @@ -166,6 +172,16 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionRowNumber`") else: match += 1 + # validate data type: FunctionGreatestLeastTypeGeneral + if not isinstance(v, FunctionGreatestLeastTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionGreatestLeastTypeGeneral`") + else: + match += 1 + # validate data type: FunctionLogExpTypeGeneral + if not isinstance(v, FunctionLogExpTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionLogExpTypeGeneral`") + else: + match += 1 # validate data type: FunctionRoundTypeGeneral if not isinstance(v, FunctionRoundTypeGeneral): error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionRoundTypeGeneral`") @@ -198,10 +214,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) else: return v @@ -288,6 +304,18 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into FunctionGreatestLeastTypeGeneral + try: + instance.actual_instance = FunctionGreatestLeastTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionLogExpTypeGeneral + try: + instance.actual_instance = FunctionLogExpTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # deserialize data into FunctionRoundTypeGeneral try: instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) @@ -327,10 +355,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) else: return instance @@ -344,7 +372,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/cm_python_openapi_sdk/models/dwh_query_property_types.py b/cm_python_openapi_sdk/models/dwh_query_property_types.py index fb275cd..a8e21ed 100644 --- a/cm_python_openapi_sdk/models/dwh_query_property_types.py +++ b/cm_python_openapi_sdk/models/dwh_query_property_types.py @@ -26,8 +26,10 @@ from cm_python_openapi_sdk.models.function_condition_type_general import FunctionConditionTypeGeneral from cm_python_openapi_sdk.models.function_date_trunc import FunctionDateTrunc from cm_python_openapi_sdk.models.function_distance import FunctionDistance +from cm_python_openapi_sdk.models.function_greatest_least_type_general import FunctionGreatestLeastTypeGeneral from cm_python_openapi_sdk.models.function_h3_grid import FunctionH3Grid from cm_python_openapi_sdk.models.function_interval import FunctionInterval +from cm_python_openapi_sdk.models.function_log_exp_type_general import FunctionLogExpTypeGeneral from cm_python_openapi_sdk.models.function_percent_to_total_type_general import FunctionPercentToTotalTypeGeneral from cm_python_openapi_sdk.models.function_round_type_general import FunctionRoundTypeGeneral from cm_python_openapi_sdk.models.function_today import FunctionToday @@ -35,7 +37,7 @@ from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -DWHQUERYPROPERTYTYPES_ONE_OF_SCHEMAS = ["DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionH3Grid", "FunctionInterval", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday"] +DWHQUERYPROPERTYTYPES_ONE_OF_SCHEMAS = ["DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionGreatestLeastTypeGeneral", "FunctionH3Grid", "FunctionInterval", "FunctionLogExpTypeGeneral", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday"] class DwhQueryPropertyTypes(BaseModel): """ @@ -55,30 +57,34 @@ class DwhQueryPropertyTypes(BaseModel): oneof_schema_6_validator: Optional[FunctionArithmTypeGeneral] = None # data type: FunctionConditionTypeGeneral oneof_schema_7_validator: Optional[FunctionConditionTypeGeneral] = None + # data type: FunctionGreatestLeastTypeGeneral + oneof_schema_8_validator: Optional[FunctionGreatestLeastTypeGeneral] = None + # data type: FunctionLogExpTypeGeneral + oneof_schema_9_validator: Optional[FunctionLogExpTypeGeneral] = None # data type: FunctionDateTrunc - oneof_schema_8_validator: Optional[FunctionDateTrunc] = None + oneof_schema_10_validator: Optional[FunctionDateTrunc] = None # data type: FunctionDistance - oneof_schema_9_validator: Optional[FunctionDistance] = None + oneof_schema_11_validator: Optional[FunctionDistance] = None # data type: FunctionH3Grid - oneof_schema_10_validator: Optional[FunctionH3Grid] = None + oneof_schema_12_validator: Optional[FunctionH3Grid] = None # data type: FunctionInterval - oneof_schema_11_validator: Optional[FunctionInterval] = None + oneof_schema_13_validator: Optional[FunctionInterval] = None # data type: FunctionNtile - oneof_schema_12_validator: Optional[FunctionNtile] = None + oneof_schema_14_validator: Optional[FunctionNtile] = None # data type: FunctionPercentToTotalTypeGeneral - oneof_schema_13_validator: Optional[FunctionPercentToTotalTypeGeneral] = None + oneof_schema_15_validator: Optional[FunctionPercentToTotalTypeGeneral] = None # data type: FunctionPercentile - oneof_schema_14_validator: Optional[FunctionPercentile] = None + oneof_schema_16_validator: Optional[FunctionPercentile] = None # data type: FunctionRank - oneof_schema_15_validator: Optional[FunctionRank] = None + oneof_schema_17_validator: Optional[FunctionRank] = None # data type: FunctionRoundTypeGeneral - oneof_schema_16_validator: Optional[FunctionRoundTypeGeneral] = None + oneof_schema_18_validator: Optional[FunctionRoundTypeGeneral] = None # data type: FunctionRowNumber - oneof_schema_17_validator: Optional[FunctionRowNumber] = None + oneof_schema_19_validator: Optional[FunctionRowNumber] = None # data type: FunctionToday - oneof_schema_18_validator: Optional[FunctionToday] = None - actual_instance: Optional[Union[DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]] = None - one_of_schemas: Set[str] = { "DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionH3Grid", "FunctionInterval", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday" } + oneof_schema_20_validator: Optional[FunctionToday] = None + actual_instance: Optional[Union[DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]] = None + one_of_schemas: Set[str] = { "DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionGreatestLeastTypeGeneral", "FunctionH3Grid", "FunctionInterval", "FunctionLogExpTypeGeneral", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday" } model_config = ConfigDict( validate_assignment=True, @@ -136,6 +142,16 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionConditionTypeGeneral`") else: match += 1 + # validate data type: FunctionGreatestLeastTypeGeneral + if not isinstance(v, FunctionGreatestLeastTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionGreatestLeastTypeGeneral`") + else: + match += 1 + # validate data type: FunctionLogExpTypeGeneral + if not isinstance(v, FunctionLogExpTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionLogExpTypeGeneral`") + else: + match += 1 # validate data type: FunctionDateTrunc if not isinstance(v, FunctionDateTrunc): error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionDateTrunc`") @@ -193,10 +209,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) else: return v @@ -253,6 +269,18 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into FunctionGreatestLeastTypeGeneral + try: + instance.actual_instance = FunctionGreatestLeastTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionLogExpTypeGeneral + try: + instance.actual_instance = FunctionLogExpTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # deserialize data into FunctionDateTrunc try: instance.actual_instance = FunctionDateTrunc.from_json(json_str) @@ -322,10 +350,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) else: return instance @@ -339,7 +367,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionGreatestLeastTypeGeneral, FunctionH3Grid, FunctionInterval, FunctionLogExpTypeGeneral, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/cm_python_openapi_sdk/models/export_request.py b/cm_python_openapi_sdk/models/export_request.py index 36d07ac..8e409df 100644 --- a/cm_python_openapi_sdk/models/export_request.py +++ b/cm_python_openapi_sdk/models/export_request.py @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from cm_python_openapi_sdk.models.csv_header_override import CsvHeaderOverride from cm_python_openapi_sdk.models.export_request_csv_options import ExportRequestCsvOptions from typing import Optional, Set from typing_extensions import Self @@ -29,11 +30,12 @@ class ExportRequest(BaseModel): ExportRequest """ # noqa: E501 format: StrictStr + csv_header_overrides: Optional[List[CsvHeaderOverride]] = Field(default=None, alias="csvHeaderOverrides") csv_header_format: Optional[StrictStr] = Field(default=None, alias="csvHeaderFormat") query: Dict[str, Any] csv_options: Optional[ExportRequestCsvOptions] = Field(default=None, alias="csvOptions") xlsx_options: Optional[Dict[str, Any]] = Field(default=None, alias="xlsxOptions") - __properties: ClassVar[List[str]] = ["format", "csvHeaderFormat", "query", "csvOptions", "xlsxOptions"] + __properties: ClassVar[List[str]] = ["format", "csvHeaderOverrides", "csvHeaderFormat", "query", "csvOptions", "xlsxOptions"] @field_validator('format') def format_validate_enum(cls, value): @@ -91,6 +93,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in csv_header_overrides (list) + _items = [] + if self.csv_header_overrides: + for _item_csv_header_overrides in self.csv_header_overrides: + if _item_csv_header_overrides: + _items.append(_item_csv_header_overrides.to_dict()) + _dict['csvHeaderOverrides'] = _items # override the default output from pydantic by calling `to_dict()` of csv_options if self.csv_options: _dict['csvOptions'] = self.csv_options.to_dict() @@ -107,6 +116,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "format": obj.get("format"), + "csvHeaderOverrides": [CsvHeaderOverride.from_dict(_item) for _item in obj["csvHeaderOverrides"]] if obj.get("csvHeaderOverrides") is not None else None, "csvHeaderFormat": obj.get("csvHeaderFormat"), "query": obj.get("query"), "csvOptions": ExportRequestCsvOptions.from_dict(obj["csvOptions"]) if obj.get("csvOptions") is not None else None, diff --git a/cm_python_openapi_sdk/models/variable_type.py b/cm_python_openapi_sdk/models/function_greatest_least_type_general.py similarity index 81% rename from cm_python_openapi_sdk/models/variable_type.py rename to cm_python_openapi_sdk/models/function_greatest_least_type_general.py index 20760b9..d82e8f2 100644 --- a/cm_python_openapi_sdk/models/variable_type.py +++ b/cm_python_openapi_sdk/models/function_greatest_least_type_general.py @@ -24,14 +24,14 @@ from typing import Optional, Set from typing_extensions import Self -class VariableType(BaseModel): +class FunctionGreatestLeastTypeGeneral(BaseModel): """ - VariableType + FunctionGreatestLeastTypeGeneral """ # noqa: E501 id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=60)]] = None type: StrictStr - value: Annotated[str, Field(strict=True)] - __properties: ClassVar[List[str]] = ["id", "type", "value"] + content: Annotated[List[Any], Field(min_length=1)] + __properties: ClassVar[List[str]] = ["id", "type", "content"] @field_validator('id') def id_validate_regular_expression(cls, value): @@ -46,15 +46,8 @@ def id_validate_regular_expression(cls, value): @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['variable']): - raise ValueError("must be one of enum values ('variable')") - return value - - @field_validator('value') - def value_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[a-z][a-z0-9_-]*$", value): - raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + if value not in set(['function_greatest', 'function_least']): + raise ValueError("must be one of enum values ('function_greatest', 'function_least')") return value model_config = ConfigDict( @@ -75,7 +68,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of VariableType from a JSON string""" + """Create an instance of FunctionGreatestLeastTypeGeneral from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -100,7 +93,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of VariableType from a dict""" + """Create an instance of FunctionGreatestLeastTypeGeneral from a dict""" if obj is None: return None @@ -110,7 +103,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "value": obj.get("value") + "content": obj.get("content") }) return _obj diff --git a/cm_python_openapi_sdk/models/reset_password_dto.py b/cm_python_openapi_sdk/models/function_log_exp_type_general.py similarity index 66% rename from cm_python_openapi_sdk/models/reset_password_dto.py rename to cm_python_openapi_sdk/models/function_log_exp_type_general.py index ec2bc9a..c7cafef 100644 --- a/cm_python_openapi_sdk/models/reset_password_dto.py +++ b/cm_python_openapi_sdk/models/function_log_exp_type_general.py @@ -18,20 +18,37 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self -class ResetPasswordDTO(BaseModel): +class FunctionLogExpTypeGeneral(BaseModel): """ - ResetPasswordDTO + FunctionLogExpTypeGeneral """ # noqa: E501 - new_password: Annotated[str, Field(strict=True, max_length=100)] = Field(alias="newPassword") - consent_granted: Optional[StrictBool] = Field(default=None, alias="consentGranted") - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["newPassword", "consentGranted"] + id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=60)]] = None + type: StrictStr + content: Annotated[List[Any], Field(min_length=1, max_length=1)] + __properties: ClassVar[List[str]] = ["id", "type", "content"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[\w_-]+$", value): + raise ValueError(r"must validate the regular expression /^[\w_-]+$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['function_ln', 'function_exp']): + raise ValueError("must be one of enum values ('function_ln', 'function_exp')") + return value model_config = ConfigDict( populate_by_name=True, @@ -51,7 +68,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ResetPasswordDTO from a JSON string""" + """Create an instance of FunctionLogExpTypeGeneral from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -63,10 +80,8 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. - * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ - "additional_properties", ]) _dict = self.model_dump( @@ -74,16 +89,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ResetPasswordDTO from a dict""" + """Create an instance of FunctionLogExpTypeGeneral from a dict""" if obj is None: return None @@ -91,14 +101,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "newPassword": obj.get("newPassword"), - "consentGranted": obj.get("consentGranted") + "id": obj.get("id"), + "type": obj.get("type"), + "content": obj.get("content") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/cm_python_openapi_sdk/models/membership_dto.py b/cm_python_openapi_sdk/models/membership_dto.py deleted file mode 100644 index 207c5e2..0000000 --- a/cm_python_openapi_sdk/models/membership_dto.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - clevermaps-client - - CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations - - The version of the OpenAPI document: 1.0.0 - Contact: support@clevermaps.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.account_dto import AccountDTO -from typing import Optional, Set -from typing_extensions import Self - -class MembershipDTO(BaseModel): - """ - MembershipDTO - """ # noqa: E501 - id: Optional[StrictStr] = None - account_id: Optional[StrictStr] = Field(default=None, alias="accountId") - status: StrictStr - role: StrictStr - created_at: Optional[StrictStr] = Field(default=None, alias="createdAt") - modified_at: Optional[StrictStr] = Field(default=None, alias="modifiedAt") - account: Optional[AccountDTO] = None - links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - __properties: ClassVar[List[str]] = ["id", "accountId", "status", "role", "createdAt", "modifiedAt", "account", "links"] - - @field_validator('status') - def status_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['ENABLED', 'DISABLED']): - raise ValueError("must be one of enum values ('ENABLED', 'DISABLED')") - return value - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['ANONYMOUS', 'VIEWER', 'VIEW_CREATOR', 'EDITOR', 'DATA_EDITOR', 'ADMIN', 'LOAD_DATA', 'DUMP_DATA', 'LOCATION_API_CONSUMER']): - raise ValueError("must be one of enum values ('ANONYMOUS', 'VIEWER', 'VIEW_CREATOR', 'EDITOR', 'DATA_EDITOR', 'ADMIN', 'LOAD_DATA', 'DUMP_DATA', 'LOCATION_API_CONSUMER')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MembershipDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of account - if self.account: - _dict['account'] = self.account.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MembershipDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "accountId": obj.get("accountId"), - "status": obj.get("status"), - "role": obj.get("role"), - "createdAt": obj.get("createdAt"), - "modifiedAt": obj.get("modifiedAt"), - "account": AccountDTO.from_dict(obj["account"]) if obj.get("account") is not None else None, - "links": obj.get("links") - }) - return _obj - - diff --git a/cm_python_openapi_sdk/models/new_account_dto.py b/cm_python_openapi_sdk/models/new_account_dto.py deleted file mode 100644 index b4b919a..0000000 --- a/cm_python_openapi_sdk/models/new_account_dto.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding: utf-8 - -""" - clevermaps-client - - CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations - - The version of the OpenAPI document: 1.0.0 - Contact: support@clevermaps.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from cm_python_openapi_sdk.models.account_job_info import AccountJobInfo -from cm_python_openapi_sdk.models.account_preferences import AccountPreferences -from cm_python_openapi_sdk.models.account_utm_parameters import AccountUtmParameters -from typing import Optional, Set -from typing_extensions import Self - -class NewAccountDTO(BaseModel): - """ - NewAccountDTO - """ # noqa: E501 - given_name: Annotated[str, Field(min_length=1, strict=True, max_length=50)] = Field(alias="givenName") - surname: Annotated[str, Field(min_length=1, strict=True, max_length=50)] - email: StrictStr - password: Annotated[str, Field(strict=True, max_length=100)] - consent_granted: Optional[StrictBool] = Field(default=None, alias="consentGranted") - phone_number: Optional[Annotated[str, Field(min_length=6, strict=True, max_length=20)]] = Field(default=None, alias="phoneNumber") - require_additional_attributes: Optional[StrictBool] = Field(default=None, alias="requireAdditionalAttributes") - preferences: Optional[AccountPreferences] = None - utm_parameters: Optional[AccountUtmParameters] = Field(default=None, alias="utmParameters") - job_info: Optional[AccountJobInfo] = Field(default=None, alias="jobInfo") - __properties: ClassVar[List[str]] = ["givenName", "surname", "email", "password", "consentGranted", "phoneNumber", "requireAdditionalAttributes", "preferences", "utmParameters", "jobInfo"] - - @field_validator('given_name') - def given_name_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[\p{L} \'-]+$", value): - raise ValueError(r"must validate the regular expression /^[\p{L} '-]+$/") - return value - - @field_validator('surname') - def surname_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[\p{L} \'-]+$", value): - raise ValueError(r"must validate the regular expression /^[\p{L} '-]+$/") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NewAccountDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of preferences - if self.preferences: - _dict['preferences'] = self.preferences.to_dict() - # override the default output from pydantic by calling `to_dict()` of utm_parameters - if self.utm_parameters: - _dict['utmParameters'] = self.utm_parameters.to_dict() - # override the default output from pydantic by calling `to_dict()` of job_info - if self.job_info: - _dict['jobInfo'] = self.job_info.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NewAccountDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "givenName": obj.get("givenName"), - "surname": obj.get("surname"), - "email": obj.get("email"), - "password": obj.get("password"), - "consentGranted": obj.get("consentGranted"), - "phoneNumber": obj.get("phoneNumber"), - "requireAdditionalAttributes": obj.get("requireAdditionalAttributes"), - "preferences": AccountPreferences.from_dict(obj["preferences"]) if obj.get("preferences") is not None else None, - "utmParameters": AccountUtmParameters.from_dict(obj["utmParameters"]) if obj.get("utmParameters") is not None else None, - "jobInfo": AccountJobInfo.from_dict(obj["jobInfo"]) if obj.get("jobInfo") is not None else None - }) - return _obj - - diff --git a/cm_python_openapi_sdk/models/password_change_dto.py b/cm_python_openapi_sdk/models/password_change_dto.py deleted file mode 100644 index 4a65233..0000000 --- a/cm_python_openapi_sdk/models/password_change_dto.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - clevermaps-client - - CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations - - The version of the OpenAPI document: 1.0.0 - Contact: support@clevermaps.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class PasswordChangeDTO(BaseModel): - """ - PasswordChangeDTO - """ # noqa: E501 - old_password: Annotated[str, Field(strict=True, max_length=100)] = Field(alias="oldPassword") - new_password: Annotated[str, Field(strict=True, max_length=100)] = Field(alias="newPassword") - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["oldPassword", "newPassword"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PasswordChangeDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PasswordChangeDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "oldPassword": obj.get("oldPassword"), - "newPassword": obj.get("newPassword") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj - - diff --git a/cm_python_openapi_sdk/models/submit_job_execution_request.py b/cm_python_openapi_sdk/models/submit_job_execution_request.py deleted file mode 100644 index a58bf38..0000000 --- a/cm_python_openapi_sdk/models/submit_job_execution_request.py +++ /dev/null @@ -1,208 +0,0 @@ -# coding: utf-8 - -""" - clevermaps-client - - CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations - - The version of the OpenAPI document: 1.0.0 - Contact: support@clevermaps.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from cm_python_openapi_sdk.models.bulk_point_query_job_request import BulkPointQueryJobRequest -from cm_python_openapi_sdk.models.data_dump_job_request import DataDumpJobRequest -from cm_python_openapi_sdk.models.data_pull_job_request import DataPullJobRequest -from cm_python_openapi_sdk.models.export_job_request import ExportJobRequest -from cm_python_openapi_sdk.models.import_project_job_request import ImportProjectJobRequest -from cm_python_openapi_sdk.models.truncate_job_request import TruncateJobRequest -from cm_python_openapi_sdk.models.validate_job_request import ValidateJobRequest -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -SUBMITJOBEXECUTIONREQUEST_ONE_OF_SCHEMAS = ["BulkPointQueryJobRequest", "DataDumpJobRequest", "DataPullJobRequest", "ExportJobRequest", "ImportProjectJobRequest", "TruncateJobRequest", "ValidateJobRequest"] - -class SubmitJobExecutionRequest(BaseModel): - """ - SubmitJobExecutionRequest - """ - # data type: ImportProjectJobRequest - oneof_schema_1_validator: Optional[ImportProjectJobRequest] = None - # data type: ValidateJobRequest - oneof_schema_2_validator: Optional[ValidateJobRequest] = None - # data type: TruncateJobRequest - oneof_schema_3_validator: Optional[TruncateJobRequest] = None - # data type: DataDumpJobRequest - oneof_schema_4_validator: Optional[DataDumpJobRequest] = None - # data type: DataPullJobRequest - oneof_schema_5_validator: Optional[DataPullJobRequest] = None - # data type: BulkPointQueryJobRequest - oneof_schema_6_validator: Optional[BulkPointQueryJobRequest] = None - # data type: ExportJobRequest - oneof_schema_7_validator: Optional[ExportJobRequest] = None - actual_instance: Optional[Union[BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest]] = None - one_of_schemas: Set[str] = { "BulkPointQueryJobRequest", "DataDumpJobRequest", "DataPullJobRequest", "ExportJobRequest", "ImportProjectJobRequest", "TruncateJobRequest", "ValidateJobRequest" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = SubmitJobExecutionRequest.model_construct() - error_messages = [] - match = 0 - # validate data type: ImportProjectJobRequest - if not isinstance(v, ImportProjectJobRequest): - error_messages.append(f"Error! Input type `{type(v)}` is not `ImportProjectJobRequest`") - else: - match += 1 - # validate data type: ValidateJobRequest - if not isinstance(v, ValidateJobRequest): - error_messages.append(f"Error! Input type `{type(v)}` is not `ValidateJobRequest`") - else: - match += 1 - # validate data type: TruncateJobRequest - if not isinstance(v, TruncateJobRequest): - error_messages.append(f"Error! Input type `{type(v)}` is not `TruncateJobRequest`") - else: - match += 1 - # validate data type: DataDumpJobRequest - if not isinstance(v, DataDumpJobRequest): - error_messages.append(f"Error! Input type `{type(v)}` is not `DataDumpJobRequest`") - else: - match += 1 - # validate data type: DataPullJobRequest - if not isinstance(v, DataPullJobRequest): - error_messages.append(f"Error! Input type `{type(v)}` is not `DataPullJobRequest`") - else: - match += 1 - # validate data type: BulkPointQueryJobRequest - if not isinstance(v, BulkPointQueryJobRequest): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkPointQueryJobRequest`") - else: - match += 1 - # validate data type: ExportJobRequest - if not isinstance(v, ExportJobRequest): - error_messages.append(f"Error! Input type `{type(v)}` is not `ExportJobRequest`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in SubmitJobExecutionRequest with oneOf schemas: BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in SubmitJobExecutionRequest with oneOf schemas: BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into ImportProjectJobRequest - try: - instance.actual_instance = ImportProjectJobRequest.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ValidateJobRequest - try: - instance.actual_instance = ValidateJobRequest.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into TruncateJobRequest - try: - instance.actual_instance = TruncateJobRequest.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into DataDumpJobRequest - try: - instance.actual_instance = DataDumpJobRequest.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into DataPullJobRequest - try: - instance.actual_instance = DataPullJobRequest.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into BulkPointQueryJobRequest - try: - instance.actual_instance = BulkPointQueryJobRequest.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ExportJobRequest - try: - instance.actual_instance = ExportJobRequest.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into SubmitJobExecutionRequest with oneOf schemas: BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into SubmitJobExecutionRequest with oneOf schemas: BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/docs/AccountDTO.md b/docs/AccountDTO.md index efa869f..8dd0ed5 100644 --- a/docs/AccountDTO.md +++ b/docs/AccountDTO.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **email** | **str** | | **consent_granted** | **bool** | | [optional] **status** | **str** | | [optional] -**anonymous** | **bool** | | [optional] **phone_number** | **str** | | [optional] **preferences** | [**AccountPreferences**](AccountPreferences.md) | | [optional] **onboarding** | [**AccountOnboardingParameters**](AccountOnboardingParameters.md) | | [optional] diff --git a/docs/AccountJobInfo.md b/docs/AccountJobInfo.md deleted file mode 100644 index 6af0922..0000000 --- a/docs/AccountJobInfo.md +++ /dev/null @@ -1,31 +0,0 @@ -# AccountJobInfo - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**company_name** | **str** | | [optional] -**job_position** | **str** | | [optional] -**industry** | **str** | | [optional] - -## Example - -```python -from cm_python_openapi_sdk.models.account_job_info import AccountJobInfo - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountJobInfo from a JSON string -account_job_info_instance = AccountJobInfo.from_json(json) -# print the JSON string representation of the object -print(AccountJobInfo.to_json()) - -# convert the object into a dict -account_job_info_dict = account_job_info_instance.to_dict() -# create an instance of AccountJobInfo from a dict -account_job_info_from_dict = AccountJobInfo.from_dict(account_job_info_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AccountUtmParameters.md b/docs/AccountUtmParameters.md deleted file mode 100644 index bfcdbb2..0000000 --- a/docs/AccountUtmParameters.md +++ /dev/null @@ -1,32 +0,0 @@ -# AccountUtmParameters - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**medium** | **str** | | [optional] -**source** | **str** | | [optional] -**campaign** | **str** | | [optional] -**referrer** | **str** | | [optional] - -## Example - -```python -from cm_python_openapi_sdk.models.account_utm_parameters import AccountUtmParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountUtmParameters from a JSON string -account_utm_parameters_instance = AccountUtmParameters.from_json(json) -# print the JSON string representation of the object -print(AccountUtmParameters.to_json()) - -# convert the object into a dict -account_utm_parameters_dict = account_utm_parameters_instance.to_dict() -# create an instance of AccountUtmParameters from a dict -account_utm_parameters_from_dict = AccountUtmParameters.from_dict(account_utm_parameters_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AccountsApi.md b/docs/AccountsApi.md index 5212341..e4569a2 100644 --- a/docs/AccountsApi.md +++ b/docs/AccountsApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**change_onboarding**](AccountsApi.md#change_onboarding) | **PUT** /accounts/{accountId}/onboarding | Change account onboarding [**change_preferences**](AccountsApi.md#change_preferences) | **PUT** /accounts/{accountId}/preferences | Change account preferences +[**create_pipedrive_account**](AccountsApi.md#create_pipedrive_account) | **POST** /accounts/pipedrive | Create pipedrive account and save ID to Cognito profile [**delete_account_by_id**](AccountsApi.md#delete_account_by_id) | **DELETE** /accounts/{accountId} | Delete account. [**get_account_by_account_id**](AccountsApi.md#get_account_by_account_id) | **GET** /accounts/{accountId} | Get account by accountId [**get_account_by_email**](AccountsApi.md#get_account_by_email) | **GET** /accounts | Find if account with email exists. @@ -55,7 +56,7 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AccountsApi(api_client) account_id = 'account_id_example' # str | Id of the account - account_onboarding_parameters = cm_python_openapi_sdk.AccountOnboardingParameters() # AccountOnboardingParameters | (optional) + account_onboarding_parameters = {"introShown":["/rest/projects/qkn86k5upo4m9b27/md/views/td9uijp62o8sa27b","/rest/projects/kfdkssvg7rjeri1c/md/views/ul81ijptko8s453t"],"tipsShown":["basicVisualization","extBlockRanking"]} # AccountOnboardingParameters | (optional) try: # Change account onboarding @@ -141,7 +142,7 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AccountsApi(api_client) account_id = 'account_id_example' # str | Id of the account - account_preferences = cm_python_openapi_sdk.AccountPreferences() # AccountPreferences | (optional) + account_preferences = {"language":"en","lastActiveProject":"/rest/projects/kfdkssvg7rjeri1c","sendNewsletter":false} # AccountPreferences | (optional) try: # Change account preferences @@ -182,12 +183,90 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **create_pipedrive_account** +> create_pipedrive_account(create_person_request_dto=create_person_request_dto) + +Create pipedrive account and save ID to Cognito profile + +Create pipedrive account for currently authenticated user and save ID to Cognito profile. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.create_person_request_dto import CreatePersonRequestDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.AccountsApi(api_client) + create_person_request_dto = {"language":"cs","projectIdInvitation":"srb6iq85a8h0ors3"} # CreatePersonRequestDTO | (optional) + + try: + # Create pipedrive account and save ID to Cognito profile + api_instance.create_pipedrive_account(create_person_request_dto=create_person_request_dto) + except Exception as e: + print("Exception when calling AccountsApi->create_pipedrive_account: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_person_request_dto** | [**CreatePersonRequestDTO**](CreatePersonRequestDTO.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Account created | - | +**409** | Account already exists | - | +**500** | Could not create Pipedrive account. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_account_by_id** > delete_account_by_id(account_id) Delete account. -Deletes user account from Okta. Destroys Okta session. Delete from Intercom. +Deletes user account. **Security:** User can delete only himself. diff --git a/docs/AccountsResetPasswordApi.md b/docs/AccountsResetPasswordApi.md deleted file mode 100644 index 8fc0a66..0000000 --- a/docs/AccountsResetPasswordApi.md +++ /dev/null @@ -1,228 +0,0 @@ -# cm_python_openapi_sdk.AccountsResetPasswordApi - -All URIs are relative to *https://staging.dev.clevermaps.io/rest* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**reset_password_with_token**](AccountsResetPasswordApi.md#reset_password_with_token) | **POST** /accounts/passwordReset/{passwordResetToken} | Finish reset password with token -[**send_reset_password_token**](AccountsResetPasswordApi.md#send_reset_password_token) | **POST** /accounts/passwordReset | Ask for reset password token -[**verify_reset_password_token**](AccountsResetPasswordApi.md#verify_reset_password_token) | **GET** /accounts/passwordReset/{passwordResetToken} | Verify reset password token is valid - - -# **reset_password_with_token** -> reset_password_with_token(password_reset_token, reset_password_dto=reset_password_dto) - -Finish reset password with token - -Finish the process of resetting the password by sending a valid token and a new password. -**Security:** -Unauthorized resource, anonymous users are allowed to finish password reset. - - -### Example - - -```python -import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.reset_password_dto import ResetPasswordDTO -from cm_python_openapi_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest -# See configuration.py for a list of all supported configuration parameters. -configuration = cm_python_openapi_sdk.Configuration( - host = "https://staging.dev.clevermaps.io/rest" -) - - -# Enter a context with an instance of the API client -with cm_python_openapi_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = cm_python_openapi_sdk.AccountsResetPasswordApi(api_client) - password_reset_token = 'password_reset_token_example' # str | Password reset token - reset_password_dto = cm_python_openapi_sdk.ResetPasswordDTO() # ResetPasswordDTO | (optional) - - try: - # Finish reset password with token - api_instance.reset_password_with_token(password_reset_token, reset_password_dto=reset_password_dto) - except Exception as e: - print("Exception when calling AccountsResetPasswordApi->reset_password_with_token: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **password_reset_token** | **str**| Password reset token | - **reset_password_dto** | [**ResetPasswordDTO**](ResetPasswordDTO.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Password was reset to new password | - | -**404** | Request token was not found | - | -**400** | New password does not match requirements for passwords (see changePassword for requirements) | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **send_reset_password_token** -> send_reset_password_token(send_reset_password_dto=send_reset_password_dto) - -Ask for reset password token - -Create new request for resetting password. - -**Security:** -Unauthorized resource, anonymous users are allowed to initiate password reset. - - -### Example - - -```python -import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.send_reset_password_dto import SendResetPasswordDTO -from cm_python_openapi_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest -# See configuration.py for a list of all supported configuration parameters. -configuration = cm_python_openapi_sdk.Configuration( - host = "https://staging.dev.clevermaps.io/rest" -) - - -# Enter a context with an instance of the API client -with cm_python_openapi_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = cm_python_openapi_sdk.AccountsResetPasswordApi(api_client) - send_reset_password_dto = cm_python_openapi_sdk.SendResetPasswordDTO() # SendResetPasswordDTO | (optional) - - try: - # Ask for reset password token - api_instance.send_reset_password_token(send_reset_password_dto=send_reset_password_dto) - except Exception as e: - print("Exception when calling AccountsResetPasswordApi->send_reset_password_token: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **send_reset_password_dto** | [**SendResetPasswordDTO**](SendResetPasswordDTO.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created request for resetting password | - | -**404** | No account was found for given email | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **verify_reset_password_token** -> AccountDTO verify_reset_password_token(password_reset_token) - -Verify reset password token is valid - -Test if given token exists and is valid. Returns account which password is resetting. - -**Security:** -Unauthorized resource, anonymous users are allowed to verify password reset token. - - -### Example - - -```python -import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.account_dto import AccountDTO -from cm_python_openapi_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest -# See configuration.py for a list of all supported configuration parameters. -configuration = cm_python_openapi_sdk.Configuration( - host = "https://staging.dev.clevermaps.io/rest" -) - - -# Enter a context with an instance of the API client -with cm_python_openapi_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = cm_python_openapi_sdk.AccountsResetPasswordApi(api_client) - password_reset_token = 'password_reset_token_example' # str | Password reset token - - try: - # Verify reset password token is valid - api_response = api_instance.verify_reset_password_token(password_reset_token) - print("The response of AccountsResetPasswordApi->verify_reset_password_token:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountsResetPasswordApi->verify_reset_password_token: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **password_reset_token** | **str**| Password reset token | - -### Return type - -[**AccountDTO**](AccountDTO.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Information about account | - | -**404** | Request token was not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/AttributeStylesApi.md b/docs/AttributeStylesApi.md index 06caefb..8acea67 100644 --- a/docs/AttributeStylesApi.md +++ b/docs/AttributeStylesApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AttributeStylesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - attribute_style_dto = cm_python_openapi_sdk.AttributeStyleDTO() # AttributeStyleDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + attribute_style_dto = {"name":"delivery_type_attribute_style","type":"attributeStyle","title":"Delivery type","content":{"property":"baskets.courier","categories":[{"title":null,"value":"Picked up","style":{"fillColor":"orange"}},{"title":null,"value":"Delivered","style":{"fillColor":"blue"}}]}} # AttributeStyleDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AttributeStylesApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the attribute style try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AttributeStylesApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AttributeStylesApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the attribute style try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AttributeStylesApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the attribute style try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AttributeStylesApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the attribute style if_match = 'if_match_example' # str | ETag value used for conditional updates - attribute_style_dto = cm_python_openapi_sdk.AttributeStyleDTO() # AttributeStyleDTO | + attribute_style_dto = {"id":"sr1pkd7kmlluqvde","name":"delivery_type_attribute_style","type":"attributeStyle","title":"Updated Delivery type","content":{"property":"baskets.courier","categories":[{"title":null,"value":"Picked up","style":{"fillColor":"pink"}},{"title":null,"value":"Delivered","style":{"fillColor":"lime"}}]},"accessInfo":{"createdAt":"2024-02-08T15:46:21Z","createdBy":"/rest/accounts/e145a4e5-40c1-70dd-541c-c3a5c3d41g1h"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/attributeStyles/sr1pkd7kmlluqvde"}],"version":1} # AttributeStyleDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/AuditLogApi.md b/docs/AuditLogApi.md index 2b10f24..0ffa000 100644 --- a/docs/AuditLogApi.md +++ b/docs/AuditLogApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **get_audit_log_event** -> AuditLogSingleResource get_audit_log_event(event_id, project_id) +> AuditLogSingleResource1 get_audit_log_event(event_id, project_id) Get audit log event by eventId @@ -25,7 +25,7 @@ Resource return only audit log events for those projects where the authenticated ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.audit_log_single_resource import AuditLogSingleResource +from cm_python_openapi_sdk.models.audit_log_single_resource1 import AuditLogSingleResource1 from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -73,7 +73,7 @@ Name | Type | Description | Notes ### Return type -[**AuditLogSingleResource**](AuditLogSingleResource.md) +[**AuditLogSingleResource1**](AuditLogSingleResource1.md) ### Authorization @@ -134,12 +134,12 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AuditLogApi(api_client) project_id = 'project_id_example' # str | Id of the project, used as query parameter - account_id = 'account_id_example' # str | Id of the account, used in query parameters (optional) + account_id = 'account_id_example' # str | Id of the account, used in query parameters for auditlog and jobs history. (optional) event_types = 'search' # str | Event type (optional) var_from = '2019-01-17T19:09:28,918' # str | Timestamp lower bound (UTC timestamp format) (optional) to = '2022-01-17T19:09:28,918' # str | Timestamp upper bound (UTC timestamp format) (optional) last_evaluated_event_id = 'last_evaluated_event_id_example' # str | Last evaluated event ID when requesting next page (optional) - last_evaluated_timestamp = '2020-11-18T08:39:56,199' # str | Last evaluated timestamp when requesting next page (UTC timestamp format) (optional) + last_evaluated_timestamp = 'last_evaluated_timestamp_example' # str | Last evaluated timestamp when requesting next page (UTC timestamp format) (optional) page_size = 56 # int | page size (optional) sort_direction = 'ASC' # str | Sort direction (optional) @@ -160,7 +160,7 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| Id of the project, used as query parameter | - **account_id** | **str**| Id of the account, used in query parameters | [optional] + **account_id** | **str**| Id of the account, used in query parameters for auditlog and jobs history. | [optional] **event_types** | **str**| Event type | [optional] **var_from** | **str**| Timestamp lower bound (UTC timestamp format) | [optional] **to** | **str**| Timestamp upper bound (UTC timestamp format) | [optional] diff --git a/docs/AuditLogSingleResource1.md b/docs/AuditLogSingleResource1.md new file mode 100644 index 0000000..352b51e --- /dev/null +++ b/docs/AuditLogSingleResource1.md @@ -0,0 +1,37 @@ +# AuditLogSingleResource1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_id** | **str** | | +**account_id** | **str** | | +**request_id** | **str** | | [optional] +**remote_host** | **str** | | [optional] +**project_id** | **str** | | +**event_type** | **str** | | +**timestamp** | **str** | | +**content** | **object** | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | + +## Example + +```python +from cm_python_openapi_sdk.models.audit_log_single_resource1 import AuditLogSingleResource1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AuditLogSingleResource1 from a JSON string +audit_log_single_resource1_instance = AuditLogSingleResource1.from_json(json) +# print the JSON string representation of the object +print(AuditLogSingleResource1.to_json()) + +# convert the object into a dict +audit_log_single_resource1_dict = audit_log_single_resource1_instance.to_dict() +# create an instance of AuditLogSingleResource1 from a dict +audit_log_single_resource1_from_dict = AuditLogSingleResource1.from_dict(audit_log_single_resource1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index 5a98050..dc3c891 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -35,7 +35,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AuthenticationApi(api_client) - token_request_dto = cm_python_openapi_sdk.TokenRequestDTO() # TokenRequestDTO | (optional) + token_request_dto = {"refresh_token":"eyJjdHk...QsRvrA"} # TokenRequestDTO | (optional) try: # Get bearer token diff --git a/docs/AvailableDatasetsApi.md b/docs/AvailableDatasetsApi.md index 8f1a855..a2b54e2 100644 --- a/docs/AvailableDatasetsApi.md +++ b/docs/AvailableDatasetsApi.md @@ -48,13 +48,13 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.AvailableDatasetsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster available_datasets_request = cm_python_openapi_sdk.AvailableDatasetsRequest() # AvailableDatasetsRequest | type = 'dwh' # str | If the parameter present, only the datasets of given type(s) are returned. Parameter can be repeated. (optional) subtype = 'geometryPoint' # str | If the parameter present, only the dwh datasets of given subtype(s) are returned. Parameter can be repeated, e.g. `?subtype=geometryLine&subtype=geometryPolygon` If a parameter `type=dwh` is present then a subtype parameter is ignored and all subtypes of dwh datasets are returned. (optional) expand = 'expand_example' # str | Expand datasets to minimalize roundtrips. (optional) - var_from = 'clients.postcode_point' # str | Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alterantively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. (optional) + var_from = 'clients.postcode_point' # str | Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alternatively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. (optional) try: api_response = api_instance.available_datasets(project_id, dwh_cluster_id, available_datasets_request, type=type, subtype=subtype, expand=expand, var_from=var_from) @@ -77,7 +77,7 @@ Name | Type | Description | Notes **type** | **str**| If the parameter present, only the datasets of given type(s) are returned. Parameter can be repeated. | [optional] **subtype** | **str**| If the parameter present, only the dwh datasets of given subtype(s) are returned. Parameter can be repeated, e.g. `?subtype=geometryLine&subtype=geometryPolygon` If a parameter `type=dwh` is present then a subtype parameter is ignored and all subtypes of dwh datasets are returned. | [optional] **expand** | **str**| Expand datasets to minimalize roundtrips. | [optional] - **var_from** | **str**| Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alterantively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. | [optional] + **var_from** | **str**| Specify the dataset foreign key to limit list of available datasets. This allows to find just datasets from one date dimension. Alternatively, you can specify the model subtree by setting a primary key of dataset. In this case, only the dataset specified by it's primary key and the connected datasets will be returned. | [optional] ### Return type diff --git a/docs/AvailableDatasetsForMetric.md b/docs/AvailableDatasetsForMetric.md new file mode 100644 index 0000000..7058a2f --- /dev/null +++ b/docs/AvailableDatasetsForMetric.md @@ -0,0 +1,28 @@ +# AvailableDatasetsForMetric + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from cm_python_openapi_sdk.models.available_datasets_for_metric import AvailableDatasetsForMetric + +# TODO update the JSON string below +json = "{}" +# create an instance of AvailableDatasetsForMetric from a JSON string +available_datasets_for_metric_instance = AvailableDatasetsForMetric.from_json(json) +# print the JSON string representation of the object +print(AvailableDatasetsForMetric.to_json()) + +# convert the object into a dict +available_datasets_for_metric_dict = available_datasets_for_metric_instance.to_dict() +# create an instance of AvailableDatasetsForMetric from a dict +available_datasets_for_metric_from_dict = AvailableDatasetsForMetric.from_dict(available_datasets_for_metric_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AvailableDatasetsResponseContentInner.md b/docs/AvailableDatasetsResponseContentInner.md index ee54c85..8ba1e6a 100644 --- a/docs/AvailableDatasetsResponseContentInner.md +++ b/docs/AvailableDatasetsResponseContentInner.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **metric_id** | **str** | | [optional] -**available_datasets** | **List[object]** | | [optional] +**available_datasets** | [**List[AvailableDatasetsForMetric]**](AvailableDatasetsForMetric.md) | | [optional] ## Example diff --git a/docs/CachesApi.md b/docs/CachesApi.md index 326760d..cad11e8 100644 --- a/docs/CachesApi.md +++ b/docs/CachesApi.md @@ -43,8 +43,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.CachesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster dwh_materialized_cache_id = 'if_0xNW_I7qO2A9-1UmZecWvg' # str | Id of the dwh materialized cache try: diff --git a/docs/CreatePersonRequestDTO.md b/docs/CreatePersonRequestDTO.md new file mode 100644 index 0000000..b106aed --- /dev/null +++ b/docs/CreatePersonRequestDTO.md @@ -0,0 +1,30 @@ +# CreatePersonRequestDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**language** | **str** | | +**project_id_invitation** | **str** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.create_person_request_dto import CreatePersonRequestDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of CreatePersonRequestDTO from a JSON string +create_person_request_dto_instance = CreatePersonRequestDTO.from_json(json) +# print the JSON string representation of the object +print(CreatePersonRequestDTO.to_json()) + +# convert the object into a dict +create_person_request_dto_dict = create_person_request_dto_instance.to_dict() +# create an instance of CreatePersonRequestDTO from a dict +create_person_request_dto_from_dict = CreatePersonRequestDTO.from_dict(create_person_request_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CsvHeaderOverride.md b/docs/CsvHeaderOverride.md new file mode 100644 index 0000000..96cf141 --- /dev/null +++ b/docs/CsvHeaderOverride.md @@ -0,0 +1,30 @@ +# CsvHeaderOverride + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**query_dwh_property_id** | **str** | | +**title** | **str** | | + +## Example + +```python +from cm_python_openapi_sdk.models.csv_header_override import CsvHeaderOverride + +# TODO update the JSON string below +json = "{}" +# create an instance of CsvHeaderOverride from a JSON string +csv_header_override_instance = CsvHeaderOverride.from_json(json) +# print the JSON string representation of the object +print(CsvHeaderOverride.to_json()) + +# convert the object into a dict +csv_header_override_dict = csv_header_override_instance.to_dict() +# create an instance of CsvHeaderOverride from a dict +csv_header_override_from_dict = CsvHeaderOverride.from_dict(csv_header_override_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardsApi.md b/docs/DashboardsApi.md index 09f629c..ed19fd9 100644 --- a/docs/DashboardsApi.md +++ b/docs/DashboardsApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DashboardsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dashboard_dto = cm_python_openapi_sdk.DashboardDTO() # DashboardDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dashboard_dto = {"name":"penetration_dashboard","type":"dashboard","content":{"blockRows":[{"type":"indicator","indicator":"/rest/projects/f76on62tb6bpitbb/md/indicators?name=orders_indicator","indicatorDrill":"/rest/projects/f76on62tb6bpitbb/md/indicatorDrills?name=orders_indicator_drill","layout":"primary"},{"type":"indicator","indicator":"/rest/projects/f76on62tb6bpitbb/md/indicators?name=revenue_indicator","indicatorDrill":"/rest/projects/f76on62tb6bpitbb/md/indicatorDrills?name=revenue_indicator_drill","layout":"primary"},{"type":"indicator","indicator":"/rest/projects/f76on62tb6bpitbb/md/indicators?name=customers_indicator","indicatorDrill":"/rest/projects/f76on62tb6bpitbb/md/indicatorDrills?name=customers_indicator_drill","layout":"primary"},{"type":"indicator","indicator":"/rest/projects/f76on62tb6bpitbb/md/indicators?name=average_order_indicator","indicatorDrill":"/rest/projects/f76on62tb6bpitbb/md/indicatorDrills?name=average_order_indicator_drill","layout":"primary"},{"type":"indicator","indicator":"/rest/projects/f76on62tb6bpitbb/md/indicators?name=orders_per_customer_indicator","indicatorDrill":"/rest/projects/f76on62tb6bpitbb/md/indicatorDrills?name=orders_per_customer_indicator_drill","layout":"primary"}]}} # DashboardDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DashboardsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the dashboard try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DashboardsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DashboardsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the dashboard try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DashboardsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the dashboard try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DashboardsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the dashboard if_match = 'if_match_example' # str | ETag value used for conditional updates - dashboard_dto = cm_python_openapi_sdk.DashboardDTO() # DashboardDTO | + dashboard_dto = {"id":"nf1r3qcht0sbbnct","name":"penetration_dashboard","type":"dashboard","title":"Updated penetration dashboard with removed two blocks in blockRows.","content":{"blockRows":[{"type":"indicator","indicator":"/rest/projects/f76on62tb6bpitbb/md/indicators?name=orders_indicator","indicatorDrill":"/rest/projects/f76on62tb6bpitbb/md/indicatorDrills?name=orders_indicator_drill","layout":"primary"},{"type":"indicator","indicator":"/rest/projects/f76on62tb6bpitbb/md/indicators?name=revenue_indicator","indicatorDrill":"/rest/projects/f76on62tb6bpitbb/md/indicatorDrills?name=revenue_indicator_drill","layout":"primary"},{"type":"indicator","indicator":"/rest/projects/f76on62tb6bpitbb/md/indicators?name=customers_indicator","indicatorDrill":"/rest/projects/f76on62tb6bpitbb/md/indicatorDrills?name=customers_indicator_drill","layout":"primary"}]},"accessInfo":{"createdAt":"2025-08-03T13:21:40Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/dashboards/nf1r3qcht0sbbnct"}],"version":1} # DashboardDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/DataDumpApi.md b/docs/DataDumpApi.md index 5632ed8..ccf25b2 100644 --- a/docs/DataDumpApi.md +++ b/docs/DataDumpApi.md @@ -4,7 +4,7 @@ All URIs are relative to *https://staging.dev.clevermaps.io/rest* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_data_dump**](DataDumpApi.md#get_data_dump) | **GET** /projects/{projectId}/data/dumps/{dumpId} | Get data dump file +[**get_data_dump**](DataDumpApi.md#get_data_dump) | **GET** /projects/{projectId}/dwh/data/dumps/{dumpId} | Get data dump file # **get_data_dump** @@ -55,7 +55,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DataDumpApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project dump_id = '1fuYh8ApOR1rwu3Zo8xqI0p333jnrLEU' # str | ID of dump returned as result of job try: diff --git a/docs/DataPermissionsApi.md b/docs/DataPermissionsApi.md index 47940fd..0dc3684 100644 --- a/docs/DataPermissionsApi.md +++ b/docs/DataPermissionsApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DataPermissionsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - data_permission_dto = cm_python_openapi_sdk.DataPermissionDTO() # DataPermissionDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + data_permission_dto = {"name":"data_permission_3","type":"dataPermission","description":"Permission allowing to view only stores in Zlinsky kraj.","content":{"accountId":"2f9263dc-aef4-4389-bcb6-9d232cb8a041","email":"jack@clevermaps.io","filters":[{"property":"region_dwh.name","value":"Zlinsky kraj","operator":"eq"}]}} # DataPermissionDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DataPermissionsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the data permission try: @@ -212,7 +212,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DataPermissionsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -296,7 +296,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DataPermissionsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the data permission try: @@ -377,7 +377,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DataPermissionsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the data permission try: @@ -459,10 +459,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DataPermissionsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the data permission if_match = 'if_match_example' # str | ETag value used for conditional updates - data_permission_dto = cm_python_openapi_sdk.DataPermissionDTO() # DataPermissionDTO | + data_permission_dto = {"id":"fdedgoz8zyz4zqqv","name":"data_permission_3","type":"dataPermission","description":"Updating permission allowing to view only stores in Zlinsky kraj.","content":{"accountId":"2f9263dc-aef4-4389-bcb6-9d232cb8a041","email":"jack@clevermaps.io","filters":[{"property":"region_dwh.name","value":"Zlinsky kraj","operator":"eq"}]},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/dataPermissions/fdedgoz8zyz4zqqv"}],"version":1} # DataPermissionDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/DataSourcesApi.md b/docs/DataSourcesApi.md index 8e879e7..07f3189 100644 --- a/docs/DataSourcesApi.md +++ b/docs/DataSourcesApi.md @@ -42,7 +42,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DataSourcesApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) diff --git a/docs/DataUploadApi.md b/docs/DataUploadApi.md index d32a769..8671375 100644 --- a/docs/DataUploadApi.md +++ b/docs/DataUploadApi.md @@ -52,7 +52,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DataUploadApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'nogeLAvMPlITfWC66ztEDOW6Vl3bwRrn' # str | data_complete_multipart_upload_request = cm_python_openapi_sdk.DataCompleteMultipartUploadRequest() # DataCompleteMultipartUploadRequest | @@ -154,7 +154,7 @@ Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ```json { "type": "dataPull", - "projectId": "ncesksvg7rjeri7v", + "projectId": "f76on62tb6bpitbb", "content": { "dataset": "mystores", "mode": "full", @@ -175,7 +175,7 @@ Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ```json { "type": "dataPull", - "projectId": "ncesksvg7rjeri7v", + "projectId": "f76on62tb6bpitbb", "content": { "dataset": "mystores", "mode": "full", @@ -207,7 +207,7 @@ With **CsvOptions**, you can specify how the CSV should be processed. The availa ```json { "type": "dataPull", - "projectId": "ncesksvg7rjeri7v", + "projectId": "f76on62tb6bpitbb", "content": { "dataset": "mystores", "mode": "full", @@ -263,7 +263,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DataUploadApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project parts = 56 # int | (optional) try: diff --git a/docs/DatasetsApi.md b/docs/DatasetsApi.md index 972c3f7..478763f 100644 --- a/docs/DatasetsApi.md +++ b/docs/DatasetsApi.md @@ -51,8 +51,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DatasetsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dataset_dto = cm_python_openapi_sdk.DatasetDTO() # DatasetDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dataset_dto = {"name":"clients","type":"dataset","title":"Clients","origin":"https://secure.clevermaps.io/rest/projects/f76on62tb6bpitbb/md/datasets?name=clients","properties":{"featureTitle":{"type":"property","value":"client_id"}},"ref":{"subtype":"basic","type":"dwh","table":"clients","primaryKey":"client_id","properties":[{"name":"client_id","title":"Client ID","column":"client_id","type":"integer","filterable":false},{"name":"postcode","title":"postcode","column":"postcode","type":"string","filterable":false}]}} # DatasetDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -134,7 +134,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DatasetsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the dataset try: @@ -213,9 +213,9 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DatasetsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'baskets' # str | Name of the dataset - body = 'body_example' # str | + body = basket_id,date_iso,shop_id,client_id,amount,on_off_name,courier,value_name 2087008,2017-05-31,7,2003018,15.250000,Online,Picked up,£10 - £25 2087027,2017-05-14,4,2003410,63.640000,Online,Picked up,£50 - £100 2087039,2017-05-31,1,8139,85.640000,Offline,Picked up,£50 - £100 2087057,2017-05-18,1,8694,42.560000,Offline,Picked up,£25 - £50 2087070,2017-05-31,2,23128,95.180000,Online,Picked up,£50 - £100 # str | subtype = 'basic' # str | Subtype of the dataset (optional) (default to 'basic') primary_key = 'basic_id' # str | Name of the property that will be marked as primary key (optional) geometry = 'geometry_example' # str | Name of the geometry key for geometryPolygon dataset subtype (optional) @@ -270,6 +270,7 @@ Name | Type | Description | Notes **400** | When a parameter is invalid, or CSV body parsing fails, or the CSV does not contain specific columns | - | **409** | When the specified name of the dataset already exists | - | **413** | When the CSV body is larger than 10 lines | - | +**415** | Check Content-Type header - only text/csv, text/csv;charset=UTF-8, text/csv;charset=utf-8 is supported. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -308,7 +309,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DatasetsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -392,7 +393,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DatasetsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the dataset try: @@ -471,7 +472,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DatasetsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the dataset try: @@ -553,10 +554,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DatasetsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the dataset if_match = 'if_match_example' # str | ETag value used for conditional updates - dataset_dto = cm_python_openapi_sdk.DatasetDTO() # DatasetDTO | + dataset_dto = {"id":"hb8ugmblksj0p0go","name":"clients","type":"dataset","title":"Updated clients dataset by adding address","origin":"https://secure.clevermaps.io/rest/projects/f76on62tb6bpitbb/md/datasets?name=clients","properties":{"featureTitle":{"type":"property","value":"client_id"}},"ref":{"subtype":"basic","type":"dwh","table":"clients","primaryKey":"client_id","properties":[{"name":"client_id","title":"Client ID","column":"client_id","type":"integer","filterable":false},{"name":"postcode","title":"postcode","column":"postcode","type":"string","filterable":false},{"name":"address","title":"Address","column":"address","type":"string","filterable":false}]},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/datasets/hb8ugmblksj0p0go"}],"version":1} # DatasetDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/DateRangesApi.md b/docs/DateRangesApi.md index 6b4263a..47f4d89 100644 --- a/docs/DateRangesApi.md +++ b/docs/DateRangesApi.md @@ -51,8 +51,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DateRangesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster dwh_date_range_request = cm_python_openapi_sdk.DwhDateRangeRequest() # DwhDateRangeRequest | try: @@ -135,9 +135,9 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.DateRangesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster - dwh_cache_id = 'q:vb2b3d8v91jao331:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster + dwh_cache_id = 'q:f76on62tb6bpitbb:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache try: # Get date ranges diff --git a/docs/DwhDateRangeFilter.md b/docs/DwhDateRangeFilter.md new file mode 100644 index 0000000..8718e4d --- /dev/null +++ b/docs/DwhDateRangeFilter.md @@ -0,0 +1,30 @@ +# DwhDateRangeFilter + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | [**DateFilterDefaultValueType**](DateFilterDefaultValueType.md) | | [optional] +**end_date** | [**DateFilterDefaultValueType**](DateFilterDefaultValueType.md) | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.dwh_date_range_filter import DwhDateRangeFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of DwhDateRangeFilter from a JSON string +dwh_date_range_filter_instance = DwhDateRangeFilter.from_json(json) +# print the JSON string representation of the object +print(DwhDateRangeFilter.to_json()) + +# convert the object into a dict +dwh_date_range_filter_dict = dwh_date_range_filter_instance.to_dict() +# create an instance of DwhDateRangeFilter from a dict +dwh_date_range_filter_from_dict = DwhDateRangeFilter.from_dict(dwh_date_range_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DwhDateRangeRequest.md b/docs/DwhDateRangeRequest.md index 1a94637..106749b 100644 --- a/docs/DwhDateRangeRequest.md +++ b/docs/DwhDateRangeRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **execution_context** | [**ExecutionContext**](ExecutionContext.md) | | [optional] **var_from** | **str** | defines the date property in a fact table | -**filter** | [**DwhDateRangeRequestFilter**](DwhDateRangeRequestFilter.md) | | [optional] +**filter** | [**DwhDateRangeFilter**](DwhDateRangeFilter.md) | | [optional] ## Example diff --git a/docs/DwhMetricValuesDistributionRequest.md b/docs/DwhMetricValuesDistributionRequest.md new file mode 100644 index 0000000..9ccea9d --- /dev/null +++ b/docs/DwhMetricValuesDistributionRequest.md @@ -0,0 +1,31 @@ +# DwhMetricValuesDistributionRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**buckets** | **int** | | [optional] +**breakpoints** | **List[float]** | | [optional] +**query** | [**DwhQueryRequest1**](DwhQueryRequest1.md) | | + +## Example + +```python +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_request import DwhMetricValuesDistributionRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DwhMetricValuesDistributionRequest from a JSON string +dwh_metric_values_distribution_request_instance = DwhMetricValuesDistributionRequest.from_json(json) +# print the JSON string representation of the object +print(DwhMetricValuesDistributionRequest.to_json()) + +# convert the object into a dict +dwh_metric_values_distribution_request_dict = dwh_metric_values_distribution_request_instance.to_dict() +# create an instance of DwhMetricValuesDistributionRequest from a dict +dwh_metric_values_distribution_request_from_dict = DwhMetricValuesDistributionRequest.from_dict(dwh_metric_values_distribution_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DwhMetricValuesDistributionResponse1.md b/docs/DwhMetricValuesDistributionResponse1.md new file mode 100644 index 0000000..4255616 --- /dev/null +++ b/docs/DwhMetricValuesDistributionResponse1.md @@ -0,0 +1,29 @@ +# DwhMetricValuesDistributionResponse1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**List[DwhMetricValuesDistributionResponseContentInner]**](DwhMetricValuesDistributionResponseContentInner.md) | | + +## Example + +```python +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response1 import DwhMetricValuesDistributionResponse1 + +# TODO update the JSON string below +json = "{}" +# create an instance of DwhMetricValuesDistributionResponse1 from a JSON string +dwh_metric_values_distribution_response1_instance = DwhMetricValuesDistributionResponse1.from_json(json) +# print the JSON string representation of the object +print(DwhMetricValuesDistributionResponse1.to_json()) + +# convert the object into a dict +dwh_metric_values_distribution_response1_dict = dwh_metric_values_distribution_response1_instance.to_dict() +# create an instance of DwhMetricValuesDistributionResponse1 from a dict +dwh_metric_values_distribution_response1_from_dict = DwhMetricValuesDistributionResponse1.from_dict(dwh_metric_values_distribution_response1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExplainApi.md b/docs/ExplainApi.md index 55ebb6e..3d5270b 100644 --- a/docs/ExplainApi.md +++ b/docs/ExplainApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **explain** -> str explain(project_id, dwh_cluster_id, page=page, size=size) +> str explain(project_id, dwh_cluster_id, dwh_query_request1, page=page, size=size) Explain query @@ -21,6 +21,7 @@ This resource is useful for debugging and tuning DWH queries. The resource accep ```python import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.dwh_query_request1 import DwhQueryRequest1 from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -44,14 +45,15 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ExplainApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster + dwh_query_request1 = cm_python_openapi_sdk.DwhQueryRequest1() # DwhQueryRequest1 | page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) try: # Explain query - api_response = api_instance.explain(project_id, dwh_cluster_id, page=page, size=size) + api_response = api_instance.explain(project_id, dwh_cluster_id, dwh_query_request1, page=page, size=size) print("The response of ExplainApi->explain:\n") pprint(api_response) except Exception as e: @@ -67,6 +69,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| Id of the project | **dwh_cluster_id** | **str**| Id of the dwh cluster | + **dwh_query_request1** | [**DwhQueryRequest1**](DwhQueryRequest1.md)| | **page** | **int**| Number of the page | [optional] [default to 0] **size** | **int**| The count of records to return for one page | [optional] [default to 100] @@ -80,7 +83,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: text/plain;charset=UTF-8 ### HTTP response details diff --git a/docs/ExportApi.md b/docs/ExportApi.md index aca5b81..1fa2601 100644 --- a/docs/ExportApi.md +++ b/docs/ExportApi.md @@ -44,7 +44,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ExportApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project export_id = '1fuYh8ApOR1rwu3Zo8xqI0p333jnrLEU' # str | ID of export returned as result of job try: diff --git a/docs/ExportRequest.md b/docs/ExportRequest.md index dd18d53..a3f7c60 100644 --- a/docs/ExportRequest.md +++ b/docs/ExportRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **format** | **str** | | +**csv_header_overrides** | [**List[CsvHeaderOverride]**](CsvHeaderOverride.md) | | [optional] **csv_header_format** | **str** | | [optional] **query** | **object** | | **csv_options** | [**ExportRequestCsvOptions**](ExportRequestCsvOptions.md) | | [optional] diff --git a/docs/ExportsApi.md b/docs/ExportsApi.md index f9e1516..9d67744 100644 --- a/docs/ExportsApi.md +++ b/docs/ExportsApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ExportsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - export_dto = cm_python_openapi_sdk.ExportDTO() # ExportDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + export_dto = {"name":"project_export_1","type":"export","title":"Export version 1","description":"All delayed orders made in specific city districts.","content":{"properties":["city_district_dwh.name","city_district_dwh.upper_name","orders_dwh.id","orders_dwh.id_user","orders_dwh.date","orders_dwh.price","orders_dwh.delay"]}} # ExportDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ExportsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the export try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ExportsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ExportsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the export try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ExportsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the export try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ExportsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the export if_match = 'if_match_example' # str | ETag value used for conditional updates - export_dto = cm_python_openapi_sdk.ExportDTO() # ExportDTO | + export_dto = {"id":"eqf3525q9jbs2hff","name":"project_export_1","type":"export","title":"Updated export version 1","description":"All delayed orders made in specific city districts.","content":{"properties":["city_district_dwh.name","city_district_dwh.upper_name","orders_dwh.id","orders_dwh.id_user","orders_dwh.date","orders_dwh.price","orders_dwh.delay","orders_dwh.address"]},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/exports/eqf3525q9jbs2hff"}],"version":1} # ExportDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/FunctionGreatestLeastTypeGeneral.md b/docs/FunctionGreatestLeastTypeGeneral.md new file mode 100644 index 0000000..17275dd --- /dev/null +++ b/docs/FunctionGreatestLeastTypeGeneral.md @@ -0,0 +1,31 @@ +# FunctionGreatestLeastTypeGeneral + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | +**content** | **List[object]** | | + +## Example + +```python +from cm_python_openapi_sdk.models.function_greatest_least_type_general import FunctionGreatestLeastTypeGeneral + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionGreatestLeastTypeGeneral from a JSON string +function_greatest_least_type_general_instance = FunctionGreatestLeastTypeGeneral.from_json(json) +# print the JSON string representation of the object +print(FunctionGreatestLeastTypeGeneral.to_json()) + +# convert the object into a dict +function_greatest_least_type_general_dict = function_greatest_least_type_general_instance.to_dict() +# create an instance of FunctionGreatestLeastTypeGeneral from a dict +function_greatest_least_type_general_from_dict = FunctionGreatestLeastTypeGeneral.from_dict(function_greatest_least_type_general_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FunctionLogExpTypeGeneral.md b/docs/FunctionLogExpTypeGeneral.md new file mode 100644 index 0000000..78d6967 --- /dev/null +++ b/docs/FunctionLogExpTypeGeneral.md @@ -0,0 +1,31 @@ +# FunctionLogExpTypeGeneral + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | +**content** | **List[object]** | | + +## Example + +```python +from cm_python_openapi_sdk.models.function_log_exp_type_general import FunctionLogExpTypeGeneral + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionLogExpTypeGeneral from a JSON string +function_log_exp_type_general_instance = FunctionLogExpTypeGeneral.from_json(json) +# print the JSON string representation of the object +print(FunctionLogExpTypeGeneral.to_json()) + +# convert the object into a dict +function_log_exp_type_general_dict = function_log_exp_type_general_instance.to_dict() +# create an instance of FunctionLogExpTypeGeneral from a dict +function_log_exp_type_general_from_dict = FunctionLogExpTypeGeneral.from_dict(function_log_exp_type_general_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FunctionNtileContentInner.md b/docs/FunctionNtileContentInner.md deleted file mode 100644 index eeb6036..0000000 --- a/docs/FunctionNtileContentInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# FunctionNtileContentInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**type** | **str** | | -**content** | **List[object]** | | -**options** | **object** | | [optional] - -## Example - -```python -from cm_python_openapi_sdk.models.function_ntile_content_inner import FunctionNtileContentInner - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionNtileContentInner from a JSON string -function_ntile_content_inner_instance = FunctionNtileContentInner.from_json(json) -# print the JSON string representation of the object -print(FunctionNtileContentInner.to_json()) - -# convert the object into a dict -function_ntile_content_inner_dict = function_ntile_content_inner_instance.to_dict() -# create an instance of FunctionNtileContentInner from a dict -function_ntile_content_inner_from_dict = FunctionNtileContentInner.from_dict(function_ntile_content_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GeosearchApi.md b/docs/GeosearchApi.md index f12c5d5..4930d7e 100644 --- a/docs/GeosearchApi.md +++ b/docs/GeosearchApi.md @@ -50,7 +50,7 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: size = 100 # int | The count of records to return for one page (optional) (default to 100) country = 'GB' # str | Array of ISO 3166 alpha-2 country codes to limit the search. (optional) language = 'en' # str | Language to use for query results as defined by ISO 639-1. (optional) - types = 'city, locality, address' # str | Array of place types, available types are [region, district, city, locality, address, postcode] (optional) + types = 'city,locality,address' # str | Array of place types, available types are [region, district, city, street, locality, address, postcode] (optional) try: # Geographic search @@ -73,7 +73,7 @@ Name | Type | Description | Notes **size** | **int**| The count of records to return for one page | [optional] [default to 100] **country** | **str**| Array of ISO 3166 alpha-2 country codes to limit the search. | [optional] **language** | **str**| Language to use for query results as defined by ISO 639-1. | [optional] - **types** | **str**| Array of place types, available types are [region, district, city, locality, address, postcode] | [optional] + **types** | **str**| Array of place types, available types are [region, district, city, street, locality, address, postcode] | [optional] ### Return type diff --git a/docs/GetAccountByAccountId200Response.md b/docs/GetAccountByAccountId200Response.md index c576219..134f97c 100644 --- a/docs/GetAccountByAccountId200Response.md +++ b/docs/GetAccountByAccountId200Response.md @@ -11,7 +11,6 @@ Name | Type | Description | Notes **status** | **str** | | **preferences** | [**AccountPreferences**](AccountPreferences.md) | | [optional] **consent_granted** | **bool** | | [optional] -**anonymous** | **bool** | | [optional] **phone_number** | **str** | | [optional] **onboarding** | [**AccountOnboardingParameters**](AccountOnboardingParameters.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] diff --git a/docs/IndicatorDrillsApi.md b/docs/IndicatorDrillsApi.md index e44a1a7..d105f7b 100644 --- a/docs/IndicatorDrillsApi.md +++ b/docs/IndicatorDrillsApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorDrillsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - indicator_drill_dto = cm_python_openapi_sdk.IndicatorDrillDTO() # IndicatorDrillDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + indicator_drill_dto = {"name":"average_purchase_indicator_drill","type":"indicatorDrill","content":{"blocks":[{"type":"distribution"},{"type":"ranking"},{"type":"timeSeries"},{"type":"categories","title":"Average Purchase value by channel","description":"Average Purchase value by channel","splitProperty":"baskets.on_off_name","orderBy":{"property":"baskets.on_off_name","direction":"desc"}}]}} # IndicatorDrillDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorDrillsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the indicator drill try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorDrillsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorDrillsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the indicator drill try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorDrillsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the indicator drill try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorDrillsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the indicator drill if_match = 'if_match_example' # str | ETag value used for conditional updates - indicator_drill_dto = cm_python_openapi_sdk.IndicatorDrillDTO() # IndicatorDrillDTO | + indicator_drill_dto = {"id":"nmhelks1t913n43a","name":"average_purchase_indicator_drill","type":"indicatorDrill","title":"Added title to drill","content":{"blocks":[{"type":"distribution"},{"type":"ranking"},{"type":"timeSeries"},{"type":"categories","title":"Average Purchase value by channel","description":"Average Purchase value by channel","splitProperty":"baskets.on_off_name","orderBy":{"property":"baskets.on_off_name","direction":"desc"}}]},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/indicatorDrills/nmhelks1t913n43a"}],"version":1} # IndicatorDrillDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/IndicatorsApi.md b/docs/IndicatorsApi.md index 0ced48a..6e64484 100644 --- a/docs/IndicatorsApi.md +++ b/docs/IndicatorsApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - indicator_dto = cm_python_openapi_sdk.IndicatorDTO() # IndicatorDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + indicator_dto = {"name":"average_purchase_indicator","type":"indicator","title":"Average purchase","description":"Average purchase value of a customer","content":{"metric":"/rest/projects/f76on62tb6bpitbb/md/metrics?name=average_purchase_metric","scale":"standard","distribution":"uniform","format":{"type":"number","fraction":1,"symbol":"£"}}} # IndicatorDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the indicator try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the indicator try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the indicator try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.IndicatorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the indicator if_match = 'if_match_example' # str | ETag value used for conditional updates - indicator_dto = cm_python_openapi_sdk.IndicatorDTO() # IndicatorDTO | + indicator_dto = {"id":"utvm7qp1i0qu0eaa","name":"average_purchase_indicator","type":"indicator","title":"Updated Average purchase","description":"Average purchase value of a customer","content":{"metric":"/rest/projects/f76on62tb6bpitbb/md/metrics?name=average_purchase_metric","scale":"standard","distribution":"uniform","format":{"type":"number","fraction":1,"symbol":"$"}},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/indicators/utvm7qp1i0qu0eaa"}],"version":1} # IndicatorDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/InvitationsApi.md b/docs/InvitationsApi.md new file mode 100644 index 0000000..25ac480 --- /dev/null +++ b/docs/InvitationsApi.md @@ -0,0 +1,458 @@ +# cm_python_openapi_sdk.InvitationsApi + +All URIs are relative to *https://staging.dev.clevermaps.io/rest* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_invitation**](InvitationsApi.md#create_invitation) | **POST** /projects/{projectId}/invitations | Create new invitation to the project for a user. +[**delete_invitation**](InvitationsApi.md#delete_invitation) | **DELETE** /projects/{projectId}/invitations/{invitationId} | Delete invitation. +[**get_invitation_by_id**](InvitationsApi.md#get_invitation_by_id) | **GET** /projects/{projectId}/invitations/{invitationId} | Get detail of an invitation. +[**get_invitations**](InvitationsApi.md#get_invitations) | **GET** /projects/{projectId}/invitations | Get list of project invitations. +[**update_invitation**](InvitationsApi.md#update_invitation) | **PUT** /projects/{projectId}/invitations/{invitationId} | Update invitation. + + +# **create_invitation** +> InvitationDTO create_invitation(project_id, create_invitation) + +Create new invitation to the project for a user. + +User is specified by email address and invitation contains a project role. + +**Security:** +Restricted to ADMIN project role. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.create_invitation import CreateInvitation +from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.InvitationsApi(api_client) + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + create_invitation = {"email":"john.smith@clevermaps.io","role":"VIEWER"} # CreateInvitation | + + try: + # Create new invitation to the project for a user. + api_response = api_instance.create_invitation(project_id, create_invitation) + print("The response of InvitationsApi->create_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationsApi->create_invitation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **create_invitation** | [**CreateInvitation**](CreateInvitation.md)| | + +### Return type + +[**InvitationDTO**](InvitationDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | New invitation was created and sent to email. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_invitation** +> InvitationDTO delete_invitation(project_id, invitation_id) + +Delete invitation. + +If an invitation has status `PENDING`, project Admin can cancel it by calling the `DELETE` method. +Calling the `DELETE` method is equivalent to sending a `PUT` request with the status `CANCELED` as described above. + +**Security:** +Restricted to ADMIN project role. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.InvitationsApi(api_client) + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + invitation_id = 'invitation_id_example' # str | Id of the invitation + + try: + # Delete invitation. + api_response = api_instance.delete_invitation(project_id, invitation_id) + print("The response of InvitationsApi->delete_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationsApi->delete_invitation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **invitation_id** | **str**| Id of the invitation | + +### Return type + +[**InvitationDTO**](InvitationDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful update | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_invitation_by_id** +> InvitationDTO get_invitation_by_id(project_id, invitation_id) + +Get detail of an invitation. + +An invitation status value is one of: +- PENDING +- ACCEPTED +- CANCELED +- EXPIRED + +**Security:** +Restricted to ADMIN project role. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.InvitationsApi(api_client) + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + invitation_id = 'invitation_id_example' # str | Id of the invitation + + try: + # Get detail of an invitation. + api_response = api_instance.get_invitation_by_id(project_id, invitation_id) + print("The response of InvitationsApi->get_invitation_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationsApi->get_invitation_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **invitation_id** | **str**| Id of the invitation | + +### Return type + +[**InvitationDTO**](InvitationDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_invitations** +> InvitationPagedModelDTO get_invitations(project_id, size=size, page=page, sort=sort, status=status) + +Get list of project invitations. + +**Security:** +Restricted to ADMIN project role. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.invitation_paged_model_dto import InvitationPagedModelDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.InvitationsApi(api_client) + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + size = 100 # int | The count of records to return for one page (optional) (default to 100) + page = 0 # int | Number of the page (optional) (default to 0) + sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) + status = 'PENDING' # str | Filter invitations by status attribute. (optional) + + try: + # Get list of project invitations. + api_response = api_instance.get_invitations(project_id, size=size, page=page, sort=sort, status=status) + print("The response of InvitationsApi->get_invitations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationsApi->get_invitations: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **size** | **int**| The count of records to return for one page | [optional] [default to 100] + **page** | **int**| Number of the page | [optional] [default to 0] + **sort** | **str**| Name of the attribute to use for sorting the results, together with direction (asc or desc) | [optional] + **status** | **str**| Filter invitations by status attribute. | [optional] + +### Return type + +[**InvitationPagedModelDTO**](InvitationPagedModelDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_invitation** +> InvitationDTO update_invitation(project_id, invitation_id, update_invitation) + +Update invitation. + +Cancel or resend project invitation. If an invitation has status `PENDING`, project Admin can cancel it. +If the invitation has status `CANCELED`, `EXPIRED` or `PENDING`, user can activate it or resend the invitation email by PUTing the status `PENDING`. + +Invitations with status `ACCEPTED` cannot be updated anymore. + +**Allowed status transitions:** + +| Original Status | PUT Request | New Status | +|---------------|------------|------------| +| CANCELED | PENDING | PENDING | +| EXPIRED | PENDING | PENDING | +| PENDING | CANCELED | CANCELED | + +**Security:** +Restricted to ADMIN project role. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO +from cm_python_openapi_sdk.models.update_invitation import UpdateInvitation +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.InvitationsApi(api_client) + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + invitation_id = 'invitation_id_example' # str | Id of the invitation + update_invitation = {"status":"CANCELED"} # UpdateInvitation | + + try: + # Update invitation. + api_response = api_instance.update_invitation(project_id, invitation_id, update_invitation) + print("The response of InvitationsApi->update_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationsApi->update_invitation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **invitation_id** | **str**| Id of the invitation | + **update_invitation** | [**UpdateInvitation**](UpdateInvitation.md)| | + +### Return type + +[**InvitationDTO**](InvitationDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful update | - | +**400** | Invitation cannot be updated (unexpected invitation state - already accepted, canceled) | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/JobsApi.md b/docs/JobsApi.md index 353ab9c..843202a 100644 --- a/docs/JobsApi.md +++ b/docs/JobsApi.md @@ -145,9 +145,9 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.JobsApi(api_client) project_id = 'project_id_example' # str | Id of the project, used as query parameter - account_id = 'account_id_example' # str | Id of the account, used in query parameters (optional) + account_id = 'account_id_example' # str | Id of the account, used in query parameters for auditlog and jobs history. (optional) sort_direction = 'ASC' # str | Sort direction (optional) - last_evaluated_timestamp = '2020-11-18T08:39:56,199' # str | Last evaluated timestamp when requesting next page (UTC timestamp format) (optional) + last_evaluated_timestamp = 'last_evaluated_timestamp_example' # str | Last evaluated timestamp when requesting next page (UTC timestamp format) (optional) type = 'export' # str | Jobs type (optional) dataset = 'dataset_example' # str | (optional) @@ -168,7 +168,7 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| Id of the project, used as query parameter | - **account_id** | **str**| Id of the account, used in query parameters | [optional] + **account_id** | **str**| Id of the account, used in query parameters for auditlog and jobs history. | [optional] **sort_direction** | **str**| Sort direction | [optional] **last_evaluated_timestamp** | **str**| Last evaluated timestamp when requesting next page (UTC timestamp format) | [optional] **type** | **str**| Jobs type | [optional] @@ -249,7 +249,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.JobsApi(api_client) - general_job_request = cm_python_openapi_sdk.GeneralJobRequest() # GeneralJobRequest | Successful response + general_job_request = {"type":"dataDump","projectId":"f76on62tb6bpitbb","content":{"dataset":"mystores"}} # GeneralJobRequest | Successful response try: # Submit job execution diff --git a/docs/MandatoryKeysForPagableResponse.md b/docs/MandatoryKeysForPagableResponse.md deleted file mode 100644 index 470d7fa..0000000 --- a/docs/MandatoryKeysForPagableResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# MandatoryKeysForPagableResponse - -define keys links and page that are mandatory for all pageble responses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**size** | **int** | | -**total_elements** | **object** | | -**total_pages** | **int** | | -**number** | **int** | | - -## Example - -```python -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of MandatoryKeysForPagableResponse from a JSON string -mandatory_keys_for_pagable_response_instance = MandatoryKeysForPagableResponse.from_json(json) -# print the JSON string representation of the object -print(MandatoryKeysForPagableResponse.to_json()) - -# convert the object into a dict -mandatory_keys_for_pagable_response_dict = mandatory_keys_for_pagable_response_instance.to_dict() -# create an instance of MandatoryKeysForPagableResponse from a dict -mandatory_keys_for_pagable_response_from_dict = MandatoryKeysForPagableResponse.from_dict(mandatory_keys_for_pagable_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MapsApi.md b/docs/MapsApi.md index 81fa214..6158b66 100644 --- a/docs/MapsApi.md +++ b/docs/MapsApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MapsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - map_dto = cm_python_openapi_sdk.MapDTO() # MapDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + map_dto = {"name":"catchment_area_map","type":"map","content":{"options":{"center":{"lat":52.47,"lng":-1.88},"zoom":12,"minZoom":0,"maxZoom":18},"baseLayer":{"type":"mapbox"},"contextMenu":{"items":[{"type":"googleSatellite"},{"type":"googleStreetView"}]},"layers":[{"name":"layer_1","indicator":"inherit","baseStyle":{"fillColor":"pink","outlineColor":"turquoise"},"showIndicatorValueLabels":false,"clusterPoints":true,"keepFiltered":false,"visible":true,"datasets":[{"dataset":"/rest/projects/f76on62tb6bpitbb/md/datasets?name=baskets","visualization":"dotmap"}]}]}} # MapDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MapsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the map try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MapsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MapsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the map try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MapsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the map try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MapsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the map if_match = 'if_match_example' # str | ETag value used for conditional updates - map_dto = cm_python_openapi_sdk.MapDTO() # MapDTO | + map_dto = {"example":{"id":"gkymg56h8d55gtu5","name":"catchment_area_map","type":"map","content":{"options":{"center":{"lat":52.47,"lng":-1.88},"zoom":12,"minZoom":0,"maxZoom":18},"baseLayer":{"type":"mapbox"},"contextMenu":{"items":[{"type":"googleSatellite"},{"type":"googleStreetView"}]},"layers":[{"name":"layer_1","indicator":"inherit","baseStyle":{"fillColor":"pink","outlineColor":"turquoise"},"showIndicatorValueLabels":false,"clusterPoints":true,"keepFiltered":false,"visible":true,"datasets":[{"dataset":"/rest/projects/f76on62tb6bpitbb/md/datasets?name=baskets","visualization":"dotmap"}]}]},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/maps/gkymg56h8d55gtu5"}],"version":2}} # MapDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/MarkerSelectorsApi.md b/docs/MarkerSelectorsApi.md index df871a1..a42e8a5 100644 --- a/docs/MarkerSelectorsApi.md +++ b/docs/MarkerSelectorsApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkerSelectorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - marker_selector_dto = cm_python_openapi_sdk.MarkerSelectorDTO() # MarkerSelectorDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + marker_selector_dto = {"name":"shops_marker_selector","type":"markerSelector","content":{"categories":[{"dataset":"/rest/projects/f76on62tb6bpitbb/md/datasets?name=shops","markers":[{"marker":"/rest/projects/f76on62tb6bpitbb/md/markers?name=shops_marker","visible":true},{"marker":"/rest/projects/f76on62tb6bpitbb/md/markers?name=partners_marker","visible":true}]}]}} # MarkerSelectorDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkerSelectorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the marker selector try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkerSelectorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkerSelectorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the marker selector try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkerSelectorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the marker selector try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkerSelectorsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the marker selector if_match = 'if_match_example' # str | ETag value used for conditional updates - marker_selector_dto = cm_python_openapi_sdk.MarkerSelectorDTO() # MarkerSelectorDTO | + marker_selector_dto = {"id":"glrqdativpenfdk5","name":"shops_marker_selector","type":"markerSelector","title":"Added title","content":{"categories":[{"dataset":"/rest/projects/f76on62tb6bpitbb/md/datasets?name=shops","markers":[{"marker":"/rest/projects/f76on62tb6bpitbb/md/markers?name=shops_marker","visible":true},{"marker":"/rest/projects/f76on62tb6bpitbb/md/markers?name=partners_marker","visible":true}]}]},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/markerSelectors/glrqdativpenfdk5"}],"version":1} # MarkerSelectorDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/MarkersApi.md b/docs/MarkersApi.md index 2b3f10f..9f3edb0 100644 --- a/docs/MarkersApi.md +++ b/docs/MarkersApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkersApi(api_client) - project_id = 'project_id_example' # str | Id of the project - marker_dto = cm_python_openapi_sdk.MarkerDTO() # MarkerDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + marker_dto = {"name":"partners_marker","type":"marker","title":"Pick Up Partners","content":{"style":"marker-green","propertyFilters":[{"propertyName":"partner","value":"yes","operator":"eq"}]}} # MarkerDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkersApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the marker try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkersApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkersApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the marker try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkersApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the marker try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MarkersApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the marker if_match = 'if_match_example' # str | ETag value used for conditional updates - marker_dto = cm_python_openapi_sdk.MarkerDTO() # MarkerDTO | + marker_dto = {"id":"i21ad13kv579qu7j","name":"partners_marker","type":"marker","title":"Pick Up Partners","content":{"style":"marker-red","propertyFilters":[{"propertyName":"partner","value":"yes","operator":"eq"}]},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/markers/i21ad13kv579qu7j"}],"version":1} # MarkerDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/MembersApi.md b/docs/MembersApi.md index 4f0bf0d..4df9839 100644 --- a/docs/MembersApi.md +++ b/docs/MembersApi.md @@ -56,8 +56,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MembersApi(api_client) - project_id = 'project_id_example' # str | Id of the project - create_membership_dto = cm_python_openapi_sdk.CreateMembershipDTO() # CreateMembershipDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + create_membership_dto = {"accountId":"b2754484-4551-7915-c82d-abb453bahlf6","role":"VIEWER","status":"ENABLED"} # CreateMembershipDTO | try: # Add new project member and assign a role. @@ -139,7 +139,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MembersApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project membership_id = 'membership_id_example' # str | Id of the membership try: @@ -220,7 +220,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MembersApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project membership_id = 'membership_id_example' # str | Id of the membership try: @@ -307,7 +307,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MembersApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project size = 100 # int | The count of records to return for one page (optional) (default to 100) page = 0 # int | Number of the page (optional) (default to 0) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -398,9 +398,9 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MembersApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project membership_id = 'membership_id_example' # str | Id of the membership - update_membership_dto = cm_python_openapi_sdk.UpdateMembershipDTO() # UpdateMembershipDTO | + update_membership_dto = {"role":"EDITOR","status":"DISABLED"} # UpdateMembershipDTO | try: # Update membership by changing role or status in project. diff --git a/docs/MembershipDTO.md b/docs/MembershipDTO.md deleted file mode 100644 index a4cc60c..0000000 --- a/docs/MembershipDTO.md +++ /dev/null @@ -1,36 +0,0 @@ -# MembershipDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**account_id** | **str** | | [optional] -**status** | **str** | | -**role** | **str** | | -**created_at** | **str** | | [optional] -**modified_at** | **str** | | [optional] -**account** | [**AccountDTO**](AccountDTO.md) | | [optional] -**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] - -## Example - -```python -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of MembershipDTO from a JSON string -membership_dto_instance = MembershipDTO.from_json(json) -# print the JSON string representation of the object -print(MembershipDTO.to_json()) - -# convert the object into a dict -membership_dto_dict = membership_dto_instance.to_dict() -# create an instance of MembershipDTO from a dict -membership_dto_from_dict = MembershipDTO.from_dict(membership_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MetricRangesApi.md b/docs/MetricRangesApi.md index 1f690ce..f608de6 100644 --- a/docs/MetricRangesApi.md +++ b/docs/MetricRangesApi.md @@ -49,8 +49,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MetricRangesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster dwh_query_request1 = cm_python_openapi_sdk.DwhQueryRequest1() # DwhQueryRequest1 | try: @@ -137,9 +137,9 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MetricRangesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster - dwh_cache_id = 'q:vb2b3d8v91jao331:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster + dwh_cache_id = 'q:f76on62tb6bpitbb:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache try: # Get metric ranges diff --git a/docs/MetricValuesDistributionApi.md b/docs/MetricValuesDistributionApi.md new file mode 100644 index 0000000..d882e41 --- /dev/null +++ b/docs/MetricValuesDistributionApi.md @@ -0,0 +1,198 @@ +# cm_python_openapi_sdk.MetricValuesDistributionApi + +All URIs are relative to *https://staging.dev.clevermaps.io/rest* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**accept_metric_values_distributions**](MetricValuesDistributionApi.md#accept_metric_values_distributions) | **POST** /projects/{projectId}/dwh/{dwhClusterId}/metricValuesDistributions | +[**get_metric_values_distributions**](MetricValuesDistributionApi.md#get_metric_values_distributions) | **GET** /projects/{projectId}/dwh/{dwhClusterId}/metricValuesDistributions/{dwhCacheId} | + + +# **accept_metric_values_distributions** +> QueriesResponse accept_metric_values_distributions(project_id, dwh_cluster_id, dwh_metric_values_distribution_request) + +Executes a multidimensional query and returns the data distribution of given metric. + +This resource is typically used for the histogram filter distribution. + +This request starts an asynchronous action, which computes the metric values distributions result and returns the location URI of the result in `location` response header. To get the result, client must make another GET request on this URI (see [getMetricValuesDistribution](#operation/getMetricValuesDistribution)). + +**Distribution methods** + +There are currently supported two distribution methods for counting number of elements. +Each method has a custom parameter in request body (see request examples bellow): +- buckets (int) - number of bucket for the dynamic splitting +- breakpoints (array) - array of breakpoints for static segments + +**Dynamic buckets split** + +Metric range is split into required number of equal size buckets. +The frequency is the count of occurrences of given metric in these buckets. The range values depends on a granularity - that is defined by query properties. + +**Static breakpoints for segments** + +Executes a multidimensional query and returns the number of records in each segment. +Segments are defined as static breakpoints of the metric distribution. +To the first segment are counted all regions whose value of metric is between . +The interval for second segment is (breakpoint[1], breakpoint[2]>. And the last segment is (breakpoint[last-1], breakpoint[last]>. +The minimal required number of breakpoints is 2, it returns count of elements in one segment. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_request import DwhMetricValuesDistributionRequest +from cm_python_openapi_sdk.models.queries_response import QueriesResponse +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.MetricValuesDistributionApi(api_client) + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster + dwh_metric_values_distribution_request = cm_python_openapi_sdk.DwhMetricValuesDistributionRequest() # DwhMetricValuesDistributionRequest | + + try: + api_response = api_instance.accept_metric_values_distributions(project_id, dwh_cluster_id, dwh_metric_values_distribution_request) + print("The response of MetricValuesDistributionApi->accept_metric_values_distributions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetricValuesDistributionApi->accept_metric_values_distributions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **dwh_cluster_id** | **str**| Id of the dwh cluster | + **dwh_metric_values_distribution_request** | [**DwhMetricValuesDistributionRequest**](DwhMetricValuesDistributionRequest.md)| | + +### Return type + +[**QueriesResponse**](QueriesResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Accepted - request was accepted for processing | * location - URI of overlaps result
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_metric_values_distributions** +> DwhMetricValuesDistributionResponse1 get_metric_values_distributions(project_id, dwh_cluster_id, dwh_cache_id) + +Get the result of the asynchronous metric values distributions request submitted in [acceptMetricValuesDistribution](#operation/acceptMetricValuesDistribution). + +This endpoint implements long polling - see details in [getQueries](#operation/getQueries). + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response1 import DwhMetricValuesDistributionResponse1 +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.MetricValuesDistributionApi(api_client) + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster + dwh_cache_id = 'q:f76on62tb6bpitbb:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache + + try: + api_response = api_instance.get_metric_values_distributions(project_id, dwh_cluster_id, dwh_cache_id) + print("The response of MetricValuesDistributionApi->get_metric_values_distributions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetricValuesDistributionApi->get_metric_values_distributions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **dwh_cluster_id** | **str**| Id of the dwh cluster | + **dwh_cache_id** | **str**| Id of the dwh cache | + +### Return type + +[**DwhMetricValuesDistributionResponse1**](DwhMetricValuesDistributionResponse1.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK - metric values distributions was successfully executed | - | +**404** | Not Found - metric values distributions result was not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/MetricsApi.md b/docs/MetricsApi.md index 6727c51..45ca5f8 100644 --- a/docs/MetricsApi.md +++ b/docs/MetricsApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MetricsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - metric_dto = cm_python_openapi_sdk.MetricDTO() # MetricDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + metric_dto = {"name":"average_purchase_metric","type":"metric","content":{"type":"function_avg","content":[{"type":"property"}]}} # MetricDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MetricsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the metric try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MetricsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MetricsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the metric try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MetricsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the metric try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.MetricsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the metric if_match = 'if_match_example' # str | ETag value used for conditional updates - metric_dto = cm_python_openapi_sdk.MetricDTO() # MetricDTO | + metric_dto = {"id":"onb0i86sf4415ks7","name":"average_purchase_metric","type":"metric","title":"Updated title","content":{"type":"function_avg","content":[{"type":"property"}]},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/metrics/onb0i86sf4415ks7"}],"version":1} # MetricDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/NewAccountDTO.md b/docs/NewAccountDTO.md deleted file mode 100644 index e4da3ce..0000000 --- a/docs/NewAccountDTO.md +++ /dev/null @@ -1,38 +0,0 @@ -# NewAccountDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**given_name** | **str** | | -**surname** | **str** | | -**email** | **str** | | -**password** | **str** | | -**consent_granted** | **bool** | | [optional] -**phone_number** | **str** | | [optional] -**require_additional_attributes** | **bool** | | [optional] -**preferences** | [**AccountPreferences**](AccountPreferences.md) | | [optional] -**utm_parameters** | [**AccountUtmParameters**](AccountUtmParameters.md) | | [optional] -**job_info** | [**AccountJobInfo**](AccountJobInfo.md) | | [optional] - -## Example - -```python -from cm_python_openapi_sdk.models.new_account_dto import NewAccountDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of NewAccountDTO from a JSON string -new_account_dto_instance = NewAccountDTO.from_json(json) -# print the JSON string representation of the object -print(NewAccountDTO.to_json()) - -# convert the object into a dict -new_account_dto_dict = new_account_dto_instance.to_dict() -# create an instance of NewAccountDTO from a dict -new_account_dto_from_dict = NewAccountDTO.from_dict(new_account_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationsApi.md b/docs/OrganizationsApi.md index 4af16f1..1139123 100644 --- a/docs/OrganizationsApi.md +++ b/docs/OrganizationsApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **create_organization** -> OrganizationPagedModelDTO create_organization(create_organization_dto) +> OrganizationResponseDTO create_organization(create_organization_dto) Creates a new organization. @@ -27,7 +27,7 @@ Creating of organization is restricted to CleverMaps platform administrators. ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.create_organization_dto import CreateOrganizationDTO -from cm_python_openapi_sdk.models.organization_paged_model_dto import OrganizationPagedModelDTO +from cm_python_openapi_sdk.models.organization_response_dto import OrganizationResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -51,7 +51,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.OrganizationsApi(api_client) - create_organization_dto = cm_python_openapi_sdk.CreateOrganizationDTO() # CreateOrganizationDTO | + create_organization_dto = {"title":"New Organization","dwhClusterId":"cmstd1"} # CreateOrganizationDTO | try: # Creates a new organization. @@ -73,7 +73,7 @@ Name | Type | Description | Notes ### Return type -[**OrganizationPagedModelDTO**](OrganizationPagedModelDTO.md) +[**OrganizationResponseDTO**](OrganizationResponseDTO.md) ### Authorization @@ -130,7 +130,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.OrganizationsApi(api_client) - organization_id = 'organization_id_example' # str | Id of the organization + organization_id = 'bvc4hb9kufgaehed' # str | Id of the organization try: # Delete an organization. @@ -204,7 +204,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.OrganizationsApi(api_client) - organization_id = 'organization_id_example' # str | Id of the organization + organization_id = 'bvc4hb9kufgaehed' # str | Id of the organization try: # Get organization detail. @@ -282,7 +282,7 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: api_instance = cm_python_openapi_sdk.OrganizationsApi(api_client) page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) - project_id = 'project_id_example' # str | Id of the project, used in query parameters (optional) + project_id = 'srb6iq85a8h0ors3' # str | Id of the project, used in query parameters (optional) try: # Get all organizations available for authenticated user. @@ -365,8 +365,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.OrganizationsApi(api_client) - organization_id = 'organization_id_example' # str | Id of the organization - update_organization_dto = cm_python_openapi_sdk.UpdateOrganizationDTO() # UpdateOrganizationDTO | + organization_id = 'bvc4hb9kufgaehed' # str | Id of the organization + update_organization_dto = {"title":"New Organization Name","invitationEmail":"invivations@organization.com","dwhClusterId":"cmstd1"} # UpdateOrganizationDTO | try: # Update organization. diff --git a/docs/OverlapsApi.md b/docs/OverlapsApi.md index 684d26d..a2eb4d0 100644 --- a/docs/OverlapsApi.md +++ b/docs/OverlapsApi.md @@ -56,8 +56,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.OverlapsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster dwh_overlaps_request = cm_python_openapi_sdk.DwhOverlapsRequest() # DwhOverlapsRequest | try: @@ -141,9 +141,9 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.OverlapsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster - dwh_cache_id = 'q:vb2b3d8v91jao331:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster + dwh_cache_id = 'q:f76on62tb6bpitbb:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache try: # Get overlaps diff --git a/docs/PasswordChangeDTO.md b/docs/PasswordChangeDTO.md deleted file mode 100644 index 89dd1e6..0000000 --- a/docs/PasswordChangeDTO.md +++ /dev/null @@ -1,30 +0,0 @@ -# PasswordChangeDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**old_password** | **str** | | -**new_password** | **str** | | - -## Example - -```python -from cm_python_openapi_sdk.models.password_change_dto import PasswordChangeDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of PasswordChangeDTO from a JSON string -password_change_dto_instance = PasswordChangeDTO.from_json(json) -# print the JSON string representation of the object -print(PasswordChangeDTO.to_json()) - -# convert the object into a dict -password_change_dto_dict = password_change_dto_instance.to_dict() -# create an instance of PasswordChangeDTO from a dict -password_change_dto_from_dict = PasswordChangeDTO.from_dict(password_change_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProjectInvitationApi.md b/docs/ProjectInvitationApi.md new file mode 100644 index 0000000..9022465 --- /dev/null +++ b/docs/ProjectInvitationApi.md @@ -0,0 +1,172 @@ +# cm_python_openapi_sdk.ProjectInvitationApi + +All URIs are relative to *https://staging.dev.clevermaps.io/rest* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**accept_project_invitation**](ProjectInvitationApi.md#accept_project_invitation) | **POST** /invitations/{invitationHash} | Accept invitation. +[**get_invitation**](ProjectInvitationApi.md#get_invitation) | **GET** /invitations/{invitationHash} | Get detail of an invitation. + + +# **accept_project_invitation** +> InvitationDTO accept_project_invitation(invitation_hash) + +Accept invitation. + +This resource allows accepting an invitation by an invited user. +The URL contains a secret `invitationHash` that is sent to the invited user by email. +By clicking on the href link from the invitation email, the user is redirected into the CleverMaps application, and after authentication, the invitation is accepted. + +When a user accepts an invitation, they are added as a new Member of the Project in the role granted by the invitation. + +**Security:** +Restricted to invited user. The authenticated user email must equal the email in the invitation. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.ProjectInvitationApi(api_client) + invitation_hash = 'invitation_hash_example' # str | Hash of the invitation + + try: + # Accept invitation. + api_response = api_instance.accept_project_invitation(invitation_hash) + print("The response of ProjectInvitationApi->accept_project_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectInvitationApi->accept_project_invitation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_hash** | **str**| Hash of the invitation | + +### Return type + +[**InvitationDTO**](InvitationDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful update | - | +**400** | invitation cannot be accepted (unexpected invitation state - already accepted, canceled) | - | +**403** | authenticated user email does not match email in invitation | - | +**404** | invitation was not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_invitation** +> InvitationDTO get_invitation(invitation_hash) + +Get detail of an invitation. + +An invitation status value is one of: +- PENDING +- ACCEPTED +- CANCELED +- EXPIRED + + +### Example + + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.ProjectInvitationApi(api_client) + invitation_hash = 'invitation_hash_example' # str | Hash of the invitation + + try: + # Get detail of an invitation. + api_response = api_instance.get_invitation(invitation_hash) + print("The response of ProjectInvitationApi->get_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectInvitationApi->get_invitation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_hash** | **str**| Hash of the invitation | + +### Return type + +[**InvitationDTO**](InvitationDTO.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, example + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectSettingsApi.md b/docs/ProjectSettingsApi.md index 5de4707..c0c3cb3 100644 --- a/docs/ProjectSettingsApi.md +++ b/docs/ProjectSettingsApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ProjectSettingsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - project_settings_dto = cm_python_openapi_sdk.ProjectSettingsDTO() # ProjectSettingsDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + project_settings_dto = {"name":"project_settings_gb","type":"projectSettings","content":{"geoSearchCountries":["GB"]}} # ProjectSettingsDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ProjectSettingsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the project settings try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ProjectSettingsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ProjectSettingsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the project settings try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ProjectSettingsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the projectSettings try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ProjectSettingsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the project settings if_match = 'if_match_example' # str | ETag value used for conditional updates - project_settings_dto = cm_python_openapi_sdk.ProjectSettingsDTO() # ProjectSettingsDTO | + project_settings_dto = {"id":"qr0kekodkijcuhev","name":"project_settings_gb","type":"projectSettings","content":{"geoSearchCountries":["GB","CZ"]},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/projectSettings/qr0kekodkijcuhev"}],"version":1} # ProjectSettingsDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/docs/ProjectsApi.md b/docs/ProjectsApi.md index 8e2ca84..e057c75 100644 --- a/docs/ProjectsApi.md +++ b/docs/ProjectsApi.md @@ -128,7 +128,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ProjectsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project try: # Delete project. @@ -206,7 +206,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ProjectsApi(api_client) - organization_id = 'organization_id_example' # str | Id of the organization, used in query parameters (optional) + organization_id = 'bvc4hb9kufgaehed' # str | Id of the organization, used in query parameters (optional) page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -296,7 +296,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ProjectsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project expand = 'expand_example' # str | Expand selected attribute(s) to minimalize roundtrips. (optional) try: @@ -379,8 +379,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ProjectsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - update_project_dto = cm_python_openapi_sdk.UpdateProjectDTO() # UpdateProjectDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + update_project_dto = {"title":"New Title for Project","description":"Updated project description","status":"ENABLED","organizationId":"bvc4hb9kufgaehed"} # UpdateProjectDTO | try: # Update the project. diff --git a/docs/PropertyValuesApi.md b/docs/PropertyValuesApi.md index c697d61..995264b 100644 --- a/docs/PropertyValuesApi.md +++ b/docs/PropertyValuesApi.md @@ -51,8 +51,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.PropertyValuesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster dwh_property_values_request = cm_python_openapi_sdk.DwhPropertyValuesRequest() # DwhPropertyValuesRequest | size = 200 # int | The count of records to return for one page (optional) (default to 200) page = 0 # int | Number of the page (optional) (default to 0) @@ -142,9 +142,9 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.PropertyValuesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster - dwh_cache_id = 'q:vb2b3d8v91jao331:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster + dwh_cache_id = 'q:f76on62tb6bpitbb:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache size = 200 # int | The count of records to return for one page (optional) (default to 200) page = 0 # int | Number of the page (optional) (default to 0) diff --git a/docs/PropertyValuesDistributionApi.md b/docs/PropertyValuesDistributionApi.md index 3a038e7..75b6bdb 100644 --- a/docs/PropertyValuesDistributionApi.md +++ b/docs/PropertyValuesDistributionApi.md @@ -11,7 +11,7 @@ Method | HTTP request | Description # **accept_property_values_distribution** > QueriesResponse accept_property_values_distribution(project_id, dwh_cluster_id, dwh_property_values_distribution_request) -Computes the distribution (frequency) of given fact (numeric dataset property). Result is splitted into required number of equal size buckets. The frequency is the count of occurencies of given metric in these buckets. +Computes the distribution (frequency) of given fact (numeric dataset property). Result is split into required number of equal size buckets. The frequency is the count of occurrences of given metric in these buckets. This resource is typically used for the histogram filter distribution. @@ -49,8 +49,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.PropertyValuesDistributionApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster dwh_property_values_distribution_request = cm_python_openapi_sdk.DwhPropertyValuesDistributionRequest() # DwhPropertyValuesDistributionRequest | try: @@ -131,10 +131,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.PropertyValuesDistributionApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster - dwh_cache_id = 'q:vb2b3d8v91jao331:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache - null_cache_id = 'q:vb2b3d8v91jao331:Ntit7mTcDMxvj7DTI6wuFA' # str | The ID of a cached null values distribution result + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster + dwh_cache_id = 'q:f76on62tb6bpitbb:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache + null_cache_id = 'q:f76on62tb6bpitbb:Ntit7mTcDMxvj7DTI6wuFA' # str | The ID of a cached null values distribution result var_property = 'baskets.amount' # str | Dataset's property identifier try: diff --git a/docs/QueriesApi.md b/docs/QueriesApi.md index 3701757..2ed53e6 100644 --- a/docs/QueriesApi.md +++ b/docs/QueriesApi.md @@ -56,8 +56,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.QueriesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster dwh_query_request1 = cm_python_openapi_sdk.DwhQueryRequest1() # DwhQueryRequest1 | size = 200 # int | The count of records to return for one page (optional) (default to 200) page = 0 # int | Number of the page (optional) (default to 0) @@ -151,9 +151,9 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.QueriesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster - dwh_cache_id = 'q:vb2b3d8v91jao331:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster + dwh_cache_id = 'q:f76on62tb6bpitbb:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) diff --git a/docs/ResetPasswordDTO.md b/docs/ResetPasswordDTO.md deleted file mode 100644 index 7a9b306..0000000 --- a/docs/ResetPasswordDTO.md +++ /dev/null @@ -1,30 +0,0 @@ -# ResetPasswordDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**new_password** | **str** | | -**consent_granted** | **bool** | | [optional] - -## Example - -```python -from cm_python_openapi_sdk.models.reset_password_dto import ResetPasswordDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of ResetPasswordDTO from a JSON string -reset_password_dto_instance = ResetPasswordDTO.from_json(json) -# print the JSON string representation of the object -print(ResetPasswordDTO.to_json()) - -# convert the object into a dict -reset_password_dto_dict = reset_password_dto_instance.to_dict() -# create an instance of ResetPasswordDTO from a dict -reset_password_dto_from_dict = ResetPasswordDTO.from_dict(reset_password_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SearchApi.md b/docs/SearchApi.md index fa2c9af..85d49ca 100644 --- a/docs/SearchApi.md +++ b/docs/SearchApi.md @@ -50,7 +50,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.SearchApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project query = 'Birmingham' # str | Query search phrase. It is split into terms and the resource return dataset's object that contains all terms in their `title` or `subtitle`. page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) diff --git a/docs/SendResetPasswordDTO.md b/docs/SendResetPasswordDTO.md deleted file mode 100644 index 00cd043..0000000 --- a/docs/SendResetPasswordDTO.md +++ /dev/null @@ -1,29 +0,0 @@ -# SendResetPasswordDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | - -## Example - -```python -from cm_python_openapi_sdk.models.send_reset_password_dto import SendResetPasswordDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of SendResetPasswordDTO from a JSON string -send_reset_password_dto_instance = SendResetPasswordDTO.from_json(json) -# print the JSON string representation of the object -print(SendResetPasswordDTO.to_json()) - -# convert the object into a dict -send_reset_password_dto_dict = send_reset_password_dto_instance.to_dict() -# create an instance of SendResetPasswordDTO from a dict -send_reset_password_dto_from_dict = SendResetPasswordDTO.from_dict(send_reset_password_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubmitJobExecutionRequest.md b/docs/SubmitJobExecutionRequest.md deleted file mode 100644 index 6628217..0000000 --- a/docs/SubmitJobExecutionRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# SubmitJobExecutionRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | | -**project_id** | **str** | | -**content** | [**ExportRequest**](ExportRequest.md) | | - -## Example - -```python -from cm_python_openapi_sdk.models.submit_job_execution_request import SubmitJobExecutionRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of SubmitJobExecutionRequest from a JSON string -submit_job_execution_request_instance = SubmitJobExecutionRequest.from_json(json) -# print the JSON string representation of the object -print(SubmitJobExecutionRequest.to_json()) - -# convert the object into a dict -submit_job_execution_request_dict = submit_job_execution_request_instance.to_dict() -# create an instance of SubmitJobExecutionRequest from a dict -submit_job_execution_request_from_dict = SubmitJobExecutionRequest.from_dict(submit_job_execution_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateMembership.md b/docs/UpdateMembership.md deleted file mode 100644 index 706f184..0000000 --- a/docs/UpdateMembership.md +++ /dev/null @@ -1,30 +0,0 @@ -# UpdateMembership - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **str** | | -**role** | **str** | | - -## Example - -```python -from cm_python_openapi_sdk.models.update_membership import UpdateMembership - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateMembership from a JSON string -update_membership_instance = UpdateMembership.from_json(json) -# print the JSON string representation of the object -print(UpdateMembership.to_json()) - -# convert the object into a dict -update_membership_dict = update_membership_instance.to_dict() -# create an instance of UpdateMembership from a dict -update_membership_from_dict = UpdateMembership.from_dict(update_membership_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/VariableType.md b/docs/VariableType.md deleted file mode 100644 index 7317070..0000000 --- a/docs/VariableType.md +++ /dev/null @@ -1,31 +0,0 @@ -# VariableType - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**type** | **str** | | -**value** | **str** | | - -## Example - -```python -from cm_python_openapi_sdk.models.variable_type import VariableType - -# TODO update the JSON string below -json = "{}" -# create an instance of VariableType from a JSON string -variable_type_instance = VariableType.from_json(json) -# print the JSON string representation of the object -print(VariableType.to_json()) - -# convert the object into a dict -variable_type_dict = variable_type_instance.to_dict() -# create an instance of VariableType from a dict -variable_type_from_dict = VariableType.from_dict(variable_type_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/VectorTilesApi.md b/docs/VectorTilesApi.md index 5741bcd..f331d04 100644 --- a/docs/VectorTilesApi.md +++ b/docs/VectorTilesApi.md @@ -48,8 +48,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.VectorTilesApi(api_client) - project_id = 'project_id_example' # str | Id of the project - dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + dwh_cluster_id = 'cmstd1' # str | Id of the dwh cluster dataset_name = 'dataset_name_example' # str | Name of the DWH dataset with geometry data z = 56 # int | Z coordinate of a vector tile x = 56 # int | X coordinate of a vector tile diff --git a/docs/ViewsApi.md b/docs/ViewsApi.md index 18e8357..218a416 100644 --- a/docs/ViewsApi.md +++ b/docs/ViewsApi.md @@ -50,8 +50,8 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ViewsApi(api_client) - project_id = 'project_id_example' # str | Id of the project - view_dto = cm_python_openapi_sdk.ViewDTO() # ViewDTO | + project_id = 'srb6iq85a8h0ors3' # str | Id of the project + view_dto = {"name":"catchment_area_view","type":"view","title":"Catchment Area Analysis","description":"Discover the areas with the biggest or lowest customer base and find out what turnover those customers generate. You can also evaluate the ranking of shops or pick-up partners that are used by customers from different regions.","content":{"icon":"catchment_area","dashboard":"/rest/projects/f76on62tb6bpitbb/md/dashboards?name=catchment_area_dashboard","markerSelector":"/rest/projects/f76on62tb6bpitbb/md/markerSelectors?name=shops_marker_selector","defaultGranularity":"/rest/projects/f76on62tb6bpitbb/md/datasets?name=district","filterGroup":[{"type":"globalDate","property":"baskets.date_iso"},{"type":"histogram","property":"baskets.amount","format":{"type":"number","fraction":0,"symbol":"£"}},{"type":"multiSelect","property":"baskets.on_off_name","orderBy":[{"property":"baskets.on_off_name","direction":"asc"}]},{"type":"multiSelect","property":"baskets.courier","orderBy":[{"property":"baskets.courier","direction":"asc"}]}],"defaultActiveFilters":[{"type":"globalDate","property":"baskets.date_iso","defaultValues":{"startDate":{"value":"2017-09-24"},"endDate":{"value":"2017-09-30"}}}],"mapOptions":{"center":{"lat":52.47,"lng":-1.88},"zoom":12,"minZoom":0,"maxZoom":18,"tileLayer":"mapbox"},"disableFitness":true}} # ViewDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: @@ -133,7 +133,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ViewsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the view try: @@ -210,7 +210,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ViewsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project page = 0 # int | Number of the page (optional) (default to 0) size = 100 # int | The count of records to return for one page (optional) (default to 100) sort = 'name,desc' # str | Name of the attribute to use for sorting the results, together with direction (asc or desc) (optional) @@ -292,7 +292,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ViewsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the view try: @@ -371,7 +371,7 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ViewsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project name = 'name_example' # str | Name of the view try: @@ -453,10 +453,10 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.ViewsApi(api_client) - project_id = 'project_id_example' # str | Id of the project + project_id = 'srb6iq85a8h0ors3' # str | Id of the project id = 'id_example' # str | Id of the view if_match = 'if_match_example' # str | ETag value used for conditional updates - view_dto = cm_python_openapi_sdk.ViewDTO() # ViewDTO | + view_dto = {"id":"o4hdm1tu50h8emea","name":"catchment_area_view","type":"view","title":"Catchment Area Analysis","description":"Discover the areas with the biggest or lowest customer base and find out what turnover those customers generate. You can also evaluate the ranking of shops or pick-up partners that are used by customers from different regions.","content":{"icon":"catchment_area","dashboard":"/rest/projects/f76on62tb6bpitbb/md/dashboards?name=catchment_area_dashboard","markerSelector":"/rest/projects/f76on62tb6bpitbb/md/markerSelectors?name=shops_marker_selector","defaultGranularity":"/rest/projects/f76on62tb6bpitbb/md/datasets?name=district","filterGroup":[{"type":"globalDate","property":"baskets.date_iso"},{"type":"histogram","property":"baskets.amount","format":{"type":"number","fraction":0,"symbol":"£"}},{"type":"multiSelect","property":"baskets.on_off_name","orderBy":[{"property":"baskets.on_off_name","direction":"asc"}]},{"type":"multiSelect","property":"baskets.courier","orderBy":[{"property":"baskets.courier","direction":"asc"}]}],"defaultActiveFilters":[{"type":"globalDate","property":"baskets.date_iso","defaultValues":{"startDate":{"value":"2017-09-24"},"endDate":{"value":"2017-09-30"}}}],"mapOptions":{"center":{"lat":52.47,"lng":-1.88},"zoom":12,"minZoom":0,"maxZoom":18,"tileLayer":"mapbox"},"disableFitness":false},"accessInfo":{"createdAt":"2025-08-03T13:10:15Z","createdBy":"/rest/accounts/a2954434-00b1-70d4-92f1-dd99bb174f4c"},"links":[{"rel":"self","href":"/rest/projects/f76on62tb6bpitbb/md/views/o4hdm1tu50h8emea"}],"version":1} # ViewDTO | x_can_strict_json_validation = False # bool | (optional) (default to False) try: diff --git a/test/test_audit_log_single_resource1.py b/test/test_audit_log_single_resource1.py new file mode 100644 index 0000000..9e7272f --- /dev/null +++ b/test/test_audit_log_single_resource1.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.audit_log_single_resource1 import AuditLogSingleResource1 + +class TestAuditLogSingleResource1(unittest.TestCase): + """AuditLogSingleResource1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuditLogSingleResource1: + """Test AuditLogSingleResource1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuditLogSingleResource1` + """ + model = AuditLogSingleResource1() + if include_optional: + return AuditLogSingleResource1( + event_id = '04807288800152802179809622550085076206862933933397565068', + account_id = 'gCu2LC4aWwWL9Y864DZt', + request_id = 'w8q6zgckec0l3o4g', + remote_host = '', + project_id = 'w8q6zgckec0l3o4g', + event_type = '_', + timestamp = '0480-72-88T80:01:52,802', + content = None, + links = [ + None + ] + ) + else: + return AuditLogSingleResource1( + event_id = '04807288800152802179809622550085076206862933933397565068', + account_id = 'gCu2LC4aWwWL9Y864DZt', + project_id = 'w8q6zgckec0l3o4g', + event_type = '_', + timestamp = '0480-72-88T80:01:52,802', + content = None, + links = [ + None + ], + ) + """ + + def testAuditLogSingleResource1(self): + """Test AuditLogSingleResource1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_membership.py b/test/test_available_datasets_for_metric.py similarity index 64% rename from test/test_update_membership.py rename to test/test_available_datasets_for_metric.py index c75441b..f7714f4 100644 --- a/test/test_update_membership.py +++ b/test/test_available_datasets_for_metric.py @@ -15,10 +15,10 @@ import unittest -from cm_python_openapi_sdk.models.update_membership import UpdateMembership +from cm_python_openapi_sdk.models.available_datasets_for_metric import AvailableDatasetsForMetric -class TestUpdateMembership(unittest.TestCase): - """UpdateMembership unit test stubs""" +class TestAvailableDatasetsForMetric(unittest.TestCase): + """AvailableDatasetsForMetric unit test stubs""" def setUp(self): pass @@ -26,28 +26,24 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> UpdateMembership: - """Test UpdateMembership + def make_instance(self, include_optional) -> AvailableDatasetsForMetric: + """Test AvailableDatasetsForMetric include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `UpdateMembership` + # uncomment below to create an instance of `AvailableDatasetsForMetric` """ - model = UpdateMembership() + model = AvailableDatasetsForMetric() if include_optional: - return UpdateMembership( - status = '', - role = '' + return AvailableDatasetsForMetric( ) else: - return UpdateMembership( - status = '', - role = '', + return AvailableDatasetsForMetric( ) """ - def testUpdateMembership(self): - """Test UpdateMembership""" + def testAvailableDatasetsForMetric(self): + """Test AvailableDatasetsForMetric""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_account_utm_parameters.py b/test/test_create_person_request_dto.py similarity index 62% rename from test/test_account_utm_parameters.py rename to test/test_create_person_request_dto.py index f1f1a16..5e3c85a 100644 --- a/test/test_account_utm_parameters.py +++ b/test/test_create_person_request_dto.py @@ -15,10 +15,10 @@ import unittest -from cm_python_openapi_sdk.models.account_utm_parameters import AccountUtmParameters +from cm_python_openapi_sdk.models.create_person_request_dto import CreatePersonRequestDTO -class TestAccountUtmParameters(unittest.TestCase): - """AccountUtmParameters unit test stubs""" +class TestCreatePersonRequestDTO(unittest.TestCase): + """CreatePersonRequestDTO unit test stubs""" def setUp(self): pass @@ -26,28 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> AccountUtmParameters: - """Test AccountUtmParameters + def make_instance(self, include_optional) -> CreatePersonRequestDTO: + """Test CreatePersonRequestDTO include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `AccountUtmParameters` + # uncomment below to create an instance of `CreatePersonRequestDTO` """ - model = AccountUtmParameters() + model = CreatePersonRequestDTO() if include_optional: - return AccountUtmParameters( - medium = '', - source = '', - campaign = '', - referrer = '' + return CreatePersonRequestDTO( + language = '', + project_id_invitation = 'w8q6zgckec0l3o4g' ) else: - return AccountUtmParameters( + return CreatePersonRequestDTO( + language = '', ) """ - def testAccountUtmParameters(self): - """Test AccountUtmParameters""" + def testCreatePersonRequestDTO(self): + """Test CreatePersonRequestDTO""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_password_change_dto.py b/test/test_csv_header_override.py similarity index 63% rename from test/test_password_change_dto.py rename to test/test_csv_header_override.py index 1092cf2..7d53599 100644 --- a/test/test_password_change_dto.py +++ b/test/test_csv_header_override.py @@ -15,10 +15,10 @@ import unittest -from cm_python_openapi_sdk.models.password_change_dto import PasswordChangeDTO +from cm_python_openapi_sdk.models.csv_header_override import CsvHeaderOverride -class TestPasswordChangeDTO(unittest.TestCase): - """PasswordChangeDTO unit test stubs""" +class TestCsvHeaderOverride(unittest.TestCase): + """CsvHeaderOverride unit test stubs""" def setUp(self): pass @@ -26,28 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PasswordChangeDTO: - """Test PasswordChangeDTO + def make_instance(self, include_optional) -> CsvHeaderOverride: + """Test CsvHeaderOverride include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `PasswordChangeDTO` + # uncomment below to create an instance of `CsvHeaderOverride` """ - model = PasswordChangeDTO() + model = CsvHeaderOverride() if include_optional: - return PasswordChangeDTO( - old_password = '', - new_password = '' + return CsvHeaderOverride( + query_dwh_property_id = '', + title = '' ) else: - return PasswordChangeDTO( - old_password = '', - new_password = '', + return CsvHeaderOverride( + query_dwh_property_id = '', + title = '', ) """ - def testPasswordChangeDTO(self): - """Test PasswordChangeDTO""" + def testCsvHeaderOverride(self): + """Test CsvHeaderOverride""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_account_job_info.py b/test/test_dwh_date_range_filter.py similarity index 65% rename from test/test_account_job_info.py rename to test/test_dwh_date_range_filter.py index 1d351a8..1cb21aa 100644 --- a/test/test_account_job_info.py +++ b/test/test_dwh_date_range_filter.py @@ -15,10 +15,10 @@ import unittest -from cm_python_openapi_sdk.models.account_job_info import AccountJobInfo +from cm_python_openapi_sdk.models.dwh_date_range_filter import DwhDateRangeFilter -class TestAccountJobInfo(unittest.TestCase): - """AccountJobInfo unit test stubs""" +class TestDwhDateRangeFilter(unittest.TestCase): + """DwhDateRangeFilter unit test stubs""" def setUp(self): pass @@ -26,27 +26,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> AccountJobInfo: - """Test AccountJobInfo + def make_instance(self, include_optional) -> DwhDateRangeFilter: + """Test DwhDateRangeFilter include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `AccountJobInfo` + # uncomment below to create an instance of `DwhDateRangeFilter` """ - model = AccountJobInfo() + model = DwhDateRangeFilter() if include_optional: - return AccountJobInfo( - company_name = '0', - job_position = '0', - industry = '0' + return DwhDateRangeFilter( + start_date = None, + end_date = None ) else: - return AccountJobInfo( + return DwhDateRangeFilter( ) """ - def testAccountJobInfo(self): - """Test AccountJobInfo""" + def testDwhDateRangeFilter(self): + """Test DwhDateRangeFilter""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_dwh_metric_values_distribution_request.py b/test/test_dwh_metric_values_distribution_request.py new file mode 100644 index 0000000..55c86fb --- /dev/null +++ b/test/test_dwh_metric_values_distribution_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_request import DwhMetricValuesDistributionRequest + +class TestDwhMetricValuesDistributionRequest(unittest.TestCase): + """DwhMetricValuesDistributionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DwhMetricValuesDistributionRequest: + """Test DwhMetricValuesDistributionRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DwhMetricValuesDistributionRequest` + """ + model = DwhMetricValuesDistributionRequest() + if include_optional: + return DwhMetricValuesDistributionRequest( + buckets = 56, + breakpoints = [ + 1.337 + ], + query = cm_python_openapi_sdk.models.dwh_query_request.DwhQueryRequest( + execution_context = null, + properties = [ + null + ], + filter_by = [ + null + ], + having = [ + null + ], + result_set_filter = [ + null + ], + order_by = [ + cm_python_openapi_sdk.models.order_by.OrderBy( + property = null, + property_id = 'z0', + direction = 'asc', + nulls = 'last', ) + ], + variables = [ + cm_python_openapi_sdk.models.variable_value.VariableValue( + variable = 'awat5ikwowtta-3mh2lcafqw3zhes', + value = 1.337, ) + ], + limit = 1, ) + ) + else: + return DwhMetricValuesDistributionRequest( + query = cm_python_openapi_sdk.models.dwh_query_request.DwhQueryRequest( + execution_context = null, + properties = [ + null + ], + filter_by = [ + null + ], + having = [ + null + ], + result_set_filter = [ + null + ], + order_by = [ + cm_python_openapi_sdk.models.order_by.OrderBy( + property = null, + property_id = 'z0', + direction = 'asc', + nulls = 'last', ) + ], + variables = [ + cm_python_openapi_sdk.models.variable_value.VariableValue( + variable = 'awat5ikwowtta-3mh2lcafqw3zhes', + value = 1.337, ) + ], + limit = 1, ), + ) + """ + + def testDwhMetricValuesDistributionRequest(self): + """Test DwhMetricValuesDistributionRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dwh_metric_values_distribution_response1.py b/test/test_dwh_metric_values_distribution_response1.py new file mode 100644 index 0000000..008958b --- /dev/null +++ b/test/test_dwh_metric_values_distribution_response1.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.dwh_metric_values_distribution_response1 import DwhMetricValuesDistributionResponse1 + +class TestDwhMetricValuesDistributionResponse1(unittest.TestCase): + """DwhMetricValuesDistributionResponse1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DwhMetricValuesDistributionResponse1: + """Test DwhMetricValuesDistributionResponse1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DwhMetricValuesDistributionResponse1` + """ + model = DwhMetricValuesDistributionResponse1() + if include_optional: + return DwhMetricValuesDistributionResponse1( + content = [ + cm_python_openapi_sdk.models.dwh_metric_values_distribution_response_content_inner.DwhMetricValuesDistributionResponse_content_inner( + min = 1.337, + max = 1.337, + content = [ + cm_python_openapi_sdk.models.dwh_metric_values_distribution_response_content_inner_content_inner.DwhMetricValuesDistributionResponse_content_inner_content_inner( + property_id = '0', + frequency = 56, ) + ], ) + ] + ) + else: + return DwhMetricValuesDistributionResponse1( + content = [ + cm_python_openapi_sdk.models.dwh_metric_values_distribution_response_content_inner.DwhMetricValuesDistributionResponse_content_inner( + min = 1.337, + max = 1.337, + content = [ + cm_python_openapi_sdk.models.dwh_metric_values_distribution_response_content_inner_content_inner.DwhMetricValuesDistributionResponse_content_inner_content_inner( + property_id = '0', + frequency = 56, ) + ], ) + ], + ) + """ + + def testDwhMetricValuesDistributionResponse1(self): + """Test DwhMetricValuesDistributionResponse1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_variable_type.py b/test/test_function_greatest_least_type_general.py similarity index 55% rename from test/test_variable_type.py rename to test/test_function_greatest_least_type_general.py index 581d518..7f6eb8f 100644 --- a/test/test_variable_type.py +++ b/test/test_function_greatest_least_type_general.py @@ -15,10 +15,10 @@ import unittest -from cm_python_openapi_sdk.models.variable_type import VariableType +from cm_python_openapi_sdk.models.function_greatest_least_type_general import FunctionGreatestLeastTypeGeneral -class TestVariableType(unittest.TestCase): - """VariableType unit test stubs""" +class TestFunctionGreatestLeastTypeGeneral(unittest.TestCase): + """FunctionGreatestLeastTypeGeneral unit test stubs""" def setUp(self): pass @@ -26,29 +26,33 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> VariableType: - """Test VariableType + def make_instance(self, include_optional) -> FunctionGreatestLeastTypeGeneral: + """Test FunctionGreatestLeastTypeGeneral include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `VariableType` + # uncomment below to create an instance of `FunctionGreatestLeastTypeGeneral` """ - model = VariableType() + model = FunctionGreatestLeastTypeGeneral() if include_optional: - return VariableType( + return FunctionGreatestLeastTypeGeneral( id = 'z0', - type = 'variable', - value = 'awat5ikwowtta-3mh2lcafqw3zhes' + type = 'function_greatest', + content = [ + null + ] ) else: - return VariableType( - type = 'variable', - value = 'awat5ikwowtta-3mh2lcafqw3zhes', + return FunctionGreatestLeastTypeGeneral( + type = 'function_greatest', + content = [ + null + ], ) """ - def testVariableType(self): - """Test VariableType""" + def testFunctionGreatestLeastTypeGeneral(self): + """Test FunctionGreatestLeastTypeGeneral""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_function_ntile_content_inner.py b/test/test_function_log_exp_type_general.py similarity index 62% rename from test/test_function_ntile_content_inner.py rename to test/test_function_log_exp_type_general.py index 3c24b18..e46fd2a 100644 --- a/test/test_function_ntile_content_inner.py +++ b/test/test_function_log_exp_type_general.py @@ -15,10 +15,10 @@ import unittest -from cm_python_openapi_sdk.models.function_ntile_content_inner import FunctionNtileContentInner +from cm_python_openapi_sdk.models.function_log_exp_type_general import FunctionLogExpTypeGeneral -class TestFunctionNtileContentInner(unittest.TestCase): - """FunctionNtileContentInner unit test stubs""" +class TestFunctionLogExpTypeGeneral(unittest.TestCase): + """FunctionLogExpTypeGeneral unit test stubs""" def setUp(self): pass @@ -26,34 +26,33 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> FunctionNtileContentInner: - """Test FunctionNtileContentInner + def make_instance(self, include_optional) -> FunctionLogExpTypeGeneral: + """Test FunctionLogExpTypeGeneral include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `FunctionNtileContentInner` + # uncomment below to create an instance of `FunctionLogExpTypeGeneral` """ - model = FunctionNtileContentInner() + model = FunctionLogExpTypeGeneral() if include_optional: - return FunctionNtileContentInner( + return FunctionLogExpTypeGeneral( id = 'z0', - type = 'function_avg', + type = 'function_ln', content = [ null - ], - options = cm_python_openapi_sdk.models.options.options() + ] ) else: - return FunctionNtileContentInner( - type = 'function_avg', + return FunctionLogExpTypeGeneral( + type = 'function_ln', content = [ null ], ) """ - def testFunctionNtileContentInner(self): - """Test FunctionNtileContentInner""" + def testFunctionLogExpTypeGeneral(self): + """Test FunctionLogExpTypeGeneral""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_invitations_api.py b/test/test_invitations_api.py new file mode 100644 index 0000000..69b2e6c --- /dev/null +++ b/test/test_invitations_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.api.invitations_api import InvitationsApi + + +class TestInvitationsApi(unittest.TestCase): + """InvitationsApi unit test stubs""" + + def setUp(self) -> None: + self.api = InvitationsApi() + + def tearDown(self) -> None: + pass + + def test_create_invitation(self) -> None: + """Test case for create_invitation + + Create new invitation to the project for a user. + """ + pass + + def test_delete_invitation(self) -> None: + """Test case for delete_invitation + + Delete invitation. + """ + pass + + def test_get_invitation_by_id(self) -> None: + """Test case for get_invitation_by_id + + Get detail of an invitation. + """ + pass + + def test_get_invitations(self) -> None: + """Test case for get_invitations + + Get list of project invitations. + """ + pass + + def test_update_invitation(self) -> None: + """Test case for update_invitation + + Update invitation. + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mandatory_keys_for_pagable_response.py b/test/test_mandatory_keys_for_pagable_response.py deleted file mode 100644 index 1f36fc8..0000000 --- a/test/test_mandatory_keys_for_pagable_response.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - clevermaps-client - - CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations - - The version of the OpenAPI document: 1.0.0 - Contact: support@clevermaps.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse - -class TestMandatoryKeysForPagableResponse(unittest.TestCase): - """MandatoryKeysForPagableResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MandatoryKeysForPagableResponse: - """Test MandatoryKeysForPagableResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MandatoryKeysForPagableResponse` - """ - model = MandatoryKeysForPagableResponse() - if include_optional: - return MandatoryKeysForPagableResponse( - size = 56, - total_elements = None, - total_pages = 56, - number = 56 - ) - else: - return MandatoryKeysForPagableResponse( - size = 56, - total_elements = None, - total_pages = 56, - number = 56, - ) - """ - - def testMandatoryKeysForPagableResponse(self): - """Test MandatoryKeysForPagableResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_membership_dto.py b/test/test_membership_dto.py deleted file mode 100644 index 04c5e2b..0000000 --- a/test/test_membership_dto.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - clevermaps-client - - CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations - - The version of the OpenAPI document: 1.0.0 - Contact: support@clevermaps.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO - -class TestMembershipDTO(unittest.TestCase): - """MembershipDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MembershipDTO: - """Test MembershipDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MembershipDTO` - """ - model = MembershipDTO() - if include_optional: - return MembershipDTO( - id = '', - account_id = '', - status = 'ENABLED', - role = 'ANONYMOUS', - created_at = '', - modified_at = '', - account = {preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, requireAdditionalAttributes=true, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, jobInfo={companyName=companyName, industry=industry, jobPosition=jobPosition}, email=email, status=ENABLED}, - links = [ - None - ] - ) - else: - return MembershipDTO( - status = 'ENABLED', - role = 'ANONYMOUS', - ) - """ - - def testMembershipDTO(self): - """Test MembershipDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_accounts_reset_password_api.py b/test/test_metric_values_distribution_api.py similarity index 53% rename from test/test_accounts_reset_password_api.py rename to test/test_metric_values_distribution_api.py index e389f13..829baa6 100644 --- a/test/test_accounts_reset_password_api.py +++ b/test/test_metric_values_distribution_api.py @@ -15,36 +15,27 @@ import unittest -from cm_python_openapi_sdk.api.accounts_reset_password_api import AccountsResetPasswordApi +from cm_python_openapi_sdk.api.metric_values_distribution_api import MetricValuesDistributionApi -class TestAccountsResetPasswordApi(unittest.TestCase): - """AccountsResetPasswordApi unit test stubs""" +class TestMetricValuesDistributionApi(unittest.TestCase): + """MetricValuesDistributionApi unit test stubs""" def setUp(self) -> None: - self.api = AccountsResetPasswordApi() + self.api = MetricValuesDistributionApi() def tearDown(self) -> None: pass - def test_reset_password_with_token(self) -> None: - """Test case for reset_password_with_token + def test_accept_metric_values_distributions(self) -> None: + """Test case for accept_metric_values_distributions - Finish reset password with token """ pass - def test_send_reset_password_token(self) -> None: - """Test case for send_reset_password_token + def test_get_metric_values_distributions(self) -> None: + """Test case for get_metric_values_distributions - Ask for reset password token - """ - pass - - def test_verify_reset_password_token(self) -> None: - """Test case for verify_reset_password_token - - Verify reset password token is valid """ pass diff --git a/test/test_new_account_dto.py b/test/test_new_account_dto.py deleted file mode 100644 index d1e0042..0000000 --- a/test/test_new_account_dto.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - clevermaps-client - - CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations - - The version of the OpenAPI document: 1.0.0 - Contact: support@clevermaps.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from cm_python_openapi_sdk.models.new_account_dto import NewAccountDTO - -class TestNewAccountDTO(unittest.TestCase): - """NewAccountDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NewAccountDTO: - """Test NewAccountDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NewAccountDTO` - """ - model = NewAccountDTO() - if include_optional: - return NewAccountDTO( - given_name = 'L0', - surname = 'L0', - email = '', - password = '', - consent_granted = True, - phone_number = '012345', - require_additional_attributes = True, - preferences = {sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, - utm_parameters = {referrer=referrer, campaign=campaign, medium=medium, source=source}, - job_info = {companyName=companyName, industry=industry, jobPosition=jobPosition} - ) - else: - return NewAccountDTO( - given_name = 'L0', - surname = 'L0', - email = '', - password = '', - ) - """ - - def testNewAccountDTO(self): - """Test NewAccountDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_project_invitation_api.py b/test/test_project_invitation_api.py new file mode 100644 index 0000000..c2e0b5f --- /dev/null +++ b/test/test_project_invitation_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.api.project_invitation_api import ProjectInvitationApi + + +class TestProjectInvitationApi(unittest.TestCase): + """ProjectInvitationApi unit test stubs""" + + def setUp(self) -> None: + self.api = ProjectInvitationApi() + + def tearDown(self) -> None: + pass + + def test_accept_project_invitation(self) -> None: + """Test case for accept_project_invitation + + Accept invitation. + """ + pass + + def test_get_invitation(self) -> None: + """Test case for get_invitation + + Get detail of an invitation. + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reset_password_dto.py b/test/test_reset_password_dto.py deleted file mode 100644 index 995fb82..0000000 --- a/test/test_reset_password_dto.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - clevermaps-client - - CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations - - The version of the OpenAPI document: 1.0.0 - Contact: support@clevermaps.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from cm_python_openapi_sdk.models.reset_password_dto import ResetPasswordDTO - -class TestResetPasswordDTO(unittest.TestCase): - """ResetPasswordDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ResetPasswordDTO: - """Test ResetPasswordDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ResetPasswordDTO` - """ - model = ResetPasswordDTO() - if include_optional: - return ResetPasswordDTO( - new_password = '', - consent_granted = True - ) - else: - return ResetPasswordDTO( - new_password = '', - ) - """ - - def testResetPasswordDTO(self): - """Test ResetPasswordDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_send_reset_password_dto.py b/test/test_send_reset_password_dto.py deleted file mode 100644 index 5aa29f9..0000000 --- a/test/test_send_reset_password_dto.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - clevermaps-client - - CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations - - The version of the OpenAPI document: 1.0.0 - Contact: support@clevermaps.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from cm_python_openapi_sdk.models.send_reset_password_dto import SendResetPasswordDTO - -class TestSendResetPasswordDTO(unittest.TestCase): - """SendResetPasswordDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendResetPasswordDTO: - """Test SendResetPasswordDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendResetPasswordDTO` - """ - model = SendResetPasswordDTO() - if include_optional: - return SendResetPasswordDTO( - email = '' - ) - else: - return SendResetPasswordDTO( - email = '', - ) - """ - - def testSendResetPasswordDTO(self): - """Test SendResetPasswordDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_submit_job_execution_request.py b/test/test_submit_job_execution_request.py deleted file mode 100644 index 69ca85d..0000000 --- a/test/test_submit_job_execution_request.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - clevermaps-client - - CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations - - The version of the OpenAPI document: 1.0.0 - Contact: support@clevermaps.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from cm_python_openapi_sdk.models.submit_job_execution_request import SubmitJobExecutionRequest - -class TestSubmitJobExecutionRequest(unittest.TestCase): - """SubmitJobExecutionRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SubmitJobExecutionRequest: - """Test SubmitJobExecutionRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SubmitJobExecutionRequest` - """ - model = SubmitJobExecutionRequest() - if include_optional: - return SubmitJobExecutionRequest( - type = 'E', - project_id = 'w8q6zgckec0l3o4g', - content = cm_python_openapi_sdk.models.export_request.ExportRequest( - format = 'csv', - csv_header_format = 'basic', - query = cm_python_openapi_sdk.models.query.query(), - csv_options = cm_python_openapi_sdk.models.export_request_csv_options.ExportRequest_csvOptions( - header = True, - separator = '', - quote = '', - escape = '', ), - xlsx_options = cm_python_openapi_sdk.models.xlsx_options.xlsxOptions(), ) - ) - else: - return SubmitJobExecutionRequest( - type = 'E', - project_id = 'w8q6zgckec0l3o4g', - content = cm_python_openapi_sdk.models.export_request.ExportRequest( - format = 'csv', - csv_header_format = 'basic', - query = cm_python_openapi_sdk.models.query.query(), - csv_options = cm_python_openapi_sdk.models.export_request_csv_options.ExportRequest_csvOptions( - header = True, - separator = '', - quote = '', - escape = '', ), - xlsx_options = cm_python_openapi_sdk.models.xlsx_options.xlsxOptions(), ), - ) - """ - - def testSubmitJobExecutionRequest(self): - """Test SubmitJobExecutionRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main()