Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
},
"invokedBy": "ci",
"requestedVersion": "1.31.0",
"requestedVersion": "1.32.0",
"ciProvider": "gitlab",
"sdkVersion": "1.31.0"
"sdkVersion": "1.32.0"
}
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@namecom/core-api",
"version": "1.31.0",
"version": "1.32.0",
"private": false,
"repository": {
"type": "git",
Expand Down
365 changes: 141 additions & 224 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3464,9 +3464,10 @@ await client.webhookNotifications.getSubscribedNotifications();
Creates a webhook subscription to receive real-time notifications about specific domain or account events (e.g. transfer completions, renewals). Pass the callback URL and event types. This allows external systems to stay in sync with name.com changes.
Supported webhook event names:
- `account.credit.balance_change` – account credit balance changes (increases or decreases).
- `account.domain.removal` – domain removed from the subscribing account.
- `domain.lock.status_change` – domain lock added or removed.
- `domain.transfer.status_change` – domain transfer IN to name.com; status updates while name.com is the gaining registrar.
- `domain.transfer_out.status_change` – domain transfer OUT from name.com to another registrar; fires when the domain is removed from the account.
- `domain.transfer_out.status_change` – domain transfer OUT from name.com; `initiated`, `completed` (domain removed), or `canceled` (no longer pending at the registry).
- `domain.transfer.internal_in` - name.com domain transfers in to the subscribing account via internal transfer.
- `domain.transfer.internal_out` - name.com domain transfers out of the subscribing account via internal transfer.
- `contact.verification.status_change` - contact verification status changes (verified or unverified).
Expand Down Expand Up @@ -4165,6 +4166,7 @@ await client.transfers.cancelTransfer({
<dd>

Cancels an outbound transfer for the given domain. Use this when the domain is being transferred out of name.com (losing registrar) to another (gaining) registrar and the registrant or reseller wants to cancel that transfer.
On success, subscribers receive `domain.transfer_out.status_change` with status `canceled`.
The endpoint validates that the domain exists and belongs to the authenticated account. Only domains in a pending transfer (out) state can be canceled.
</dd>
</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export function normalizeClientOptions<T extends BaseClientOptions = BaseClientO
{
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@namecom/core-api",
"X-Fern-SDK-Version": "1.31.0",
"User-Agent": "@namecom/core-api/1.31.0",
"X-Fern-SDK-Version": "1.32.0",
"User-Agent": "@namecom/core-api/1.32.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
3 changes: 3 additions & 0 deletions src/api/resources/contactVerification/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class ContactVerificationClient {
* @param {Namecom.UnverifiedContactsListRequest} request
* @param {ContactVerificationClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Namecom.BadRequestError}
* @throws {@link Namecom.UnauthorizedError}
* @throws {@link Namecom.ForbiddenError}
* @throws {@link Namecom.MethodNotAllowedError}
Expand Down Expand Up @@ -94,6 +95,8 @@ export class ContactVerificationClient {

if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 400:
throw new Namecom.BadRequestError(_response.error.body as unknown, _response.rawResponse);
case 401:
throw new Namecom.UnauthorizedError(_response.error.body as unknown, _response.rawResponse);
case 403:
Expand Down
12 changes: 12 additions & 0 deletions src/api/resources/domains/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,18 @@ export class DomainsClient {
* await client.domains.createDomain({
* "X-Idempotency-Key": "083910ef-04e4-4bd1-a0bf-3737fe005ca8",
* domain: {
* domainName: "example.se"
* },
* tldRequirements: {
* "X-NICSE-IDNUMBER": "5566778899"
* },
* years: 1
* })
*
* @example
* await client.domains.createDomain({
* "X-Idempotency-Key": "083910ef-04e4-4bd1-a0bf-3737fe005ca8",
* domain: {
* domainName: "tiktok.page"
* },
* claims: {
Expand Down
12 changes: 12 additions & 0 deletions src/api/resources/domains/client/requests/CreateDomainRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ import type * as Namecom from "../../../../index.js";
* {
* "X-Idempotency-Key": "083910ef-04e4-4bd1-a0bf-3737fe005ca8",
* domain: {
* domainName: "example.se"
* },
* tldRequirements: {
* "X-NICSE-IDNUMBER": "5566778899"
* },
* years: 1
* }
*
* @example
* {
* "X-Idempotency-Key": "083910ef-04e4-4bd1-a0bf-3737fe005ca8",
* domain: {
* domainName: "tiktok.page"
* },
* claims: {
Expand Down
3 changes: 3 additions & 0 deletions src/api/resources/emailForwardings/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class EmailForwardingsClient {
* @param {Namecom.ListEmailForwardingsRequest} request
* @param {EmailForwardingsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Namecom.BadRequestError}
* @throws {@link Namecom.UnauthorizedError}
* @throws {@link Namecom.ForbiddenError}
* @throws {@link Namecom.NotFoundError}
Expand Down Expand Up @@ -95,6 +96,8 @@ export class EmailForwardingsClient {

if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 400:
throw new Namecom.BadRequestError(_response.error.body as unknown, _response.rawResponse);
case 401:
throw new Namecom.UnauthorizedError(_response.error.body as unknown, _response.rawResponse);
case 403:
Expand Down
3 changes: 3 additions & 0 deletions src/api/resources/orders/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class OrdersClient {
* @param {Namecom.ListOrdersRequest} request
* @param {OrdersClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Namecom.BadRequestError}
* @throws {@link Namecom.UnauthorizedError}
* @throws {@link Namecom.ForbiddenError}
* @throws {@link Namecom.MethodNotAllowedError}
Expand Down Expand Up @@ -107,6 +108,8 @@ export class OrdersClient {

if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 400:
throw new Namecom.BadRequestError(_response.error.body as unknown, _response.rawResponse);
case 401:
throw new Namecom.UnauthorizedError(_response.error.body as unknown, _response.rawResponse);
case 403:
Expand Down
3 changes: 3 additions & 0 deletions src/api/resources/premiumDomains/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class PremiumDomainsClient {
*
* @throws {@link Namecom.UnauthorizedError}
* @throws {@link Namecom.ForbiddenError}
* @throws {@link Namecom.NotFoundError}
* @throws {@link Namecom.MethodNotAllowedError}
* @throws {@link Namecom.TooManyRequestsError}
* @throws {@link Namecom.InternalServerError}
Expand Down Expand Up @@ -86,6 +87,8 @@ export class PremiumDomainsClient {
throw new Namecom.UnauthorizedError(_response.error.body as unknown, _response.rawResponse);
case 403:
throw new Namecom.ForbiddenError(_response.error.body as unknown, _response.rawResponse);
case 404:
throw new Namecom.NotFoundError(_response.error.body as Namecom.NotFound404, _response.rawResponse);
case 405:
throw new Namecom.MethodNotAllowedError(_response.error.body as unknown, _response.rawResponse);
case 429:
Expand Down
4 changes: 4 additions & 0 deletions src/api/resources/transfers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class TransfersClient {
* @param {Namecom.ListTransfersRequest} request
* @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Namecom.BadRequestError}
* @throws {@link Namecom.UnauthorizedError}
* @throws {@link Namecom.PaymentRequiredError}
* @throws {@link Namecom.ForbiddenError}
Expand Down Expand Up @@ -91,6 +92,8 @@ export class TransfersClient {

if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 400:
throw new Namecom.BadRequestError(_response.error.body as unknown, _response.rawResponse);
case 401:
throw new Namecom.UnauthorizedError(_response.error.body as unknown, _response.rawResponse);
case 402:
Expand Down Expand Up @@ -452,6 +455,7 @@ export class TransfersClient {

/**
* Cancels an outbound transfer for the given domain. Use this when the domain is being transferred out of name.com (losing registrar) to another (gaining) registrar and the registrant or reseller wants to cancel that transfer.
* On success, subscribers receive `domain.transfer_out.status_change` with status `canceled`.
* The endpoint validates that the domain exists and belongs to the authenticated account. Only domains in a pending transfer (out) state can be canceled.
*
* @param {Namecom.CancelOutboundTransferRequest} request
Expand Down
3 changes: 2 additions & 1 deletion src/api/resources/webhookNotifications/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ export class WebhookNotificationsClient {
* Creates a webhook subscription to receive real-time notifications about specific domain or account events (e.g. transfer completions, renewals). Pass the callback URL and event types. This allows external systems to stay in sync with name.com changes.
* Supported webhook event names:
* - `account.credit.balance_change` – account credit balance changes (increases or decreases).
* - `account.domain.removal` – domain removed from the subscribing account.
* - `domain.lock.status_change` – domain lock added or removed.
* - `domain.transfer.status_change` – domain transfer IN to name.com; status updates while name.com is the gaining registrar.
* - `domain.transfer_out.status_change` – domain transfer OUT from name.com to another registrar; fires when the domain is removed from the account.
* - `domain.transfer_out.status_change` – domain transfer OUT from name.com; `initiated`, `completed` (domain removed), or `canceled` (no longer pending at the registry).
* - `domain.transfer.internal_in` - name.com domain transfers in to the subscribing account via internal transfer.
* - `domain.transfer.internal_out` - name.com domain transfers out of the subscribing account via internal transfer.
* - `contact.verification.status_change` - contact verification status changes (verified or unverified).
Expand Down
30 changes: 30 additions & 0 deletions src/api/types/AccountDomainRemoval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This file was auto-generated by Fern from our API Definition.

/**
* Payload sent when a domain is removed from the subscribing account.
*/
export interface AccountDomainRemoval {
/** The name of the subscription event */
eventName: AccountDomainRemoval.EventName;
/** The name of the domain that was removed */
domainName: string;
/** Why the domain left inventory: `expiration` (registry delete / post-expiry inventory loss), `agp_refund` (AGP refund delete), or `administrative` (ops/support removal). */
reason: AccountDomainRemoval.Reason;
/** The date and time when the domain expired */
expireDate: string;
}

export namespace AccountDomainRemoval {
/** The name of the subscription event */
export const EventName = {
AccountDomainRemoval: "account.domain.removal",
} as const;
export type EventName = (typeof EventName)[keyof typeof EventName];
/** Why the domain left inventory: `expiration` (registry delete / post-expiry inventory loss), `agp_refund` (AGP refund delete), or `administrative` (ops/support removal). */
export const Reason = {
Expiration: "expiration",
AgpRefund: "agp_refund",
Administrative: "administrative",
} as const;
export type Reason = (typeof Reason)[keyof typeof Reason];
}
1 change: 1 addition & 0 deletions src/api/types/AvailableWebhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/** The list of configured webhooks you can subscribe to */
export const AvailableWebhooks = {
AccountCreditBalanceChange: "account.credit.balance_change",
AccountDomainRemoval: "account.domain.removal",
DomainLockStatusChange: "domain.lock.status_change",
DomainTransferStatusChange: "domain.transfer.status_change",
DomainTransferOutStatusChange: "domain.transfer_out.status_change",
Expand Down
8 changes: 4 additions & 4 deletions src/api/types/DomainTransferOutStatusChange.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// This file was auto-generated by Fern from our API Definition.

/**
* Payload sent when a domain transfer OUT from name.com to another registrar has a status change (initiated, completed, or canceled). When status is "completed", the domain has been removed from name.com. In some edge cases (including near-expiration scenarios) the data may not be fully accurate.
* Payload for `domain.transfer_out.status_change`. `completed` means the domain left name.com. `canceled` means the outbound transfer is no longer pending at the registry.
*/
export interface DomainTransferOutStatusChange {
/** The name of the subscription event. */
eventName: DomainTransferOutStatusChange.EventName;
/** The domain that has transferred out of name.com. */
/** The domain whose outbound transfer status changed. For `completed`, the domain has left name.com; for `initiated` and `canceled`, it remains on the losing account. */
domainName: string;
/** The status of the transfer out event. May be "initiated" (transfer out was started), "completed" (domain has been removed from the account), or "canceled" (transfer out was canceled before completion). */
/** `initiated` (pending out started), `completed` (domain removed), or `canceled` (no longer pending at the registry). */
status: DomainTransferOutStatusChange.Status;
/** The registry client ID associated with the domain at the time of transfer out, when available. This can help identify the gaining registrar at the registry. */
registryClientId?: (string | null) | undefined;
Expand All @@ -20,7 +20,7 @@ export namespace DomainTransferOutStatusChange {
DomainTransferOutStatusChange: "domain.transfer_out.status_change",
} as const;
export type EventName = (typeof EventName)[keyof typeof EventName];
/** The status of the transfer out event. May be "initiated" (transfer out was started), "completed" (domain has been removed from the account), or "canceled" (transfer out was canceled before completion). */
/** `initiated` (pending out started), `completed` (domain removed), or `canceled` (no longer pending at the registry). */
export const Status = {
Initiated: "initiated",
Completed: "completed",
Expand Down
1 change: 1 addition & 0 deletions src/api/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from "./Account.js";
export * from "./AccountCreditBalanceChange.js";
export * from "./AccountDomainRemoval.js";
export * from "./AccountRequest.js";
export * from "./AuthCodeResponse.js";
export * from "./AutorenewEnabled.js";
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SDK_VERSION = "1.31.0";
export const SDK_VERSION = "1.32.0";
36 changes: 30 additions & 6 deletions tests/wire/contactVerification.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,30 @@ describe("ContactVerificationClient", () => {

const rawResponseBody = { key: "value" };

server
.mockEndpoint()
.get("/core/v1/contacts/unverified")
.respondWith()
.statusCode(400)
.jsonBody(rawResponseBody)
.build();

await expect(async () => {
return await client.contactVerification.unverifiedContactsList();
}).rejects.toThrow(Namecom.BadRequestError);
});

test("UnverifiedContactsList (3)", async () => {
const server = mockServerPool.createServer();
const client = new NamecomClient({
maxRetries: 0,
username: "test",
password: "test",
environment: server.baseUrl,
});

const rawResponseBody = { key: "value" };

server
.mockEndpoint()
.get("/core/v1/contacts/unverified")
Expand All @@ -70,7 +94,7 @@ describe("ContactVerificationClient", () => {
}).rejects.toThrow(Namecom.UnauthorizedError);
});

test("UnverifiedContactsList (3)", async () => {
test("UnverifiedContactsList (4)", async () => {
const server = mockServerPool.createServer();
const client = new NamecomClient({
maxRetries: 0,
Expand All @@ -94,7 +118,7 @@ describe("ContactVerificationClient", () => {
}).rejects.toThrow(Namecom.ForbiddenError);
});

test("UnverifiedContactsList (4)", async () => {
test("UnverifiedContactsList (5)", async () => {
const server = mockServerPool.createServer();
const client = new NamecomClient({
maxRetries: 0,
Expand All @@ -118,7 +142,7 @@ describe("ContactVerificationClient", () => {
}).rejects.toThrow(Namecom.MethodNotAllowedError);
});

test("UnverifiedContactsList (5)", async () => {
test("UnverifiedContactsList (6)", async () => {
const server = mockServerPool.createServer();
const client = new NamecomClient({
maxRetries: 0,
Expand All @@ -142,7 +166,7 @@ describe("ContactVerificationClient", () => {
}).rejects.toThrow(Namecom.TooManyRequestsError);
});

test("UnverifiedContactsList (6)", async () => {
test("UnverifiedContactsList (7)", async () => {
const server = mockServerPool.createServer();
const client = new NamecomClient({
maxRetries: 0,
Expand All @@ -166,7 +190,7 @@ describe("ContactVerificationClient", () => {
}).rejects.toThrow(Namecom.InternalServerError);
});

test("UnverifiedContactsList (7)", async () => {
test("UnverifiedContactsList (8)", async () => {
const server = mockServerPool.createServer();
const client = new NamecomClient({
maxRetries: 0,
Expand All @@ -190,7 +214,7 @@ describe("ContactVerificationClient", () => {
}).rejects.toThrow(Namecom.BadGatewayError);
});

test("UnverifiedContactsList (8)", async () => {
test("UnverifiedContactsList (9)", async () => {
const server = mockServerPool.createServer();
const client = new NamecomClient({
maxRetries: 0,
Expand Down
Loading
Loading