UNPKG

node-ovh-ts

Version:

OVH API wrapper library for TypeScript

1 lines 4.69 kB
{"version":3,"sources":["../src/handlers/WebPaaS.ts"],"sourcesContent":["/* WARNING: This file is auto-generated . Do not edit manually. */\n\nimport { WebPaaSOfferEnum } from '../models/WebPaaSOfferEnum';\nimport { WebPaaSSubscriptionProjectAddCustomer } from '../models/WebPaaSSubscriptionProjectAddCustomer';\nimport { WebPaaSCapabilities } from '../models/WebPaaSCapabilities';\nimport { WebPaaSSubscription } from '../models/WebPaaSSubscription';\nimport { ServiceTerminationReasonEnum } from '../models/ServiceTerminationReasonEnum';\nimport { ServicesService } from '../models/ServicesService';\nimport { WebPaaSSubscriptionCustomer } from '../models/WebPaaSSubscriptionCustomer';\nimport { ServiceTerminationFutureUseEnum } from '../models/ServiceTerminationFutureUseEnum';\nimport OVHBase from '../ovh';\n\nclass WebPaaSHandler {\n ovh: OVHBase;\n\n constructor(ovh: OVHBase) {\n this.ovh = ovh;\n }\n\n /** List available regions and templates */\n listCapabilities = (): Promise<WebPaaSCapabilities> => {\n return this.ovh.request('GET', '/webPaaS/capabilities');\n };\n\n /** List your subscriptions */\n listSubscription = (): Promise<string[]> => {\n return this.ovh.request('GET', '/webPaaS/subscription');\n };\n\n /** Get information about your subscription */\n getSubscriptionByServiceName = (serviceName: string): Promise<WebPaaSSubscription> => {\n return this.ovh.request('GET', `/webPaaS/subscription/${serviceName}`);\n };\n\n /** Confirm termination of your service */\n confirmSubscriptionTerminationByServiceName = (\n serviceName: string,\n body: {\n commentary?: string;\n futureUse?: ServiceTerminationFutureUseEnum;\n reason?: ServiceTerminationReasonEnum;\n token: string;\n }\n ): Promise<string> => {\n return this.ovh.request(\n 'POST',\n `/webPaaS/subscription/${serviceName}/confirmTermination`,\n body\n );\n };\n\n /** List customers added to a project */\n listSubscriptionCustomerByServiceName = (\n serviceName: string\n ): Promise<WebPaaSSubscriptionCustomer[]> => {\n return this.ovh.request('GET', `/webPaaS/subscription/${serviceName}/customer`);\n };\n\n /** Add customer to the project */\n addSubscriptionCustomerByServiceName = (\n serviceName: string,\n body: WebPaaSSubscriptionProjectAddCustomer\n ): Promise<WebPaaSSubscriptionCustomer> => {\n return this.ovh.request('POST', `/webPaaS/subscription/${serviceName}/customer`, body);\n };\n\n /** Remove customer from the project */\n deleteSubscriptionCustomerByServiceNameAndCustomerId = (\n customerId: string,\n serviceName: string\n ): Promise<WebPaaSSubscriptionCustomer> => {\n return this.ovh.request(\n 'DELETE',\n `/webPaaS/subscription/${serviceName}/customer/${customerId}`\n );\n };\n\n /** Get the customer details */\n getSubscriptionCustomerByServiceNameAndCustomerId = (\n customerId: string,\n serviceName: string\n ): Promise<WebPaaSSubscriptionCustomer> => {\n return this.ovh.request('GET', `/webPaaS/subscription/${serviceName}/customer/${customerId}`);\n };\n\n /** Get this object properties */\n getSubscriptionServiceInfosByServiceName = (serviceName: string): Promise<ServicesService> => {\n return this.ovh.request('GET', `/webPaaS/subscription/${serviceName}/serviceInfos`);\n };\n\n /** Alter this object properties */\n updateSubscriptionServiceInfosByServiceName = (\n serviceName: string,\n body: ServicesService\n ): Promise<void> => {\n return this.ovh.request('PUT', `/webPaaS/subscription/${serviceName}/serviceInfos`, body);\n };\n\n /** Terminate your service */\n postSubscriptionTerminateByServiceName = (serviceName: string): Promise<string> => {\n return this.ovh.request('POST', `/webPaaS/subscription/${serviceName}/terminate`);\n };\n}\n\nexport { WebPaaSHandler };\n"],"mappings":"AAYA,IAAMA,EAAN,KAAqB,CAGnB,YAAYC,EAAc,CAK1B,sBAAmB,IACV,KAAK,IAAI,QAAQ,MAAO,uBAAuB,EAIxD,sBAAmB,IACV,KAAK,IAAI,QAAQ,MAAO,uBAAuB,EAIxD,kCAAgCC,GACvB,KAAK,IAAI,QAAQ,MAAO,yBAAyBA,GAAa,EAIvE,iDAA8C,CAC5CA,EACAC,IAOO,KAAK,IAAI,QACd,OACA,yBAAyBD,uBACzBC,CACF,EAIF,2CACED,GAEO,KAAK,IAAI,QAAQ,MAAO,yBAAyBA,YAAsB,EAIhF,0CAAuC,CACrCA,EACAC,IAEO,KAAK,IAAI,QAAQ,OAAQ,yBAAyBD,aAAwBC,CAAI,EAIvF,0DAAuD,CACrDC,EACAF,IAEO,KAAK,IAAI,QACd,SACA,yBAAyBA,cAAwBE,GACnD,EAIF,uDAAoD,CAClDA,EACAF,IAEO,KAAK,IAAI,QAAQ,MAAO,yBAAyBA,cAAwBE,GAAY,EAI9F,8CAA4CF,GACnC,KAAK,IAAI,QAAQ,MAAO,yBAAyBA,gBAA0B,EAIpF,iDAA8C,CAC5CA,EACAC,IAEO,KAAK,IAAI,QAAQ,MAAO,yBAAyBD,iBAA4BC,CAAI,EAI1F,4CAA0CD,GACjC,KAAK,IAAI,QAAQ,OAAQ,yBAAyBA,aAAuB,EApFhF,KAAK,IAAMD,CACb,CAqFF","names":["WebPaaSHandler","ovh","serviceName","body","customerId"]}