@fwgapps/namecheap 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -424,7 +424,8 @@ interface DomainsGetContactsResult {
424
424
  domain: string;
425
425
  /** Sent as the lower-case attribute `domainnameid`. */
426
426
  domainnameid: number;
427
- readonly: boolean;
427
+ /** Absent in live responses, which carry ReadOnly on each contact block instead. */
428
+ readonly?: boolean;
428
429
  registrant?: DomainsContact;
429
430
  tech?: DomainsContact;
430
431
  admin?: DomainsContact;
@@ -787,7 +788,8 @@ interface TransferListItem {
787
788
  domainName: string;
788
789
  user: string;
789
790
  transferDate: string;
790
- orderID: number;
791
+ /** Absent while the transfer is still queued. */
792
+ orderID?: number;
791
793
  statusID: number;
792
794
  status: string;
793
795
  }
@@ -813,7 +815,13 @@ declare const transferCommands: {
813
815
  interface SslCreateParams {
814
816
  /** Number of years for the certificate. Allowed values: 1 to 5. */
815
817
  years: number;
816
- /** SSL product name. */
818
+ /**
819
+ * SSL product name. Since July 11, 2026 use one of: `Standard SSL SSLcom`,
820
+ * `Standard Wildcard SSL SSLcom`, `SAN Certificate SSL SSLcom`, `High Assurance SSL SSLcom`,
821
+ * `OV Wildcard SSL SSLcom`, `OV Multi-domain SSL SSLcom`, `EV SSL SSLcom`,
822
+ * `EV Multi Domain SSL SSLcom`. Older names (`PositiveSSL`, `InstantSSL`, ...) are deprecated:
823
+ * the API still accepts them and issues an equivalent new type.
824
+ */
817
825
  type: string;
818
826
  /** Number of add-on domains for multi-domain certificates. Sent as `SANStoADD`. */
819
827
  sansToAdd?: number;
@@ -865,12 +873,12 @@ interface SslParseCsrParams {
865
873
  interface SslParseCsrResult {
866
874
  commonName: string;
867
875
  domainName: string;
868
- country: string;
869
- organisationUnit: string;
870
- organisation: string;
871
- state: string;
872
- locality: string;
873
- email: string;
876
+ country?: string;
877
+ organisationUnit?: string;
878
+ organisation?: string;
879
+ state?: string;
880
+ locality?: string;
881
+ email?: string;
874
882
  }
875
883
  declare const parseCSR: Command<SslParseCsrParams, SslParseCsrResult>;
876
884
  interface SslGetApproverEmailListParams {
@@ -886,11 +894,32 @@ interface SslGetApproverEmailListResult {
886
894
  manualEmails: string[];
887
895
  }
888
896
  declare const getApproverEmailList: Command<SslGetApproverEmailListParams, SslGetApproverEmailListResult>;
897
+ /** File to publish on the domain for HTTP domain control validation. */
898
+ interface SslHttpDcEntry {
899
+ domain?: string;
900
+ fileName?: string;
901
+ fileContent?: string;
902
+ }
889
903
  interface SslHttpDcValidation {
890
904
  /** True when HTTP_CSR_HASH was set for at least one domain. */
891
905
  valueAvailable: boolean;
906
+ /** From the first entry; the live API nests them in a `<DNS domain>` element per domain. */
892
907
  fileName?: string;
893
908
  fileContent?: string;
909
+ /** One entry per domain, when the response lists them. */
910
+ entries?: SslHttpDcEntry[];
911
+ }
912
+ /** DNS record to create for DNS domain control validation. */
913
+ interface SslDnsDcEntry {
914
+ domain?: string;
915
+ hostName?: string;
916
+ target?: string;
917
+ }
918
+ interface SslDnsDcValidation {
919
+ valueAvailable: boolean;
920
+ hostName?: string;
921
+ target?: string;
922
+ entries?: SslDnsDcEntry[];
894
923
  }
895
924
  interface SslActivateParams {
896
925
  certificateID: number;
@@ -901,12 +930,20 @@ interface SslActivateParams {
901
930
  /** Server software type, e.g. `apacheopenssl`, `nginx`, `iis`. */
902
931
  webServerType?: string;
903
932
  uniqueValue?: string;
933
+ /** Email address that approves the request (e-mail domain control validation). Sent as `ApproverEmail`. */
934
+ approverEmail?: string;
935
+ /** Validate by publishing a file over HTTP. Sent as `HTTPDCValidation`. */
936
+ httpDcValidation?: boolean;
937
+ /** Validate by creating a DNS record. Sent as `DNSDCValidation`. */
938
+ dnsDcValidation?: boolean;
904
939
  }
905
940
  interface SslActivateResult {
906
941
  id: number;
907
942
  isSuccess: boolean;
908
943
  /** Present when the response carries an HTTP DCV block. */
909
944
  httpDCValidation?: SslHttpDcValidation;
945
+ /** Present when the response carries a DNS DCV block. */
946
+ dnsDCValidation?: SslDnsDcValidation;
910
947
  }
911
948
  declare const activate: Command<SslActivateParams, SslActivateResult>;
912
949
  interface SslResendApproverEmailParams {
@@ -927,6 +964,12 @@ interface SslReissueParams {
927
964
  adminEmailAddress?: string;
928
965
  webServerType?: string;
929
966
  uniqueValue?: string;
967
+ /** Email address that approves the request (e-mail domain control validation). Sent as `ApproverEmail`. */
968
+ approverEmail?: string;
969
+ /** Validate by publishing a file over HTTP. Sent as `HTTPDCValidation`. */
970
+ httpDcValidation?: boolean;
971
+ /** Validate by creating a DNS record. Sent as `DNSDCValidation`. */
972
+ dnsDcValidation?: boolean;
930
973
  }
931
974
  type SslReissueResult = SslActivateResult;
932
975
  declare const reissue: Command<SslReissueParams, SslActivateResult>;
@@ -963,7 +1006,8 @@ interface SslGetInfoParams {
963
1006
  returnType?: SslReturnType;
964
1007
  }
965
1008
  interface SslGetInfoResult {
966
- certificateID: number;
1009
+ /** Absent in live responses; the reference lists it. */
1010
+ certificateID?: number;
967
1011
  /** For example `Active`, `Newpurchase`, `Purchased`, `Cancelled`. */
968
1012
  status: string;
969
1013
  /** The attributes below are in the fixture but not in the reference. */
@@ -1111,7 +1155,7 @@ type UsersChangePasswordParams = {
1111
1155
  /** Never echoes a password or reset code. */
1112
1156
  interface UsersChangePasswordResult {
1113
1157
  success: boolean;
1114
- userID: number;
1158
+ userID?: number;
1115
1159
  }
1116
1160
  declare const changePassword: Command<UsersChangePasswordParams, UsersChangePasswordResult>;
1117
1161
  interface UsersUpdateParams {
@@ -1459,4 +1503,4 @@ declare const whoisGuardCommands: {
1459
1503
  };
1460
1504
 
1461
1505
  export { Namecheap, NamecheapError, NamecheapHttpError, NamecheapParseError, createTransport, Namecheap as default, dnsCommands, getEmailForwarding as dnsGetEmailForwarding, getHosts as dnsGetHosts, getList$4 as dnsGetList, setCustom as dnsSetCustom, setDefault$1 as dnsSetDefault, setEmailForwarding as dnsSetEmailForwarding, setHosts as dnsSetHosts, check as domainsCheck, domainsCommands, create$5 as domainsCreate, getContacts as domainsGetContacts, getInfo$3 as domainsGetInfo, getList$5 as domainsGetList, getRegistrarLock as domainsGetRegistrarLock, getTldList as domainsGetTldList, reactivate as domainsReactivate, renew$2 as domainsRenew, setContacts as domainsSetContacts, setRegistrarLock as domainsSetRegistrarLock, nsCommands, create$4 as nsCreate, deleteNs as nsDelete, getInfo$2 as nsGetInfo, update$2 as nsUpdate, run, activate as sslActivate, sslCommands, create$2 as sslCreate, editDCVMethod as sslEditDCVMethod, getApproverEmailList as sslGetApproverEmailList, getInfo$1 as sslGetInfo, getList$2 as sslGetList, parseCSR as sslParseCSR, purchaseMoreSans as sslPurchaseMoreSans, reissue as sslReissue, renew$1 as sslRenew, resendApproverEmail as sslResendApproverEmail, resendFulfillmentEmail as sslResendFulfillmentEmail, revokeCertificate as sslRevokeCertificate, transferCommands, create$3 as transferCreate, getList$3 as transferGetList, getStatus as transferGetStatus, updateStatus as transferUpdateStatus, usersAddressCommands, create as usersAddressCreate, deleteAddress as usersAddressDelete, getInfo as usersAddressGetInfo, getList$1 as usersAddressGetList, setDefault as usersAddressSetDefault, update as usersAddressUpdate, changePassword as usersChangePassword, usersCommands, create$1 as usersCreate, createAddFundsRequest as usersCreateAddFundsRequest, getAddFundsStatus as usersGetAddFundsStatus, getBalances as usersGetBalances, getPricing as usersGetPricing, login as usersLogin, resetPassword as usersResetPassword, update$1 as usersUpdate, changeEmailAddress as whoisGuardChangeEmailAddress, whoisGuardCommands, disable as whoisGuardDisable, enable as whoisGuardEnable, getList as whoisGuardGetList, renew as whoisGuardRenew };
1462
- export type { Command, DnsEmailForward, DnsEmailForwardRecord, DnsEmailType, DnsGetEmailForwardingParams, DnsGetEmailForwardingResult, DnsGetHostsParams, DnsGetHostsResult, DnsGetListParams, DnsGetListResult, DnsHost, DnsHostRecord, DnsRecordType, DnsSetCustomParams, DnsSetCustomResult, DnsSetDefaultParams, DnsSetDefaultResult, DnsSetEmailForwardingParams, DnsSetEmailForwardingResult, DnsSetHostsParams, DnsSetHostsResult, DomainsCheckItem, DomainsCheckParams, DomainsCheckResult, DomainsContact, DomainsContactParams, DomainsCreateParams, DomainsCreateResult, DomainsGetContactsParams, DomainsGetContactsResult, DomainsGetInfoParams, DomainsGetInfoResult, DomainsGetListParams, DomainsGetListResult, DomainsGetRegistrarLockParams, DomainsGetRegistrarLockResult, DomainsGetTldListResult, DomainsListItem, DomainsListType, DomainsLockAction, DomainsReactivateParams, DomainsReactivateResult, DomainsRenewParams, DomainsRenewResult, DomainsSetContactsParams, DomainsSetContactsResult, DomainsSetRegistrarLockParams, DomainsSetRegistrarLockResult, DomainsSortBy, DomainsTld, TransportConfig as NamecheapConfig, NsCreateParams, NsCreateResult, NsDeleteParams, NsDeleteResult, NsGetInfoParams, NsGetInfoResult, NsUpdateParams, NsUpdateResult, PricingPrice, PricingProduct, PricingProductCategory, PricingProductType, Send, SslActivateParams, SslActivateResult, SslCreateParams, SslCreateResult, SslEditDcvMethodParams, SslEditDcvMethodResult, SslGetApproverEmailListParams, SslGetApproverEmailListResult, SslGetInfoParams, SslGetInfoResult, SslGetListParams, SslGetListResult, SslHttpDcValidation, SslListItem, SslListType, SslParseCsrParams, SslParseCsrResult, SslPurchaseMoreSansParams, SslPurchaseMoreSansResult, SslReissueParams, SslReissueResult, SslRenewParams, SslRenewResult, SslResendApproverEmailParams, SslResendApproverEmailResult, SslResendFulfillmentEmailParams, SslResendFulfillmentEmailResult, SslResendResult, SslReturnType, SslRevokeCertificateParams, SslRevokeCertificateResult, SslSortBy, TransferCreateParams, TransferCreateResult, TransferGetListParams, TransferGetListResult, TransferGetStatusParams, TransferGetStatusResult, TransferListItem, TransferListType, TransferSortBy, TransferUpdateStatusParams, TransferUpdateStatusResult, UsersAddressCreateParams, UsersAddressCreateResult, UsersAddressDeleteParams, UsersAddressDeleteResult, UsersAddressGetInfoParams, UsersAddressGetInfoResult, UsersAddressGetListResult, UsersAddressListItem, UsersAddressSetDefaultParams, UsersAddressSetDefaultResult, UsersAddressUpdateParams, UsersAddressUpdateResult, UsersChangePasswordParams, UsersChangePasswordResult, UsersCreateAddFundsRequestParams, UsersCreateAddFundsRequestResult, UsersCreateParams, UsersCreateResult, UsersGetAddFundsStatusParams, UsersGetAddFundsStatusResult, UsersGetBalancesResult, UsersGetPricingParams, UsersGetPricingResult, UsersLoginParams, UsersLoginResult, UsersPaymentType, UsersResetPasswordFindBy, UsersResetPasswordParams, UsersResetPasswordResult, UsersUpdateParams, UsersUpdateResult, WhoisguardChangeEmailAddressParams, WhoisguardChangeEmailAddressResult, WhoisguardDisableParams, WhoisguardDisableResult, WhoisguardEnableParams, WhoisguardEnableResult, WhoisguardGetListParams, WhoisguardGetListResult, WhoisguardListItem, WhoisguardListType, WhoisguardRenewParams, WhoisguardRenewResult };
1506
+ export type { Command, DnsEmailForward, DnsEmailForwardRecord, DnsEmailType, DnsGetEmailForwardingParams, DnsGetEmailForwardingResult, DnsGetHostsParams, DnsGetHostsResult, DnsGetListParams, DnsGetListResult, DnsHost, DnsHostRecord, DnsRecordType, DnsSetCustomParams, DnsSetCustomResult, DnsSetDefaultParams, DnsSetDefaultResult, DnsSetEmailForwardingParams, DnsSetEmailForwardingResult, DnsSetHostsParams, DnsSetHostsResult, DomainsCheckItem, DomainsCheckParams, DomainsCheckResult, DomainsContact, DomainsContactParams, DomainsCreateParams, DomainsCreateResult, DomainsGetContactsParams, DomainsGetContactsResult, DomainsGetInfoParams, DomainsGetInfoResult, DomainsGetListParams, DomainsGetListResult, DomainsGetRegistrarLockParams, DomainsGetRegistrarLockResult, DomainsGetTldListResult, DomainsListItem, DomainsListType, DomainsLockAction, DomainsReactivateParams, DomainsReactivateResult, DomainsRenewParams, DomainsRenewResult, DomainsSetContactsParams, DomainsSetContactsResult, DomainsSetRegistrarLockParams, DomainsSetRegistrarLockResult, DomainsSortBy, DomainsTld, TransportConfig as NamecheapConfig, NsCreateParams, NsCreateResult, NsDeleteParams, NsDeleteResult, NsGetInfoParams, NsGetInfoResult, NsUpdateParams, NsUpdateResult, PricingPrice, PricingProduct, PricingProductCategory, PricingProductType, Send, SslActivateParams, SslActivateResult, SslCreateParams, SslCreateResult, SslDnsDcEntry, SslDnsDcValidation, SslEditDcvMethodParams, SslEditDcvMethodResult, SslGetApproverEmailListParams, SslGetApproverEmailListResult, SslGetInfoParams, SslGetInfoResult, SslGetListParams, SslGetListResult, SslHttpDcEntry, SslHttpDcValidation, SslListItem, SslListType, SslParseCsrParams, SslParseCsrResult, SslPurchaseMoreSansParams, SslPurchaseMoreSansResult, SslReissueParams, SslReissueResult, SslRenewParams, SslRenewResult, SslResendApproverEmailParams, SslResendApproverEmailResult, SslResendFulfillmentEmailParams, SslResendFulfillmentEmailResult, SslResendResult, SslReturnType, SslRevokeCertificateParams, SslRevokeCertificateResult, SslSortBy, TransferCreateParams, TransferCreateResult, TransferGetListParams, TransferGetListResult, TransferGetStatusParams, TransferGetStatusResult, TransferListItem, TransferListType, TransferSortBy, TransferUpdateStatusParams, TransferUpdateStatusResult, UsersAddressCreateParams, UsersAddressCreateResult, UsersAddressDeleteParams, UsersAddressDeleteResult, UsersAddressGetInfoParams, UsersAddressGetInfoResult, UsersAddressGetListResult, UsersAddressListItem, UsersAddressSetDefaultParams, UsersAddressSetDefaultResult, UsersAddressUpdateParams, UsersAddressUpdateResult, UsersChangePasswordParams, UsersChangePasswordResult, UsersCreateAddFundsRequestParams, UsersCreateAddFundsRequestResult, UsersCreateParams, UsersCreateResult, UsersGetAddFundsStatusParams, UsersGetAddFundsStatusResult, UsersGetBalancesResult, UsersGetPricingParams, UsersGetPricingResult, UsersLoginParams, UsersLoginResult, UsersPaymentType, UsersResetPasswordFindBy, UsersResetPasswordParams, UsersResetPasswordResult, UsersUpdateParams, UsersUpdateResult, WhoisguardChangeEmailAddressParams, WhoisguardChangeEmailAddressResult, WhoisguardDisableParams, WhoisguardDisableResult, WhoisguardEnableParams, WhoisguardEnableResult, WhoisguardGetListParams, WhoisguardGetListResult, WhoisguardListItem, WhoisguardListType, WhoisguardRenewParams, WhoisguardRenewResult };
package/dist/index.d.ts CHANGED
@@ -424,7 +424,8 @@ interface DomainsGetContactsResult {
424
424
  domain: string;
425
425
  /** Sent as the lower-case attribute `domainnameid`. */
426
426
  domainnameid: number;
427
- readonly: boolean;
427
+ /** Absent in live responses, which carry ReadOnly on each contact block instead. */
428
+ readonly?: boolean;
428
429
  registrant?: DomainsContact;
429
430
  tech?: DomainsContact;
430
431
  admin?: DomainsContact;
@@ -787,7 +788,8 @@ interface TransferListItem {
787
788
  domainName: string;
788
789
  user: string;
789
790
  transferDate: string;
790
- orderID: number;
791
+ /** Absent while the transfer is still queued. */
792
+ orderID?: number;
791
793
  statusID: number;
792
794
  status: string;
793
795
  }
@@ -813,7 +815,13 @@ declare const transferCommands: {
813
815
  interface SslCreateParams {
814
816
  /** Number of years for the certificate. Allowed values: 1 to 5. */
815
817
  years: number;
816
- /** SSL product name. */
818
+ /**
819
+ * SSL product name. Since July 11, 2026 use one of: `Standard SSL SSLcom`,
820
+ * `Standard Wildcard SSL SSLcom`, `SAN Certificate SSL SSLcom`, `High Assurance SSL SSLcom`,
821
+ * `OV Wildcard SSL SSLcom`, `OV Multi-domain SSL SSLcom`, `EV SSL SSLcom`,
822
+ * `EV Multi Domain SSL SSLcom`. Older names (`PositiveSSL`, `InstantSSL`, ...) are deprecated:
823
+ * the API still accepts them and issues an equivalent new type.
824
+ */
817
825
  type: string;
818
826
  /** Number of add-on domains for multi-domain certificates. Sent as `SANStoADD`. */
819
827
  sansToAdd?: number;
@@ -865,12 +873,12 @@ interface SslParseCsrParams {
865
873
  interface SslParseCsrResult {
866
874
  commonName: string;
867
875
  domainName: string;
868
- country: string;
869
- organisationUnit: string;
870
- organisation: string;
871
- state: string;
872
- locality: string;
873
- email: string;
876
+ country?: string;
877
+ organisationUnit?: string;
878
+ organisation?: string;
879
+ state?: string;
880
+ locality?: string;
881
+ email?: string;
874
882
  }
875
883
  declare const parseCSR: Command<SslParseCsrParams, SslParseCsrResult>;
876
884
  interface SslGetApproverEmailListParams {
@@ -886,11 +894,32 @@ interface SslGetApproverEmailListResult {
886
894
  manualEmails: string[];
887
895
  }
888
896
  declare const getApproverEmailList: Command<SslGetApproverEmailListParams, SslGetApproverEmailListResult>;
897
+ /** File to publish on the domain for HTTP domain control validation. */
898
+ interface SslHttpDcEntry {
899
+ domain?: string;
900
+ fileName?: string;
901
+ fileContent?: string;
902
+ }
889
903
  interface SslHttpDcValidation {
890
904
  /** True when HTTP_CSR_HASH was set for at least one domain. */
891
905
  valueAvailable: boolean;
906
+ /** From the first entry; the live API nests them in a `<DNS domain>` element per domain. */
892
907
  fileName?: string;
893
908
  fileContent?: string;
909
+ /** One entry per domain, when the response lists them. */
910
+ entries?: SslHttpDcEntry[];
911
+ }
912
+ /** DNS record to create for DNS domain control validation. */
913
+ interface SslDnsDcEntry {
914
+ domain?: string;
915
+ hostName?: string;
916
+ target?: string;
917
+ }
918
+ interface SslDnsDcValidation {
919
+ valueAvailable: boolean;
920
+ hostName?: string;
921
+ target?: string;
922
+ entries?: SslDnsDcEntry[];
894
923
  }
895
924
  interface SslActivateParams {
896
925
  certificateID: number;
@@ -901,12 +930,20 @@ interface SslActivateParams {
901
930
  /** Server software type, e.g. `apacheopenssl`, `nginx`, `iis`. */
902
931
  webServerType?: string;
903
932
  uniqueValue?: string;
933
+ /** Email address that approves the request (e-mail domain control validation). Sent as `ApproverEmail`. */
934
+ approverEmail?: string;
935
+ /** Validate by publishing a file over HTTP. Sent as `HTTPDCValidation`. */
936
+ httpDcValidation?: boolean;
937
+ /** Validate by creating a DNS record. Sent as `DNSDCValidation`. */
938
+ dnsDcValidation?: boolean;
904
939
  }
905
940
  interface SslActivateResult {
906
941
  id: number;
907
942
  isSuccess: boolean;
908
943
  /** Present when the response carries an HTTP DCV block. */
909
944
  httpDCValidation?: SslHttpDcValidation;
945
+ /** Present when the response carries a DNS DCV block. */
946
+ dnsDCValidation?: SslDnsDcValidation;
910
947
  }
911
948
  declare const activate: Command<SslActivateParams, SslActivateResult>;
912
949
  interface SslResendApproverEmailParams {
@@ -927,6 +964,12 @@ interface SslReissueParams {
927
964
  adminEmailAddress?: string;
928
965
  webServerType?: string;
929
966
  uniqueValue?: string;
967
+ /** Email address that approves the request (e-mail domain control validation). Sent as `ApproverEmail`. */
968
+ approverEmail?: string;
969
+ /** Validate by publishing a file over HTTP. Sent as `HTTPDCValidation`. */
970
+ httpDcValidation?: boolean;
971
+ /** Validate by creating a DNS record. Sent as `DNSDCValidation`. */
972
+ dnsDcValidation?: boolean;
930
973
  }
931
974
  type SslReissueResult = SslActivateResult;
932
975
  declare const reissue: Command<SslReissueParams, SslActivateResult>;
@@ -963,7 +1006,8 @@ interface SslGetInfoParams {
963
1006
  returnType?: SslReturnType;
964
1007
  }
965
1008
  interface SslGetInfoResult {
966
- certificateID: number;
1009
+ /** Absent in live responses; the reference lists it. */
1010
+ certificateID?: number;
967
1011
  /** For example `Active`, `Newpurchase`, `Purchased`, `Cancelled`. */
968
1012
  status: string;
969
1013
  /** The attributes below are in the fixture but not in the reference. */
@@ -1111,7 +1155,7 @@ type UsersChangePasswordParams = {
1111
1155
  /** Never echoes a password or reset code. */
1112
1156
  interface UsersChangePasswordResult {
1113
1157
  success: boolean;
1114
- userID: number;
1158
+ userID?: number;
1115
1159
  }
1116
1160
  declare const changePassword: Command<UsersChangePasswordParams, UsersChangePasswordResult>;
1117
1161
  interface UsersUpdateParams {
@@ -1459,4 +1503,4 @@ declare const whoisGuardCommands: {
1459
1503
  };
1460
1504
 
1461
1505
  export { Namecheap, NamecheapError, NamecheapHttpError, NamecheapParseError, createTransport, Namecheap as default, dnsCommands, getEmailForwarding as dnsGetEmailForwarding, getHosts as dnsGetHosts, getList$4 as dnsGetList, setCustom as dnsSetCustom, setDefault$1 as dnsSetDefault, setEmailForwarding as dnsSetEmailForwarding, setHosts as dnsSetHosts, check as domainsCheck, domainsCommands, create$5 as domainsCreate, getContacts as domainsGetContacts, getInfo$3 as domainsGetInfo, getList$5 as domainsGetList, getRegistrarLock as domainsGetRegistrarLock, getTldList as domainsGetTldList, reactivate as domainsReactivate, renew$2 as domainsRenew, setContacts as domainsSetContacts, setRegistrarLock as domainsSetRegistrarLock, nsCommands, create$4 as nsCreate, deleteNs as nsDelete, getInfo$2 as nsGetInfo, update$2 as nsUpdate, run, activate as sslActivate, sslCommands, create$2 as sslCreate, editDCVMethod as sslEditDCVMethod, getApproverEmailList as sslGetApproverEmailList, getInfo$1 as sslGetInfo, getList$2 as sslGetList, parseCSR as sslParseCSR, purchaseMoreSans as sslPurchaseMoreSans, reissue as sslReissue, renew$1 as sslRenew, resendApproverEmail as sslResendApproverEmail, resendFulfillmentEmail as sslResendFulfillmentEmail, revokeCertificate as sslRevokeCertificate, transferCommands, create$3 as transferCreate, getList$3 as transferGetList, getStatus as transferGetStatus, updateStatus as transferUpdateStatus, usersAddressCommands, create as usersAddressCreate, deleteAddress as usersAddressDelete, getInfo as usersAddressGetInfo, getList$1 as usersAddressGetList, setDefault as usersAddressSetDefault, update as usersAddressUpdate, changePassword as usersChangePassword, usersCommands, create$1 as usersCreate, createAddFundsRequest as usersCreateAddFundsRequest, getAddFundsStatus as usersGetAddFundsStatus, getBalances as usersGetBalances, getPricing as usersGetPricing, login as usersLogin, resetPassword as usersResetPassword, update$1 as usersUpdate, changeEmailAddress as whoisGuardChangeEmailAddress, whoisGuardCommands, disable as whoisGuardDisable, enable as whoisGuardEnable, getList as whoisGuardGetList, renew as whoisGuardRenew };
1462
- export type { Command, DnsEmailForward, DnsEmailForwardRecord, DnsEmailType, DnsGetEmailForwardingParams, DnsGetEmailForwardingResult, DnsGetHostsParams, DnsGetHostsResult, DnsGetListParams, DnsGetListResult, DnsHost, DnsHostRecord, DnsRecordType, DnsSetCustomParams, DnsSetCustomResult, DnsSetDefaultParams, DnsSetDefaultResult, DnsSetEmailForwardingParams, DnsSetEmailForwardingResult, DnsSetHostsParams, DnsSetHostsResult, DomainsCheckItem, DomainsCheckParams, DomainsCheckResult, DomainsContact, DomainsContactParams, DomainsCreateParams, DomainsCreateResult, DomainsGetContactsParams, DomainsGetContactsResult, DomainsGetInfoParams, DomainsGetInfoResult, DomainsGetListParams, DomainsGetListResult, DomainsGetRegistrarLockParams, DomainsGetRegistrarLockResult, DomainsGetTldListResult, DomainsListItem, DomainsListType, DomainsLockAction, DomainsReactivateParams, DomainsReactivateResult, DomainsRenewParams, DomainsRenewResult, DomainsSetContactsParams, DomainsSetContactsResult, DomainsSetRegistrarLockParams, DomainsSetRegistrarLockResult, DomainsSortBy, DomainsTld, TransportConfig as NamecheapConfig, NsCreateParams, NsCreateResult, NsDeleteParams, NsDeleteResult, NsGetInfoParams, NsGetInfoResult, NsUpdateParams, NsUpdateResult, PricingPrice, PricingProduct, PricingProductCategory, PricingProductType, Send, SslActivateParams, SslActivateResult, SslCreateParams, SslCreateResult, SslEditDcvMethodParams, SslEditDcvMethodResult, SslGetApproverEmailListParams, SslGetApproverEmailListResult, SslGetInfoParams, SslGetInfoResult, SslGetListParams, SslGetListResult, SslHttpDcValidation, SslListItem, SslListType, SslParseCsrParams, SslParseCsrResult, SslPurchaseMoreSansParams, SslPurchaseMoreSansResult, SslReissueParams, SslReissueResult, SslRenewParams, SslRenewResult, SslResendApproverEmailParams, SslResendApproverEmailResult, SslResendFulfillmentEmailParams, SslResendFulfillmentEmailResult, SslResendResult, SslReturnType, SslRevokeCertificateParams, SslRevokeCertificateResult, SslSortBy, TransferCreateParams, TransferCreateResult, TransferGetListParams, TransferGetListResult, TransferGetStatusParams, TransferGetStatusResult, TransferListItem, TransferListType, TransferSortBy, TransferUpdateStatusParams, TransferUpdateStatusResult, UsersAddressCreateParams, UsersAddressCreateResult, UsersAddressDeleteParams, UsersAddressDeleteResult, UsersAddressGetInfoParams, UsersAddressGetInfoResult, UsersAddressGetListResult, UsersAddressListItem, UsersAddressSetDefaultParams, UsersAddressSetDefaultResult, UsersAddressUpdateParams, UsersAddressUpdateResult, UsersChangePasswordParams, UsersChangePasswordResult, UsersCreateAddFundsRequestParams, UsersCreateAddFundsRequestResult, UsersCreateParams, UsersCreateResult, UsersGetAddFundsStatusParams, UsersGetAddFundsStatusResult, UsersGetBalancesResult, UsersGetPricingParams, UsersGetPricingResult, UsersLoginParams, UsersLoginResult, UsersPaymentType, UsersResetPasswordFindBy, UsersResetPasswordParams, UsersResetPasswordResult, UsersUpdateParams, UsersUpdateResult, WhoisguardChangeEmailAddressParams, WhoisguardChangeEmailAddressResult, WhoisguardDisableParams, WhoisguardDisableResult, WhoisguardEnableParams, WhoisguardEnableResult, WhoisguardGetListParams, WhoisguardGetListResult, WhoisguardListItem, WhoisguardListType, WhoisguardRenewParams, WhoisguardRenewResult };
1506
+ export type { Command, DnsEmailForward, DnsEmailForwardRecord, DnsEmailType, DnsGetEmailForwardingParams, DnsGetEmailForwardingResult, DnsGetHostsParams, DnsGetHostsResult, DnsGetListParams, DnsGetListResult, DnsHost, DnsHostRecord, DnsRecordType, DnsSetCustomParams, DnsSetCustomResult, DnsSetDefaultParams, DnsSetDefaultResult, DnsSetEmailForwardingParams, DnsSetEmailForwardingResult, DnsSetHostsParams, DnsSetHostsResult, DomainsCheckItem, DomainsCheckParams, DomainsCheckResult, DomainsContact, DomainsContactParams, DomainsCreateParams, DomainsCreateResult, DomainsGetContactsParams, DomainsGetContactsResult, DomainsGetInfoParams, DomainsGetInfoResult, DomainsGetListParams, DomainsGetListResult, DomainsGetRegistrarLockParams, DomainsGetRegistrarLockResult, DomainsGetTldListResult, DomainsListItem, DomainsListType, DomainsLockAction, DomainsReactivateParams, DomainsReactivateResult, DomainsRenewParams, DomainsRenewResult, DomainsSetContactsParams, DomainsSetContactsResult, DomainsSetRegistrarLockParams, DomainsSetRegistrarLockResult, DomainsSortBy, DomainsTld, TransportConfig as NamecheapConfig, NsCreateParams, NsCreateResult, NsDeleteParams, NsDeleteResult, NsGetInfoParams, NsGetInfoResult, NsUpdateParams, NsUpdateResult, PricingPrice, PricingProduct, PricingProductCategory, PricingProductType, Send, SslActivateParams, SslActivateResult, SslCreateParams, SslCreateResult, SslDnsDcEntry, SslDnsDcValidation, SslEditDcvMethodParams, SslEditDcvMethodResult, SslGetApproverEmailListParams, SslGetApproverEmailListResult, SslGetInfoParams, SslGetInfoResult, SslGetListParams, SslGetListResult, SslHttpDcEntry, SslHttpDcValidation, SslListItem, SslListType, SslParseCsrParams, SslParseCsrResult, SslPurchaseMoreSansParams, SslPurchaseMoreSansResult, SslReissueParams, SslReissueResult, SslRenewParams, SslRenewResult, SslResendApproverEmailParams, SslResendApproverEmailResult, SslResendFulfillmentEmailParams, SslResendFulfillmentEmailResult, SslResendResult, SslReturnType, SslRevokeCertificateParams, SslRevokeCertificateResult, SslSortBy, TransferCreateParams, TransferCreateResult, TransferGetListParams, TransferGetListResult, TransferGetStatusParams, TransferGetStatusResult, TransferListItem, TransferListType, TransferSortBy, TransferUpdateStatusParams, TransferUpdateStatusResult, UsersAddressCreateParams, UsersAddressCreateResult, UsersAddressDeleteParams, UsersAddressDeleteResult, UsersAddressGetInfoParams, UsersAddressGetInfoResult, UsersAddressGetListResult, UsersAddressListItem, UsersAddressSetDefaultParams, UsersAddressSetDefaultResult, UsersAddressUpdateParams, UsersAddressUpdateResult, UsersChangePasswordParams, UsersChangePasswordResult, UsersCreateAddFundsRequestParams, UsersCreateAddFundsRequestResult, UsersCreateParams, UsersCreateResult, UsersGetAddFundsStatusParams, UsersGetAddFundsStatusResult, UsersGetBalancesResult, UsersGetPricingParams, UsersGetPricingResult, UsersLoginParams, UsersLoginResult, UsersPaymentType, UsersResetPasswordFindBy, UsersResetPasswordParams, UsersResetPasswordResult, UsersUpdateParams, UsersUpdateResult, WhoisguardChangeEmailAddressParams, WhoisguardChangeEmailAddressResult, WhoisguardDisableParams, WhoisguardDisableResult, WhoisguardEnableParams, WhoisguardEnableResult, WhoisguardGetListParams, WhoisguardGetListResult, WhoisguardListItem, WhoisguardListType, WhoisguardRenewParams, WhoisguardRenewResult };
package/dist/index.js CHANGED
@@ -228,7 +228,7 @@ var getHosts = /* @__PURE__ */ defineCommand({
228
228
  var getEmailForwarding = /* @__PURE__ */ defineCommand({
229
229
  name: "namecheap.domains.dns.getEmailForwarding",
230
230
  parse: (cr) => {
231
- const result = cr.one("DomainEmailForwardingResult");
231
+ const result = cr.optional("DomainDNSGetEmailForwardingResult") ?? cr.one("DomainEmailForwardingResult");
232
232
  return {
233
233
  domain: result.string("Domain"),
234
234
  forwards: result.all("Forward").map((forward) => ({
@@ -241,7 +241,7 @@ var getEmailForwarding = /* @__PURE__ */ defineCommand({
241
241
  var setEmailForwarding = /* @__PURE__ */ defineCommand({
242
242
  name: "namecheap.domains.dns.setEmailForwarding",
243
243
  parse: (cr) => {
244
- const result = cr.one("DomainEmailForwardingResult");
244
+ const result = cr.optional("DomainDNSSetEmailForwardingResult") ?? cr.one("DomainEmailForwardingResult");
245
245
  return { domain: result.string("Domain"), isSuccess: result.boolean("IsSuccess") };
246
246
  }
247
247
  });
@@ -397,7 +397,8 @@ var getTldList = /* @__PURE__ */ defineCommand({
397
397
  name: "namecheap.domains.getTldList",
398
398
  parse: (cr) => (cr.optional("Tlds")?.all("Tld") ?? []).map((tld) => ({
399
399
  name: tld.string("Name"),
400
- nonRealTimeDomain: tld.boolean("NonRealTimeDomain"),
400
+ // The live API sends NonRealTime; the reference (and older fixtures) say NonRealTimeDomain.
401
+ nonRealTimeDomain: tld.optionalBoolean("NonRealTime") ?? tld.boolean("NonRealTimeDomain"),
401
402
  minRegisterYears: tld.number("MinRegisterYears"),
402
403
  maxRegisterYears: tld.number("MaxRegisterYears"),
403
404
  minRenewYears: tld.number("MinRenewYears"),
@@ -439,7 +440,10 @@ var getContacts = /* @__PURE__ */ defineCommand({
439
440
  return {
440
441
  domain: result.string("Domain"),
441
442
  domainnameid: result.number("domainnameid"),
442
- readonly: result.boolean("Readonly"),
443
+ ...optionalField(
444
+ "readonly",
445
+ result.optionalBoolean("ReadOnly") ?? result.optionalBoolean("Readonly")
446
+ ),
443
447
  ...optionalField("registrant", contact("Registrant")),
444
448
  ...optionalField("tech", contact("Tech")),
445
449
  ...optionalField("admin", contact("Admin")),
@@ -640,12 +644,13 @@ var parseCSR = /* @__PURE__ */ defineCommand({
640
644
  return {
641
645
  commonName: details.one("CommonName").text(),
642
646
  domainName: details.one("DomainName").text(),
643
- country: details.one("Country").text(),
644
- organisationUnit: details.one("OrganisationUnit").text(),
645
- organisation: details.one("Organisation").text(),
646
- state: details.one("State").text(),
647
- locality: details.one("Locality").text(),
648
- email: details.one("Email").text()
647
+ // A CSR may omit any of these (e.g. no organisational unit), and the API then omits them too.
648
+ ...optionalField("country", details.optional("Country")?.text()),
649
+ ...optionalField("organisationUnit", details.optional("OrganisationUnit")?.text()),
650
+ ...optionalField("organisation", details.optional("Organisation")?.text()),
651
+ ...optionalField("state", details.optional("State")?.text()),
652
+ ...optionalField("locality", details.optional("Locality")?.text()),
653
+ ...optionalField("email", details.optional("Email")?.text())
649
654
  };
650
655
  }
651
656
  });
@@ -666,21 +671,52 @@ var getApproverEmailList = /* @__PURE__ */ defineCommand({
666
671
  function parseHttpDcValidation(result) {
667
672
  const validation = result.optional("HttpDCValidation");
668
673
  if (validation === void 0) return void 0;
674
+ const entries = validation.all("DNS").map((entry) => ({
675
+ ...optionalField("domain", entry.optionalString("domain")),
676
+ ...optionalField("fileName", entry.optionalText("FileName")),
677
+ ...optionalField("fileContent", entry.optionalText("FileContent"))
678
+ }));
679
+ const fileName = validation.optionalText("FileName") ?? entries[0]?.fileName;
680
+ const fileContent = validation.optionalText("FileContent") ?? entries[0]?.fileContent;
681
+ return {
682
+ valueAvailable: validation.boolean("ValueAvailable"),
683
+ ...optionalField("fileName", fileName),
684
+ ...optionalField("fileContent", fileContent),
685
+ ...entries.length > 0 ? { entries } : {}
686
+ };
687
+ }
688
+ function parseDnsDcValidation(result) {
689
+ const validation = result.optional("DNSDCValidation");
690
+ if (validation === void 0) return void 0;
691
+ const entries = validation.all("DNS").map((entry) => ({
692
+ ...optionalField("domain", entry.optionalString("domain")),
693
+ ...optionalField("hostName", entry.optionalText("HostName")),
694
+ ...optionalField("target", entry.optionalText("Target"))
695
+ }));
696
+ const hostName = validation.optionalText("HostName") ?? entries[0]?.hostName;
697
+ const target = validation.optionalText("Target") ?? entries[0]?.target;
669
698
  return {
670
699
  valueAvailable: validation.boolean("ValueAvailable"),
671
- ...optionalField("fileName", validation.optionalText("FileName")),
672
- ...optionalField("fileContent", validation.optionalText("FileContent"))
700
+ ...optionalField("hostName", hostName),
701
+ ...optionalField("target", target),
702
+ ...entries.length > 0 ? { entries } : {}
673
703
  };
674
704
  }
675
705
  function parseActivation(result) {
676
706
  return {
677
707
  id: result.number("ID"),
678
708
  isSuccess: result.boolean("IsSuccess"),
679
- ...optionalField("httpDCValidation", parseHttpDcValidation(result))
709
+ ...optionalField("httpDCValidation", parseHttpDcValidation(result)),
710
+ ...optionalField("dnsDCValidation", parseDnsDcValidation(result))
680
711
  };
681
712
  }
682
713
  var activate = /* @__PURE__ */ defineCommand({
683
714
  name: "namecheap.ssl.activate",
715
+ keys: {
716
+ approverEmail: "ApproverEmail",
717
+ httpDcValidation: "HTTPDCValidation",
718
+ dnsDcValidation: "DNSDCValidation"
719
+ },
684
720
  parse: (cr) => parseActivation(cr.one("SSLActivateResult"))
685
721
  });
686
722
  function parseResend(result) {
@@ -692,6 +728,11 @@ var resendApproverEmail = /* @__PURE__ */ defineCommand({
692
728
  });
693
729
  var reissue = /* @__PURE__ */ defineCommand({
694
730
  name: "namecheap.ssl.reissue",
731
+ keys: {
732
+ approverEmail: "ApproverEmail",
733
+ httpDcValidation: "HTTPDCValidation",
734
+ dnsDcValidation: "DNSDCValidation"
735
+ },
695
736
  parse: (cr) => parseActivation(cr.one("SSLReissueResult"))
696
737
  });
697
738
  var resendFulfillmentEmail = /* @__PURE__ */ defineCommand({
@@ -710,11 +751,14 @@ var getInfo3 = /* @__PURE__ */ defineCommand({
710
751
  parse: (cr) => {
711
752
  const result = cr.one("SSLGetInfoResult");
712
753
  return {
713
- certificateID: result.number("CertificateID"),
754
+ ...optionalField("certificateID", result.lenientNumber("CertificateID")),
714
755
  status: result.string("Status"),
715
756
  ...optionalField("type", result.optionalString("Type")),
716
757
  ...optionalField("commonName", result.optionalString("CommonName")),
717
- ...optionalField("provider", result.optionalString("Provider")),
758
+ ...optionalField(
759
+ "provider",
760
+ result.optionalString("Provider") ?? result.optional("Provider")?.optionalText("Name")
761
+ ),
718
762
  ...optionalField("issuedOn", result.optionalString("IssuedOn")),
719
763
  ...optionalField("expires", result.optionalString("Expires"))
720
764
  };
@@ -822,11 +866,13 @@ var updateStatus = /* @__PURE__ */ defineCommand({
822
866
  });
823
867
  function parseListItem3(transfer) {
824
868
  return {
825
- transferID: transfer.number("TransferID"),
869
+ // The live list sends ID; the reference says TransferID.
870
+ transferID: transfer.optionalNumber("ID") ?? transfer.number("TransferID"),
826
871
  domainName: transfer.string("DomainName"),
827
872
  user: transfer.string("User"),
828
873
  transferDate: transfer.string("TransferDate"),
829
- orderID: transfer.number("OrderID"),
874
+ // OrderID is empty for a queued transfer.
875
+ ...optionalField("orderID", transfer.lenientNumber("OrderID")),
830
876
  statusID: transfer.number("StatusID"),
831
877
  status: transfer.string("Status")
832
878
  };
@@ -885,7 +931,11 @@ var changePassword = /* @__PURE__ */ defineCommand({
885
931
  name: "namecheap.users.changePassword",
886
932
  parse: (cr) => {
887
933
  const result = cr.one("UserChangePasswordResult");
888
- return { success: result.boolean("Success"), userID: result.number("UserID") };
934
+ return {
935
+ success: result.boolean("Success"),
936
+ // The live API may spell it UserId, or leave it out.
937
+ ...optionalField("userID", result.lenientNumber("UserID") ?? result.lenientNumber("UserId"))
938
+ };
889
939
  }
890
940
  });
891
941
  var update2 = /* @__PURE__ */ defineCommand({
@@ -895,7 +945,7 @@ var update2 = /* @__PURE__ */ defineCommand({
895
945
  var createAddFundsRequest = /* @__PURE__ */ defineCommand({
896
946
  name: "namecheap.users.createaddfundsrequest",
897
947
  parse: (cr) => {
898
- const result = cr.one("CreateAddFundsRequestResult");
948
+ const result = cr.optional("Createaddfundsrequestresult") ?? cr.one("CreateAddFundsRequestResult");
899
949
  return {
900
950
  tokenID: result.string("TokenID"),
901
951
  redirectURL: result.string("RedirectURL"),
@@ -907,7 +957,7 @@ var getAddFundsStatus = /* @__PURE__ */ defineCommand({
907
957
  name: "namecheap.users.getAddFundsStatus",
908
958
  keys: { tokenId: "TokenId" },
909
959
  parse: (cr) => {
910
- const result = cr.one("GetAddFundsStatusResult");
960
+ const result = cr.optional("Getaddfundsstatusresult") ?? cr.one("GetAddFundsStatusResult");
911
961
  return {
912
962
  transactionID: result.number("TransactionID"),
913
963
  amount: result.string("Amount"),
@@ -1397,7 +1447,8 @@ function toErrorItem(error) {
1397
1447
  };
1398
1448
  }
1399
1449
  function readEnvelope(xml) {
1400
- const root = new El(parseXml(xml));
1450
+ const start = xml.search(/<\?xml|<ApiResponse/);
1451
+ const root = new El(parseXml(start > 0 ? xml.slice(start) : xml));
1401
1452
  if (root.name !== "ApiResponse") {
1402
1453
  throw new NamecheapParseError(`Unexpected response root element "${root.name}"`);
1403
1454
  }