You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Major refactor of all email management API endpoints to use strongly-typed Pydantic request and response models, improving type safety and clarity.
Introduced numerous new models (e.g., AliasDisplay, EmailDisplay, OrderDisplay, ChangeQuotaCreate200Response, SubscriptionInfoResponse, etc.) for representing API data structures.
Updated serialization and deserialization logic across APIs to support new models and JSON content handling.
Added and updated comprehensive documentation for all new and refactored endpoints and models, including usage examples and property descriptions.
Added unit test stubs for all new models to ensure instantiation and field validation.
Updated package metadata and version to 2.0.0, reflecting the significant API and model changes.
Improved OpenAPI generator configuration and tracked files to align with the expanded model and test set.
Enhanced README with new usage examples, installation instructions, and model documentation.
Changes walkthrough 📝
Relevant files
Enhancement
33 files
change_quota_api.py
Refactor change quota API for typed request and response handling
workplace_console_client/api/change_quota_api.py
Added import statements for new response and request models.
Updated all change_quota_create* methods to accept a data parameter of type ChangeEmailQuota and return a ChangeQuotaCreate200Response.
Updated docstrings to reflect the new request and response types.
Modified serialization logic to handle the new request body and set appropriate headers for JSON content.
Changed response type mapping from '201': None to '200': "ChangeQuotaCreate200Response".
Added new model SubscriptionInfoCreate200Response for representing subscription usage info responses.
Includes fields for used_emails, remaining_quota, remaining_emails, allowed_emails, allowed_alias, remaining_alias, and allowed_quota, with serialization and deserialization helpers.
Extended the DnsInfoCreate200Response model with new fields: domain, all_dns_score, found, total, missing_dns, other_missing_dns, found_dns, and error.
Changed score to accept both float and int.
Updated serialization/deserialization to handle new fields.
The API methods have been updated to return specific response types, but there's inconsistency in how response codes are handled. Some methods expect 200 responses but the original code expected 201 responses.
Several methods have been renamed (e.g., subscriptions_create_0 to subscriptions_list) which could break backward compatibility for existing client code.
New code adds content type handling for JSON requests and responses, but doesn't handle potential content negotiation failures or invalid content types.
_body_params=data# set the HTTP header `Accept`if'Accept'notin_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_typeelse:
_default_content_type= (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if_default_content_typeisnotNone:
_header_params['Content-Type'] =_default_content_type
The score field is required but doesn't have a default value. Since this is a response model, it should handle cases where the API might not return a score. Make the field optional to prevent deserialization errors when the API response doesn't include a score.
[To ensure code accuracy, apply this suggestion manually]
Suggestion importance[1-10]: 5
__
Why: The suggestion correctly identifies that making score optional could improve robustness when handling API responses that might not include this field. However, this changes the API contract and may not be necessary if the API consistently returns a score value. The change is reasonable but not critical.
Low
General
Remove trailing comma
Remove the trailing comma after the last parameter in the return SubScriptionInfo() constructor. While Python allows trailing commas in function calls, maintaining consistent style without unnecessary commas improves readability.
Why: The suggestion correctly identifies a trailing comma that can be removed for style consistency. However, this is a very minor cosmetic change with minimal impact on code quality or functionality.
patienceigiraneza
changed the title
Feat: realizing the version 2.0 to allow users to perform emails services management operations.
Feat: release SDK version 2.0 to allow users to perform emails services management operations.
Jun 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Enhancement, Documentation, Tests, Other
Description
Major refactor of all email management API endpoints to use strongly-typed Pydantic request and response models, improving type safety and clarity.
Introduced numerous new models (e.g.,
AliasDisplay,EmailDisplay,OrderDisplay,ChangeQuotaCreate200Response,SubscriptionInfoResponse, etc.) for representing API data structures.Updated serialization and deserialization logic across APIs to support new models and JSON content handling.
Added and updated comprehensive documentation for all new and refactored endpoints and models, including usage examples and property descriptions.
Added unit test stubs for all new models to ensure instantiation and field validation.
Updated package metadata and version to 2.0.0, reflecting the significant API and model changes.
Improved OpenAPI generator configuration and tracked files to align with the expanded model and test set.
Enhanced README with new usage examples, installation instructions, and model documentation.
Changes walkthrough 📝
33 files
change_quota_api.py
Refactor change quota API for typed request and response handlingworkplace_console_client/api/change_quota_api.py
change_quota_create*methods to accept adataparameter oftype
ChangeEmailQuotaand return aChangeQuotaCreate200Response.appropriate headers for JSON content.
"ChangeQuotaCreate200Response".
create_alias_api.py
Refactor create alias API for typed request and response handlingworkplace_console_client/api/create_alias_api.py
create_alias_create*methods to accept adataparameter oftype
EmailAliasand return aChangeQuotaCreate200Response.appropriate headers for JSON content.
"ChangeQuotaCreate200Response".
delete_alias_api.py
Refactor delete alias API for typed request and response handlingworkplace_console_client/api/delete_alias_api.py
delete_alias_create*methods to accept adataparameter oftype
DeleteAliasand return aChangeQuotaCreate200Response.appropriate headers for JSON content.
"ChangeQuotaCreate200Response".
delete_email_api.py
Refactor delete email API for typed request and response handlingworkplace_console_client/api/delete_email_api.py
delete_email_create*methods to accept adataparameter oftype
DeleteEmailand return aChangeQuotaCreate200Response.appropriate headers for JSON content.
"ChangeQuotaCreate200Response".
domain_alias_api.py
Refactor domain alias API for typed request and response handlingworkplace_console_client/api/domain_alias_api.py
domain_alias_create*methods to accept adataparameter oftype
Domainand return a list ofAliasDisplay.appropriate headers for JSON content.
"List[AliasDisplay]".
domain_api.py
Refactor domain API for typed request and response handlingworkplace_console_client/api/domain_api.py
domain_create*methods to accept adataparameter of typeDomainActionand return aChangeQuotaCreate200Response.appropriate headers for JSON content.
"ChangeQuotaCreate200Response".
domain_info_api.py
Refactor domain info API for typed request and response handlingworkplace_console_client/api/domain_info_api.py
domain_info_create*methods to accept adataparameter oftype
SubScriptionInfoand return aSubscriptionInfoResponse.appropriate headers for JSON content.
"SubscriptionInfoResponse".
import_api.py
Refactor import API for typed request and response handlingworkplace_console_client/api/import_api.py
import_create*methods to accept adataparameter of typeImportCreateRequestand return aChangeQuotaCreate200Response.appropriate headers for JSON content.
"ChangeQuotaCreate200Response".
reset_password_api.py
Refactor reset password API for typed request and response handlingworkplace_console_client/api/reset_password_api.py
reset_password_create*methods to accept adataparameterof type
PasswordResetand return aChangeQuotaCreate200Response.appropriate headers for JSON content.
"ChangeQuotaCreate200Response".
subscription_info_api.py
Refactor subscription info API for typed request and response handlingworkplace_console_client/api/subscription_info_api.py
subscription_info_create*methods to accept adataparameter of type
SubScriptionInfoand return aSubscriptionInfoCreate200Response.appropriate headers for JSON content.
"SubscriptionInfoCreate200Response".
subscriptions_api.py
Major refactor of subscriptions API for typed request/response and newendpointsworkplace_console_client/api/subscriptions_api.py
subscriptions_create*methods to accept adataparameter oftype
OpenExchangeCreateAccountand return aChangeQuotaCreate200Response.subscriptions_list*methods to provide a list endpoint forsubscriptions.
subscriptions_read*methods for retrieving subscriptiondetails by context ID, returning
SubscriptionsRead200Response.update_subscription_status*methods for updating subscriptionstatus, accepting
ServiceActionand returningChangeQuotaCreate200Response.affected endpoints.
upgrade_api.py
Refactor upgrade API for typed request and response handlingworkplace_console_client/api/upgrade_api.py
upgrade_create*methods to accept adataparameter of typeSubScriptionInfoand return aChangeQuotaCreate200Response.appropriate headers for JSON content.
"ChangeQuotaCreate200Response".
alias_display.py
Add AliasDisplay model for alias representationworkplace_console_client/models/alias_display.py
AliasDisplayfor representing alias display data.and deserialization helpers.
email_display.py
Add EmailDisplay model for email representationworkplace_console_client/models/email_display.py
EmailDisplayfor representing email display data.email_id, display_name, and order, with serialization and
deserialization helpers.
open_exchange_create_account.py
Add OpenExchangeCreateAccount model for subscription creationworkplace_console_client/models/open_exchange_create_account.py
OpenExchangeCreateAccountfor creating new emailsubscriptions.
new_subscription, with serialization and deserialization helpers.
order_display.py
Add OrderDisplay model for subscription/order detailsworkplace_console_client/models/order_display.py
OrderDisplayfor representing order/subscriptiondetails.
serialization and deserialization helpers.
subscription_info_create200_response.py
Add SubscriptionInfoCreate200Response model for usage info responsesworkplace_console_client/models/subscription_info_create200_response.py
SubscriptionInfoCreate200Responsefor representingsubscription usage info responses.
allowed_emails, allowed_alias, remaining_alias, and allowed_quota,
with serialization and deserialization helpers.
subscription_info_response.py
Add SubscriptionInfoResponse model for detailed subscription infoworkplace_console_client/models/subscription_info_response.py
SubscriptionInfoResponsefor representing detailedsubscription info.
EmailDisplay), with serialization and deserialization helpers.
delete_alias.py
Add DeleteAlias Pydantic model for alias deletion requestsworkplace_console_client/models/delete_alias.py
DeleteAliasfor representing alias deletionrequests.
email,alias, anddomainwith validation.to_str,to_json,from_json,to_dict,from_dict).email_alias.py
Add EmailAlias Pydantic model for email alias creationworkplace_console_client/models/email_alias.py
EmailAliasfor email alias creation.email,domain, andaliaswith validation.delete_email.py
Add DeleteEmail Pydantic model for email deletionworkplace_console_client/models/delete_email.py
DeleteEmailfor deleting email accounts.email,domain, andsubscriptionwith type validation.import_create_request.py
Add ImportCreateRequest model for bulk email importworkplace_console_client/models/import_create_request.py
ImportCreateRequestPydantic model for bulk email importrequests.
sub_scription_info.py
Add SubScriptionInfo model for subscription informationworkplace_console_client/models/sub_scription_info.py
SubScriptionInfoPydantic model for subscriptioninformation.
domainandsubscriptionfields with validation.change_quota_create200_response.py
Add ChangeQuotaCreate200Response model for quota change responsesworkplace_console_client/models/change_quota_create200_response.py
ChangeQuotaCreate200ResponsePydantic model for quota changeresponses.
messageanderrorfields.domain_action.py
Add DomainAction model for domain action requestsworkplace_console_client/models/domain_action.py
DomainActionPydantic model for domain-related actions.actionanddomainwith validation.password_reset.py
Add PasswordReset model for password reset requestsworkplace_console_client/models/password_reset.py
PasswordResetPydantic model for password reset requests.emailandpasswordfields with validation.change_email_quota.py
Add ChangeEmailQuota model for email quota changesworkplace_console_client/models/change_email_quota.py
ChangeEmailQuotaPydantic model for changing email quota.emailandquotawith validation.service_action.py
Add ServiceAction model for service action requestsworkplace_console_client/models/service_action.py
ServiceActionPydantic model for service-level actions.actionfield with validation.domain.py
Add Domain model for domain representationworkplace_console_client/models/domain.py
DomainPydantic model for domain representation.domainfield with validation.dns_info_create200_response.py
Extend DnsInfoCreate200Response model with DNS detailsworkplace_console_client/models/dns_info_create200_response.py
DnsInfoCreate200Responsemodel with new fields:domain,all_dns_score,found,total,missing_dns,other_missing_dns,found_dns, anderror.scoreto accept both float and int.subscriptions_read200_response.py
Add SubscriptionsRead200Response model for subscription detailsworkplace_console_client/models/subscriptions_read200_response.py
SubscriptionsRead200ResponsePydantic model for subscriptionread responses.
domain_context,user_emails, andemail_aliases.__init__.py
Import new models into models packageworkplace_console_client/models/init.py
AliasDisplay,ChangeEmailQuota,ChangeQuotaCreate200Response,DeleteAlias,DeleteEmail,Domain,DomainAction,EmailAlias,EmailDisplay,ImportCreateRequest,OpenExchangeCreateAccount,OrderDisplay,PasswordReset,ServiceAction,SubScriptionInfo,SubscriptionInfoCreate200Response,SubscriptionInfoResponse,SubscriptionsRead200Response.__init__.py
Import new models into SDK package for external useworkplace_console_client/init.py
AliasDisplay,ChangeEmailQuota,ChangeQuotaCreate200Response,DeleteAlias,DeleteEmail,Domain,DomainAction,EmailAlias,EmailDisplay,ImportCreateRequest,OpenExchangeCreateAccount,OrderDisplay,PasswordReset,ServiceAction,SubScriptionInfo,SubscriptionInfoCreate200Response,SubscriptionInfoResponse,SubscriptionsRead200Response.20 files
test_order_display.py
Add unit test stub for OrderDisplay modeltest/test_order_display.py
OrderDisplaymodel.test_subscription_info_response.py
Add unit test stub for SubscriptionInfoResponse modeltest/test_subscription_info_response.py
SubscriptionInfoResponsemodel.test_alias_display.py
Add unit test stub for AliasDisplay modeltest/test_alias_display.py
AliasDisplaymodel.optional parameters.
test_change_email_quota.py
Add unit test stub for ChangeEmailQuota modeltest/test_change_email_quota.py
ChangeEmailQuotamodel.optional parameters.
test_change_quota_create200_response.py
Add unit test stub for ChangeQuotaCreate200Response modeltest/test_change_quota_create200_response.py
ChangeQuotaCreate200Responsemodel.optional parameters.
test_delete_alias.py
Add unit test stub for DeleteAlias modeltest/test_delete_alias.py
DeleteAliasmodel.optional parameters.
test_delete_email.py
Add unit test stub for DeleteEmail modeltest/test_delete_email.py
DeleteEmailmodel.optional parameters.
test_domain.py
Add unit test stub for Domain modeltest/test_domain.py
Domainmodel.optional parameters.
test_domain_action.py
Add unit test stub for DomainAction modeltest/test_domain_action.py
DomainActionmodel.optional parameters.
test_email_alias.py
Add unit test stub for EmailAlias modeltest/test_email_alias.py
EmailAliasmodel.optional parameters.
test_email_display.py
Add unit test stub for EmailDisplay modeltest/test_email_display.py
EmailDisplaymodel.optional parameters.
test_import_create_request.py
Add unit test stub for ImportCreateRequest modeltest/test_import_create_request.py
ImportCreateRequestmodel.optional parameters.
test_open_exchange_create_account.py
Add unit test stub for OpenExchangeCreateAccount modeltest/test_open_exchange_create_account.py
OpenExchangeCreateAccountmodel.optional parameters.
test_order_display.py
Add unit test stub for OrderDisplay modeltest/test_order_display.py
OrderDisplaymodel.optional parameters.
test_password_reset.py
Add unit test stub for PasswordReset modeltest/test_password_reset.py
PasswordResetmodel.optional parameters.
test_service_action.py
Add unit test stub for ServiceAction modeltest/test_service_action.py
ServiceActionmodel.optional parameters.
test_sub_scription_info.py
Add unit test stub for SubScriptionInfo modeltest/test_sub_scription_info.py
SubScriptionInfomodel.optional parameters.
test_subscription_info_create200_response.py
Add unit test stub for SubscriptionInfoCreate200Response modeltest/test_subscription_info_create200_response.py
SubscriptionInfoCreate200Responsemodel.optional parameters.
test_subscription_info_response.py
Add unit test stub for SubscriptionInfoResponse modeltest/test_subscription_info_response.py
SubscriptionInfoResponsemodel.optional parameters.
test_subscriptions_read200_response.py
Add unit test stub for SubscriptionsRead200Response modeltest/test_subscriptions_read200_response.py
SubscriptionsRead200Responsemodel.optional parameters.
2 files
setup.py
Update package metadata and version for v2.0.0 releasesetup.py
and BSD License.
FILES
Update OpenAPI generator tracked files for new models and tests.openapi-generator/FILES
documentation files.
expanded model set.
32 files
SubscriptionsApi.md
Update SubscriptionsApi documentation for new endpoints and modelsdocs/SubscriptionsApi.md
existing endpoints.
update_subscription_status.ChangeQuotaApi.md
Update ChangeQuotaApi documentation for new request/response modelsdocs/ChangeQuotaApi.md
change_quota_createendpoint, includingrequest/response models and examples.
DomainApi.md
Update DomainApi documentation for new request/response modelsdocs/DomainApi.md
domain_createendpoint, includingrequest/response models and examples.
DomainAliasApi.md
Update DomainAliasApi documentation for new request/response modelsdocs/DomainAliasApi.md
domain_alias_createendpoint, includingrequest/response models and examples.
DomainInfoApi.md
Update DomainInfoApi documentation for new request/response modelsdocs/DomainInfoApi.md
domain_info_createendpoint, includingrequest/response models and examples.
CreateAliasApi.md
Update CreateAliasApi documentation for new request/response modelsdocs/CreateAliasApi.md
create_alias_createendpoint, includingrequest/response models and examples.
DeleteAliasApi.md
Update DeleteAliasApi documentation for new request/response modelsdocs/DeleteAliasApi.md
delete_alias_createendpoint, includingrequest/response models and examples.
DeleteEmailApi.md
Update DeleteEmailApi documentation for new request/response modelsdocs/DeleteEmailApi.md
delete_email_createendpoint, includingrequest/response models and examples.
ImportApi.md
Update ImportApi documentation for new request/response modelsdocs/ImportApi.md
import_createendpoint, includingrequest/response models and examples.
ResetPasswordApi.md
Update ResetPasswordApi documentation for new request/response modelsdocs/ResetPasswordApi.md
reset_password_createendpoint, includingrequest/response models and examples.
SubscriptionInfoApi.md
Update SubscriptionInfoApi documentation for new request/responsemodelsdocs/SubscriptionInfoApi.md
subscription_info_createendpoint, includingrequest/response models and examples.
UpgradeApi.md
Update UpgradeApi documentation for new request/response modelsdocs/UpgradeApi.md
upgrade_createendpoint, includingrequest/response models and examples.
OrderDisplay.md
Add documentation for OrderDisplay modeldocs/OrderDisplay.md
OrderDisplaymodel, listing its propertiesand example usage.
EmailDisplay.md
Add documentation for EmailDisplay modeldocs/EmailDisplay.md
EmailDisplaymodel, listing its propertiesand example usage.
SubscriptionsRead200Response.md
Add documentation for SubscriptionsRead200Response modeldocs/SubscriptionsRead200Response.md
SubscriptionsRead200Responsemodel,listing its properties and example usage.
OpenExchangeCreateAccount.md
Add documentation for OpenExchangeCreateAccount modeldocs/OpenExchangeCreateAccount.md
OpenExchangeCreateAccountmodel, listingits properties and example usage.
SubscriptionInfoCreate200Response.md
Add documentation for SubscriptionInfoCreate200Response modeldocs/SubscriptionInfoCreate200Response.md
SubscriptionInfoCreate200Responsemodel,listing its properties and example usage.
README.md
Update README for v2.0.0 with new models and endpointsREADME.md
examples.
ChangeQuotaCreate200Response.md
Add documentation for ChangeQuotaCreate200Response response modeldocs/ChangeQuotaCreate200Response.md
ChangeQuotaCreate200Responsemodel.messageanderror.SubscriptionInfoResponse.md
Add documentation for SubscriptionInfoResponse modeldocs/SubscriptionInfoResponse.md
SubscriptionInfoResponsemodel.infoandemailswith references to related models.SubScriptionInfo.md
Add documentation for SubScriptionInfo modeldocs/SubScriptionInfo.md
SubScriptionInfomodel.domainandsubscription.AliasDisplay.md
Add documentation for AliasDisplay modeldocs/AliasDisplay.md
AliasDisplaymodel.id,primary_email, andname.ImportCreateRequest.md
Add documentation for ImportCreateRequest modeldocs/ImportCreateRequest.md
ImportCreateRequestmodel.fileanddomainproperties.ChangeEmailQuota.md
Add documentation for ChangeEmailQuota modeldocs/ChangeEmailQuota.md
ChangeEmailQuotamodel.emailandquota.EmailAlias.md
Add documentation for EmailAlias modeldocs/EmailAlias.md
EmailAliasmodel.email,domain, andalias.DeleteAlias.md
Add documentation for DeleteAlias modeldocs/DeleteAlias.md
DeleteAliasmodel.email,alias, anddomain.DeleteEmail.md
Add documentation for DeleteEmail modeldocs/DeleteEmail.md
DeleteEmailmodel.email,domain, andsubscription.DomainAction.md
Add documentation for DomainAction modeldocs/DomainAction.md
DomainActionmodel.actionanddomain.PasswordReset.md
Add documentation for PasswordReset modeldocs/PasswordReset.md
PasswordResetmodel.emailandpassword.ServiceAction.md
Add documentation for ServiceAction modeldocs/ServiceAction.md
ServiceActionmodel.actionproperty.DnsInfoCreate200Response.md
Update and expand DnsInfoCreate200Response model documentationdocs/DnsInfoCreate200Response.md
DnsInfoCreate200Responsemodel.scorefrom int to float and made it required.domain,all_dns_score,found,total,missing_dns,other_missing_dns,found_dns, anderror.Domain.md
Add documentation for Domain modeldocs/Domain.md
Domainmodel.domainproperty.