-
Notifications
You must be signed in to change notification settings - Fork 34
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
Conversation
There was a problem hiding this 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.
content/v2/openapi.yml
Outdated
@@ -3931,6 +4006,12 @@ components: | |||
properties: | |||
domain: | |||
$ref: '#/components/schemas/Domain' | |||
EventDomainLock: | |||
type: object | |||
description: Payload for domain.lock |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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
@@ -90,6 +90,7 @@ The following events are available: | |||
* domain.auto\_renewal\_enable | |||
* domain.create | |||
* domain.delete | |||
* domain.lock | |||
* domain.register:started |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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
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
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
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
This PR adds OpenAPI definitions for the new Domain Transfer Lock API and its related events.
There are three endpoints that are added:
GET /:account/registrar/domains/:domain/transfer_lock
POST /:account/registrar/domains/:domain/transfer_lock
DELETE /:account/registrar/domains/:domain/transfer_lock
Two already existing but undocumented events have been added:
domain.lock
domain.unlock
Belongs to https://github.com/dnsimple/dnsimple-business/issues/1728