@ovh-soyoustart/analytics
Version:
Add typing to to ovh api analytics
163 lines (162 loc) • 5.93 kB
TypeScript
import { CacheAction, ICacheOptions, OvhRequestable } from '@ovh-api/common';
/**
* START API /analytics Models
* Source: https://eu.api.soyoustart.com/1.0/analytics.json
*/
export declare namespace service {
/**
* Map a possible renew for a specific service
* interface fullName: service.RenewType.RenewType
*/
interface RenewType {
automatic: boolean;
deleteAtExpiration: boolean;
forced: boolean;
manualPayment?: boolean;
period?: number;
}
/**
* Detailed renewal type of a service
* type fullname: service.RenewalTypeEnum
*/
type RenewalTypeEnum = "automaticForcedProduct" | "automaticV2012" | "automaticV2014" | "automaticV2016" | "manual" | "oneShot" | "option";
/**
* type fullname: service.StateEnum
*/
type StateEnum = "expired" | "inCreation" | "ok" | "pendingDebt" | "unPaid";
/**
* All future uses you can provide for a service termination
* type fullname: service.TerminationFutureUseEnum
*/
type TerminationFutureUseEnum = "NOT_REPLACING_SERVICE" | "OTHER" | "SUBSCRIBE_AN_OTHER_SERVICE" | "SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR" | "SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR";
/**
* All reasons you can provide for a service termination
* type fullname: service.TerminationReasonEnum
*/
type TerminationReasonEnum = "FEATURES_DONT_SUIT_ME" | "LACK_OF_PERFORMANCES" | "MIGRATED_TO_ANOTHER_OVH_PRODUCT" | "MIGRATED_TO_COMPETITOR" | "NOT_ENOUGH_RECOGNITION" | "NOT_NEEDED_ANYMORE" | "NOT_RELIABLE" | "NO_ANSWER" | "OTHER" | "PRODUCT_DIMENSION_DONT_SUIT_ME" | "PRODUCT_TOOLS_DONT_SUIT_ME" | "TOO_EXPENSIVE" | "TOO_HARD_TO_USE" | "UNSATIFIED_BY_CUSTOMER_SUPPORT";
}
export declare namespace services {
/**
* Details about a Service
* interface fullName: services.Service.Service
*/
interface Service {
canDeleteAtExpiration: boolean;
contactAdmin: string;
contactBilling: string;
contactTech: string;
creation: string;
domain: string;
engagedUpTo?: string;
expiration: string;
possibleRenewPeriod?: number[];
renew?: service.RenewType;
renewalType: service.RenewalTypeEnum;
serviceId: number;
status: service.StateEnum;
}
}
/**
* END API /analytics Models
*/
export declare function proxyAnalytics(ovhEngine: OvhRequestable): Analytics;
export default proxyAnalytics;
/**
* Api model for /analytics
*/
export interface Analytics {
platforms: {
/**
* List available services
* GET /analytics/platforms
*/
$get(): Promise<string[]>;
/**
* Controle cache
*/
$cache(param?: ICacheOptions | CacheAction): Promise<any>;
$(serviceName: string): {
/**
* Void
* GET /analytics/platforms/{serviceName}
*/
$get(): Promise<void>;
/**
* Controle cache
*/
$cache(param?: ICacheOptions | CacheAction): Promise<any>;
changeContact: {
/**
* Launch a contact change procedure
* POST /analytics/platforms/{serviceName}/changeContact
*/
$post(params?: {
contactAdmin?: string;
contactBilling?: string;
contactTech?: string;
}): Promise<number[]>;
/**
* Controle cache
*/
$cache(param?: ICacheOptions | CacheAction): Promise<any>;
};
confirmTermination: {
/**
* Confirm termination of your service
* POST /analytics/platforms/{serviceName}/confirmTermination
*/
$post(params: {
commentary?: string;
futureUse?: service.TerminationFutureUseEnum;
reason?: service.TerminationReasonEnum;
token: string;
}): Promise<string>;
/**
* Controle cache
*/
$cache(param?: ICacheOptions | CacheAction): Promise<any>;
};
serviceInfos: {
/**
* Get this object properties
* GET /analytics/platforms/{serviceName}/serviceInfos
*/
$get(): Promise<services.Service>;
/**
* Alter this object properties
* PUT /analytics/platforms/{serviceName}/serviceInfos
*/
$put(params?: {
canDeleteAtExpiration?: boolean;
contactAdmin?: string;
contactBilling?: string;
contactTech?: string;
creation?: string;
domain?: string;
engagedUpTo?: string;
expiration?: string;
possibleRenewPeriod?: number[];
renew?: service.RenewType;
renewalType?: service.RenewalTypeEnum;
serviceId?: number;
status?: service.StateEnum;
}): Promise<void>;
/**
* Controle cache
*/
$cache(param?: ICacheOptions | CacheAction): Promise<any>;
};
terminate: {
/**
* Terminate your service
* POST /analytics/platforms/{serviceName}/terminate
*/
$post(): Promise<string>;
/**
* Controle cache
*/
$cache(param?: ICacheOptions | CacheAction): Promise<any>;
};
};
};
}