node-ovh-ts
Version:
OVH API wrapper library for TypeScript
231 lines (228 loc) • 16.1 kB
TypeScript
import { OvertheboxConfigurationDnsNameserver } from '../models/OvertheboxConfigurationDnsNameserver.js';
import { OverTheBoxDevice } from '../models/OverTheBoxDevice.js';
import { OverTheBoxAvailableMigrationOffer } from '../models/OverTheBoxAvailableMigrationOffer.js';
import { ServicesService } from '../models/ServicesService.js';
import { OvertheboxConfigurationDnsLocalDomain } from '../models/OvertheboxConfigurationDnsLocalDomain.js';
import { OverTheBoxTask } from '../models/OverTheBoxTask.js';
import { OverTheBoxService } from '../models/OverTheBoxService.js';
import { OvertheboxConfigurationFirewallRedirect } from '../models/OvertheboxConfigurationFirewallRedirect.js';
import { OvertheboxConfigurationDhcpStaticLease } from '../models/OvertheboxConfigurationDhcpStaticLease.js';
import { OverTheBoxAvailableDeviceAction } from '../models/OverTheBoxAvailableDeviceAction.js';
import { OverTheBoxAvailableStatusEnum } from '../models/OverTheBoxAvailableStatusEnum.js';
import { OvertheboxConfigurationDhcpConfig } from '../models/OvertheboxConfigurationDhcpConfig.js';
import { OverTheBoxDeviceForRegistration } from '../models/OverTheBoxDeviceForRegistration.js';
import { OverTheBoxBackup } from '../models/OverTheBoxBackup.js';
import { OvertheboxConfigurationNetworkInterface } from '../models/OvertheboxConfigurationNetworkInterface.js';
import { OvertheboxConfigurationFirewallRule } from '../models/OvertheboxConfigurationFirewallRule.js';
import { OverTheBoxHardware } from '../models/OverTheBoxHardware.js';
import { OverTheBoxRemoteAccess } from '../models/OverTheBoxRemoteAccess.js';
import { OverTheBoxDeviceAction } from '../models/OverTheBoxDeviceAction.js';
import { PriceOverTheBoxOfferEnum } from '../models/PriceOverTheBoxOfferEnum.js';
import { OtbDeviceStatistics } from '../models/OtbDeviceStatistics.js';
import { OverTheBoxTemporaryLogsLink } from '../models/OverTheBoxTemporaryLogsLink.js';
import OVHBase from '../ovh.js';
import '../models/OvertheboxConfigurationTypesDnsNameserver.js';
import '../models/OvertheboxConfigurationStatusEnum.js';
import '../models/OverTheBoxDeviceInterface.js';
import '../models/OverTheBoxMultipathStatusEnum.js';
import '../models/OrderPrice.js';
import '../models/OrderCurrencyCodeEnum.js';
import '../models/ServiceStateEnum.js';
import '../models/ServiceRenewType.js';
import '../models/ServiceRenewalTypeEnum.js';
import '../models/OvertheboxConfigurationTypesDnsLocalDomain.js';
import '../models/OverTheBoxTaskStatusEnum.js';
import '../models/OverTheBoxServiceStatusEnum.js';
import '../models/OverTheBoxTunnelModeEnum.js';
import '../models/OverTheBoxGraphEndpoint.js';
import '../models/OverTheBoxServiceConfigurationModeEnum.js';
import '../models/OvertheboxConfigurationTypesFirewallRedirect.js';
import '../models/OvertheboxConfigurationFirewallProtocolEnum.js';
import '../models/OvertheboxConfigurationFirewallRedirectTargetEnum.js';
import '../models/OvertheboxConfigurationTypesDhcpStaticLease.js';
import '../models/OvertheboxConfigurationTypesDhcpConfig.js';
import '../models/OvertheboxConfigurationTypesNetworkInterface.js';
import '../models/OvertheboxConfigurationNetworkInterfaceTypeEnum.js';
import '../models/OvertheboxConfigurationNetworkInterfaceMultipathEnum.js';
import '../models/OvertheboxConfigurationNetworkInterfaceProtoEnum.js';
import '../models/OvertheboxConfigurationTypesFirewallRule.js';
import '../models/OvertheboxConfigurationFirewallRuleTargetEnum.js';
import '../models/OvertheboxConfigurationFirewallRuleFamilyEnum.js';
import '../models/OverTheBoxRemoteAccessUserInfos.js';
import '../models/OverTheBoxRemoteAccessConnectionInfos.js';
import '../models/OverTheBoxRemoteAccessStatusEnum.js';
import '../models/OverTheBoxActionStatusEnum.js';
import '../models/OtbDeviceStatisticsPoint.js';
import '../models/OtbDeviceStatisticsTag.js';
import '../models/OtbDeviceStatisticsUnitEnum.js';
import '../endpoints.js';
declare class OverTheBoxHandler {
ovh: OVHBase;
constructor(ovh: OVHBase);
/** List available services */
list: () => Promise<string[]>;
/** List the available offers for the new call */
listAvailableOffers: () => Promise<PriceOverTheBoxOfferEnum[]>;
/** Get the list of devices connected from the same IP address */
postDevices: () => Promise<OverTheBoxDeviceForRegistration[]>;
/** List available services */
listHardware: () => Promise<string[]>;
/** List hardware that can be linked to a service */
listHardwareAvailable: () => Promise<string[]>;
/** Get this object properties */
getHardwareByHardwareName: (hardwareName: string) => Promise<OverTheBoxHardware>;
/** Resiliate a service */
deleteByServiceName: (serviceName: string) => Promise<void>;
/** Get this object properties */
getByServiceName: (serviceName: string) => Promise<OverTheBoxService>;
/** Alter this object properties */
updateByServiceName: (serviceName: string, body: OverTheBoxService) => Promise<void>;
/** Change the value of autoMTU */
updateAutoMTUByServiceName: (serviceName: string, body: {
mtuAuto: OverTheBoxAvailableStatusEnum;
}) => Promise<void>;
/** List available release channels for this service */
listAvailableReleaseChannelsByServiceName: (serviceName: string) => Promise<string[]>;
/** List of backups for this service */
listBackupsByServiceName: (serviceName: string) => Promise<string[]>;
/** Delete a backup */
deleteBackupsByServiceNameAndBackupId: (backupId: string, serviceName: string) => Promise<void>;
/** Get this object properties */
getBackupsByServiceNameAndBackupId: (backupId: string, serviceName: string) => Promise<OverTheBoxBackup>;
/** Cancel the resiliation of the Service */
postCancelResiliationByServiceName: (serviceName: string) => Promise<void>;
/** Launch a contact change procedure */
launchChangeContactByServiceName: (serviceName: string, body: {
contactAdmin?: string;
contactBilling?: string;
contactTech?: string;
}) => Promise<number[]>;
/** Return the list of DHCP configurations */
getConfigurationDhcpConfigByServiceName: (serviceName: string) => Promise<OvertheboxConfigurationDhcpConfig[]>;
/** Create a DHCP configuration */
createConfigurationDhcpConfigByServiceName: (serviceName: string, body: OvertheboxConfigurationDhcpConfig) => Promise<OvertheboxConfigurationDhcpConfig>;
/** Delete a DHCP configuration */
deleteConfigurationDhcpConfigByServiceNameAndId: (serviceName: string, id: string) => Promise<void>;
/** Return the specified DHCP configuration */
getConfigurationDhcpConfigByServiceNameAndId: (serviceName: string, id: string) => Promise<OvertheboxConfigurationDhcpConfig>;
/** Update a DHCP configuration */
updateConfigurationDhcpConfigByServiceNameAndId: (serviceName: string, id: string, body: OvertheboxConfigurationDhcpConfig) => Promise<OvertheboxConfigurationDhcpConfig>;
/** Return the list of DHCP static leases */
getConfigurationDhcpStaticLeaseByServiceName: (serviceName: string) => Promise<OvertheboxConfigurationDhcpStaticLease[]>;
/** Create a DHCP static lease */
createConfigurationDhcpStaticLeaseByServiceName: (serviceName: string, body: OvertheboxConfigurationDhcpStaticLease) => Promise<OvertheboxConfigurationDhcpStaticLease>;
/** Delete a DHCP static lease */
deleteConfigurationDhcpStaticLeaseByServiceNameAndId: (serviceName: string, id: string) => Promise<void>;
/** Return the specified DHCP static lease */
getConfigurationDhcpStaticLeaseByServiceNameAndId: (serviceName: string, id: string) => Promise<OvertheboxConfigurationDhcpStaticLease>;
/** Update a DHCP static lease */
updateConfigurationDhcpStaticLeaseByServiceNameAndId: (serviceName: string, id: string, body: OvertheboxConfigurationDhcpStaticLease) => Promise<OvertheboxConfigurationDhcpStaticLease>;
/** Return the list of DNS local domains */
getConfigurationDnsLocalDomainByServiceName: (serviceName: string) => Promise<OvertheboxConfigurationDnsLocalDomain[]>;
/** Create a DNS local domain */
createConfigurationDnsLocalDomainByServiceName: (serviceName: string, body: OvertheboxConfigurationDnsLocalDomain) => Promise<OvertheboxConfigurationDnsLocalDomain>;
/** Delete a DNS local domain */
deleteConfigurationDnsLocalDomainByServiceNameAndId: (serviceName: string, id: string) => Promise<void>;
/** Return the specified DNS local domain */
getConfigurationDnsLocalDomainByServiceNameAndId: (serviceName: string, id: string) => Promise<OvertheboxConfigurationDnsLocalDomain>;
/** Update a DNS local domain */
updateConfigurationDnsLocalDomainByServiceNameAndId: (serviceName: string, id: string, body: OvertheboxConfigurationDnsLocalDomain) => Promise<OvertheboxConfigurationDnsLocalDomain>;
/** Return the list of DNS nameservers */
getConfigurationDnsNameserverByServiceName: (serviceName: string) => Promise<OvertheboxConfigurationDnsNameserver[]>;
/** Create a DNS nameserver */
createConfigurationDnsNameserverByServiceName: (serviceName: string, body: OvertheboxConfigurationDnsNameserver) => Promise<OvertheboxConfigurationDnsNameserver>;
/** Delete a DNS nameserver */
deleteConfigurationDnsNameserverByServiceNameAndId: (serviceName: string, id: string) => Promise<void>;
/** Get a DNS nameserver configuration */
getConfigurationDnsNameserverByServiceNameAndId: (serviceName: string, id: string) => Promise<OvertheboxConfigurationDnsNameserver>;
/** Update a DNS nameserver configuration */
updateConfigurationDnsNameserverByServiceNameAndId: (serviceName: string, id: string, body: OvertheboxConfigurationDnsNameserver) => Promise<OvertheboxConfigurationDnsNameserver>;
/** Return the list of firewall redirects */
getConfigurationFirewallRedirectByServiceName: (serviceName: string) => Promise<OvertheboxConfigurationFirewallRedirect[]>;
/** Create a firewall redirect */
createConfigurationFirewallRedirectByServiceName: (serviceName: string, body: OvertheboxConfigurationFirewallRedirect) => Promise<OvertheboxConfigurationFirewallRedirect>;
/** Delete a firewall redirect */
deleteConfigurationFirewallRedirectByServiceNameAndId: (serviceName: string, id: string) => Promise<void>;
/** Get a firewall redirect */
getConfigurationFirewallRedirectByServiceNameAndId: (serviceName: string, id: string) => Promise<OvertheboxConfigurationFirewallRedirect>;
/** Update a firewall redirect */
updateConfigurationFirewallRedirectByServiceNameAndId: (serviceName: string, id: string, body: OvertheboxConfigurationFirewallRedirect) => Promise<OvertheboxConfigurationFirewallRedirect>;
/** Return the list of firewall rules */
getConfigurationFirewallRuleByServiceName: (serviceName: string) => Promise<OvertheboxConfigurationFirewallRule[]>;
/** Create a firewall rule */
createConfigurationFirewallRuleByServiceName: (serviceName: string, body: OvertheboxConfigurationFirewallRule) => Promise<OvertheboxConfigurationFirewallRule>;
/** Delete a firewall rule */
deleteConfigurationFirewallRuleByServiceNameAndId: (serviceName: string, id: string) => Promise<void>;
/** Get a firewall rule */
getConfigurationFirewallRuleByServiceNameAndId: (serviceName: string, id: string) => Promise<OvertheboxConfigurationFirewallRule>;
/** Update a firewall rule */
updateConfigurationFirewallRuleByServiceNameAndId: (serviceName: string, id: string, body: OvertheboxConfigurationFirewallRule) => Promise<OvertheboxConfigurationFirewallRule>;
/** Return the list of network interfaces */
getConfigurationNetworkInterfaceByServiceName: (serviceName: string) => Promise<OvertheboxConfigurationNetworkInterface[]>;
/** Create a network interface */
createConfigurationNetworkInterfaceByServiceName: (serviceName: string, body: OvertheboxConfigurationNetworkInterface) => Promise<OvertheboxConfigurationNetworkInterface>;
/** Delete a network interface */
deleteConfigurationNetworkInterfaceByServiceNameAndId: (serviceName: string, id: string) => Promise<void>;
/** Get a network interface */
getConfigurationNetworkInterfaceByServiceNameAndId: (serviceName: string, id: string) => Promise<OvertheboxConfigurationNetworkInterface>;
/** Update a network interface */
updateConfigurationNetworkInterfaceByServiceNameAndId: (serviceName: string, id: string, body: OvertheboxConfigurationNetworkInterface) => Promise<OvertheboxConfigurationNetworkInterface>;
/** Unlink a device from a service */
deleteDeviceByServiceName: (serviceName: string) => Promise<void>;
/** Get this object properties */
getDeviceByServiceName: (serviceName: string) => Promise<OverTheBoxDevice>;
/** List of actions scheduled for this device */
listDeviceActionsByServiceName: (serviceName: string) => Promise<string[]>;
/** Create a device action on the device */
createDeviceActionsByServiceName: (serviceName: string, body: {
name: string;
}) => Promise<OverTheBoxDeviceAction>;
/** Get this object properties */
getDeviceActionsByServiceNameAndActionId: (actionId: string, serviceName: string) => Promise<OverTheBoxDeviceAction>;
/** List the available device actions */
listDeviceAvailableActionsByServiceName: (serviceName: string) => Promise<OverTheBoxAvailableDeviceAction[]>;
/** Create an action to generate a backup */
createDeviceBackupByServiceName: (serviceName: string) => Promise<OverTheBoxDeviceAction>;
/** Generate a temporary url to retrieve device logs */
postDeviceLogsByServiceName: (serviceName: string) => Promise<OverTheBoxTemporaryLogsLink>;
/** Create a group of actions to restore a given backup */
createDeviceRestoreBackupByServiceName: (serviceName: string, body: {
backupId: string;
}) => Promise<OverTheBoxDeviceAction[]>;
/** Link a device to this service */
postLinkDeviceByServiceName: (serviceName: string, body: {
deviceId: string;
}) => Promise<void>;
/** Link an available hardware to this service */
postLinkHardwareByServiceName: (serviceName: string, body: {
hardwareName: string;
}) => Promise<void>;
/** List all available offers one can migrate to */
listMigrationOffersByServiceName: (serviceName: string) => Promise<OverTheBoxAvailableMigrationOffer[]>;
/** List of remote accesses for the service */
listRemoteAccessesByServiceName: (serviceName: string) => Promise<string[]>;
/** Create a new remote access for the service */
createRemoteAccessesByServiceName: (serviceName: string, body: {
allowedIp?: string;
expirationDate?: Date;
exposedPort: number;
publicKey?: string;
}) => Promise<OverTheBoxRemoteAccess>;
/** Delete a remote access */
deleteRemoteAccessesByServiceNameAndRemoteAccessId: (remoteAccessId: string, serviceName: string) => Promise<void>;
/** Get this object properties */
getRemoteAccessesByServiceNameAndRemoteAccessId: (remoteAccessId: string, serviceName: string) => Promise<OverTheBoxRemoteAccess>;
/** Authorize the remote access */
postRemoteAccessesAuthorizeByServiceNameAndRemoteAccessId: (remoteAccessId: string, serviceName: string) => Promise<void>;
/** Get this object properties */
getServiceInfosByServiceName: (serviceName: string) => Promise<ServicesService>;
/** Alter this object properties */
updateServiceInfosByServiceName: (serviceName: string, body: ServicesService) => Promise<void>;
/** Get statistics for an OTB device */
getStatisticsByServiceName: (serviceName: string) => Promise<OtbDeviceStatistics[]>;
/** List of tasks scheduled for this service */
listTasksByServiceName: (serviceName: string) => Promise<string[]>;
/** Get this object properties */
getTasksByServiceNameAndTaskId: (serviceName: string, taskId: string) => Promise<OverTheBoxTask>;
}
export { OverTheBoxHandler };