Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilson Lin committed Aug 22, 2023
1 parent e6e1795 commit 579d666
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
30 changes: 30 additions & 0 deletions lib/registrar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -592,4 +592,34 @@ export class Registrar {
);
return method;
})();

/**
* Starts a registrant change.
*
* POST /{account}/registrar/registrant_changes
*
* @see https://developer.dnsimple.com/v2/registrar/#createRegistrantChange
*
* @param account The account id
* @param change The change details
* @param params Query parameters
*/
createRegistrantChange = (() => {
const method = (
account: number,
change: {
domain_id: string,
contact_id: string,
extended_attributes: Record<string, string>,
},
params: QueryParams & {} = {}
): Promise<{ data: types.RegistrantChange }> =>
this._client.request(
"POST",
`/${account}/registrar/registrant_changes`,
change,
params,
);
return method;
})();
}
14 changes: 14 additions & 0 deletions lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,20 @@ export type WhoisPrivacyRenewal = {
updated_at: string;
};

export type RegistrantChange = {
id: number,
type: number,
account_id: number,
contact_id: number,
domain_id: number,
state: string,
extended_attributes: Record<string, string>,
registry_owner_change: boolean,
irt_lock_lifted_by: string,
created_at: string,
updated_at: string,
};

export type PrimaryServer = {
id: number;
account_id: number;
Expand Down

0 comments on commit 579d666

Please sign in to comment.