Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain transfer lock API #519

Merged
merged 13 commits into from
Sep 21, 2023
Merged

Domain transfer lock API #519

merged 13 commits into from
Sep 21, 2023

Conversation

DXTimer
Copy link
Contributor

@DXTimer DXTimer commented Aug 15, 2023

This PR adds OpenAPI definitions for the new Domain Transfer Lock API and its related events.

There are three endpoints that are added:

  1. GET /:account/registrar/domains/:domain/transfer_lock
  2. POST /:account/registrar/domains/:domain/transfer_lock
  3. DELETE /:account/registrar/domains/:domain/transfer_lock

Two already existing but undocumented events have been added:

  1. domain.lock
  2. domain.unlock

Belongs to https://github.com/dnsimple/dnsimple-business/issues/1728

@DXTimer DXTimer self-assigned this Aug 15, 2023
content/v2/openapi.yml Outdated Show resolved Hide resolved
content/v2/openapi.yml Outdated Show resolved Hide resolved
content/v2/openapi.yml Outdated Show resolved Hide resolved
content/v2/openapi.yml Outdated Show resolved Hide resolved
content/v2/openapi.yml Outdated Show resolved Hide resolved
@DXTimer DXTimer requested a review from AGS4NO August 30, 2023 10:06
@DXTimer DXTimer marked this pull request as ready for review August 31, 2023 07:07
Copy link
Member

@weppos weppos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please have a look at the notes inline.

@@ -3931,6 +4006,12 @@ components:
properties:
domain:
$ref: '#/components/schemas/Domain'
EventDomainLock:
type: object
description: Payload for domain.lock
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domain.lock is too generic. Note we had the same issue in the actual interactor code, and they were renamed.

Please use something that is more closely associated with the notion of transfer lock, for instance:

  • domain.transfer_lock_enable
  • domain.transfer_lock_disable

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weppos I have renamed the event and payload items per your suggestion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AGS4NO did you use "enable" or "enabled" (notice the -ed form). For consistency with all the other events, we should use "enable/disable"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, I was looking an outdated diff where it used the -ed form, but it sounds like it is now fixed.

content/v2/webhooks/events.markdown Outdated Show resolved Hide resolved
@@ -90,6 +90,7 @@ The following events are available:
* domain.auto\_renewal\_enable
* domain.create
* domain.delete
* domain.lock
* domain.register:started
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this PR, but when changes were made in #505 it seems we did not keep names sorted properly. Can you please have state-aware events (the ones ending with :) added at the end?

* domain.transfer
* domain.transfer:started
* domain.transfer:cancelled

vs

* domain.transfer:started
* domain.transfer
* domain.transfer:cancelled

This for all cases in this file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These have all been alphabetized with state-aware events at the end of each section.

* domain.transfer
* domain.transfer:cancelled
* domain.transfer:started

Content-Length: 643
Connection: keep-alive

{"data": {"domain": {"id": 1, "name": "example.com", "state": "registered", "account_id": 1010, "auto_renew": false, "created_at": "2023-03-02T02:39:18Z", "expires_at": "2024-03-02T02:39:22Z", "expires_on": "2024-03-02", "updated_at": "2023-08-31T06:46:48Z", "unicode_name": "example.com", "private_whois": false, "registrant_id": 101}}, "name": "domain.lock", "actor": {"id": "1010", "entity": "account", "pretty": "[email protected]"}, "account": {"id": 1010, "display": "xxxxxxx-xxxxxxx-xxxxxxx", "identifier": "[email protected]"}, "api_version": "v2", "request_identifier": "0f31483c-c303-497b-8a88-2edb48aa111e"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for the future:

It's a bit awkward that the payload doesn't have any information regarding the lock status. Generally, the payload carries over details about the change.

As we currently can't include the lock status in the domain (for the performance reason we discussed), we would need to add a separate, specific node just for it. Given the payload name carries over the status, I'd leave it as it is.

Should we ever be able to sync the lock status locally in the domain object, we should definitely expose it here.

/cc @OleMchls for knowledge about the current limitations imposed by not storing the status locally

@AGS4NO AGS4NO requested a review from weppos September 6, 2023 16:03
@DXTimer DXTimer merged commit fa5f098 into main Sep 21, 2023
@DXTimer DXTimer deleted the enhancement/domain-transfer-lock branch September 21, 2023 07:53
@weppos weppos added documentation Updates on the documentation and support content. and removed enhancement labels Sep 28, 2023
DXTimer added a commit to dnsimple/dnsimple-csharp that referenced this pull request Dec 28, 2023
This PR introduces 3 new endpoints that are part of the domain transfer lock API that is introduced in dnsimple/dnsimple-developer#519.

The following endpoints have been added:
- **getDomainTransferLock**: GET `/{account}/registrar/domains/{domain}/transfer_lock`
- **enableDomainTransferLock**: POST `/{account}/registrar/domains/{domain}/transfer_lock`
- **disableDomainTransferLock**: DELETE `/{account}/registrar/domains/{domain}/transfer_lock`

Belongs to dnsimple/dnsimple-business#1728
Belongs to https://github.com/dnsimple/dnsimple-external-integrations/issues/18
DXTimer added a commit to dnsimple/dnsimple-elixir that referenced this pull request Dec 28, 2023
This PR introduces 3 new endpoints that are part of the domain transfer lock API that is introduced in dnsimple/dnsimple-developer#519.

The following endpoints have been added:
- **getDomainTransferLock**: GET `/{account}/registrar/domains/{domain}/transfer_lock`
- **enableDomainTransferLock**: POST `/{account}/registrar/domains/{domain}/transfer_lock`
- **disableDomainTransferLock**: DELETE `/{account}/registrar/domains/{domain}/transfer_lock`

Belongs to dnsimple/dnsimple-business#1728
Belongs to https://github.com/dnsimple/dnsimple-external-integrations/issues/18
DXTimer added a commit to dnsimple/dnsimple-rust that referenced this pull request Dec 28, 2023
This PR introduces 3 new endpoints that are part of the domain transfer lock API that is introduced in dnsimple/dnsimple-developer#519.

The following endpoints have been added:
- **getDomainTransferLock**: GET `/{account}/registrar/domains/{domain}/transfer_lock`
- **enableDomainTransferLock**: POST `/{account}/registrar/domains/{domain}/transfer_lock`
- **disableDomainTransferLock**: DELETE `/{account}/registrar/domains/{domain}/transfer_lock`

Belongs to dnsimple/dnsimple-business#1728
Belongs to https://github.com/dnsimple/dnsimple-external-integrations/issues/18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Updates on the documentation and support content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants