node-ovh-ts
Version:
OVH API wrapper library for TypeScript
1 lines • 4.72 kB
Source Map (JSON)
{"version":3,"sources":["../src/handlers/NewAccount.ts"],"sourcesContent":["/* WARNING: This file is auto-generated . Do not edit manually. */\n\nimport { NichandleCreationRules } from '../models/NichandleCreationRules';\nimport { NichandleLanguageEnum } from '../models/NichandleLanguageEnum';\nimport { NichandleCountryEnum } from '../models/NichandleCountryEnum';\nimport { OrderContract } from '../models/OrderContract';\nimport { NichandleLegalFormEnum } from '../models/NichandleLegalFormEnum';\nimport { NichandleCreationRule } from '../models/NichandleCreationRule';\nimport { NichandleCreationRulesActionEnum } from '../models/NichandleCreationRulesActionEnum';\nimport { NichandleGenderEnum } from '../models/NichandleGenderEnum';\nimport { NichandleNewAccountAndToken } from '../models/NichandleNewAccountAndToken';\nimport { NichandleOvhSubsidiaryEnum } from '../models/NichandleOvhSubsidiaryEnum';\nimport { NichandleOvhCompanyEnum } from '../models/NichandleOvhCompanyEnum';\nimport OVHBase from '../ovh';\n\nclass NewAccountHandler {\n ovh: OVHBase;\n\n constructor(ovh: OVHBase) {\n this.ovh = ovh;\n }\n\n /** Create a new OVH identifier */\n create = (body: {\n address?: string;\n area?: string;\n birthCity?: string;\n birthDay?: string;\n city?: string;\n companyNationalIdentificationNumber?: string;\n corporationType?: string;\n country: NichandleCountryEnum;\n email: string;\n fax?: string;\n firstname?: string;\n italianSDI?: string;\n language?: NichandleLanguageEnum;\n legalform: NichandleLegalFormEnum;\n name?: string;\n nationalIdentificationNumber?: string;\n organisation?: string;\n ovhCompany: NichandleOvhCompanyEnum;\n ovhSubsidiary: NichandleOvhSubsidiaryEnum;\n phone?: string;\n phoneCountry?: NichandleCountryEnum;\n sex?: NichandleGenderEnum;\n spareEmail?: string;\n vat?: string;\n zip?: string;\n }): Promise<NichandleNewAccountAndToken> => {\n return this.ovh.request('POST', '/newAccount', body);\n };\n\n /** All available areas for a given country */\n getArea = (): Promise<string[]> => {\n return this.ovh.request('GET', '/newAccount/area');\n };\n\n /** Returns the contracts that governs the creation of an OVH identifier */\n getContracts = (): Promise<OrderContract[]> => {\n return this.ovh.request('GET', '/newAccount/contracts');\n };\n\n /** All available corporation types for a given country */\n getCorporationType = (): Promise<string[]> => {\n return this.ovh.request('GET', '/newAccount/corporationType');\n };\n\n /** All available countries for an ovh company and an ovh subsidiary */\n getCountries = (): Promise<NichandleCountryEnum[]> => {\n return this.ovh.request('GET', '/newAccount/countries');\n };\n\n /** Give all the rules to follow in order to create an OVH identifier */\n getCreationRules = (): Promise<NichandleCreationRules> => {\n return this.ovh.request('GET', '/newAccount/creationRules');\n };\n\n /** All available legal forms for a given country */\n getLegalform = (): Promise<string[]> => {\n return this.ovh.request('GET', '/newAccount/legalform');\n };\n\n /** Give all the rules to follow in order to create and update an OVH identifier */\n postRules = (body: {\n action?: NichandleCreationRulesActionEnum;\n address?: string;\n area?: string;\n birthCity?: string;\n birthDay?: string;\n city?: string;\n companyNationalIdentificationNumber?: string;\n corporationType?: string;\n country?: NichandleCountryEnum;\n email?: string;\n fax?: string;\n firstname?: string;\n italianSDI?: string;\n language?: NichandleLanguageEnum;\n legalform?: NichandleLegalFormEnum;\n name?: string;\n nationalIdentificationNumber?: string;\n organisation?: string;\n ovhCompany?: NichandleOvhCompanyEnum;\n ovhSubsidiary?: NichandleOvhSubsidiaryEnum;\n phone?: string;\n phoneCountry?: NichandleCountryEnum;\n sex?: NichandleGenderEnum;\n spareEmail?: string;\n vat?: string;\n zip?: string;\n }): Promise<NichandleCreationRule[]> => {\n return this.ovh.request('POST', '/newAccount/rules', body);\n };\n}\n\nexport { NewAccountHandler };\n"],"mappings":"AAeA,IAAMA,EAAN,KAAwB,CAGtB,YAAYC,EAAc,CAK1B,YAAUC,GA2BD,KAAK,IAAI,QAAQ,OAAQ,cAAeA,CAAI,EAIrD,aAAU,IACD,KAAK,IAAI,QAAQ,MAAO,kBAAkB,EAInD,kBAAe,IACN,KAAK,IAAI,QAAQ,MAAO,uBAAuB,EAIxD,wBAAqB,IACZ,KAAK,IAAI,QAAQ,MAAO,6BAA6B,EAI9D,kBAAe,IACN,KAAK,IAAI,QAAQ,MAAO,uBAAuB,EAIxD,sBAAmB,IACV,KAAK,IAAI,QAAQ,MAAO,2BAA2B,EAI5D,kBAAe,IACN,KAAK,IAAI,QAAQ,MAAO,uBAAuB,EAIxD,eAAaA,GA4BJ,KAAK,IAAI,QAAQ,OAAQ,oBAAqBA,CAAI,EA7FzD,KAAK,IAAMD,CACb,CA8FF","names":["NewAccountHandler","ovh","body"]}