@nutanix-scratch/licensing-js-client 4.0.1-alpha.1 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. package/LICENSE.txt +202 -49
  2. package/README.md +54 -36
  3. package/dist/Ntnx-Licensing-js-client-prod.js +1 -1
  4. package/dist/Ntnx-Licensing-js-client.js +506 -242
  5. package/dist/es/ApiClient.d.ts +14 -1
  6. package/dist/es/ApiClient.js +257 -206
  7. package/dist/es/Paginable.d.ts +1 -1
  8. package/dist/es/Paginable.js +10 -10
  9. package/dist/es/apis/enduserlicenseagreement-endpoints.d.ts +41 -0
  10. package/dist/es/apis/{enduserlicenseagreements-endpoints.js → enduserlicenseagreement-endpoints.js} +28 -70
  11. package/dist/es/apis/licensekeys-endpoints.d.ts +90 -0
  12. package/dist/es/apis/licensekeys-endpoints.js +283 -0
  13. package/dist/es/apis/licenses-endpoints.d.ts +60 -146
  14. package/dist/es/apis/licenses-endpoints.js +176 -362
  15. package/dist/es/index.d.ts +115 -67
  16. package/dist/es/index.js +348 -156
  17. package/dist/es/models/common/v1/config/Flag.d.ts +32 -26
  18. package/dist/es/models/common/v1/config/Flag.js +66 -22
  19. package/dist/es/models/common/v1/config/KVPair.d.ts +35 -26
  20. package/dist/es/models/common/v1/config/KVPair.js +71 -25
  21. package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +58 -0
  22. package/dist/es/models/common/v1/config/MapOfStringWrapper.js +275 -0
  23. package/dist/es/models/common/v1/config/Message.d.ts +41 -38
  24. package/dist/es/models/common/v1/config/Message.js +58 -26
  25. package/dist/es/models/common/v1/config/MessageSeverity.js +8 -8
  26. package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +24 -22
  27. package/dist/es/models/common/v1/config/TenantAwareModel.js +55 -23
  28. package/dist/es/models/common/v1/response/ApiLink.d.ts +28 -26
  29. package/dist/es/models/common/v1/response/ApiLink.js +54 -22
  30. package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +79 -44
  31. package/dist/es/models/common/v1/response/ApiResponseMetadata.js +72 -28
  32. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +24 -18
  33. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +72 -32
  34. package/dist/es/models/licensing/v4/agreements/Acceptance.d.ts +81 -0
  35. package/dist/es/models/licensing/v4/agreements/Acceptance.js +314 -0
  36. package/dist/es/models/licensing/v4/agreements/AddUserApiResponse.d.ts +65 -25
  37. package/dist/es/models/licensing/v4/agreements/AddUserApiResponse.js +96 -42
  38. package/dist/es/models/licensing/v4/agreements/EndUser.d.ts +110 -0
  39. package/dist/{lib/models/licensing/v4/agreements/EulaUser.js → es/models/licensing/v4/agreements/EndUser.js} +148 -137
  40. package/dist/es/models/licensing/v4/agreements/Eula.d.ts +61 -41
  41. package/dist/es/models/licensing/v4/agreements/Eula.js +112 -75
  42. package/dist/es/models/licensing/v4/agreements/GetEulaApiResponse.d.ts +65 -25
  43. package/dist/es/models/licensing/v4/agreements/GetEulaApiResponse.js +60 -28
  44. package/dist/es/models/licensing/v4/config/AddLicenseKeyApiResponse.d.ts +103 -0
  45. package/dist/es/models/licensing/v4/config/AddLicenseKeyApiResponse.js +347 -0
  46. package/dist/es/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.d.ts +127 -0
  47. package/dist/es/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.js +360 -0
  48. package/dist/es/models/licensing/v4/config/Allowance.d.ts +70 -0
  49. package/dist/es/models/licensing/v4/config/{ClusterAllowance.js → Allowance.js} +136 -84
  50. package/dist/es/models/licensing/v4/config/AllowanceDetail.d.ts +46 -42
  51. package/dist/es/models/licensing/v4/config/AllowanceDetail.js +84 -52
  52. package/dist/es/models/licensing/v4/config/AllowanceDetailProjection.d.ts +2 -1
  53. package/dist/es/models/licensing/v4/config/AllowanceDetailProjection.js +40 -19
  54. package/dist/es/models/licensing/v4/config/AllowanceProjection.d.ts +56 -0
  55. package/dist/es/models/licensing/v4/config/AllowanceProjection.js +320 -0
  56. package/dist/es/models/licensing/v4/config/AssignLicenseKeysApiResponse.d.ts +102 -0
  57. package/dist/es/models/licensing/v4/config/{ListClusterAllowancesApiResponse.js → AssignLicenseKeysApiResponse.js} +90 -63
  58. package/dist/es/models/licensing/v4/config/BaseClusterInfo.d.ts +21 -16
  59. package/dist/es/models/licensing/v4/config/BaseClusterInfo.js +82 -34
  60. package/dist/es/models/licensing/v4/config/BaseLicenseInfo.d.ts +49 -41
  61. package/dist/es/models/licensing/v4/config/BaseLicenseInfo.js +101 -52
  62. package/dist/es/models/licensing/v4/config/BillingPlan.d.ts +19 -0
  63. package/dist/es/models/licensing/v4/config/BillingPlan.js +91 -0
  64. package/dist/es/models/licensing/v4/config/CapacityViolation.d.ts +45 -40
  65. package/dist/es/models/licensing/v4/config/CapacityViolation.js +84 -52
  66. package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMapping.d.ts +30 -0
  67. package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMapping.js +269 -0
  68. package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.d.ts +10 -0
  69. package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.js +151 -0
  70. package/dist/es/models/licensing/v4/config/ClusterType.d.ts +19 -0
  71. package/dist/es/models/licensing/v4/config/ClusterType.js +91 -0
  72. package/dist/es/models/licensing/v4/config/Compliance.d.ts +52 -29
  73. package/dist/es/models/licensing/v4/config/Compliance.js +90 -38
  74. package/dist/es/models/licensing/v4/config/ComplianceProjection.d.ts +56 -18
  75. package/dist/es/models/licensing/v4/config/ComplianceProjection.js +112 -33
  76. package/dist/es/models/licensing/v4/config/Consumption.d.ts +46 -26
  77. package/dist/es/models/licensing/v4/config/Consumption.js +114 -65
  78. package/dist/es/models/licensing/v4/config/ConsumptionProjection.d.ts +2 -1
  79. package/dist/es/models/licensing/v4/config/ConsumptionProjection.js +38 -17
  80. package/dist/es/models/licensing/v4/config/{ProductNameEnum.d.ts → ConsumptionType.d.ts} +6 -6
  81. package/dist/es/models/licensing/v4/config/ConsumptionType.js +85 -0
  82. package/dist/es/models/licensing/v4/config/DeleteLicenseKeyApiResponse.d.ts +98 -0
  83. package/dist/{lib/models/licensing/v4/config/GetClusterAllowanceApiResponse.js → es/models/licensing/v4/config/DeleteLicenseKeyApiResponse.js} +93 -59
  84. package/dist/es/models/licensing/v4/config/DryRunCheck.d.ts +72 -0
  85. package/dist/es/models/licensing/v4/config/DryRunCheck.js +325 -0
  86. package/dist/es/models/licensing/v4/config/DryRunStatus.d.ts +19 -0
  87. package/dist/es/models/licensing/v4/config/DryRunStatus.js +86 -0
  88. package/dist/es/models/licensing/v4/config/DryRunValidationResult.d.ts +68 -0
  89. package/dist/es/models/licensing/v4/config/DryRunValidationResult.js +297 -0
  90. package/dist/es/models/licensing/v4/config/EnforcementActions.d.ts +19 -0
  91. package/dist/es/models/licensing/v4/config/EnforcementActions.js +139 -0
  92. package/dist/es/models/licensing/v4/config/EnforcementLevel.d.ts +19 -0
  93. package/dist/{lib/models/licensing/v4/config/EnforcementLevelEnum.js → es/models/licensing/v4/config/EnforcementLevel.js} +27 -27
  94. package/dist/es/models/licensing/v4/config/EnforcementPolicy.d.ts +19 -0
  95. package/dist/es/models/licensing/v4/config/EnforcementPolicy.js +85 -0
  96. package/dist/es/models/licensing/v4/config/Entitlement.d.ts +98 -0
  97. package/dist/es/models/licensing/v4/config/{ClusterEntitlement.js → Entitlement.js} +147 -95
  98. package/dist/es/models/licensing/v4/config/EntitlementDetail.d.ts +74 -67
  99. package/dist/es/models/licensing/v4/config/EntitlementDetail.js +89 -56
  100. package/dist/es/models/licensing/v4/config/EntitlementDetailProjection.d.ts +2 -1
  101. package/dist/es/models/licensing/v4/config/EntitlementDetailProjection.js +43 -22
  102. package/dist/es/models/licensing/v4/config/EntitlementProjection.d.ts +66 -0
  103. package/dist/{lib/models/licensing/v4/config/ClusterEntitlementProjection.js → es/models/licensing/v4/config/EntitlementProjection.js} +149 -60
  104. package/dist/es/models/licensing/v4/config/ExpiredLicense.d.ts +38 -32
  105. package/dist/es/models/licensing/v4/config/ExpiredLicense.js +116 -44
  106. package/dist/es/models/licensing/v4/config/Feature.d.ts +63 -53
  107. package/dist/es/models/licensing/v4/config/Feature.js +144 -81
  108. package/dist/es/models/licensing/v4/config/FeatureDetail.d.ts +40 -38
  109. package/dist/es/models/licensing/v4/config/FeatureDetail.js +68 -36
  110. package/dist/es/models/licensing/v4/config/FeatureProjection.d.ts +2 -1
  111. package/dist/es/models/licensing/v4/config/FeatureProjection.js +40 -22
  112. package/dist/es/models/licensing/v4/config/FeatureViolation.d.ts +15 -16
  113. package/dist/es/models/licensing/v4/config/FeatureViolation.js +79 -30
  114. package/dist/es/models/licensing/v4/config/GetLicenseKeyApiResponse.d.ts +99 -0
  115. package/dist/es/models/licensing/v4/config/{GetComplianceApiResponse.js → GetLicenseKeyApiResponse.js} +90 -58
  116. package/dist/es/models/licensing/v4/config/License.d.ts +66 -40
  117. package/dist/es/models/licensing/v4/config/License.js +165 -57
  118. package/dist/es/models/licensing/v4/config/{LicenseTypeEnum.d.ts → LicenseCategory.d.ts} +6 -6
  119. package/dist/es/models/licensing/v4/config/LicenseCategory.js +277 -0
  120. package/dist/es/models/licensing/v4/config/LicenseClass.d.ts +19 -0
  121. package/dist/es/models/licensing/v4/config/LicenseClass.js +91 -0
  122. package/dist/es/models/licensing/v4/config/LicenseKey.d.ts +149 -0
  123. package/dist/es/models/licensing/v4/config/LicenseKey.js +623 -0
  124. package/dist/es/models/licensing/v4/config/LicenseKeyAssignSpec.d.ts +71 -0
  125. package/dist/es/models/licensing/v4/config/LicenseKeyAssignSpec.js +329 -0
  126. package/dist/es/models/licensing/v4/config/LicenseKeyMapping.d.ts +64 -0
  127. package/dist/es/models/licensing/v4/config/LicenseKeyMapping.js +315 -0
  128. package/dist/es/models/licensing/v4/config/LicenseKeyProjection.d.ts +60 -0
  129. package/dist/es/models/licensing/v4/config/LicenseKeyProjection.js +366 -0
  130. package/dist/{lib/models/licensing/v4/config/EnforcementPolicyEnum.d.ts → es/models/licensing/v4/config/LicenseKeySubCategory.d.ts} +6 -6
  131. package/dist/es/models/licensing/v4/config/LicenseKeySubCategory.js +85 -0
  132. package/dist/es/models/licensing/v4/config/LicenseProjection.d.ts +41 -22
  133. package/dist/es/models/licensing/v4/config/LicenseProjection.js +146 -36
  134. package/dist/es/models/licensing/v4/config/LicenseStateSyncSpec.d.ts +75 -0
  135. package/dist/es/models/licensing/v4/config/LicenseStateSyncSpec.js +364 -0
  136. package/dist/es/models/licensing/v4/config/LicenseType.d.ts +19 -0
  137. package/dist/es/models/licensing/v4/config/LicenseType.js +271 -0
  138. package/dist/es/models/licensing/v4/config/ListAllowancesApiResponse.d.ts +100 -0
  139. package/dist/{lib/models/licensing/v4/config/ListClusterEntitlementsApiResponse.js → es/models/licensing/v4/config/ListAllowancesApiResponse.js} +93 -61
  140. package/dist/es/models/licensing/v4/config/ListCompliancesApiResponse.d.ts +66 -25
  141. package/dist/es/models/licensing/v4/config/ListCompliancesApiResponse.js +60 -28
  142. package/dist/es/models/licensing/v4/config/ListEntitlementsApiResponse.d.ts +100 -0
  143. package/dist/es/models/licensing/v4/config/ListEntitlementsApiResponse.js +370 -0
  144. package/dist/es/models/licensing/v4/config/ListFeaturesApiResponse.d.ts +66 -25
  145. package/dist/es/models/licensing/v4/config/ListFeaturesApiResponse.js +60 -28
  146. package/dist/es/models/licensing/v4/config/ListLicenseKeysApiResponse.d.ts +100 -0
  147. package/dist/es/models/licensing/v4/config/ListLicenseKeysApiResponse.js +370 -0
  148. package/dist/es/models/licensing/v4/config/ListLicensesApiResponse.d.ts +66 -25
  149. package/dist/es/models/licensing/v4/config/ListLicensesApiResponse.js +60 -28
  150. package/dist/es/models/licensing/v4/config/ListRecommendationsApiResponse.d.ts +99 -0
  151. package/dist/{lib/models/licensing/v4/config/ListClusterViolationsApiResponse.js → es/models/licensing/v4/config/ListRecommendationsApiResponse.js} +90 -58
  152. package/dist/es/models/licensing/v4/config/ListSettingsApiResponse.d.ts +65 -25
  153. package/dist/es/models/licensing/v4/config/ListSettingsApiResponse.js +60 -28
  154. package/dist/es/models/licensing/v4/config/ListViolationsApiResponse.d.ts +99 -0
  155. package/dist/es/models/licensing/v4/config/{ListClusterViolationsApiResponse.js → ListViolationsApiResponse.js} +90 -58
  156. package/dist/es/models/licensing/v4/config/LogicalVersion.d.ts +32 -30
  157. package/dist/es/models/licensing/v4/config/LogicalVersion.js +93 -61
  158. package/dist/es/models/licensing/v4/config/{TypeEnum.d.ts → Meter.d.ts} +6 -6
  159. package/dist/es/models/licensing/v4/config/Meter.js +127 -0
  160. package/dist/es/models/licensing/v4/config/OperationType.d.ts +19 -0
  161. package/dist/es/models/licensing/v4/config/OperationType.js +97 -0
  162. package/dist/es/models/licensing/v4/config/PortalSetting.d.ts +86 -0
  163. package/dist/es/models/licensing/v4/config/PortalSetting.js +359 -0
  164. package/dist/es/models/licensing/v4/config/PostPaidCategory.d.ts +19 -0
  165. package/dist/es/models/licensing/v4/config/PostPaidCategory.js +85 -0
  166. package/dist/es/models/licensing/v4/config/PostPaidConfig.d.ts +61 -38
  167. package/dist/es/models/licensing/v4/config/PostPaidConfig.js +141 -42
  168. package/dist/es/models/licensing/v4/config/ProductName.d.ts +19 -0
  169. package/dist/es/models/licensing/v4/config/ProductName.js +115 -0
  170. package/dist/es/models/licensing/v4/config/Recommendation.d.ts +47 -0
  171. package/dist/es/models/licensing/v4/config/Recommendation.js +287 -0
  172. package/dist/es/models/licensing/v4/config/RecommendationDetail.d.ts +98 -0
  173. package/dist/es/models/licensing/v4/config/RecommendationDetail.js +429 -0
  174. package/dist/es/models/licensing/v4/config/{LicenseCategoryEnum.d.ts → RecommendationScope.d.ts} +6 -6
  175. package/dist/es/models/licensing/v4/config/RecommendationScope.js +85 -0
  176. package/dist/{lib/models/licensing/v4/config/StatusEnum.d.ts → es/models/licensing/v4/config/ResetScope.d.ts} +6 -6
  177. package/dist/{lib/models/licensing/v4/config/ResetScopeEnum.js → es/models/licensing/v4/config/ResetScope.js} +27 -27
  178. package/dist/{lib/models/licensing/v4/config/TypeEnum.d.ts → es/models/licensing/v4/config/Scope.d.ts} +6 -6
  179. package/dist/{lib/models/licensing/v4/config/ScopeEnum.js → es/models/licensing/v4/config/Scope.js} +29 -35
  180. package/dist/es/models/licensing/v4/config/Service.d.ts +65 -52
  181. package/dist/es/models/licensing/v4/config/Service.js +79 -41
  182. package/dist/es/models/licensing/v4/config/ServiceProjection.d.ts +2 -1
  183. package/dist/es/models/licensing/v4/config/ServiceProjection.js +42 -21
  184. package/dist/es/models/licensing/v4/config/ServiceViolation.d.ts +28 -25
  185. package/dist/es/models/licensing/v4/config/ServiceViolation.js +59 -26
  186. package/dist/es/models/licensing/v4/config/{PostPaidCategoryEnum.d.ts → ServiceViolationType.d.ts} +6 -6
  187. package/dist/{lib/models/licensing/v4/config/ServiceViolationEnum.js → es/models/licensing/v4/config/ServiceViolationType.js} +29 -29
  188. package/dist/es/models/licensing/v4/config/Setting.d.ts +97 -85
  189. package/dist/es/models/licensing/v4/config/Setting.js +137 -124
  190. package/dist/es/models/licensing/v4/config/{ScopeEnum.d.ts → Status.d.ts} +6 -6
  191. package/dist/es/models/licensing/v4/config/Status.js +85 -0
  192. package/dist/es/models/licensing/v4/config/SubCategory.d.ts +19 -0
  193. package/dist/es/models/licensing/v4/config/{SubCategoryEnum.js → SubCategory.js} +27 -27
  194. package/dist/es/models/licensing/v4/config/SyncLicenseStateApiResponse.d.ts +99 -0
  195. package/dist/{lib/models/licensing/v4/config/GetClusterEntitlementApiResponse.js → es/models/licensing/v4/config/SyncLicenseStateApiResponse.js} +90 -58
  196. package/dist/es/models/licensing/v4/config/SyncOperationType.d.ts +19 -0
  197. package/dist/es/models/licensing/v4/config/SyncOperationType.js +121 -0
  198. package/dist/{lib/models/licensing/v4/config/ScopeEnum.d.ts → es/models/licensing/v4/config/ValueType.d.ts} +6 -6
  199. package/dist/es/models/licensing/v4/config/{TypeEnum.js → ValueType.js} +27 -27
  200. package/dist/es/models/licensing/v4/config/Violation.d.ts +102 -0
  201. package/dist/es/models/licensing/v4/config/{ClusterViolation.js → Violation.js} +112 -60
  202. package/dist/es/models/licensing/v4/error/AppMessage.d.ts +59 -50
  203. package/dist/es/models/licensing/v4/error/AppMessage.js +65 -33
  204. package/dist/es/models/licensing/v4/error/ErrorResponse.d.ts +23 -19
  205. package/dist/es/models/licensing/v4/error/ErrorResponse.js +64 -32
  206. package/dist/es/models/licensing/v4/error/SchemaValidationError.d.ts +53 -43
  207. package/dist/es/models/licensing/v4/error/SchemaValidationError.js +63 -30
  208. package/dist/es/models/licensing/v4/error/SchemaValidationErrorMessage.d.ts +34 -32
  209. package/dist/es/models/licensing/v4/error/SchemaValidationErrorMessage.js +56 -24
  210. package/dist/es/models/prism/v4/config/TaskReference.d.ts +52 -0
  211. package/dist/es/models/prism/v4/config/TaskReference.js +279 -0
  212. package/dist/es/models/validation/ValidationError.js +6 -6
  213. package/dist/es/utils/ValidationUtils.js +6 -6
  214. package/dist/lib/ApiClient.d.ts +14 -1
  215. package/dist/lib/ApiClient.js +257 -206
  216. package/dist/lib/Paginable.d.ts +1 -1
  217. package/dist/lib/Paginable.js +10 -10
  218. package/dist/lib/apis/enduserlicenseagreement-endpoints.d.ts +41 -0
  219. package/dist/lib/apis/{enduserlicenseagreements-endpoints.js → enduserlicenseagreement-endpoints.js} +28 -70
  220. package/dist/lib/apis/licensekeys-endpoints.d.ts +90 -0
  221. package/dist/lib/apis/licensekeys-endpoints.js +283 -0
  222. package/dist/lib/apis/licenses-endpoints.d.ts +60 -146
  223. package/dist/lib/apis/licenses-endpoints.js +176 -362
  224. package/dist/lib/index.d.ts +115 -67
  225. package/dist/lib/index.js +348 -156
  226. package/dist/lib/models/common/v1/config/Flag.d.ts +32 -26
  227. package/dist/lib/models/common/v1/config/Flag.js +66 -22
  228. package/dist/lib/models/common/v1/config/KVPair.d.ts +35 -26
  229. package/dist/lib/models/common/v1/config/KVPair.js +71 -25
  230. package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +58 -0
  231. package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +275 -0
  232. package/dist/lib/models/common/v1/config/Message.d.ts +41 -38
  233. package/dist/lib/models/common/v1/config/Message.js +58 -26
  234. package/dist/lib/models/common/v1/config/MessageSeverity.js +8 -8
  235. package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +24 -22
  236. package/dist/lib/models/common/v1/config/TenantAwareModel.js +55 -23
  237. package/dist/lib/models/common/v1/response/ApiLink.d.ts +28 -26
  238. package/dist/lib/models/common/v1/response/ApiLink.js +54 -22
  239. package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +79 -44
  240. package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +72 -28
  241. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +24 -18
  242. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +72 -32
  243. package/dist/lib/models/licensing/v4/agreements/Acceptance.d.ts +81 -0
  244. package/dist/lib/models/licensing/v4/agreements/Acceptance.js +314 -0
  245. package/dist/lib/models/licensing/v4/agreements/AddUserApiResponse.d.ts +65 -25
  246. package/dist/lib/models/licensing/v4/agreements/AddUserApiResponse.js +96 -42
  247. package/dist/lib/models/licensing/v4/agreements/EndUser.d.ts +110 -0
  248. package/dist/{es/models/licensing/v4/agreements/EulaUser.js → lib/models/licensing/v4/agreements/EndUser.js} +148 -137
  249. package/dist/lib/models/licensing/v4/agreements/Eula.d.ts +61 -41
  250. package/dist/lib/models/licensing/v4/agreements/Eula.js +112 -75
  251. package/dist/lib/models/licensing/v4/agreements/GetEulaApiResponse.d.ts +65 -25
  252. package/dist/lib/models/licensing/v4/agreements/GetEulaApiResponse.js +60 -28
  253. package/dist/lib/models/licensing/v4/config/AddLicenseKeyApiResponse.d.ts +103 -0
  254. package/dist/lib/models/licensing/v4/config/AddLicenseKeyApiResponse.js +347 -0
  255. package/dist/lib/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.d.ts +127 -0
  256. package/dist/lib/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.js +360 -0
  257. package/dist/lib/models/licensing/v4/config/Allowance.d.ts +70 -0
  258. package/dist/lib/models/licensing/v4/config/{ClusterAllowance.js → Allowance.js} +136 -84
  259. package/dist/lib/models/licensing/v4/config/AllowanceDetail.d.ts +46 -42
  260. package/dist/lib/models/licensing/v4/config/AllowanceDetail.js +84 -52
  261. package/dist/lib/models/licensing/v4/config/AllowanceDetailProjection.d.ts +2 -1
  262. package/dist/lib/models/licensing/v4/config/AllowanceDetailProjection.js +40 -19
  263. package/dist/lib/models/licensing/v4/config/AllowanceProjection.d.ts +56 -0
  264. package/dist/lib/models/licensing/v4/config/AllowanceProjection.js +320 -0
  265. package/dist/lib/models/licensing/v4/config/AssignLicenseKeysApiResponse.d.ts +102 -0
  266. package/dist/{es/models/licensing/v4/config/ListClusterEntitlementsApiResponse.js → lib/models/licensing/v4/config/AssignLicenseKeysApiResponse.js} +90 -63
  267. package/dist/lib/models/licensing/v4/config/BaseClusterInfo.d.ts +21 -16
  268. package/dist/lib/models/licensing/v4/config/BaseClusterInfo.js +82 -34
  269. package/dist/lib/models/licensing/v4/config/BaseLicenseInfo.d.ts +49 -41
  270. package/dist/lib/models/licensing/v4/config/BaseLicenseInfo.js +101 -52
  271. package/dist/lib/models/licensing/v4/config/BillingPlan.d.ts +19 -0
  272. package/dist/lib/models/licensing/v4/config/BillingPlan.js +91 -0
  273. package/dist/lib/models/licensing/v4/config/CapacityViolation.d.ts +45 -40
  274. package/dist/lib/models/licensing/v4/config/CapacityViolation.js +84 -52
  275. package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMapping.d.ts +30 -0
  276. package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMapping.js +269 -0
  277. package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.d.ts +10 -0
  278. package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.js +151 -0
  279. package/dist/lib/models/licensing/v4/config/ClusterType.d.ts +19 -0
  280. package/dist/lib/models/licensing/v4/config/ClusterType.js +91 -0
  281. package/dist/lib/models/licensing/v4/config/Compliance.d.ts +52 -29
  282. package/dist/lib/models/licensing/v4/config/Compliance.js +90 -38
  283. package/dist/lib/models/licensing/v4/config/ComplianceProjection.d.ts +56 -18
  284. package/dist/lib/models/licensing/v4/config/ComplianceProjection.js +112 -33
  285. package/dist/lib/models/licensing/v4/config/Consumption.d.ts +46 -26
  286. package/dist/lib/models/licensing/v4/config/Consumption.js +114 -65
  287. package/dist/lib/models/licensing/v4/config/ConsumptionProjection.d.ts +2 -1
  288. package/dist/lib/models/licensing/v4/config/ConsumptionProjection.js +38 -17
  289. package/dist/{es/models/licensing/v4/config/SubCategoryEnum.d.ts → lib/models/licensing/v4/config/ConsumptionType.d.ts} +6 -6
  290. package/dist/lib/models/licensing/v4/config/ConsumptionType.js +85 -0
  291. package/dist/lib/models/licensing/v4/config/DeleteLicenseKeyApiResponse.d.ts +98 -0
  292. package/dist/{es/models/licensing/v4/config/GetClusterAllowanceApiResponse.js → lib/models/licensing/v4/config/DeleteLicenseKeyApiResponse.js} +93 -59
  293. package/dist/lib/models/licensing/v4/config/DryRunCheck.d.ts +72 -0
  294. package/dist/lib/models/licensing/v4/config/DryRunCheck.js +325 -0
  295. package/dist/lib/models/licensing/v4/config/DryRunStatus.d.ts +19 -0
  296. package/dist/lib/models/licensing/v4/config/DryRunStatus.js +86 -0
  297. package/dist/lib/models/licensing/v4/config/DryRunValidationResult.d.ts +68 -0
  298. package/dist/lib/models/licensing/v4/config/DryRunValidationResult.js +297 -0
  299. package/dist/lib/models/licensing/v4/config/EnforcementActions.d.ts +19 -0
  300. package/dist/lib/models/licensing/v4/config/EnforcementActions.js +139 -0
  301. package/dist/lib/models/licensing/v4/config/EnforcementLevel.d.ts +19 -0
  302. package/dist/{es/models/licensing/v4/config/EnforcementLevelEnum.js → lib/models/licensing/v4/config/EnforcementLevel.js} +27 -27
  303. package/dist/lib/models/licensing/v4/config/EnforcementPolicy.d.ts +19 -0
  304. package/dist/lib/models/licensing/v4/config/EnforcementPolicy.js +85 -0
  305. package/dist/lib/models/licensing/v4/config/Entitlement.d.ts +98 -0
  306. package/dist/lib/models/licensing/v4/config/{ClusterEntitlement.js → Entitlement.js} +147 -95
  307. package/dist/lib/models/licensing/v4/config/EntitlementDetail.d.ts +74 -67
  308. package/dist/lib/models/licensing/v4/config/EntitlementDetail.js +89 -56
  309. package/dist/lib/models/licensing/v4/config/EntitlementDetailProjection.d.ts +2 -1
  310. package/dist/lib/models/licensing/v4/config/EntitlementDetailProjection.js +43 -22
  311. package/dist/lib/models/licensing/v4/config/EntitlementProjection.d.ts +66 -0
  312. package/dist/{es/models/licensing/v4/config/ClusterEntitlementProjection.js → lib/models/licensing/v4/config/EntitlementProjection.js} +149 -60
  313. package/dist/lib/models/licensing/v4/config/ExpiredLicense.d.ts +38 -32
  314. package/dist/lib/models/licensing/v4/config/ExpiredLicense.js +116 -44
  315. package/dist/lib/models/licensing/v4/config/Feature.d.ts +63 -53
  316. package/dist/lib/models/licensing/v4/config/Feature.js +144 -81
  317. package/dist/lib/models/licensing/v4/config/FeatureDetail.d.ts +40 -38
  318. package/dist/lib/models/licensing/v4/config/FeatureDetail.js +68 -36
  319. package/dist/lib/models/licensing/v4/config/FeatureProjection.d.ts +2 -1
  320. package/dist/lib/models/licensing/v4/config/FeatureProjection.js +40 -22
  321. package/dist/lib/models/licensing/v4/config/FeatureViolation.d.ts +15 -16
  322. package/dist/lib/models/licensing/v4/config/FeatureViolation.js +79 -30
  323. package/dist/lib/models/licensing/v4/config/GetLicenseKeyApiResponse.d.ts +99 -0
  324. package/dist/lib/models/licensing/v4/config/{GetComplianceApiResponse.js → GetLicenseKeyApiResponse.js} +90 -58
  325. package/dist/lib/models/licensing/v4/config/License.d.ts +66 -40
  326. package/dist/lib/models/licensing/v4/config/License.js +165 -57
  327. package/dist/{es/models/licensing/v4/config/ClusterTypeEnum.d.ts → lib/models/licensing/v4/config/LicenseCategory.d.ts} +6 -6
  328. package/dist/lib/models/licensing/v4/config/LicenseCategory.js +277 -0
  329. package/dist/lib/models/licensing/v4/config/LicenseClass.d.ts +19 -0
  330. package/dist/lib/models/licensing/v4/config/LicenseClass.js +91 -0
  331. package/dist/lib/models/licensing/v4/config/LicenseKey.d.ts +149 -0
  332. package/dist/lib/models/licensing/v4/config/LicenseKey.js +623 -0
  333. package/dist/lib/models/licensing/v4/config/LicenseKeyAssignSpec.d.ts +71 -0
  334. package/dist/lib/models/licensing/v4/config/LicenseKeyAssignSpec.js +329 -0
  335. package/dist/lib/models/licensing/v4/config/LicenseKeyMapping.d.ts +64 -0
  336. package/dist/lib/models/licensing/v4/config/LicenseKeyMapping.js +315 -0
  337. package/dist/lib/models/licensing/v4/config/LicenseKeyProjection.d.ts +60 -0
  338. package/dist/lib/models/licensing/v4/config/LicenseKeyProjection.js +366 -0
  339. package/dist/{es/models/licensing/v4/config/EnforcementPolicyEnum.d.ts → lib/models/licensing/v4/config/LicenseKeySubCategory.d.ts} +6 -6
  340. package/dist/lib/models/licensing/v4/config/LicenseKeySubCategory.js +85 -0
  341. package/dist/lib/models/licensing/v4/config/LicenseProjection.d.ts +41 -22
  342. package/dist/lib/models/licensing/v4/config/LicenseProjection.js +146 -36
  343. package/dist/lib/models/licensing/v4/config/LicenseStateSyncSpec.d.ts +75 -0
  344. package/dist/lib/models/licensing/v4/config/LicenseStateSyncSpec.js +364 -0
  345. package/dist/lib/models/licensing/v4/config/LicenseType.d.ts +19 -0
  346. package/dist/lib/models/licensing/v4/config/LicenseType.js +271 -0
  347. package/dist/lib/models/licensing/v4/config/ListAllowancesApiResponse.d.ts +100 -0
  348. package/dist/lib/models/licensing/v4/config/ListAllowancesApiResponse.js +370 -0
  349. package/dist/lib/models/licensing/v4/config/ListCompliancesApiResponse.d.ts +66 -25
  350. package/dist/lib/models/licensing/v4/config/ListCompliancesApiResponse.js +60 -28
  351. package/dist/lib/models/licensing/v4/config/ListEntitlementsApiResponse.d.ts +100 -0
  352. package/dist/lib/models/licensing/v4/config/ListEntitlementsApiResponse.js +370 -0
  353. package/dist/lib/models/licensing/v4/config/ListFeaturesApiResponse.d.ts +66 -25
  354. package/dist/lib/models/licensing/v4/config/ListFeaturesApiResponse.js +60 -28
  355. package/dist/lib/models/licensing/v4/config/ListLicenseKeysApiResponse.d.ts +100 -0
  356. package/dist/lib/models/licensing/v4/config/ListLicenseKeysApiResponse.js +370 -0
  357. package/dist/lib/models/licensing/v4/config/ListLicensesApiResponse.d.ts +66 -25
  358. package/dist/lib/models/licensing/v4/config/ListLicensesApiResponse.js +60 -28
  359. package/dist/lib/models/licensing/v4/config/ListRecommendationsApiResponse.d.ts +99 -0
  360. package/dist/lib/models/licensing/v4/config/ListRecommendationsApiResponse.js +365 -0
  361. package/dist/lib/models/licensing/v4/config/ListSettingsApiResponse.d.ts +65 -25
  362. package/dist/lib/models/licensing/v4/config/ListSettingsApiResponse.js +60 -28
  363. package/dist/lib/models/licensing/v4/config/ListViolationsApiResponse.d.ts +99 -0
  364. package/dist/lib/models/licensing/v4/config/{ListClusterAllowancesApiResponse.js → ListViolationsApiResponse.js} +90 -63
  365. package/dist/lib/models/licensing/v4/config/LogicalVersion.d.ts +32 -30
  366. package/dist/lib/models/licensing/v4/config/LogicalVersion.js +93 -61
  367. package/dist/lib/models/licensing/v4/config/{MeterEnum.d.ts → Meter.d.ts} +6 -6
  368. package/dist/lib/models/licensing/v4/config/Meter.js +127 -0
  369. package/dist/lib/models/licensing/v4/config/OperationType.d.ts +19 -0
  370. package/dist/lib/models/licensing/v4/config/OperationType.js +97 -0
  371. package/dist/lib/models/licensing/v4/config/PortalSetting.d.ts +86 -0
  372. package/dist/lib/models/licensing/v4/config/PortalSetting.js +359 -0
  373. package/dist/lib/models/licensing/v4/config/PostPaidCategory.d.ts +19 -0
  374. package/dist/lib/models/licensing/v4/config/PostPaidCategory.js +85 -0
  375. package/dist/lib/models/licensing/v4/config/PostPaidConfig.d.ts +61 -38
  376. package/dist/lib/models/licensing/v4/config/PostPaidConfig.js +141 -42
  377. package/dist/lib/models/licensing/v4/config/ProductName.d.ts +19 -0
  378. package/dist/lib/models/licensing/v4/config/ProductName.js +115 -0
  379. package/dist/lib/models/licensing/v4/config/Recommendation.d.ts +47 -0
  380. package/dist/lib/models/licensing/v4/config/Recommendation.js +287 -0
  381. package/dist/lib/models/licensing/v4/config/RecommendationDetail.d.ts +98 -0
  382. package/dist/lib/models/licensing/v4/config/RecommendationDetail.js +429 -0
  383. package/dist/lib/models/licensing/v4/config/{LicenseCategoryEnum.d.ts → RecommendationScope.d.ts} +6 -6
  384. package/dist/lib/models/licensing/v4/config/RecommendationScope.js +85 -0
  385. package/dist/{es/models/licensing/v4/config/StatusEnum.d.ts → lib/models/licensing/v4/config/ResetScope.d.ts} +6 -6
  386. package/dist/{es/models/licensing/v4/config/ResetScopeEnum.js → lib/models/licensing/v4/config/ResetScope.js} +27 -27
  387. package/dist/lib/models/licensing/v4/config/Scope.d.ts +19 -0
  388. package/dist/{es/models/licensing/v4/config/ScopeEnum.js → lib/models/licensing/v4/config/Scope.js} +29 -35
  389. package/dist/lib/models/licensing/v4/config/Service.d.ts +65 -52
  390. package/dist/lib/models/licensing/v4/config/Service.js +79 -41
  391. package/dist/lib/models/licensing/v4/config/ServiceProjection.d.ts +2 -1
  392. package/dist/lib/models/licensing/v4/config/ServiceProjection.js +42 -21
  393. package/dist/lib/models/licensing/v4/config/ServiceViolation.d.ts +28 -25
  394. package/dist/lib/models/licensing/v4/config/ServiceViolation.js +59 -26
  395. package/dist/{es/models/licensing/v4/config/ServiceViolationEnum.d.ts → lib/models/licensing/v4/config/ServiceViolationType.d.ts} +6 -6
  396. package/dist/{es/models/licensing/v4/config/ServiceViolationEnum.js → lib/models/licensing/v4/config/ServiceViolationType.js} +29 -29
  397. package/dist/lib/models/licensing/v4/config/Setting.d.ts +97 -85
  398. package/dist/lib/models/licensing/v4/config/Setting.js +137 -124
  399. package/dist/lib/models/licensing/v4/config/Status.d.ts +19 -0
  400. package/dist/lib/models/licensing/v4/config/Status.js +85 -0
  401. package/dist/lib/models/licensing/v4/config/SubCategory.d.ts +19 -0
  402. package/dist/lib/models/licensing/v4/config/{SubCategoryEnum.js → SubCategory.js} +27 -27
  403. package/dist/lib/models/licensing/v4/config/SyncLicenseStateApiResponse.d.ts +99 -0
  404. package/dist/{es/models/licensing/v4/config/GetClusterEntitlementApiResponse.js → lib/models/licensing/v4/config/SyncLicenseStateApiResponse.js} +90 -58
  405. package/dist/lib/models/licensing/v4/config/SyncOperationType.d.ts +19 -0
  406. package/dist/lib/models/licensing/v4/config/SyncOperationType.js +121 -0
  407. package/dist/{es/models/licensing/v4/config/MeterEnum.d.ts → lib/models/licensing/v4/config/ValueType.d.ts} +6 -6
  408. package/dist/lib/models/licensing/v4/config/{TypeEnum.js → ValueType.js} +27 -27
  409. package/dist/lib/models/licensing/v4/config/Violation.d.ts +102 -0
  410. package/dist/lib/models/licensing/v4/config/{ClusterViolation.js → Violation.js} +112 -60
  411. package/dist/lib/models/licensing/v4/error/AppMessage.d.ts +59 -50
  412. package/dist/lib/models/licensing/v4/error/AppMessage.js +65 -33
  413. package/dist/lib/models/licensing/v4/error/ErrorResponse.d.ts +23 -19
  414. package/dist/lib/models/licensing/v4/error/ErrorResponse.js +64 -32
  415. package/dist/lib/models/licensing/v4/error/SchemaValidationError.d.ts +53 -43
  416. package/dist/lib/models/licensing/v4/error/SchemaValidationError.js +63 -30
  417. package/dist/lib/models/licensing/v4/error/SchemaValidationErrorMessage.d.ts +34 -32
  418. package/dist/lib/models/licensing/v4/error/SchemaValidationErrorMessage.js +56 -24
  419. package/dist/lib/models/prism/v4/config/TaskReference.d.ts +52 -0
  420. package/dist/lib/models/prism/v4/config/TaskReference.js +279 -0
  421. package/dist/lib/models/validation/ValidationError.js +6 -6
  422. package/dist/lib/utils/ValidationUtils.js +6 -6
  423. package/package.json +4 -4
  424. package/dist/es/apis/enduserlicenseagreements-endpoints.d.ts +0 -51
  425. package/dist/es/models/licensing/v4/agreements/EulaUser.d.ts +0 -103
  426. package/dist/es/models/licensing/v4/agreements/UpdateEulaApiResponse.d.ts +0 -59
  427. package/dist/es/models/licensing/v4/agreements/UpdateEulaApiResponse.js +0 -311
  428. package/dist/es/models/licensing/v4/config/ClusterAllowance.d.ts +0 -55
  429. package/dist/es/models/licensing/v4/config/ClusterAllowanceProjection.d.ts +0 -34
  430. package/dist/es/models/licensing/v4/config/ClusterAllowanceProjection.js +0 -241
  431. package/dist/es/models/licensing/v4/config/ClusterEntitlement.d.ts +0 -79
  432. package/dist/es/models/licensing/v4/config/ClusterEntitlementProjection.d.ts +0 -36
  433. package/dist/es/models/licensing/v4/config/ClusterTypeEnum.js +0 -91
  434. package/dist/es/models/licensing/v4/config/ClusterViolation.d.ts +0 -57
  435. package/dist/es/models/licensing/v4/config/EnforcementActionsEnum.d.ts +0 -19
  436. package/dist/es/models/licensing/v4/config/EnforcementActionsEnum.js +0 -139
  437. package/dist/es/models/licensing/v4/config/EnforcementLevelEnum.d.ts +0 -19
  438. package/dist/es/models/licensing/v4/config/EnforcementPolicyEnum.js +0 -85
  439. package/dist/es/models/licensing/v4/config/GetClusterAllowanceApiResponse.d.ts +0 -59
  440. package/dist/es/models/licensing/v4/config/GetClusterEntitlementApiResponse.d.ts +0 -59
  441. package/dist/es/models/licensing/v4/config/GetClusterViolationApiResponse.d.ts +0 -59
  442. package/dist/es/models/licensing/v4/config/GetClusterViolationApiResponse.js +0 -311
  443. package/dist/es/models/licensing/v4/config/GetComplianceApiResponse.d.ts +0 -59
  444. package/dist/es/models/licensing/v4/config/GetLicenseApiResponse.d.ts +0 -59
  445. package/dist/es/models/licensing/v4/config/GetLicenseApiResponse.js +0 -311
  446. package/dist/es/models/licensing/v4/config/GetSettingApiResponse.d.ts +0 -59
  447. package/dist/es/models/licensing/v4/config/GetSettingApiResponse.js +0 -311
  448. package/dist/es/models/licensing/v4/config/LicenseCategoryEnum.js +0 -271
  449. package/dist/es/models/licensing/v4/config/LicenseTypeEnum.js +0 -235
  450. package/dist/es/models/licensing/v4/config/ListClusterAllowancesApiResponse.d.ts +0 -59
  451. package/dist/es/models/licensing/v4/config/ListClusterEntitlementsApiResponse.d.ts +0 -59
  452. package/dist/es/models/licensing/v4/config/ListClusterViolationsApiResponse.d.ts +0 -59
  453. package/dist/es/models/licensing/v4/config/MeterEnum.js +0 -121
  454. package/dist/es/models/licensing/v4/config/NutanixClusterConfig.d.ts +0 -98
  455. package/dist/es/models/licensing/v4/config/NutanixClusterConfig.js +0 -406
  456. package/dist/es/models/licensing/v4/config/PostPaidCategoryEnum.js +0 -85
  457. package/dist/es/models/licensing/v4/config/ProductNameEnum.js +0 -115
  458. package/dist/es/models/licensing/v4/config/ResetScopeEnum.d.ts +0 -19
  459. package/dist/es/models/licensing/v4/config/StatusEnum.js +0 -85
  460. package/dist/lib/apis/enduserlicenseagreements-endpoints.d.ts +0 -51
  461. package/dist/lib/models/licensing/v4/agreements/EulaUser.d.ts +0 -103
  462. package/dist/lib/models/licensing/v4/agreements/UpdateEulaApiResponse.d.ts +0 -59
  463. package/dist/lib/models/licensing/v4/agreements/UpdateEulaApiResponse.js +0 -311
  464. package/dist/lib/models/licensing/v4/config/ClusterAllowance.d.ts +0 -55
  465. package/dist/lib/models/licensing/v4/config/ClusterAllowanceProjection.d.ts +0 -34
  466. package/dist/lib/models/licensing/v4/config/ClusterAllowanceProjection.js +0 -241
  467. package/dist/lib/models/licensing/v4/config/ClusterEntitlement.d.ts +0 -79
  468. package/dist/lib/models/licensing/v4/config/ClusterEntitlementProjection.d.ts +0 -36
  469. package/dist/lib/models/licensing/v4/config/ClusterTypeEnum.d.ts +0 -19
  470. package/dist/lib/models/licensing/v4/config/ClusterTypeEnum.js +0 -91
  471. package/dist/lib/models/licensing/v4/config/ClusterViolation.d.ts +0 -57
  472. package/dist/lib/models/licensing/v4/config/EnforcementActionsEnum.d.ts +0 -19
  473. package/dist/lib/models/licensing/v4/config/EnforcementActionsEnum.js +0 -139
  474. package/dist/lib/models/licensing/v4/config/EnforcementLevelEnum.d.ts +0 -19
  475. package/dist/lib/models/licensing/v4/config/EnforcementPolicyEnum.js +0 -85
  476. package/dist/lib/models/licensing/v4/config/GetClusterAllowanceApiResponse.d.ts +0 -59
  477. package/dist/lib/models/licensing/v4/config/GetClusterEntitlementApiResponse.d.ts +0 -59
  478. package/dist/lib/models/licensing/v4/config/GetClusterViolationApiResponse.d.ts +0 -59
  479. package/dist/lib/models/licensing/v4/config/GetClusterViolationApiResponse.js +0 -311
  480. package/dist/lib/models/licensing/v4/config/GetComplianceApiResponse.d.ts +0 -59
  481. package/dist/lib/models/licensing/v4/config/GetLicenseApiResponse.d.ts +0 -59
  482. package/dist/lib/models/licensing/v4/config/GetLicenseApiResponse.js +0 -311
  483. package/dist/lib/models/licensing/v4/config/GetSettingApiResponse.d.ts +0 -59
  484. package/dist/lib/models/licensing/v4/config/GetSettingApiResponse.js +0 -311
  485. package/dist/lib/models/licensing/v4/config/LicenseCategoryEnum.js +0 -271
  486. package/dist/lib/models/licensing/v4/config/LicenseTypeEnum.d.ts +0 -19
  487. package/dist/lib/models/licensing/v4/config/LicenseTypeEnum.js +0 -235
  488. package/dist/lib/models/licensing/v4/config/ListClusterAllowancesApiResponse.d.ts +0 -59
  489. package/dist/lib/models/licensing/v4/config/ListClusterEntitlementsApiResponse.d.ts +0 -59
  490. package/dist/lib/models/licensing/v4/config/ListClusterViolationsApiResponse.d.ts +0 -59
  491. package/dist/lib/models/licensing/v4/config/MeterEnum.js +0 -121
  492. package/dist/lib/models/licensing/v4/config/NutanixClusterConfig.d.ts +0 -98
  493. package/dist/lib/models/licensing/v4/config/NutanixClusterConfig.js +0 -406
  494. package/dist/lib/models/licensing/v4/config/PostPaidCategoryEnum.d.ts +0 -19
  495. package/dist/lib/models/licensing/v4/config/PostPaidCategoryEnum.js +0 -85
  496. package/dist/lib/models/licensing/v4/config/ProductNameEnum.d.ts +0 -19
  497. package/dist/lib/models/licensing/v4/config/ProductNameEnum.js +0 -115
  498. package/dist/lib/models/licensing/v4/config/ResetScopeEnum.d.ts +0 -19
  499. package/dist/lib/models/licensing/v4/config/ServiceViolationEnum.d.ts +0 -19
  500. package/dist/lib/models/licensing/v4/config/StatusEnum.js +0 -85
  501. package/dist/lib/models/licensing/v4/config/SubCategoryEnum.d.ts +0 -19
@@ -12,36 +12,38 @@ var _https = _interopRequireDefault(require("https"));
12
12
  var _fs2 = _interopRequireDefault(require("fs"));
13
13
  var _path = _interopRequireDefault(require("path"));
14
14
  var _buffer = require("buffer");
15
+ var _ApiResponseMetadata = _interopRequireDefault(require("./models/common/v1/response/ApiResponseMetadata"));
16
+ var _Flag = _interopRequireDefault(require("./models/common/v1/config/Flag"));
15
17
  var _ApiClient;
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
18
- function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
19
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
20
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
19
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)(>|$)/g, function (e, r, t) { if ("" === t) return e; var p = o[r]; return Array.isArray(p) ? "$" + p.join("$") : "number" == typeof p ? "$" + p : ""; })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
20
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
21
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
21
22
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
23
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
25
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
26
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
27
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
28
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
29
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
24
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
25
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
26
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
27
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
28
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
29
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
30
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
31
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
30
32
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
31
33
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
32
- function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
33
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
34
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
34
+ function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
35
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
36
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
35
37
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
36
38
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
37
39
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } /*
38
- * Nutanix Licensing Versioned APIs
40
+ * Nutanix Licensing APIs
39
41
  *
40
- * OpenAPI spec version: 4.0.1-alpha-1
42
+ * OpenAPI spec version: 4.1.1
41
43
  *
42
44
  * NOTE: This class is auto generated by the Open API Dev Platform.
43
45
  *
44
- * Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
46
+ * Open API Dev Platform Codegen version: 17.4.0.8851-RELEASE
45
47
  *
46
48
  * Do not edit the class manually.
47
49
  *
@@ -52,7 +54,7 @@ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.h
52
54
  * application to use this class directly - the *Api and model classes provide the public API for the service. The
53
55
  * contents of this file should be regarded as internal but are documented for completeness.
54
56
  * @module ApiClient
55
- * @version 4.0.1-alpha-1
57
+ * @version 4.1.1
56
58
  */
57
59
  var _protocol = /*#__PURE__*/new WeakMap();
58
60
  var _cookie = /*#__PURE__*/new WeakMap();
@@ -136,6 +138,11 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
136
138
  * @type {Array.<String>}
137
139
  */
138
140
  this.authentications = {
141
+ 'apiKeyAuthScheme': {
142
+ type: 'apiKey',
143
+ 'in': 'header',
144
+ name: 'X-ntnx-api-key'
145
+ },
139
146
  'basicAuthScheme': {
140
147
  type: 'basic'
141
148
  }
@@ -149,7 +156,7 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
149
156
  this.defaultHeaders = {};
150
157
  _classPrivateFieldSet(_defaultConnectTimeout, this, 30000);
151
158
  _classPrivateFieldSet(_defaultReadTimeout, this, 30000);
152
- _classPrivateFieldSet(_defaultMaxTimeout, this, 1800000);
159
+ _classPrivateFieldSet(_defaultMaxTimeout, this, 10800000);
153
160
 
154
161
  /**
155
162
  * The default HTTP read timeout in milliseconds for all API calls.
@@ -179,6 +186,13 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
179
186
  */
180
187
  _classPrivateFieldSet(_cookie, this, null);
181
188
 
189
+ /**
190
+ * The maximum number of redirects to be followed for all API calls.
191
+ * @type {Number}
192
+ * @default 1
193
+ */
194
+ this.maxRedirects = 1;
195
+
182
196
  /**
183
197
  * The maximum number of retry attempts to be made by the client
184
198
  * in case of server error.
@@ -193,6 +207,13 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
193
207
  * @default 3000
194
208
  */
195
209
  this.retryInterval = 3000;
210
+
211
+ /**
212
+ * A boolean value that indicates whether cross-site Access-Control requests should be made using auth credentials.
213
+ * @type {Boolean}
214
+ * @default false
215
+ */
216
+ this.withCredentials = false;
196
217
  if (typeof self === 'undefined') {
197
218
  this.agent = new _superagent["default"].agent();
198
219
  }
@@ -360,6 +381,21 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
360
381
  }
361
382
  }
362
383
 
384
+ /*
385
+ * Sets API key for authentication
386
+ *
387
+ * @param {String} key The API key for authentication
388
+ */
389
+ }, {
390
+ key: "setApiKey",
391
+ value: function setApiKey(key) {
392
+ if (key == undefined || typeof key === 'string' || key instanceof String) {
393
+ this.authentications['apiKeyAuthScheme']['apiKey'] = key;
394
+ } else {
395
+ this.authentications['apiKeyAuthScheme']['apiKey'] = undefined;
396
+ }
397
+ }
398
+
363
399
  /*
364
400
  * Applies authentication headers to the request.
365
401
  * @param {Object} request The request object created by a <code>superagent()</code> call.
@@ -431,13 +467,20 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
431
467
  request.callback = function (err, res) {
432
468
  if (res && res.status) {
433
469
  var status = res.status;
434
- if (status >= 400 && !(status === 401 || status === 408 || status === 503 || status === 504)) {
470
+ if (status >= 400 && !(status === 401 || status === 408 || status === 429 || status === 503 || status === 504)) {
435
471
  this._maxRetries = 0;
436
472
  }
437
473
  if (res.status === 401) {
438
474
  this.unset("Cookie");
439
475
  this._maxRetries = 1;
440
476
  }
477
+ if (status === 429) {
478
+ var retryAfter = res.headers['retry-after'];
479
+ if (retryAfter) {
480
+ var delay = parseInt(retryAfter, 10) * 1000;
481
+ this._retryDelays[this._retries] = delay;
482
+ }
483
+ }
441
484
  }
442
485
  this.oldCallback(err, res);
443
486
  };
@@ -463,8 +506,9 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
463
506
  // Set User-Agent header only if it is not a browser environment
464
507
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
465
508
  if (!isBrowser) {
509
+ this.downloadDestination = '.';
466
510
  request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {
467
- 'User-Agent': 'Nutanix-licensing-js-client/4.0.1-alpha.1'
511
+ 'User-Agent': 'Nutanix-licensing-js-client/4.1.1'
468
512
  }));
469
513
  }
470
514
 
@@ -552,180 +596,126 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
552
596
  }
553
597
  _assertClassBrand(_ApiClient_brand, this, _attachCookies).call(this, request);
554
598
  _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, "Request Body :", typeof request._data === "undefined" ? "" : request._data);
555
- var accept = headerParams.hasOwnProperty("Accept") ? headerParams["Accept"] : _assertClassBrand(_ApiClient_brand, this, _jsonPreferredMime).call(this, accepts);
556
- var fetchStream = headerParams.hasOwnProperty("Accept") && headerParams["Accept"] === "application/octet-stream" || accepts.length == 1 && accepts[0] === "application/octet-stream";
557
-
558
- /*
559
- * 4xx 5xx auto generated responses always append 'application/json' to accepts array
560
- * octet-stream will be overlooked during jsonPreferredMime call, therefore additional check added
561
- */
562
- if (fetchStream) {
563
- // FILE DOWNLOAD SUPPORT
564
-
565
- request.accept('application/octet-stream');
566
- request.buffer(false);
567
- return new Promise(function (resolve, reject) {
568
- var tempFilename = null;
569
-
570
- /*
571
- * Browser environment :
572
- * uses Web Streams, downloadDestination expected to be a WritableStream (i.e. sink for response to be streamed to)
573
- * Node.js environment :
574
- * uses File System, downloadDestination expected to be a directory path, file is downloaded to this directory
575
- */
576
-
577
- if (isBrowser) {
578
- /*
579
- * Browser environment :
580
- * - fetch webstream module
581
- * - write file to WritableStream downloadDestination
582
- * - if webstream if not available or downloadDestination is not instance of WritableStream
583
- * code flow goes to main request.then execution
584
- */
585
-
586
- if (typeof require === 'function') {
587
- var _webstream;
588
- try {
589
- _webstream = require('stream/web');
590
- } catch (err) {
591
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Error fetching steam/web");
592
- }
593
- if (_this2.downloadDestination instanceof _webstream.WritableStream) {
594
- // Piping Data
595
- var writer = _this2.downloadDestination.getWriter();
596
- try {
597
- request.on('data', function (chunk) {
598
- writer.write(chunk);
599
- });
600
- } catch (err) {
601
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Issue while downloading file", err);
602
- }
603
-
604
- // Receiving Response in case of 4xx 5xx
605
- request.on('response', function (response) {
606
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Response Status :", response.status);
607
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, _assertClassBrand(_ApiClient_brand, _this2, _flatten), "Response Headers :", response.headers);
608
- var data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, response, returnType);
609
- resolve({
610
- data: data,
611
- response: response
612
- });
613
- }).on('error', function (err) {
614
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Caught the following error :", err);
615
- reject(err);
616
- });
617
- } else {
618
- var errMsg = "Incompatible downloadDestination for Browser Environment, must be WritableStream";
619
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, errMsg);
620
- reject(errMsg);
621
- }
599
+ var accept = headerParams.hasOwnProperty("Accept") && headerParams["Accept"] != undefined ? headerParams["Accept"] : accepts.join(', ');
600
+ var binaryMediaTypes = ['application/octet-stream', 'application/pdf', 'application/zip'];
601
+ if (accept) {
602
+ request.accept(accept);
603
+ }
604
+ return new Promise(function (resolve, reject) {
605
+ request.buffer(false).redirects(0).retry(_this2.maxRetryAttempts, _this2.retryInterval, []).withCredentials(_this2.withCredentials).on('error', function (err) {
606
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, null, "Caught the following error :", err);
607
+ }).end(function (error, response) {
608
+ if (error) {
609
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, null, "Caught error during the request!");
610
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, error);
611
+ if (error.response !== null && typeof error.response !== 'undefined') {
612
+ error.data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, error.response, returnType);
613
+ } else {
614
+ error.data = _assertClassBrand(_ApiClient_brand, _this2, _wrapErrorInResponse).call(_this2, error);
622
615
  }
616
+ reject(error);
623
617
  } else {
624
- /*
625
- * Non Browser environment :
626
- * - stream data to file
627
- * - fetch response headers and body (if exists)
628
- * - return in case of error or after stream finish
629
- *
630
- * NOTE :
631
- * superagent does not provide access to headers before pipe, therefore response is piped to
632
- * file with temporary name, which is renamed to proper filename after Content-Disposition header is available
633
- */
634
-
635
- // Sanitizing downloadDestination
636
- if (_this2.downloadDestination === null || typeof _this2.downloadDestination === 'undefined' || typeof _this2.downloadDestination !== 'string') {
637
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Incompatible downloadDestination must be string, is", _this2.downloadDestination);
638
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Downloading file to base directory");
639
- _this2.downloadDestination = ".";
618
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Response Status :", response.status);
619
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, _assertClassBrand(_ApiClient_brand, _this2, _flatten), "Response Headers :", response.headers);
620
+ var _contentType = '';
621
+ if (response.headers.hasOwnProperty('content-type')) {
622
+ _contentType = response.headers["content-type"];
640
623
  }
641
-
642
- // Piping data to temporary file
643
- tempFilename = _this2.downloadDestination + '/downloaded_file_' + Date.now() + '.txt'; // temporary filename
644
- var stream = _fs2["default"].createWriteStream(tempFilename);
645
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Streaming response to : ", tempFilename);
646
- request.pipe(stream);
647
-
648
- // Receiving response (json response for 4xx 5xx, or Component-Disposition header for successful pipe)
649
- request.on('response', function (response) {
650
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Response Status :", response.status);
651
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, _assertClassBrand(_ApiClient_brand, _this2, _flatten), "Response Headers :", response.headers);
652
-
653
- // deserialize response if any
654
- var data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, response, returnType);
655
- if (!response.ok) {
656
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, data);
657
- reject(_objectSpread(_objectSpread({}, response.error), {}, {
658
- data: data
659
- }));
660
- }
661
-
662
- // Fetch filename
663
- var filename = "";
664
- if (typeof response.headers['content-disposition'] !== 'undefined' && response.headers['content-disposition'] !== null) {
665
- var match = response.headers['content-disposition'].match( /*#__PURE__*/_wrapRegExp(/.*filename="(.*)".*/, {
666
- filename: 1
667
- }));
668
- var filepath = _path["default"].parse(match.groups['filename']);
669
- filename = _this2.downloadDestination + '/' + filepath.name + '_' + Date.now() + filepath.ext;
670
- if (typeof data === 'undefined') {
671
- data = new returnType();
672
- data.data = {
673
- "path": _path["default"].parse(filename),
674
- $objectType: "Path"
675
- };
676
- }
677
- }
678
- stream.on('finish', function () {
679
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Finished streaming response");
680
- if (filename.length !== 0) {
681
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Content-Disposition header found [", filename, "] is final filename");
682
- stream.close();
683
- _fs2["default"].rename(tempFilename, filename, function () {
684
- resolve({
685
- data: data,
686
- response: response
624
+ var fetchStream = binaryMediaTypes.includes(_contentType);
625
+ if (fetchStream) {
626
+ /*
627
+ * Browser environment :
628
+ * uses Web Streams, downloadDestination expected to be a WritableStream (i.e. sink for response to be streamed to)
629
+ * Node.js environment :
630
+ * uses File System, downloadDestination expected to be a directory path, file is downloaded to this directory
631
+ */
632
+ if (isBrowser) {
633
+ /*
634
+ * Browser environment :
635
+ * - fetch webstream module
636
+ * - write file to WritableStream downloadDestination
637
+ * - if webstream if not available or downloadDestination is not instance of WritableStream
638
+ * code flow goes to main request.then execution
639
+ */
640
+ if (typeof require === 'function') {
641
+ var _webstream;
642
+ try {
643
+ _webstream = require('stream/web');
644
+ } catch (err) {
645
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Error fetching steam/web");
646
+ }
647
+ if (_this2.downloadDestination instanceof _webstream.WritableStream) {
648
+ // Piping Data
649
+ var writer = _this2.downloadDestination.getWriter();
650
+ try {
651
+ response.on('data', function (chunk) {
652
+ writer.write(chunk);
653
+ });
654
+ } catch (err) {
655
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Issue while downloading file", err);
656
+ }
657
+ response.on('end', function () {
658
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Finished streaming response");
659
+ writer.close();
660
+ var data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, response, returnType);
661
+ resolve({
662
+ data: data,
663
+ response: response
664
+ });
665
+ }).on('error', function (err) {
666
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Caught the following error :", err);
667
+ err.data = _assertClassBrand(_ApiClient_brand, _this2, _wrapErrorInResponse).call(_this2, err);
668
+ reject(err);
687
669
  });
688
- });
689
- } else {
690
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Content-Disposition header not found [", tempFilename, "] is final filename");
691
- resolve({
692
- data: data,
693
- response: response
694
- });
670
+ } else {
671
+ var errMsg = "Incompatible downloadDestination for Browser Environment, must be WritableStream";
672
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, errMsg);
673
+ reject(errMsg);
674
+ }
695
675
  }
696
- }).on('error', function (err) {
697
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Caught the following error :", err);
698
- error.data = _assertClassBrand(_ApiClient_brand, _this2, _wrapErrorInResponse).call(_this2, error);
699
- reject(err);
700
- });
701
- }).on('error', function (error) {
702
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Caught the following error :", err);
703
- if (error.response !== null && typeof error.response !== 'undefined') {
704
- error.data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, error.response, returnType);
705
676
  } else {
706
- error.data = _assertClassBrand(_ApiClient_brand, _this2, _wrapErrorInResponse).call(_this2, error);
677
+ /*
678
+ * Non Browser environment :
679
+ * - stream data to file
680
+ * - fetch response headers and body (if exists)
681
+ * - return in case of error or after stream finish
682
+ *
683
+ * NOTE :
684
+ * superagent does not provide access to headers before pipe, therefore response is piped to
685
+ * file with temporary name, which is renamed to proper filename after Content-Disposition header is available
686
+ */
687
+
688
+ var tempFilename = _this2.downloadDestination + '/downloaded_file_' + Date.now() + '.txt'; // temporary filename
689
+ var stream = _fs2["default"].createWriteStream(tempFilename);
690
+ _assertClassBrand(_ApiClient_brand, _this2, _processDownloadedFile).call(_this2, response, stream, tempFilename, resolve, reject, returnType);
707
691
  }
708
- reject(error);
709
- });
710
- }
711
- });
712
- } else if (accept) {
713
- request.accept(accept);
714
- }
715
- return new Promise(function (resolve, reject) {
716
- request.on('error', function (err) {
717
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, null, "Caught the following error :", err);
718
- }).retry(_this2.maxRetryAttempts, _this2.retryInterval, []).then(function (response) {
719
- _assertClassBrand(_ApiClient_brand, _this2, _handleApiResponseForPromise).call(_this2, response, path, queryParams, returnType, resolve, reject);
720
- })["catch"](function (error) {
721
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, null, "Caught error during the request!");
722
- _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, error);
723
- if (error.response !== null && typeof error.response !== 'undefined') {
724
- error.data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, error.response, returnType);
725
- } else {
726
- error.data = _assertClassBrand(_ApiClient_brand, _this2, _wrapErrorInResponse).call(_this2, error);
692
+ } else if (response.status == 302) {
693
+ /*
694
+ * Handling 302 Redirects
695
+ * - Reads X-Redirect-Token header from response and writes into Cookie header for redirected request
696
+ */
697
+ var _tempFilename = _this2.downloadDestination + '/downloaded_file_' + Date.now() + '.txt'; // temporary filename
698
+ var context = _this2;
699
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Redirecting to :", response.headers.location);
700
+ var redirectRequest = (0, _superagent["default"])(httpMethod, response.headers.location);
701
+ redirectRequest.set(request.header);
702
+ if (response.headers.hasOwnProperty("x-redirect-token")) {
703
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Writing X-Redirect-Token into Cookie");
704
+ redirectRequest.set("Cookie", response.headers["x-redirect-token"]);
705
+ }
706
+ redirectRequest.redirects(0);
707
+ redirectRequest.withCredentials(_this2.withCredentials);
708
+ redirectRequest.buffer(false);
709
+ var redirectedStream = _fs2["default"].createWriteStream(_tempFilename);
710
+ redirectRequest.pipe(redirectedStream);
711
+ redirectRequest.on('response', function (redirectResponse) {
712
+ _assertClassBrand(_ApiClient_brand, context, _log).call(context, _classPrivateFieldGet(_LOG_LEVEL, context).INFO, null, "Received response after redirection :", redirectResponse.status);
713
+ _assertClassBrand(_ApiClient_brand, context, _processDownloadedFile).call(context, redirectResponse, redirectedStream, _tempFilename, resolve, reject, returnType);
714
+ });
715
+ } else {
716
+ _assertClassBrand(_ApiClient_brand, _this2, _handleApiResponseForPromise).call(_this2, response, path, queryParams, returnType, resolve, reject);
717
+ }
727
718
  }
728
- reject(error);
729
719
  });
730
720
  });
731
721
  }
@@ -1046,6 +1036,22 @@ function _deserialize(response, returnType) {
1046
1036
  return null;
1047
1037
  }
1048
1038
 
1039
+ // Handle text response
1040
+ if (response.headers && ['text/event-stream', 'text/html', 'text/xml', 'text/csv', 'text/javascript', 'text/markdown', 'text/vcard'].includes(response.headers['content-type'])) {
1041
+ var data = new returnType();
1042
+ data.data = new _buffer.Blob([response.text], {
1043
+ type: response.headers['content-type']
1044
+ });
1045
+ var flag = new _Flag["default"]();
1046
+ flag.name = "hasError";
1047
+ flag.value = false;
1048
+ var flags = [flag];
1049
+ var metadata = new _ApiResponseMetadata["default"]();
1050
+ metadata.flags = flags;
1051
+ data.metadata = metadata;
1052
+ return data;
1053
+ }
1054
+
1049
1055
  // Rely on SuperAgent for parsing response body.
1050
1056
  // See http://visionmedia.github.io/superagent/#parsing-response-bodies
1051
1057
  var data = response.body;
@@ -1140,7 +1146,7 @@ function _log(level, mapper) {
1140
1146
  return typeof message === "string" ? message : mapper ? mapper(message) : JSON.stringify(message);
1141
1147
  });
1142
1148
  var message = messages.join(' ');
1143
- message = _assertClassBrand(_ApiClient_brand, this, _getLocalDateTime).call(this) + ' ' + level.key + ' - ' + message;
1149
+ message = new Date().toISOString() + ' ' + level.key + ' - ' + message;
1144
1150
  if (typeof _classPrivateFieldGet(_logger, this) !== "undefined" && _classPrivateFieldGet(_logger, this) !== null && typeof _classPrivateFieldGet(_logger, this).log === 'function') {
1145
1151
  _classPrivateFieldGet(_logger, this).log(message);
1146
1152
  } else {
@@ -1152,21 +1158,6 @@ function _skipLogging(level) {
1152
1158
  // Skip logging if log level is DEBUG but debug is not enabled.
1153
1159
  return !this.debug && level === _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG;
1154
1160
  }
1155
- function _getLocalDateTime() {
1156
- // Current epoch UTC time in milliseconds
1157
- var epochTime = Date.now();
1158
-
1159
- // "getTimezoneOffset" returns the difference, in minutes, between a date as evaluated in the UTC time zone,
1160
- // and the same date as evaluated in the local time zone.
1161
- // if you are in timezone UTC-1, outputs 60
1162
- // if you are in timezone UTC+3, outputs -180
1163
- var timezoneOffsetInMinutes = new Date().getTimezoneOffset();
1164
- var timezoneOffsetInMilliseconds = timezoneOffsetInMinutes * 60 * 1000;
1165
-
1166
- // Create a new date with adjusted epoch time based on timezone offset
1167
- var date = new Date(epochTime - timezoneOffsetInMilliseconds);
1168
- return date.toISOString().slice(0, 23);
1169
- }
1170
1161
  // A mapper function to flatten a simple non-nested (key:value) object to string
1171
1162
  function _flatten(obj) {
1172
1163
  if (_typeof(obj) !== "object") {
@@ -1183,12 +1174,17 @@ function _flatten(obj) {
1183
1174
  // handle and deserialize received response
1184
1175
  function _handleApiResponseForPromise(response, path, queryParams, returnType, resolve, reject) {
1185
1176
  try {
1177
+ var data = _assertClassBrand(_ApiClient_brand, this, _deserialize).call(this, response, returnType);
1186
1178
  _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "Response Status :", response.status);
1187
1179
  _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), "Response Headers :", response.headers);
1188
1180
  _assertClassBrand(_ApiClient_brand, this, _updateCookies).call(this, response || {});
1189
- var data = _assertClassBrand(_ApiClient_brand, this, _deserialize).call(this, response, returnType);
1190
1181
  _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, "Response Body :", data);
1191
- if (response.ok) {
1182
+ if (response.status == 204 && data == null) {
1183
+ resolve({
1184
+ data: data,
1185
+ response: response
1186
+ });
1187
+ } else if (response.ok && data != null) {
1192
1188
  this.addEtagToReservedMap(response, data);
1193
1189
  _assertClassBrand(_ApiClient_brand, this, _paginateIfNeeded).call(this, data, path, queryParams);
1194
1190
  resolve({
@@ -1208,4 +1204,59 @@ function _handleApiResponseForPromise(response, path, queryParams, returnType, r
1208
1204
  reject(err);
1209
1205
  }
1210
1206
  }
1207
+ function _processDownloadedFile(response, stream, tempFilename, resolve, reject, returnType) {
1208
+ var _this4 = this;
1209
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "Streaming response to : ", tempFilename);
1210
+ try {
1211
+ response.on('data', function (chunk) {
1212
+ stream.write(chunk);
1213
+ });
1214
+ } catch (err) {
1215
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, "Issue while downloading file", err);
1216
+ }
1217
+ var data = new returnType();
1218
+ // Fetch filename
1219
+ var filename = "";
1220
+ if (typeof response.headers['content-disposition'] !== 'undefined' && response.headers['content-disposition'] !== null) {
1221
+ var match = response.headers['content-disposition'].match(/*#__PURE__*/_wrapRegExp(/.*filename="(.*)".*/, {
1222
+ filename: 1
1223
+ }));
1224
+ var filepath = _path["default"].parse(match.groups['filename']);
1225
+ filename = this.downloadDestination + '/' + filepath.name + '_' + Date.now() + filepath.ext;
1226
+ data.data = {
1227
+ "path": _path["default"].parse(filename),
1228
+ $objectType: "Path"
1229
+ };
1230
+ var flag = new _Flag["default"]();
1231
+ flag.name = "hasError";
1232
+ flag.value = false;
1233
+ var flags = [flag];
1234
+ var metadata = new _ApiResponseMetadata["default"]();
1235
+ metadata.flags = flags;
1236
+ data.metadata = metadata;
1237
+ }
1238
+ response.on('end', function () {
1239
+ _assertClassBrand(_ApiClient_brand, _this4, _log).call(_this4, _classPrivateFieldGet(_LOG_LEVEL, _this4).INFO, null, "Finished streaming response");
1240
+ if (filename.length !== 0) {
1241
+ _assertClassBrand(_ApiClient_brand, _this4, _log).call(_this4, _classPrivateFieldGet(_LOG_LEVEL, _this4).INFO, null, "Content-Disposition header found [", filename, "] is final filename");
1242
+ stream.close();
1243
+ _fs2["default"].renameSync(tempFilename, filename);
1244
+ resolve({
1245
+ data: data,
1246
+ response: response
1247
+ });
1248
+ } else {
1249
+ _assertClassBrand(_ApiClient_brand, _this4, _log).call(_this4, _classPrivateFieldGet(_LOG_LEVEL, _this4).ERROR, null, "Content-Disposition header not found [", tempFilename, "] is final filename");
1250
+ resolve({
1251
+ data: data,
1252
+ response: response
1253
+ });
1254
+ }
1255
+ });
1256
+ response.on('error', function (err) {
1257
+ _assertClassBrand(_ApiClient_brand, _this4, _log).call(_this4, _classPrivateFieldGet(_LOG_LEVEL, _this4).ERROR, null, "Caught the following error :", err);
1258
+ error.data = _assertClassBrand(_ApiClient_brand, _this4, _wrapErrorInResponse).call(_this4, error);
1259
+ reject(err);
1260
+ });
1261
+ }
1211
1262
  ApiClient.instance = new ApiClient();