@nutanix-scratch/licensing-js-client 4.2.1 → 4.3.2
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.
- package/README.md +15 -3
- package/dist/Ntnx-Licensing-js-client-prod.js +1 -1
- package/dist/Ntnx-Licensing-js-client.js +633 -561
- package/dist/es/ApiClient.d.ts +29 -7
- package/dist/es/ApiClient.js +854 -667
- package/dist/es/Paginable.d.ts +1 -1
- package/dist/es/Paginable.js +144 -183
- package/dist/es/apis/enduserlicenseagreement-endpoints.d.ts +1 -1
- package/dist/es/apis/enduserlicenseagreement-endpoints.js +82 -99
- package/dist/es/apis/licensekeys-endpoints.d.ts +47 -2
- package/dist/es/apis/licensekeys-endpoints.js +360 -222
- package/dist/es/apis/licenses-endpoints.d.ts +6 -6
- package/dist/es/apis/licenses-endpoints.js +401 -381
- package/dist/es/index.d.ts +15 -3
- package/dist/es/index.js +387 -339
- package/dist/es/models/common/v1/config/Flag.d.ts +2 -8
- package/dist/es/models/common/v1/config/Flag.js +170 -211
- package/dist/es/models/common/v1/config/KVPair.d.ts +2 -8
- package/dist/es/models/common/v1/config/KVPair.js +225 -270
- package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
- package/dist/es/models/common/v1/config/MapOfStringWrapper.js +139 -178
- package/dist/es/models/common/v1/config/Message.d.ts +2 -10
- package/dist/es/models/common/v1/config/Message.js +213 -258
- package/dist/es/models/common/v1/config/MessageSeverity.js +7 -9
- package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +2 -7
- package/dist/es/models/common/v1/config/TenantAwareModel.js +137 -177
- package/dist/es/models/common/v1/response/ApiLink.d.ts +2 -8
- package/dist/es/models/common/v1/response/ApiLink.js +165 -206
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +281 -344
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +154 -202
- package/dist/es/models/licensing/v4/agreements/Acceptance.d.ts +2 -16
- package/dist/es/models/licensing/v4/agreements/Acceptance.js +161 -203
- package/dist/es/models/licensing/v4/agreements/AddUserApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/agreements/AddUserApiResponse.js +209 -264
- package/dist/es/models/licensing/v4/agreements/EndUser.d.ts +2 -10
- package/dist/es/models/licensing/v4/agreements/EndUser.js +226 -271
- package/dist/es/models/licensing/v4/agreements/Eula.d.ts +1 -34
- package/dist/es/models/licensing/v4/agreements/Eula.js +230 -286
- package/dist/es/models/licensing/v4/agreements/GetEulaApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/agreements/GetEulaApiResponse.js +187 -242
- package/dist/es/models/licensing/v4/config/AddLicenseKeyApiResponse.d.ts +2 -46
- package/dist/es/models/licensing/v4/config/AddLicenseKeyApiResponse.js +190 -245
- package/dist/es/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.d.ts +2 -72
- package/dist/es/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.js +194 -247
- package/dist/es/models/licensing/v4/config/Allowance.d.ts +1 -27
- package/dist/es/models/licensing/v4/config/Allowance.js +192 -241
- package/dist/es/models/licensing/v4/config/AllowanceDetail.d.ts +2 -10
- package/dist/es/models/licensing/v4/config/AllowanceDetail.js +217 -262
- package/dist/es/models/licensing/v4/config/AllowanceDetailProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/AllowanceDetailProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/AllowanceProjection.d.ts +1 -36
- package/dist/es/models/licensing/v4/config/AllowanceProjection.js +155 -198
- package/dist/es/models/licensing/v4/config/AssignLicenseKeysApiResponse.d.ts +2 -46
- package/dist/es/models/licensing/v4/config/AssignLicenseKeysApiResponse.js +209 -264
- package/dist/es/models/licensing/v4/config/{LicenseKeyAssociationSpec.d.ts → AssociateLicenseKeySpec.d.ts} +11 -24
- package/dist/es/models/licensing/v4/config/AssociateLicenseKeySpec.js +253 -0
- package/dist/es/models/licensing/v4/config/AssociateLicenseKeysApiResponse.d.ts +58 -0
- package/dist/es/models/licensing/v4/config/AssociateLicenseKeysApiResponse.js +310 -0
- package/dist/es/models/licensing/v4/config/AssociationType.js +7 -9
- package/dist/es/models/licensing/v4/config/BaseClusterInfo.d.ts +1 -16
- package/dist/es/models/licensing/v4/config/BaseClusterInfo.js +123 -166
- package/dist/es/models/licensing/v4/config/BaseLicenseInfo.d.ts +1 -20
- package/dist/es/models/licensing/v4/config/BaseLicenseInfo.js +223 -273
- package/dist/es/models/licensing/v4/config/BillingPlan.js +7 -9
- package/dist/es/models/licensing/v4/config/CapacityViolation.d.ts +2 -10
- package/dist/es/models/licensing/v4/config/CapacityViolation.js +210 -255
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMapping.d.ts +1 -9
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMapping.js +131 -170
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.js +73 -102
- package/dist/es/models/licensing/v4/config/ClusterType.js +14 -10
- package/dist/es/models/licensing/v4/config/Compliance.d.ts +1 -35
- package/dist/es/models/licensing/v4/config/Compliance.js +192 -241
- package/dist/es/models/licensing/v4/config/ComplianceProjection.d.ts +1 -52
- package/dist/es/models/licensing/v4/config/ComplianceProjection.js +155 -198
- package/dist/es/models/licensing/v4/config/Consumption.d.ts +2 -8
- package/dist/es/models/licensing/v4/config/Consumption.js +168 -209
- package/dist/es/models/licensing/v4/config/ConsumptionProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/ConsumptionProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/ConsumptionType.js +7 -9
- package/dist/es/models/licensing/v4/config/DeleteLicenseKeyApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/DeleteLicenseKeyApiResponse.js +190 -245
- package/dist/es/models/licensing/v4/config/DryRunCheck.d.ts +2 -18
- package/dist/es/models/licensing/v4/config/DryRunCheck.js +173 -224
- package/dist/es/models/licensing/v4/config/DryRunStatus.js +7 -9
- package/dist/es/models/licensing/v4/config/DryRunValidationResult.d.ts +2 -23
- package/dist/es/models/licensing/v4/config/DryRunValidationResult.js +154 -207
- package/dist/es/models/licensing/v4/config/EnforcementActions.js +7 -9
- package/dist/es/models/licensing/v4/config/EnforcementLevel.js +7 -9
- package/dist/es/models/licensing/v4/config/EnforcementPolicy.js +7 -9
- package/dist/es/models/licensing/v4/config/Entitlement.d.ts +1 -33
- package/dist/es/models/licensing/v4/config/Entitlement.js +245 -298
- package/dist/es/models/licensing/v4/config/EntitlementDetail.d.ts +2 -14
- package/dist/es/models/licensing/v4/config/EntitlementDetail.js +308 -361
- package/dist/es/models/licensing/v4/config/EntitlementDetailProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/EntitlementDetailProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/EntitlementProjection.d.ts +1 -46
- package/dist/es/models/licensing/v4/config/EntitlementProjection.js +165 -204
- package/dist/es/models/licensing/v4/config/ExpiredLicense.d.ts +1 -23
- package/dist/es/models/licensing/v4/config/ExpiredLicense.js +203 -239
- package/dist/es/models/licensing/v4/config/Feature.d.ts +1 -22
- package/dist/es/models/licensing/v4/config/Feature.js +285 -343
- package/dist/es/models/licensing/v4/config/FeatureDetail.d.ts +2 -9
- package/dist/es/models/licensing/v4/config/FeatureDetail.js +198 -241
- package/dist/es/models/licensing/v4/config/FeatureProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/FeatureProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/FeatureViolation.d.ts +1 -10
- package/dist/es/models/licensing/v4/config/FeatureViolation.js +136 -173
- package/dist/es/models/licensing/v4/config/GetLicenseKeyApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/GetLicenseKeyApiResponse.js +187 -242
- package/dist/es/models/licensing/v4/config/License.d.ts +1 -31
- package/dist/es/models/licensing/v4/config/License.js +262 -306
- package/dist/es/models/licensing/v4/config/LicenseCategory.js +14 -10
- package/dist/es/models/licensing/v4/config/LicenseClass.js +7 -9
- package/dist/es/models/licensing/v4/config/LicenseKey.d.ts +1 -42
- package/dist/es/models/licensing/v4/config/LicenseKey.js +410 -483
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignment.d.ts +2 -14
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignment.js +178 -223
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignmentSpec.d.ts +2 -19
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignmentSpec.js +152 -195
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociation.d.ts +2 -10
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociation.js +215 -261
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociationProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociationProjection.js +73 -102
- package/dist/es/models/licensing/v4/config/LicenseKeyMapping.d.ts +2 -8
- package/dist/es/models/licensing/v4/config/LicenseKeyMapping.js +168 -209
- package/dist/es/models/licensing/v4/config/LicenseKeyProjection.d.ts +1 -61
- package/dist/es/models/licensing/v4/config/LicenseKeyProjection.js +217 -254
- package/dist/es/models/licensing/v4/config/LicenseKeySubCategory.js +7 -9
- package/dist/es/models/licensing/v4/config/LicenseProjection.d.ts +1 -38
- package/dist/es/models/licensing/v4/config/LicenseProjection.js +187 -217
- package/dist/es/models/licensing/v4/config/LicenseStateSyncSpec.d.ts +2 -9
- package/dist/es/models/licensing/v4/config/LicenseStateSyncSpec.js +203 -246
- package/dist/es/models/licensing/v4/config/LicenseType.js +7 -9
- package/dist/es/models/licensing/v4/config/ListAllowancesApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListAllowancesApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListCompliancesApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListCompliancesApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListEntitlementsApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListEntitlementsApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListFeaturesApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListFeaturesApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListLicenseKeysApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListLicenseKeysApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListLicensesApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListLicensesApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListReclaimLicenseTokensApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ListReclaimLicenseTokensApiResponse.js +315 -0
- package/dist/es/models/licensing/v4/config/ListRecommendationsApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListRecommendationsApiResponse.js +209 -264
- package/dist/es/models/licensing/v4/config/ListSettingsApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListSettingsApiResponse.js +209 -264
- package/dist/es/models/licensing/v4/config/ListViolationsApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListViolationsApiResponse.js +209 -264
- package/dist/es/models/licensing/v4/config/LogicalVersion.d.ts +2 -8
- package/dist/es/models/licensing/v4/config/LogicalVersion.js +166 -207
- package/dist/es/models/licensing/v4/config/Meter.js +7 -9
- package/dist/es/models/licensing/v4/config/OperationType.js +7 -9
- package/dist/es/models/licensing/v4/config/PortalSetting.d.ts +2 -9
- package/dist/es/models/licensing/v4/config/PortalSetting.js +194 -238
- package/dist/es/models/licensing/v4/config/PostPaidCategory.js +7 -9
- package/dist/es/models/licensing/v4/config/PostPaidConfig.d.ts +2 -11
- package/dist/es/models/licensing/v4/config/PostPaidConfig.js +237 -284
- package/dist/es/models/licensing/v4/config/ProductName.js +15 -11
- package/dist/es/models/licensing/v4/config/ReclaimLicenseKeyApiResponse.d.ts +58 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseKeyApiResponse.js +310 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseKeySpec.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseKeySpec.js +248 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseToken.d.ts +57 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseToken.js +342 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseTokenProjection.d.ts +10 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseTokenProjection.js +123 -0
- package/dist/es/models/licensing/v4/config/ReclaimType.js +7 -9
- package/dist/es/models/licensing/v4/config/Recommendation.d.ts +1 -25
- package/dist/es/models/licensing/v4/config/Recommendation.js +136 -182
- package/dist/es/models/licensing/v4/config/RecommendationDetail.d.ts +2 -11
- package/dist/es/models/licensing/v4/config/RecommendationDetail.js +241 -288
- package/dist/es/models/licensing/v4/config/RecommendationScope.js +7 -9
- package/dist/es/models/licensing/v4/config/ResetScope.js +7 -9
- package/dist/es/models/licensing/v4/config/Scope.js +7 -9
- package/dist/es/models/licensing/v4/config/Service.d.ts +2 -18
- package/dist/es/models/licensing/v4/config/Service.js +278 -331
- package/dist/es/models/licensing/v4/config/ServiceProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/ServiceProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/ServiceViolation.d.ts +2 -8
- package/dist/es/models/licensing/v4/config/ServiceViolation.js +164 -205
- package/dist/es/models/licensing/v4/config/ServiceViolationType.js +7 -9
- package/dist/es/models/licensing/v4/config/Setting.d.ts +1 -40
- package/dist/es/models/licensing/v4/config/Setting.js +325 -382
- package/dist/es/models/licensing/v4/config/Status.js +7 -9
- package/dist/es/models/licensing/v4/config/SubCategory.js +7 -9
- package/dist/es/models/licensing/v4/config/SyncLicenseStateApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/SyncLicenseStateApiResponse.js +187 -242
- package/dist/es/models/licensing/v4/config/SyncOperationType.js +7 -9
- package/dist/es/models/licensing/v4/config/Trial.d.ts +1 -20
- package/dist/es/models/licensing/v4/config/Trial.js +218 -270
- package/dist/es/models/licensing/v4/config/TrialCategory.js +7 -9
- package/dist/es/models/licensing/v4/config/TrialProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/TrialProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/TrialStatus.js +7 -9
- package/dist/es/models/licensing/v4/config/TrialType.js +7 -9
- package/dist/es/models/licensing/v4/config/ValueType.js +7 -9
- package/dist/es/models/licensing/v4/config/Violation.d.ts +1 -56
- package/dist/es/models/licensing/v4/config/Violation.js +211 -268
- package/dist/es/models/licensing/v4/error/AppMessage.d.ts +2 -12
- package/dist/es/models/licensing/v4/error/AppMessage.js +264 -313
- package/dist/es/models/licensing/v4/error/ErrorResponse.d.ts +2 -7
- package/dist/es/models/licensing/v4/error/ErrorResponse.js +178 -218
- package/dist/es/models/licensing/v4/error/SchemaValidationError.d.ts +2 -18
- package/dist/es/models/licensing/v4/error/SchemaValidationError.js +249 -300
- package/dist/es/models/licensing/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
- package/dist/es/models/licensing/v4/error/SchemaValidationErrorMessage.js +191 -234
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +2 -7
- package/dist/es/models/prism/v4/config/TaskReference.js +142 -181
- package/dist/es/models/validation/ValidationError.js +26 -42
- package/dist/es/models/validation/ValidationScopes.js +3 -3
- package/dist/es/utils/ValidationUtils.js +39 -69
- package/dist/lib/ApiClient.d.ts +29 -7
- package/dist/lib/ApiClient.js +854 -667
- package/dist/lib/Paginable.d.ts +1 -1
- package/dist/lib/Paginable.js +144 -183
- package/dist/lib/apis/enduserlicenseagreement-endpoints.d.ts +1 -1
- package/dist/lib/apis/enduserlicenseagreement-endpoints.js +82 -99
- package/dist/lib/apis/licensekeys-endpoints.d.ts +47 -2
- package/dist/lib/apis/licensekeys-endpoints.js +360 -222
- package/dist/lib/apis/licenses-endpoints.d.ts +6 -6
- package/dist/lib/apis/licenses-endpoints.js +401 -381
- package/dist/lib/index.d.ts +15 -3
- package/dist/lib/index.js +387 -339
- package/dist/lib/models/common/v1/config/Flag.d.ts +2 -8
- package/dist/lib/models/common/v1/config/Flag.js +170 -211
- package/dist/lib/models/common/v1/config/KVPair.d.ts +2 -8
- package/dist/lib/models/common/v1/config/KVPair.js +225 -270
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +139 -178
- package/dist/lib/models/common/v1/config/Message.d.ts +2 -10
- package/dist/lib/models/common/v1/config/Message.js +213 -258
- package/dist/lib/models/common/v1/config/MessageSeverity.js +7 -9
- package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +2 -7
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +137 -177
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +2 -8
- package/dist/lib/models/common/v1/response/ApiLink.js +165 -206
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +281 -344
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +154 -202
- package/dist/lib/models/licensing/v4/agreements/Acceptance.d.ts +2 -16
- package/dist/lib/models/licensing/v4/agreements/Acceptance.js +161 -203
- package/dist/lib/models/licensing/v4/agreements/AddUserApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/agreements/AddUserApiResponse.js +209 -264
- package/dist/lib/models/licensing/v4/agreements/EndUser.d.ts +2 -10
- package/dist/lib/models/licensing/v4/agreements/EndUser.js +226 -271
- package/dist/lib/models/licensing/v4/agreements/Eula.d.ts +1 -34
- package/dist/lib/models/licensing/v4/agreements/Eula.js +230 -286
- package/dist/lib/models/licensing/v4/agreements/GetEulaApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/agreements/GetEulaApiResponse.js +187 -242
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyApiResponse.d.ts +2 -46
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyApiResponse.js +190 -245
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.d.ts +2 -72
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.js +194 -247
- package/dist/lib/models/licensing/v4/config/Allowance.d.ts +1 -27
- package/dist/lib/models/licensing/v4/config/Allowance.js +192 -241
- package/dist/lib/models/licensing/v4/config/AllowanceDetail.d.ts +2 -10
- package/dist/lib/models/licensing/v4/config/AllowanceDetail.js +217 -262
- package/dist/lib/models/licensing/v4/config/AllowanceDetailProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/AllowanceDetailProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/AllowanceProjection.d.ts +1 -36
- package/dist/lib/models/licensing/v4/config/AllowanceProjection.js +155 -198
- package/dist/lib/models/licensing/v4/config/AssignLicenseKeysApiResponse.d.ts +2 -46
- package/dist/lib/models/licensing/v4/config/AssignLicenseKeysApiResponse.js +209 -264
- package/dist/lib/models/licensing/v4/config/{LicenseKeyAssociationSpec.d.ts → AssociateLicenseKeySpec.d.ts} +11 -24
- package/dist/lib/models/licensing/v4/config/AssociateLicenseKeySpec.js +253 -0
- package/dist/lib/models/licensing/v4/config/AssociateLicenseKeysApiResponse.d.ts +58 -0
- package/dist/lib/models/licensing/v4/config/AssociateLicenseKeysApiResponse.js +310 -0
- package/dist/lib/models/licensing/v4/config/AssociationType.js +7 -9
- package/dist/lib/models/licensing/v4/config/BaseClusterInfo.d.ts +1 -16
- package/dist/lib/models/licensing/v4/config/BaseClusterInfo.js +123 -166
- package/dist/lib/models/licensing/v4/config/BaseLicenseInfo.d.ts +1 -20
- package/dist/lib/models/licensing/v4/config/BaseLicenseInfo.js +223 -273
- package/dist/lib/models/licensing/v4/config/BillingPlan.js +7 -9
- package/dist/lib/models/licensing/v4/config/CapacityViolation.d.ts +2 -10
- package/dist/lib/models/licensing/v4/config/CapacityViolation.js +210 -255
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMapping.d.ts +1 -9
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMapping.js +131 -170
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.js +73 -102
- package/dist/lib/models/licensing/v4/config/ClusterType.js +14 -10
- package/dist/lib/models/licensing/v4/config/Compliance.d.ts +1 -35
- package/dist/lib/models/licensing/v4/config/Compliance.js +192 -241
- package/dist/lib/models/licensing/v4/config/ComplianceProjection.d.ts +1 -52
- package/dist/lib/models/licensing/v4/config/ComplianceProjection.js +155 -198
- package/dist/lib/models/licensing/v4/config/Consumption.d.ts +2 -8
- package/dist/lib/models/licensing/v4/config/Consumption.js +168 -209
- package/dist/lib/models/licensing/v4/config/ConsumptionProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/ConsumptionProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/ConsumptionType.js +7 -9
- package/dist/lib/models/licensing/v4/config/DeleteLicenseKeyApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/DeleteLicenseKeyApiResponse.js +190 -245
- package/dist/lib/models/licensing/v4/config/DryRunCheck.d.ts +2 -18
- package/dist/lib/models/licensing/v4/config/DryRunCheck.js +173 -224
- package/dist/lib/models/licensing/v4/config/DryRunStatus.js +7 -9
- package/dist/lib/models/licensing/v4/config/DryRunValidationResult.d.ts +2 -23
- package/dist/lib/models/licensing/v4/config/DryRunValidationResult.js +154 -207
- package/dist/lib/models/licensing/v4/config/EnforcementActions.js +7 -9
- package/dist/lib/models/licensing/v4/config/EnforcementLevel.js +7 -9
- package/dist/lib/models/licensing/v4/config/EnforcementPolicy.js +7 -9
- package/dist/lib/models/licensing/v4/config/Entitlement.d.ts +1 -33
- package/dist/lib/models/licensing/v4/config/Entitlement.js +245 -298
- package/dist/lib/models/licensing/v4/config/EntitlementDetail.d.ts +2 -14
- package/dist/lib/models/licensing/v4/config/EntitlementDetail.js +308 -361
- package/dist/lib/models/licensing/v4/config/EntitlementDetailProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/EntitlementDetailProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/EntitlementProjection.d.ts +1 -46
- package/dist/lib/models/licensing/v4/config/EntitlementProjection.js +165 -204
- package/dist/lib/models/licensing/v4/config/ExpiredLicense.d.ts +1 -23
- package/dist/lib/models/licensing/v4/config/ExpiredLicense.js +203 -239
- package/dist/lib/models/licensing/v4/config/Feature.d.ts +1 -22
- package/dist/lib/models/licensing/v4/config/Feature.js +285 -343
- package/dist/lib/models/licensing/v4/config/FeatureDetail.d.ts +2 -9
- package/dist/lib/models/licensing/v4/config/FeatureDetail.js +198 -241
- package/dist/lib/models/licensing/v4/config/FeatureProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/FeatureProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/FeatureViolation.d.ts +1 -10
- package/dist/lib/models/licensing/v4/config/FeatureViolation.js +136 -173
- package/dist/lib/models/licensing/v4/config/GetLicenseKeyApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/GetLicenseKeyApiResponse.js +187 -242
- package/dist/lib/models/licensing/v4/config/License.d.ts +1 -31
- package/dist/lib/models/licensing/v4/config/License.js +262 -306
- package/dist/lib/models/licensing/v4/config/LicenseCategory.js +14 -10
- package/dist/lib/models/licensing/v4/config/LicenseClass.js +7 -9
- package/dist/lib/models/licensing/v4/config/LicenseKey.d.ts +1 -42
- package/dist/lib/models/licensing/v4/config/LicenseKey.js +410 -483
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignment.d.ts +2 -14
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignment.js +178 -223
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignmentSpec.d.ts +2 -19
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignmentSpec.js +152 -195
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociation.d.ts +2 -10
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociation.js +215 -261
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociationProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociationProjection.js +73 -102
- package/dist/lib/models/licensing/v4/config/LicenseKeyMapping.d.ts +2 -8
- package/dist/lib/models/licensing/v4/config/LicenseKeyMapping.js +168 -209
- package/dist/lib/models/licensing/v4/config/LicenseKeyProjection.d.ts +1 -61
- package/dist/lib/models/licensing/v4/config/LicenseKeyProjection.js +217 -254
- package/dist/lib/models/licensing/v4/config/LicenseKeySubCategory.js +7 -9
- package/dist/lib/models/licensing/v4/config/LicenseProjection.d.ts +1 -38
- package/dist/lib/models/licensing/v4/config/LicenseProjection.js +187 -217
- package/dist/lib/models/licensing/v4/config/LicenseStateSyncSpec.d.ts +2 -9
- package/dist/lib/models/licensing/v4/config/LicenseStateSyncSpec.js +203 -246
- package/dist/lib/models/licensing/v4/config/LicenseType.js +7 -9
- package/dist/lib/models/licensing/v4/config/ListAllowancesApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListAllowancesApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListCompliancesApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListCompliancesApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListEntitlementsApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListEntitlementsApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListFeaturesApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListFeaturesApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListLicenseKeysApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListLicenseKeysApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListLicensesApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListLicensesApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListReclaimLicenseTokensApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ListReclaimLicenseTokensApiResponse.js +315 -0
- package/dist/lib/models/licensing/v4/config/ListRecommendationsApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListRecommendationsApiResponse.js +209 -264
- package/dist/lib/models/licensing/v4/config/ListSettingsApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListSettingsApiResponse.js +209 -264
- package/dist/lib/models/licensing/v4/config/ListViolationsApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListViolationsApiResponse.js +209 -264
- package/dist/lib/models/licensing/v4/config/LogicalVersion.d.ts +2 -8
- package/dist/lib/models/licensing/v4/config/LogicalVersion.js +166 -207
- package/dist/lib/models/licensing/v4/config/Meter.js +7 -9
- package/dist/lib/models/licensing/v4/config/OperationType.js +7 -9
- package/dist/lib/models/licensing/v4/config/PortalSetting.d.ts +2 -9
- package/dist/lib/models/licensing/v4/config/PortalSetting.js +194 -238
- package/dist/lib/models/licensing/v4/config/PostPaidCategory.js +7 -9
- package/dist/lib/models/licensing/v4/config/PostPaidConfig.d.ts +2 -11
- package/dist/lib/models/licensing/v4/config/PostPaidConfig.js +237 -284
- package/dist/lib/models/licensing/v4/config/ProductName.js +15 -11
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseKeyApiResponse.d.ts +58 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseKeyApiResponse.js +310 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseKeySpec.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseKeySpec.js +248 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseToken.d.ts +57 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseToken.js +342 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseTokenProjection.d.ts +10 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseTokenProjection.js +123 -0
- package/dist/lib/models/licensing/v4/config/ReclaimType.js +7 -9
- package/dist/lib/models/licensing/v4/config/Recommendation.d.ts +1 -25
- package/dist/lib/models/licensing/v4/config/Recommendation.js +136 -182
- package/dist/lib/models/licensing/v4/config/RecommendationDetail.d.ts +2 -11
- package/dist/lib/models/licensing/v4/config/RecommendationDetail.js +241 -288
- package/dist/lib/models/licensing/v4/config/RecommendationScope.js +7 -9
- package/dist/lib/models/licensing/v4/config/ResetScope.js +7 -9
- package/dist/lib/models/licensing/v4/config/Scope.js +7 -9
- package/dist/lib/models/licensing/v4/config/Service.d.ts +2 -18
- package/dist/lib/models/licensing/v4/config/Service.js +278 -331
- package/dist/lib/models/licensing/v4/config/ServiceProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/ServiceProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/ServiceViolation.d.ts +2 -8
- package/dist/lib/models/licensing/v4/config/ServiceViolation.js +164 -205
- package/dist/lib/models/licensing/v4/config/ServiceViolationType.js +7 -9
- package/dist/lib/models/licensing/v4/config/Setting.d.ts +1 -40
- package/dist/lib/models/licensing/v4/config/Setting.js +325 -382
- package/dist/lib/models/licensing/v4/config/Status.js +7 -9
- package/dist/lib/models/licensing/v4/config/SubCategory.js +7 -9
- package/dist/lib/models/licensing/v4/config/SyncLicenseStateApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/SyncLicenseStateApiResponse.js +187 -242
- package/dist/lib/models/licensing/v4/config/SyncOperationType.js +7 -9
- package/dist/lib/models/licensing/v4/config/Trial.d.ts +1 -20
- package/dist/lib/models/licensing/v4/config/Trial.js +218 -270
- package/dist/lib/models/licensing/v4/config/TrialCategory.js +7 -9
- package/dist/lib/models/licensing/v4/config/TrialProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/TrialProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/TrialStatus.js +7 -9
- package/dist/lib/models/licensing/v4/config/TrialType.js +7 -9
- package/dist/lib/models/licensing/v4/config/ValueType.js +7 -9
- package/dist/lib/models/licensing/v4/config/Violation.d.ts +1 -56
- package/dist/lib/models/licensing/v4/config/Violation.js +211 -268
- package/dist/lib/models/licensing/v4/error/AppMessage.d.ts +2 -12
- package/dist/lib/models/licensing/v4/error/AppMessage.js +264 -313
- package/dist/lib/models/licensing/v4/error/ErrorResponse.d.ts +2 -7
- package/dist/lib/models/licensing/v4/error/ErrorResponse.js +178 -218
- package/dist/lib/models/licensing/v4/error/SchemaValidationError.d.ts +2 -18
- package/dist/lib/models/licensing/v4/error/SchemaValidationError.js +249 -300
- package/dist/lib/models/licensing/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
- package/dist/lib/models/licensing/v4/error/SchemaValidationErrorMessage.js +191 -234
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +2 -7
- package/dist/lib/models/prism/v4/config/TaskReference.js +142 -181
- package/dist/lib/models/validation/ValidationError.js +26 -42
- package/dist/lib/models/validation/ValidationScopes.js +3 -3
- package/dist/lib/utils/ValidationUtils.js +39 -69
- package/package.json +1 -1
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociationSpec.js +0 -296
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociationSpec.js +0 -296
package/dist/es/Paginable.d.ts
CHANGED
package/dist/es/Paginable.js
CHANGED
|
@@ -3,42 +3,33 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
var _ApiClient = require("./ApiClient");
|
|
8
|
-
|
|
9
|
-
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; } } }; }
|
|
10
|
-
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; } }
|
|
11
|
-
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; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
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); } }
|
|
14
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
-
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); } /*
|
|
8
|
+
/*
|
|
17
9
|
* Nutanix Licensing APIs
|
|
18
10
|
*
|
|
19
|
-
* OpenAPI spec version: 4.2
|
|
11
|
+
* OpenAPI spec version: 4.3.2
|
|
20
12
|
*
|
|
21
13
|
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
22
14
|
*
|
|
23
|
-
* Open API Dev Platform Codegen version: 17.
|
|
15
|
+
* Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE
|
|
24
16
|
*
|
|
25
17
|
* Do not edit the class manually.
|
|
26
18
|
*
|
|
27
19
|
*/
|
|
20
|
+
|
|
28
21
|
/**
|
|
29
22
|
* A model that represents a paginable response from a list endpoint.
|
|
30
23
|
* @module Paginable
|
|
31
|
-
* @version 4.2
|
|
24
|
+
* @version 4.3.2
|
|
32
25
|
*/
|
|
33
|
-
|
|
26
|
+
class Paginable {
|
|
34
27
|
/**
|
|
35
28
|
* Constructs a new <code>Paginable</code>.
|
|
36
29
|
* @alias module:Paginable
|
|
37
30
|
* @class
|
|
38
31
|
*/
|
|
39
|
-
|
|
40
|
-
_classCallCheck(this, Paginable);
|
|
41
|
-
}
|
|
32
|
+
constructor() {}
|
|
42
33
|
|
|
43
34
|
/**
|
|
44
35
|
* Constructs a <code>Paginable</code> from a plain Javascript object, optionally creating a new instance.
|
|
@@ -47,194 +38,164 @@ var Paginable = exports["default"] = /*#__PURE__*/function () {
|
|
|
47
38
|
* @param {module:Paginable} obj Optional instance to populate.
|
|
48
39
|
* @return {module:Paginable} The populated <code>Paginable</code> instance.
|
|
49
40
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
41
|
+
static constructFromObject(metadata, obj) {
|
|
42
|
+
if (metadata) {
|
|
43
|
+
obj = obj || new Paginable();
|
|
44
|
+
if (metadata.hasOwnProperty('links') && metadata['links'] !== null && metadata['links'] !== undefined) {
|
|
45
|
+
for (const link of metadata['links']) {
|
|
46
|
+
if (link.hasOwnProperty('rel') && link.hasOwnProperty('href')) {
|
|
47
|
+
switch (link['rel']) {
|
|
48
|
+
case 'first':
|
|
49
|
+
obj.linkFirst = link['href'];
|
|
50
|
+
break;
|
|
51
|
+
case 'prev':
|
|
52
|
+
obj.linkPrev = link['href'];
|
|
53
|
+
break;
|
|
54
|
+
case 'next':
|
|
55
|
+
obj.linkNext = link['href'];
|
|
56
|
+
break;
|
|
57
|
+
case 'last':
|
|
58
|
+
obj.linkLast = link['href'];
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
61
65
|
}
|
|
62
|
-
if (
|
|
63
|
-
|
|
66
|
+
if (metadata.hasOwnProperty('totalAvailableResults')) {
|
|
67
|
+
obj.resultsTotal = metadata['totalAvailableResults'];
|
|
64
68
|
}
|
|
65
|
-
return this._getLink(this.linkFirst);
|
|
66
69
|
}
|
|
70
|
+
return obj;
|
|
71
|
+
}
|
|
67
72
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if (this.isFirstPage()) {
|
|
77
|
-
return Promise.reject('Cannot navigate to previous page : already on first page');
|
|
78
|
-
}
|
|
79
|
-
if (this.linkPrev === null) {
|
|
80
|
-
return Promise.reject('No link to previous page provided in previous API response');
|
|
81
|
-
}
|
|
82
|
-
return this._getLink(this.linkPrev);
|
|
73
|
+
/**
|
|
74
|
+
* Get the first page of the set, if any
|
|
75
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable
|
|
76
|
+
* or rejects with error message if any issue (link not available, ...)
|
|
77
|
+
*/
|
|
78
|
+
getFirstPage() {
|
|
79
|
+
if (this.isFirstPage()) {
|
|
80
|
+
return Promise.reject('Cannot navigate to first page : already on first page');
|
|
83
81
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
* Get the next page of the set, if any
|
|
87
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable
|
|
88
|
-
* or rejects with error message if any issue (link not available, ...)
|
|
89
|
-
*/
|
|
90
|
-
}, {
|
|
91
|
-
key: "getNextPage",
|
|
92
|
-
value: function getNextPage() {
|
|
93
|
-
if (this.isLastPage()) {
|
|
94
|
-
return Promise.reject('Cannot navigate to next page : already on last page');
|
|
95
|
-
}
|
|
96
|
-
if (this.linkNext === null) {
|
|
97
|
-
return Promise.reject('No link to next page provided in previous API response');
|
|
98
|
-
}
|
|
99
|
-
return this._getLink(this.linkNext);
|
|
82
|
+
if (this.linkFirst === null) {
|
|
83
|
+
return Promise.reject('No link to first page provided in previous API response');
|
|
100
84
|
}
|
|
85
|
+
return this._getLink(this.linkFirst);
|
|
86
|
+
}
|
|
101
87
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (this.isLastPage()) {
|
|
111
|
-
return Promise.reject('Cannot navigate to last page : already on last page');
|
|
112
|
-
}
|
|
113
|
-
if (this.linkLast === null) {
|
|
114
|
-
return Promise.reject('No link to last page provided in previous API response');
|
|
115
|
-
}
|
|
116
|
-
return this._getLink(this.linkLast);
|
|
88
|
+
/**
|
|
89
|
+
* Get the previous page of the set, if any
|
|
90
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable
|
|
91
|
+
* or rejects with error message if any issue (link not available, ...)
|
|
92
|
+
*/
|
|
93
|
+
getPrevPage() {
|
|
94
|
+
if (this.isFirstPage()) {
|
|
95
|
+
return Promise.reject('Cannot navigate to previous page : already on first page');
|
|
117
96
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
* Get the current page number
|
|
121
|
-
* @return {Number} the current page number, starts at 0
|
|
122
|
-
*/
|
|
123
|
-
}, {
|
|
124
|
-
key: "currentPage",
|
|
125
|
-
value: function currentPage() {
|
|
126
|
-
if (this.page === null) {
|
|
127
|
-
return 0;
|
|
128
|
-
}
|
|
129
|
-
return this.page;
|
|
97
|
+
if (this.linkPrev === null) {
|
|
98
|
+
return Promise.reject('No link to previous page provided in previous API response');
|
|
130
99
|
}
|
|
100
|
+
return this._getLink(this.linkPrev);
|
|
101
|
+
}
|
|
131
102
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
return 1;
|
|
141
|
-
}
|
|
142
|
-
return Math.ceil(this.resultsTotal / this.resultsPerPage);
|
|
103
|
+
/**
|
|
104
|
+
* Get the next page of the set, if any
|
|
105
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable
|
|
106
|
+
* or rejects with error message if any issue (link not available, ...)
|
|
107
|
+
*/
|
|
108
|
+
getNextPage() {
|
|
109
|
+
if (this.isLastPage()) {
|
|
110
|
+
return Promise.reject('Cannot navigate to next page : already on last page');
|
|
143
111
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
* Check if current page is first page
|
|
147
|
-
* @return {Boolean} True if current page is 0, false otherwise
|
|
148
|
-
*/
|
|
149
|
-
}, {
|
|
150
|
-
key: "isFirstPage",
|
|
151
|
-
value: function isFirstPage() {
|
|
152
|
-
return this.currentPage() === 0;
|
|
112
|
+
if (this.linkNext === null) {
|
|
113
|
+
return Promise.reject('No link to next page provided in previous API response');
|
|
153
114
|
}
|
|
115
|
+
return this._getLink(this.linkNext);
|
|
116
|
+
}
|
|
154
117
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return
|
|
118
|
+
/**
|
|
119
|
+
* Get the last page of the set, if any
|
|
120
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable
|
|
121
|
+
* or rejects with error message if any issue (link not available, ...)
|
|
122
|
+
*/
|
|
123
|
+
getLastPage() {
|
|
124
|
+
if (this.isLastPage()) {
|
|
125
|
+
return Promise.reject('Cannot navigate to last page : already on last page');
|
|
163
126
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
value: function populatePaginationMetadata(apiClient, page, resultsPerPage) {
|
|
167
|
-
this.apiClient = apiClient;
|
|
168
|
-
this.page = page;
|
|
169
|
-
this.resultsPerPage = resultsPerPage;
|
|
127
|
+
if (this.linkLast === null) {
|
|
128
|
+
return Promise.reject('No link to last page provided in previous API response');
|
|
170
129
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
var headerParams = {};
|
|
182
|
-
var formParams = {};
|
|
183
|
-
var authNames = [];
|
|
184
|
-
var contentTypes = [];
|
|
185
|
-
var accepts = ['application/json'];
|
|
186
|
-
var returnType = this.constructor;
|
|
187
|
-
return this.apiClient.callApi(path, 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
130
|
+
return this._getLink(this.linkLast);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Get the current page number
|
|
135
|
+
* @return {Number} the current page number, starts at 0
|
|
136
|
+
*/
|
|
137
|
+
currentPage() {
|
|
138
|
+
if (this.page === null) {
|
|
139
|
+
return 0;
|
|
188
140
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
var link = _step.value;
|
|
200
|
-
if (link.hasOwnProperty('rel') && link.hasOwnProperty('href')) {
|
|
201
|
-
switch (link['rel']) {
|
|
202
|
-
case 'first':
|
|
203
|
-
obj.linkFirst = link['href'];
|
|
204
|
-
break;
|
|
205
|
-
case 'prev':
|
|
206
|
-
obj.linkPrev = link['href'];
|
|
207
|
-
break;
|
|
208
|
-
case 'next':
|
|
209
|
-
obj.linkNext = link['href'];
|
|
210
|
-
break;
|
|
211
|
-
case 'last':
|
|
212
|
-
obj.linkLast = link['href'];
|
|
213
|
-
break;
|
|
214
|
-
default:
|
|
215
|
-
break;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
} catch (err) {
|
|
220
|
-
_iterator.e(err);
|
|
221
|
-
} finally {
|
|
222
|
-
_iterator.f();
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
if (metadata.hasOwnProperty('totalAvailableResults')) {
|
|
226
|
-
obj.resultsTotal = metadata['totalAvailableResults'];
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
return obj;
|
|
141
|
+
return this.page;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Get the total number of pages
|
|
146
|
+
* @return {Number} the total number of pages available
|
|
147
|
+
*/
|
|
148
|
+
countPages() {
|
|
149
|
+
if (this.resultsPerPage === null || this.resultsTotal === null || this.resultsPerPage === 0) {
|
|
150
|
+
return 1;
|
|
230
151
|
}
|
|
231
|
-
|
|
232
|
-
}
|
|
152
|
+
return Math.ceil(this.resultsTotal / this.resultsPerPage);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Check if current page is first page
|
|
157
|
+
* @return {Boolean} True if current page is 0, false otherwise
|
|
158
|
+
*/
|
|
159
|
+
isFirstPage() {
|
|
160
|
+
return this.currentPage() === 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Check if current page is last page
|
|
165
|
+
* @return {Boolean} True if current page is countPages()-1, false otherwise
|
|
166
|
+
*/
|
|
167
|
+
isLastPage() {
|
|
168
|
+
return this.currentPage() === this.countPages() - 1;
|
|
169
|
+
}
|
|
170
|
+
populatePaginationMetadata(apiClient, page, resultsPerPage) {
|
|
171
|
+
this.apiClient = apiClient;
|
|
172
|
+
this.page = page;
|
|
173
|
+
this.resultsPerPage = resultsPerPage;
|
|
174
|
+
}
|
|
175
|
+
_getLink(path) {
|
|
176
|
+
// If no ApiClient defined, instantiate default one
|
|
177
|
+
if (this.apiClient === null) {
|
|
178
|
+
this.apiClient = _ApiClient.ApiClient.instance;
|
|
179
|
+
}
|
|
180
|
+
const postBody = {};
|
|
181
|
+
const pathParams = {};
|
|
182
|
+
const queryParams = {};
|
|
183
|
+
const headerParams = {};
|
|
184
|
+
const formParams = {};
|
|
185
|
+
const authNames = [];
|
|
186
|
+
const contentTypes = [];
|
|
187
|
+
const accepts = ['application/json'];
|
|
188
|
+
const returnType = this.constructor;
|
|
189
|
+
return this.apiClient.callApi(path, 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
233
193
|
/**
|
|
234
194
|
* The link to first page, if any
|
|
235
195
|
* @type {String}
|
|
236
196
|
* @memberOf Paginable
|
|
237
197
|
*/
|
|
198
|
+
exports.default = Paginable;
|
|
238
199
|
Paginable.prototype.linkFirst = null;
|
|
239
200
|
|
|
240
201
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -9,38 +8,36 @@ var _ApiClient = require("../ApiClient");
|
|
|
9
8
|
var _EndUser = _interopRequireDefault(require("../models/licensing/v4/agreements/EndUser"));
|
|
10
9
|
var _GetEulaApiResponse = _interopRequireDefault(require("../models/licensing/v4/agreements/GetEulaApiResponse"));
|
|
11
10
|
var _AddUserApiResponse = _interopRequireDefault(require("../models/licensing/v4/agreements/AddUserApiResponse"));
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : {
|
|
13
|
-
|
|
14
|
-
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; }
|
|
15
|
-
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; }
|
|
16
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
17
|
-
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); } }
|
|
18
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
-
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); }
|
|
21
|
-
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
22
|
-
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
23
|
-
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
24
|
-
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
25
|
-
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"); } /*
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/*
|
|
26
13
|
* Nutanix Licensing APIs
|
|
27
14
|
*
|
|
28
|
-
* OpenAPI spec version: 4.2
|
|
15
|
+
* OpenAPI spec version: 4.3.2
|
|
29
16
|
*
|
|
30
17
|
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
31
18
|
*
|
|
32
|
-
* Open API Dev Platform Codegen version: 17.
|
|
19
|
+
* Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE
|
|
33
20
|
*
|
|
34
21
|
* Do not edit the class manually.
|
|
35
22
|
*
|
|
36
23
|
*/
|
|
24
|
+
|
|
37
25
|
/**
|
|
38
26
|
* EndUserLicenseAgreement service.
|
|
39
|
-
* @version 4.2
|
|
27
|
+
* @version 4.3.2
|
|
40
28
|
* @class EndUserLicenseAgreementApi
|
|
41
29
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
class EndUserLicenseAgreementApi {
|
|
31
|
+
#headersToSkip;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Make the default {@link ApiClient} class available for developers to be able to extend it and bring
|
|
35
|
+
* their own fetch methods into the SDK
|
|
36
|
+
*/
|
|
37
|
+
static get ApiClient() {
|
|
38
|
+
return _ApiClient.ApiClient;
|
|
39
|
+
}
|
|
40
|
+
|
|
44
41
|
/**
|
|
45
42
|
* Constructs a new EndUserLicenseAgreementApi.
|
|
46
43
|
* @alias module:api/EndUserLicenseAgreementApi
|
|
@@ -48,15 +45,13 @@ var EndUserLicenseAgreementApi = exports.EndUserLicenseAgreementApi = /*#__PURE_
|
|
|
48
45
|
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
49
46
|
* default to {@link module:ApiClient#instance} if unspecified.
|
|
50
47
|
*/
|
|
51
|
-
|
|
52
|
-
_classCallCheck(this, EndUserLicenseAgreementApi);
|
|
53
|
-
_classPrivateFieldInitSpec(this, _headersToSkip, void 0);
|
|
48
|
+
constructor(apiClient) {
|
|
54
49
|
this.apiClient = apiClient || _ApiClient.ApiClient.instance;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
this.#headersToSkip = new Set();
|
|
51
|
+
this.#headersToSkip.add('authorization');
|
|
52
|
+
this.#headersToSkip.add('cookie');
|
|
53
|
+
this.#headersToSkip.add('host');
|
|
54
|
+
this.#headersToSkip.add('user-agent');
|
|
60
55
|
}
|
|
61
56
|
|
|
62
57
|
/**
|
|
@@ -66,76 +61,64 @@ var EndUserLicenseAgreementApi = exports.EndUserLicenseAgreementApi = /*#__PURE_
|
|
|
66
61
|
* @param {Object} args Additional Arguments
|
|
67
62
|
* @return {Promise<AddUserApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link AddUserApiResponse } and HTTP response
|
|
68
63
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
postBody = body.toJson();
|
|
77
|
-
} else {
|
|
78
|
-
postBody = body;
|
|
79
|
-
}
|
|
80
|
-
// verify the required parameter 'body' is set
|
|
81
|
-
if (typeof postBody === 'undefined' || postBody === null) {
|
|
82
|
-
throw new Error("Invalid body when calling addUser");
|
|
83
|
-
}
|
|
84
|
-
var pathParams = {};
|
|
85
|
-
var queryParams = {};
|
|
86
|
-
var headersToInclude = {};
|
|
87
|
-
Object.keys(argMap).forEach(function (header) {
|
|
88
|
-
if (!_classPrivateFieldGet(_headersToSkip, _this).has(header.toLowerCase())) {
|
|
89
|
-
headersToInclude[header] = argMap[header];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
var headerParams = _objectSpread({}, headersToInclude);
|
|
93
|
-
var formParams = {};
|
|
94
|
-
_ApiClient.ApiClient.addEtagReferenceToHeader(body, headerParams);
|
|
95
|
-
var authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];
|
|
96
|
-
var contentTypes = ['application/json'];
|
|
97
|
-
var accepts = ['application/json'];
|
|
98
|
-
var returnType = _AddUserApiResponse["default"];
|
|
99
|
-
return this.apiClient.callApi('/api/licensing/v4.2/agreements/eula/$actions/add-user', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Get End User License Agreement
|
|
104
|
-
* API to fetch active End User License Agreement.
|
|
105
|
-
* @param {Object} args Additional Arguments
|
|
106
|
-
* @return {Promise<GetEulaApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetEulaApiResponse } and HTTP response
|
|
107
|
-
*/
|
|
108
|
-
}, {
|
|
109
|
-
key: "getEula",
|
|
110
|
-
value: function getEula() {
|
|
111
|
-
var _this2 = this;
|
|
112
|
-
var argMap = arguments.length > 0 ? arguments.length <= 0 ? undefined : arguments[0] : {};
|
|
113
|
-
var postBody = null;
|
|
114
|
-
var pathParams = {};
|
|
115
|
-
var queryParams = {};
|
|
116
|
-
var headersToInclude = {};
|
|
117
|
-
Object.keys(argMap).forEach(function (header) {
|
|
118
|
-
if (!_classPrivateFieldGet(_headersToSkip, _this2).has(header.toLowerCase())) {
|
|
119
|
-
headersToInclude[header] = argMap[header];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
var headerParams = _objectSpread({}, headersToInclude);
|
|
123
|
-
var formParams = {};
|
|
124
|
-
var authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];
|
|
125
|
-
var contentTypes = [];
|
|
126
|
-
var accepts = ['application/json'];
|
|
127
|
-
var returnType = _GetEulaApiResponse["default"];
|
|
128
|
-
return this.apiClient.callApi('/api/licensing/v4.2/agreements/eula', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
64
|
+
addUser(body, ...args) {
|
|
65
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
66
|
+
let postBody = null;
|
|
67
|
+
if (body instanceof _EndUser.default && typeof body.toJson === 'function') {
|
|
68
|
+
postBody = body.toJson();
|
|
69
|
+
} else {
|
|
70
|
+
postBody = body;
|
|
129
71
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Make the default {@link ApiClient} class available for developers to be able to extend it and bring
|
|
135
|
-
* their own fetch methods into the SDK
|
|
136
|
-
*/
|
|
137
|
-
function get() {
|
|
138
|
-
return _ApiClient.ApiClient;
|
|
72
|
+
// verify the required parameter 'body' is set
|
|
73
|
+
if (typeof postBody === 'undefined' || postBody === null) {
|
|
74
|
+
throw new Error("Invalid body when calling addUser");
|
|
139
75
|
}
|
|
140
|
-
|
|
141
|
-
}
|
|
76
|
+
const pathParams = {};
|
|
77
|
+
const queryParams = {};
|
|
78
|
+
let headersToInclude = {};
|
|
79
|
+
Object.keys(argMap).forEach(header => {
|
|
80
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
81
|
+
headersToInclude[header] = argMap[header];
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
const headerParams = {
|
|
85
|
+
...headersToInclude
|
|
86
|
+
};
|
|
87
|
+
const formParams = {};
|
|
88
|
+
_ApiClient.ApiClient.addEtagReferenceToHeader(body, headerParams);
|
|
89
|
+
const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];
|
|
90
|
+
const contentTypes = ['application/json'];
|
|
91
|
+
const accepts = ['application/json'];
|
|
92
|
+
const returnType = _AddUserApiResponse.default;
|
|
93
|
+
return this.apiClient.callApi('/api/licensing/v4.3/agreements/eula/$actions/add-user', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Get End User License Agreement
|
|
98
|
+
* API to fetch active End User License Agreement.
|
|
99
|
+
* @param {Object} args Additional Arguments
|
|
100
|
+
* @return {Promise<GetEulaApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetEulaApiResponse } and HTTP response
|
|
101
|
+
*/
|
|
102
|
+
getEula(...args) {
|
|
103
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
104
|
+
const postBody = null;
|
|
105
|
+
const pathParams = {};
|
|
106
|
+
const queryParams = {};
|
|
107
|
+
let headersToInclude = {};
|
|
108
|
+
Object.keys(argMap).forEach(header => {
|
|
109
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
110
|
+
headersToInclude[header] = argMap[header];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
const headerParams = {
|
|
114
|
+
...headersToInclude
|
|
115
|
+
};
|
|
116
|
+
const formParams = {};
|
|
117
|
+
const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];
|
|
118
|
+
const contentTypes = [];
|
|
119
|
+
const accepts = ['application/json'];
|
|
120
|
+
const returnType = _GetEulaApiResponse.default;
|
|
121
|
+
return this.apiClient.callApi('/api/licensing/v4.3/agreements/eula', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.EndUserLicenseAgreementApi = EndUserLicenseAgreementApi;
|