node-ovh-ts
Version:
OVH API wrapper library for TypeScript
1 lines • 15.7 kB
Source Map (JSON)
{"version":3,"sources":["../src/handlers/Storage.ts"],"sourcesContent":["/* WARNING: This file is auto-generated . Do not edit manually. */\n\nimport { StorageNetAppShareUpdate } from '../models/StorageNetAppShareUpdate';\nimport { StorageNetAppShareSnapshotPolicyUpdate } from '../models/StorageNetAppShareSnapshotPolicyUpdate';\nimport { StorageNetAppShareSnapshotReserveUpdate } from '../models/StorageNetAppShareSnapshotReserveUpdate';\nimport { StorageNetAppShareSnapshotUpdate } from '../models/StorageNetAppShareSnapshotUpdate';\nimport { StorageNetAppShareSnapshotReserve } from '../models/StorageNetAppShareSnapshotReserve';\nimport { StorageNetAppShareAccessPath } from '../models/StorageNetAppShareAccessPath';\nimport { ServiceTerminationReasonEnum } from '../models/ServiceTerminationReasonEnum';\nimport { StorageNetAppShareSnapshot } from '../models/StorageNetAppShareSnapshot';\nimport { StorageNetAppService } from '../models/StorageNetAppService';\nimport { StorageNetAppShareExtendOrShrink } from '../models/StorageNetAppShareExtendOrShrink';\nimport { ServicesService } from '../models/ServicesService';\nimport { StorageNetAppShareSnapshotPolicy } from '../models/StorageNetAppShareSnapshotPolicy';\nimport { ServiceTerminationFutureUseEnum } from '../models/ServiceTerminationFutureUseEnum';\nimport { StorageNetAppSnapshotPolicyUpdate } from '../models/StorageNetAppSnapshotPolicyUpdate';\nimport { StorageNetAppShareACLRule } from '../models/StorageNetAppShareACLRule';\nimport { StorageNetAppShare } from '../models/StorageNetAppShare';\nimport { StorageNetAppSnapshotPolicy } from '../models/StorageNetAppSnapshotPolicy';\nimport { StorageNetAppServiceUpdate } from '../models/StorageNetAppServiceUpdate';\nimport OVHBase from '../ovh';\n\nclass StorageHandler {\n ovh: OVHBase;\n\n constructor(ovh: OVHBase) {\n this.ovh = ovh;\n }\n\n /** List available services */\n listNetapp = (): Promise<StorageNetAppService[]> => {\n return this.ovh.request('GET', '/storage/netapp');\n };\n\n /** Get service details */\n getNetappByServiceName = (serviceName: string): Promise<StorageNetAppService> => {\n return this.ovh.request('GET', `/storage/netapp/${serviceName}`);\n };\n\n /** Update service */\n updateNetappByServiceName = (\n serviceName: string,\n body: StorageNetAppServiceUpdate\n ): Promise<StorageNetAppService> => {\n return this.ovh.request('PUT', `/storage/netapp/${serviceName}`, body);\n };\n\n /** Launch a contact change procedure */\n launchNetappChangeContactByServiceName = (\n serviceName: string,\n body: { contactAdmin?: string; contactBilling?: string; contactTech?: string }\n ): Promise<number[]> => {\n return this.ovh.request('POST', `/storage/netapp/${serviceName}/changeContact`, body);\n };\n\n /** Confirm termination of your service */\n confirmNetappTerminationByServiceName = (\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('POST', `/storage/netapp/${serviceName}/confirmTermination`, body);\n };\n\n /** Get this object properties */\n getNetappServiceInfosByServiceName = (serviceName: string): Promise<ServicesService> => {\n return this.ovh.request('GET', `/storage/netapp/${serviceName}/serviceInfos`);\n };\n\n /** Alter this object properties */\n updateNetappServiceInfosByServiceName = (\n serviceName: string,\n body: ServicesService\n ): Promise<void> => {\n return this.ovh.request('PUT', `/storage/netapp/${serviceName}/serviceInfos`, body);\n };\n\n /** List available shares */\n listNetappShareByServiceName = (serviceName: string): Promise<StorageNetAppShare[]> => {\n return this.ovh.request('GET', `/storage/netapp/${serviceName}/share`);\n };\n\n /** Create a share */\n createNetappShareByServiceName = (\n serviceName: string,\n body: StorageNetAppShare\n ): Promise<StorageNetAppShare> => {\n return this.ovh.request('POST', `/storage/netapp/${serviceName}/share`, body);\n };\n\n /** Delete a share */\n deleteNetappShareByServiceNameAndShareId = (\n serviceName: string,\n shareId: string\n ): Promise<void> => {\n return this.ovh.request('DELETE', `/storage/netapp/${serviceName}/share/${shareId}`);\n };\n\n /** Get share details */\n getNetappShareByServiceNameAndShareId = (\n serviceName: string,\n shareId: string\n ): Promise<StorageNetAppShare> => {\n return this.ovh.request('GET', `/storage/netapp/${serviceName}/share/${shareId}`);\n };\n\n /** Update a share */\n updateNetappShareByServiceNameAndShareId = (\n serviceName: string,\n shareId: string,\n body: StorageNetAppShareUpdate\n ): Promise<StorageNetAppShare> => {\n return this.ovh.request('PUT', `/storage/netapp/${serviceName}/share/${shareId}`, body);\n };\n\n /** List available access paths */\n listNetappShareAccessPathByServiceNameAndShareId = (\n serviceName: string,\n shareId: string\n ): Promise<StorageNetAppShareAccessPath[]> => {\n return this.ovh.request('GET', `/storage/netapp/${serviceName}/share/${shareId}/accessPath`);\n };\n\n /** Get access path details */\n getNetappShareAccessPathByServiceNameAndShareIdAndAccessPathId = (\n accessPathId: string,\n serviceName: string,\n shareId: string\n ): Promise<StorageNetAppShareAccessPath> => {\n return this.ovh.request(\n 'GET',\n `/storage/netapp/${serviceName}/share/${shareId}/accessPath/${accessPathId}`\n );\n };\n\n /** List available ACLs */\n listNetappShareAclByServiceNameAndShareId = (\n serviceName: string,\n shareId: string\n ): Promise<StorageNetAppShareACLRule[]> => {\n return this.ovh.request('GET', `/storage/netapp/${serviceName}/share/${shareId}/acl`);\n };\n\n /** Create an ACL */\n createNetappShareAclByServiceNameAndShareId = (\n serviceName: string,\n shareId: string,\n body: StorageNetAppShareACLRule\n ): Promise<StorageNetAppShareACLRule> => {\n return this.ovh.request('POST', `/storage/netapp/${serviceName}/share/${shareId}/acl`, body);\n };\n\n /** Delete an ACL */\n deleteNetappShareAclByServiceNameAndShareIdAndAclRuleId = (\n aclRuleId: string,\n serviceName: string,\n shareId: string\n ): Promise<void> => {\n return this.ovh.request(\n 'DELETE',\n `/storage/netapp/${serviceName}/share/${shareId}/acl/${aclRuleId}`\n );\n };\n\n /** Get ACL details */\n getNetappShareAclByServiceNameAndShareIdAndAclRuleId = (\n aclRuleId: string,\n serviceName: string,\n shareId: string\n ): Promise<StorageNetAppShareACLRule> => {\n return this.ovh.request(\n 'GET',\n `/storage/netapp/${serviceName}/share/${shareId}/acl/${aclRuleId}`\n );\n };\n\n /** Extend share size */\n postNetappShareExtendByServiceNameAndShareId = (\n serviceName: string,\n shareId: string,\n body: StorageNetAppShareExtendOrShrink\n ): Promise<void> => {\n return this.ovh.request('POST', `/storage/netapp/${serviceName}/share/${shareId}/extend`, body);\n };\n\n /** Shrink share size */\n postNetappShareShrinkByServiceNameAndShareId = (\n serviceName: string,\n shareId: string,\n body: StorageNetAppShareExtendOrShrink\n ): Promise<void> => {\n return this.ovh.request('POST', `/storage/netapp/${serviceName}/share/${shareId}/shrink`, body);\n };\n\n /** List available snapshots */\n listNetappShareSnapshotByServiceNameAndShareId = (\n serviceName: string,\n shareId: string\n ): Promise<StorageNetAppShareSnapshot[]> => {\n return this.ovh.request('GET', `/storage/netapp/${serviceName}/share/${shareId}/snapshot`);\n };\n\n /** Create a snapshot */\n createNetappShareSnapshotByServiceNameAndShareId = (\n serviceName: string,\n shareId: string,\n body: StorageNetAppShareSnapshot\n ): Promise<StorageNetAppShareSnapshot> => {\n return this.ovh.request(\n 'POST',\n `/storage/netapp/${serviceName}/share/${shareId}/snapshot`,\n body\n );\n };\n\n /** Delete a snapshot */\n deleteNetappShareSnapshotByServiceNameAndShareIdAndSnapshotId = (\n serviceName: string,\n shareId: string,\n snapshotId: string\n ): Promise<void> => {\n return this.ovh.request(\n 'DELETE',\n `/storage/netapp/${serviceName}/share/${shareId}/snapshot/${snapshotId}`\n );\n };\n\n /** Get snapshot details */\n getNetappShareSnapshotByServiceNameAndShareIdAndSnapshotId = (\n serviceName: string,\n shareId: string,\n snapshotId: string\n ): Promise<StorageNetAppShareSnapshot> => {\n return this.ovh.request(\n 'GET',\n `/storage/netapp/${serviceName}/share/${shareId}/snapshot/${snapshotId}`\n );\n };\n\n /** Update a snapshot */\n updateNetappShareSnapshotByServiceNameAndShareIdAndSnapshotId = (\n serviceName: string,\n shareId: string,\n snapshotId: string,\n body: StorageNetAppShareSnapshotUpdate\n ): Promise<StorageNetAppShareSnapshot> => {\n return this.ovh.request(\n 'PUT',\n `/storage/netapp/${serviceName}/share/${shareId}/snapshot/${snapshotId}`,\n body\n );\n };\n\n /** Hold an automatic share snapshot */\n postNetappShareSnapshotHoldByServiceNameAndShareIdAndSnapshotId = (\n serviceName: string,\n shareId: string,\n snapshotId: string\n ): Promise<StorageNetAppShareSnapshot> => {\n return this.ovh.request(\n 'POST',\n `/storage/netapp/${serviceName}/share/${shareId}/snapshot/${snapshotId}/hold`\n );\n };\n\n /** Get snapshot policy used by a share */\n getNetappShareSnapshotPolicyByServiceNameAndShareId = (\n serviceName: string,\n shareId: string\n ): Promise<StorageNetAppShareSnapshotPolicy> => {\n return this.ovh.request(\n 'GET',\n `/storage/netapp/${serviceName}/share/${shareId}/snapshotPolicy`\n );\n };\n\n /** Update snapshot policy used by a share */\n updateNetappShareSnapshotPolicyByServiceNameAndShareId = (\n serviceName: string,\n shareId: string,\n body: StorageNetAppShareSnapshotPolicyUpdate\n ): Promise<void> => {\n return this.ovh.request(\n 'PUT',\n `/storage/netapp/${serviceName}/share/${shareId}/snapshotPolicy`,\n body\n );\n };\n\n /** Get snapshot reserve properties of a share */\n getNetappShareSnapshotReserveByServiceNameAndShareId = (\n serviceName: string,\n shareId: string\n ): Promise<StorageNetAppShareSnapshotReserve> => {\n return this.ovh.request(\n 'GET',\n `/storage/netapp/${serviceName}/share/${shareId}/snapshotReserve`\n );\n };\n\n /** Update snapshot reserve properties of a share */\n updateNetappShareSnapshotReserveByServiceNameAndShareId = (\n serviceName: string,\n shareId: string,\n body: StorageNetAppShareSnapshotReserveUpdate\n ): Promise<void> => {\n return this.ovh.request(\n 'PUT',\n `/storage/netapp/${serviceName}/share/${shareId}/snapshotReserve`,\n body\n );\n };\n\n /** Get a list of snapshot policies */\n getNetappSnapshotPolicyByServiceName = (\n serviceName: string\n ): Promise<StorageNetAppSnapshotPolicy[]> => {\n return this.ovh.request('GET', `/storage/netapp/${serviceName}/snapshotPolicy`);\n };\n\n /** Create a snapshot policy */\n createNetappSnapshotPolicyByServiceName = (\n serviceName: string,\n body: StorageNetAppSnapshotPolicy\n ): Promise<StorageNetAppSnapshotPolicy> => {\n return this.ovh.request('POST', `/storage/netapp/${serviceName}/snapshotPolicy`, body);\n };\n\n /** Delete a snapshot policy */\n deleteNetappSnapshotPolicyByServiceNameAndSnapshotPolicyId = (\n serviceName: string,\n snapshotPolicyId: string\n ): Promise<void> => {\n return this.ovh.request(\n 'DELETE',\n `/storage/netapp/${serviceName}/snapshotPolicy/${snapshotPolicyId}`\n );\n };\n\n /** Get snapshot policy details */\n getNetappSnapshotPolicyByServiceNameAndSnapshotPolicyId = (\n serviceName: string,\n snapshotPolicyId: string\n ): Promise<StorageNetAppSnapshotPolicy> => {\n return this.ovh.request(\n 'GET',\n `/storage/netapp/${serviceName}/snapshotPolicy/${snapshotPolicyId}`\n );\n };\n\n /** Update a snapshot policy */\n updateNetappSnapshotPolicyByServiceNameAndSnapshotPolicyId = (\n serviceName: string,\n snapshotPolicyId: string,\n body: StorageNetAppSnapshotPolicyUpdate\n ): Promise<void> => {\n return this.ovh.request(\n 'PUT',\n `/storage/netapp/${serviceName}/snapshotPolicy/${snapshotPolicyId}`,\n body\n );\n };\n\n /** Terminate your service */\n postNetappTerminateByServiceName = (serviceName: string): Promise<string> => {\n return this.ovh.request('POST', `/storage/netapp/${serviceName}/terminate`);\n };\n}\n\nexport { StorageHandler };\n"],"mappings":"AAsBA,IAAMA,EAAN,KAAqB,CAGnB,YAAYC,EAAc,CAK1B,gBAAa,IACJ,KAAK,IAAI,QAAQ,MAAO,iBAAiB,EAIlD,4BAA0BC,GACjB,KAAK,IAAI,QAAQ,MAAO,mBAAmBA,GAAa,EAIjE,+BAA4B,CAC1BA,EACAC,IAEO,KAAK,IAAI,QAAQ,MAAO,mBAAmBD,IAAeC,CAAI,EAIvE,4CAAyC,CACvCD,EACAC,IAEO,KAAK,IAAI,QAAQ,OAAQ,mBAAmBD,kBAA6BC,CAAI,EAItF,2CAAwC,CACtCD,EAC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IvF,gEAA6D,CAC3DD,EACAM,IAEO,KAAK,IAAI,QACd,SACA,mBAAmBN,oBAA8BM,GACnD,EAIF,6DAA0D,CACxDN,EACAM,IAEO,KAAK,IAAI,QACd,MACA,mBAAmBN,oBAA8BM,GACnD,EAIF,gEAA6D,CAC3DN,EACAM,EACAL,IAEO,KAAK,IAAI,QACd,MACA,mBAAmBD,oBAA8BM,IACjDL,CACF,EAIF,sCAAoCD,GAC3B,KAAK,IAAI,QAAQ,OAAQ,mBAAmBA,aAAuB,EAvV1E,KAAK,IAAMD,CACb,CAwVF","names":["StorageHandler","ovh","serviceName","body","shareId","accessPathId","aclRuleId","snapshotId","snapshotPolicyId"]}