@sitecore/sc-contenthub-webclient-sdk 1.1.0 → 1.2.0
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 +35 -7
- package/dist/api/api-info-resource.js +9 -8
- package/dist/api/api-info.js +1 -0
- package/dist/api/api-resource.js +2 -1
- package/dist/api/api-routes-dictionary.js +1 -0
- package/dist/authentication/oauth-grant-base.js +5 -4
- package/dist/authentication/oauth-grant-type.js +1 -0
- package/dist/authentication/oauth-password-grant.js +5 -4
- package/dist/authentication/oauth-refreshtoken-grant.js +4 -3
- package/dist/authentication/token-info.js +6 -5
- package/dist/base-types.js +1 -0
- package/dist/caches/culture-cache.js +1 -0
- package/dist/caches/entity-definition-cache.d.ts +21 -7
- package/dist/caches/entity-definition-cache.js +38 -21
- package/dist/clients/aggregates-client.d.ts +27 -3
- package/dist/clients/aggregates-client.js +4 -3
- package/dist/clients/api-client.js +3 -2
- package/dist/clients/assets-client.d.ts +16 -0
- package/dist/clients/assets-client.js +43 -0
- package/dist/clients/commands-client.d.ts +7 -4
- package/dist/clients/commands-client.js +5 -4
- package/dist/clients/content-hub-client.d.ts +3 -0
- package/dist/clients/content-hub-client.js +3 -0
- package/dist/clients/culture-client.js +1 -0
- package/dist/clients/culture-loader.js +1 -0
- package/dist/clients/entities-client.d.ts +44 -29
- package/dist/clients/entities-client.js +44 -30
- package/dist/clients/entity-definitions-client.d.ts +55 -17
- package/dist/clients/entity-definitions-client.js +58 -57
- package/dist/clients/extended-client.js +1 -0
- package/dist/clients/internal-client.d.ts +17 -2
- package/dist/clients/internal-client.js +17 -3
- package/dist/clients/notifications-client.js +1 -0
- package/dist/clients/option-list-client.d.ts +19 -12
- package/dist/clients/option-list-client.js +13 -12
- package/dist/clients/pages-client.d.ts +13 -6
- package/dist/clients/pages-client.js +9 -8
- package/dist/clients/permissions-client.js +1 -0
- package/dist/clients/policies-client.js +3 -21
- package/dist/clients/querying-client.d.ts +58 -11
- package/dist/clients/querying-client.js +43 -8
- package/dist/clients/raw-client.d.ts +11 -18
- package/dist/clients/raw-client.js +11 -10
- package/dist/clients/request-message.js +1 -0
- package/dist/clients/response-handler.js +8 -26
- package/dist/clients/response-message.js +1 -0
- package/dist/clients/schema-querying.d.ts +4 -3
- package/dist/clients/schema-querying.js +6 -4
- package/dist/clients/search-client.d.ts +7 -4
- package/dist/clients/search-client.js +5 -4
- package/dist/clients/settings-client.d.ts +8 -0
- package/dist/clients/settings-client.js +13 -0
- package/dist/clients/upload-client.d.ts +5 -2
- package/dist/clients/upload-client.js +36 -17
- package/dist/clients/users-client.js +1 -0
- package/dist/clients/version-checker.js +2 -1
- package/dist/clients/web-content-hub-client.js +1 -0
- package/dist/constants/api.d.ts +26 -3
- package/dist/constants/api.js +28 -4
- package/dist/constants/defaults.js +2 -1
- package/dist/constants/definitions.d.ts +10 -0
- package/dist/constants/definitions.js +14 -1
- package/dist/constants/index.js +2 -1
- package/dist/constants/notifications.js +1 -0
- package/dist/contracts/base/culture-insensitive-property.js +1 -0
- package/dist/contracts/base/culture-sensitive-property.js +1 -0
- package/dist/contracts/base/data-type.js +1 -0
- package/dist/contracts/base/entity-base.d.ts +7 -0
- package/dist/contracts/base/entity-base.js +57 -32
- package/dist/contracts/base/entity-construction-args.js +1 -0
- package/dist/contracts/base/entity-definition.d.ts +5 -0
- package/dist/contracts/base/entity-definition.js +20 -18
- package/dist/contracts/base/entity.d.ts +30 -1
- package/dist/contracts/base/entity.js +4 -3
- package/dist/contracts/base/index.js +2 -1
- package/dist/contracts/base/json-content-type.js +1 -0
- package/dist/contracts/base/lazy-loading-manager.js +1 -0
- package/dist/contracts/base/member-condition.js +11 -10
- package/dist/contracts/base/member-definition-type.js +1 -0
- package/dist/contracts/base/member-definition.js +14 -13
- package/dist/contracts/base/member-group.js +12 -11
- package/dist/contracts/base/member.js +1 -0
- package/dist/contracts/base/option-lists/flat-option-list-value.js +1 -0
- package/dist/contracts/base/option-lists/flat-option-list.js +1 -0
- package/dist/contracts/base/option-lists/hierarchical-option-list.js +1 -0
- package/dist/contracts/base/option-lists/hierarchical-options-list-value.js +1 -0
- package/dist/contracts/base/option-lists/option-list-base.js +1 -0
- package/dist/contracts/base/option-lists/option-list-type.js +1 -0
- package/dist/contracts/base/option-lists/option-list-value-base.js +1 -0
- package/dist/contracts/base/option-lists/option-list-value.js +1 -0
- package/dist/contracts/base/option-lists/option-list.js +1 -0
- package/dist/contracts/base/property-definition.js +13 -12
- package/dist/contracts/base/property-definitions/boolean-property-definition.js +3 -2
- package/dist/contracts/base/property-definitions/datetime-property-definition.js +3 -2
- package/dist/contracts/base/property-definitions/datetimeoffset-property-definition.js +3 -2
- package/dist/contracts/base/property-definitions/decimal-property-definition.js +3 -2
- package/dist/contracts/base/property-definitions/index.js +2 -1
- package/dist/contracts/base/property-definitions/integer-property-definition.js +3 -2
- package/dist/contracts/base/property-definitions/json-property-definition.js +4 -3
- package/dist/contracts/base/property-definitions/long-property-definition.js +3 -2
- package/dist/contracts/base/property-definitions/string-property-definition.js +5 -4
- package/dist/contracts/base/property-manager.js +1 -0
- package/dist/contracts/base/property.js +1 -0
- package/dist/contracts/base/related-path.js +1 -0
- package/dist/contracts/base/relation-cardinality.js +1 -0
- package/dist/contracts/base/relation-container.js +5 -4
- package/dist/contracts/base/relation-definition.js +23 -22
- package/dist/contracts/base/relation-manager.d.ts +1 -1
- package/dist/contracts/base/relation-manager.js +6 -6
- package/dist/contracts/base/relation-role.js +1 -0
- package/dist/contracts/base/relation.d.ts +16 -3
- package/dist/contracts/base/relation.js +28 -3
- package/dist/contracts/base/relations/child-to-many-parents-relation.d.ts +4 -1
- package/dist/contracts/base/relations/child-to-many-parents-relation.js +33 -2
- package/dist/contracts/base/relations/child-to-one-parent-relation.d.ts +3 -1
- package/dist/contracts/base/relations/child-to-one-parent-relation.js +27 -2
- package/dist/contracts/base/relations/parent-to-many-children-relation.d.ts +4 -1
- package/dist/contracts/base/relations/parent-to-many-children-relation.js +33 -2
- package/dist/contracts/base/relations/parent-to-one-child-relation.d.ts +3 -1
- package/dist/contracts/base/relations/parent-to-one-child-relation.js +27 -2
- package/dist/contracts/base/relations/to-many-relation.d.ts +10 -0
- package/dist/contracts/base/relations/to-many-relation.js +1 -0
- package/dist/contracts/base/relations/to-one-relation.d.ts +5 -0
- package/dist/contracts/base/relations/to-one-relation.js +1 -0
- package/dist/contracts/base/rendition.js +1 -0
- package/dist/contracts/base/resource.js +1 -0
- package/dist/contracts/base/string-content-type.js +1 -0
- package/dist/contracts/base/typed-entity.js +1 -0
- package/dist/contracts/base/users.js +1 -0
- package/dist/contracts/base/view-mode.js +1 -0
- package/dist/contracts/content/asset.js +1 -0
- package/dist/contracts/content/final-life-cycle-status.js +1 -0
- package/dist/contracts/dirty-tracking/dirty-tracking.js +1 -0
- package/dist/contracts/notifications/mail-template.js +1 -0
- package/dist/contracts/policies/condition.js +1 -0
- package/dist/contracts/policies/member-policy.js +1 -0
- package/dist/contracts/policies/policy.js +1 -0
- package/dist/contracts/policies/rule-type.js +1 -0
- package/dist/contracts/policies/rule.js +1 -0
- package/dist/contracts/policies/user-group-policy.js +2 -0
- package/dist/contracts/policies/user-policy.js +2 -0
- package/dist/contracts/querying/culture-load-option.js +5 -4
- package/dist/contracts/querying/entity-definition-id-iterator.js +1 -0
- package/dist/contracts/querying/entity-definition-id-query-result.js +1 -0
- package/dist/contracts/querying/entity-definition-iterator.js +1 -0
- package/dist/contracts/querying/entity-definition-query-result.js +1 -0
- package/dist/contracts/querying/entity-iterator.js +1 -0
- package/dist/contracts/querying/entity-load-configuration-builder.js +1 -0
- package/dist/contracts/querying/entity-load-configuration.js +5 -4
- package/dist/contracts/querying/entity-load-option.js +9 -8
- package/dist/contracts/querying/entity-query-result.js +1 -0
- package/dist/contracts/querying/filters/comparison-operator.js +1 -0
- package/dist/contracts/querying/filters/composite-filter-operator.js +1 -0
- package/dist/contracts/querying/filters/composite-query-filter.js +7 -6
- package/dist/contracts/querying/filters/createdby-query-filter.js +4 -3
- package/dist/contracts/querying/filters/createdon-query-filter.js +7 -6
- package/dist/contracts/querying/filters/definition-query-filter.js +11 -10
- package/dist/contracts/querying/filters/filter-data-type.js +1 -0
- package/dist/contracts/querying/filters/filter-type.js +1 -0
- package/dist/contracts/querying/filters/id-query-filter.js +8 -7
- package/dist/contracts/querying/filters/identifier-query-filter.js +8 -7
- package/dist/contracts/querying/filters/index.js +2 -1
- package/dist/contracts/querying/filters/modifiedby-query-filter.js +4 -3
- package/dist/contracts/querying/filters/modifiedon-query-filter.js +7 -6
- package/dist/contracts/querying/filters/modules-query-filter.js +5 -4
- package/dist/contracts/querying/filters/not-query-filter.js +5 -4
- package/dist/contracts/querying/filters/property-query-filter.js +11 -10
- package/dist/contracts/querying/filters/query-filter.js +4 -3
- package/dist/contracts/querying/filters/relation-connection-type.js +1 -0
- package/dist/contracts/querying/filters/relation-query-filter.js +8 -7
- package/dist/contracts/querying/filters/secured-ancestors-query-filter.js +8 -7
- package/dist/contracts/querying/filters/user-query-filter.js +11 -10
- package/dist/contracts/querying/id-iterator.js +1 -0
- package/dist/contracts/querying/id-query-result.js +1 -0
- package/dist/contracts/querying/iterator.js +1 -0
- package/dist/contracts/querying/load-option.js +1 -0
- package/dist/contracts/querying/load-options.js +1 -0
- package/dist/contracts/querying/loading-query-iterator.js +1 -0
- package/dist/contracts/querying/member-load-option.js +1 -0
- package/dist/contracts/querying/minimal-schema.js +7 -6
- package/dist/contracts/querying/property-data.js +7 -6
- package/dist/contracts/querying/property-load-option.js +5 -4
- package/dist/contracts/querying/query-iterator.js +1 -0
- package/dist/contracts/querying/query-load-configuration.js +9 -8
- package/dist/contracts/querying/query-request.js +3 -2
- package/dist/contracts/querying/query-result-paging-manager.js +1 -0
- package/dist/contracts/querying/query-result.js +1 -0
- package/dist/contracts/querying/query-sort-order.js +1 -0
- package/dist/contracts/querying/query.js +8 -7
- package/dist/contracts/querying/relation-data.js +6 -5
- package/dist/contracts/querying/relation-load-option.js +5 -4
- package/dist/contracts/querying/relation-specification.js +5 -4
- package/dist/contracts/querying/schema-querying.js +1 -0
- package/dist/contracts/querying/scroll-request.js +5 -4
- package/dist/contracts/querying/skip-take-iterator-base.js +1 -0
- package/dist/contracts/querying/sort-field-type.js +1 -0
- package/dist/contracts/querying/sorting.js +6 -5
- package/dist/contracts/upload/upload-source.js +1 -0
- package/dist/contracts/users/user-group-combine-method.js +1 -0
- package/dist/contracts/users/user-group-configuration.js +7 -6
- package/dist/contracts/users/user-profile.js +1 -0
- package/dist/contracts/users/user.js +1 -0
- package/dist/converters/aggregated-entity-relations-converter.js +1 -0
- package/dist/converters/all-facet-values-children-converter.js +1 -0
- package/dist/converters/api-resource-converter.js +2 -0
- package/dist/converters/date-converter.js +1 -0
- package/dist/converters/file-version-converter.js +1 -0
- package/dist/converters/index.js +2 -1
- package/dist/converters/member-condition-converter.js +1 -0
- package/dist/converters/member-condition-resource-converter.js +1 -0
- package/dist/converters/minimal-schema-relation-cardinality-converter.js +1 -0
- package/dist/converters/page-resource-menus-converter.js +1 -0
- package/dist/converters/page-resource-zones-converter.js +1 -0
- package/dist/converters/relation-map-resource-converter.js +1 -0
- package/dist/converters/relation-resource-converter.js +1 -0
- package/dist/converters/renditions-converter.js +1 -0
- package/dist/converters/string-to-any-map-converter.js +1 -0
- package/dist/culture-info.js +1 -0
- package/dist/dirty-value-calculator.js +1 -0
- package/dist/entity-link.js +7 -6
- package/dist/error-messages.d.ts +0 -3
- package/dist/error-messages.js +1 -3
- package/dist/errors/argument-error.js +1 -0
- package/dist/errors/authentication-error.js +1 -0
- package/dist/errors/bad-request-error.js +1 -0
- package/dist/errors/forbidden-error.js +1 -0
- package/dist/errors/internal-error.js +1 -0
- package/dist/errors/invalid-operation-error.js +1 -0
- package/dist/errors/not-found-error.js +1 -0
- package/dist/errors/not-implemented-error.js +1 -0
- package/dist/errors/not-loaded-error.js +1 -0
- package/dist/errors/not-supported-error.js +1 -0
- package/dist/errors/schema-error.js +1 -0
- package/dist/errors/validation-error.js +1 -0
- package/dist/errors/validation-failure.js +1 -0
- package/dist/errors/web-api-error.js +1 -0
- package/dist/factories/entity-factory.js +2 -1
- package/dist/factories/option-list-factory.js +1 -0
- package/dist/factories/property-factory.js +3 -2
- package/dist/factories/relation-factory.js +5 -4
- package/dist/fileversion.js +1 -0
- package/dist/guard.d.ts +10 -10
- package/dist/guard.js +3 -0
- package/dist/http-method.js +1 -0
- package/dist/index.js +2 -1
- package/dist/link-helper.d.ts +40 -16
- package/dist/link-helper.js +82 -10
- package/dist/link.js +5 -4
- package/dist/logging/log-level.js +1 -0
- package/dist/logging/logger-base.js +1 -0
- package/dist/logging/logger.js +1 -0
- package/dist/logging/null-logger.js +3 -0
- package/dist/mappers/api-resource-mapper.js +1 -0
- package/dist/mappers/condition-mapper.js +1 -0
- package/dist/mappers/entity-copy-options-mapper.d.ts +6 -0
- package/dist/mappers/entity-copy-options-mapper.js +42 -0
- package/dist/mappers/entity-definition-mapper.js +7 -2
- package/dist/mappers/entity-mapper.js +14 -0
- package/dist/mappers/filter-operator-mapper.js +1 -0
- package/dist/mappers/final-life-cycle-status-mapper.js +3 -2
- package/dist/mappers/load-options-mapper.js +1 -0
- package/dist/mappers/mapping-utilities.js +1 -0
- package/dist/mappers/member-condition-mapper.js +3 -2
- package/dist/mappers/member-definition-mapper.js +4 -3
- package/dist/mappers/member-group-mapper.js +1 -0
- package/dist/mappers/member-security-mapper.js +1 -0
- package/dist/mappers/notification-mapper.js +1 -0
- package/dist/mappers/option-list-mapper.js +2 -1
- package/dist/mappers/policy-mapper.js +1 -0
- package/dist/mappers/property-mapper.js +2 -1
- package/dist/mappers/querying-mapper.js +1 -0
- package/dist/mappers/related-path-mapper.js +1 -0
- package/dist/mappers/relation-cardinality-mapper.js +1 -0
- package/dist/mappers/relation-mapper.js +8 -7
- package/dist/mappers/relation-role-mapper.js +3 -2
- package/dist/mappers/rendition-mapper.js +1 -0
- package/dist/mappers/rule-type-mapper.js +1 -0
- package/dist/mappers/rules-mapper.js +1 -0
- package/dist/mappers/typed-entity-creator.js +1 -0
- package/dist/models/aggregate-resources/aggregate-resource.d.ts +2 -1
- package/dist/models/aggregate-resources/aggregate-resource.js +12 -7
- package/dist/models/aggregate-resources/aggregated-entity-resource.js +5 -4
- package/dist/models/content/entity-copy-options-builder.d.ts +112 -0
- package/dist/models/content/entity-copy-options-builder.js +91 -0
- package/dist/models/content/entity-copy-options.d.ts +60 -0
- package/dist/models/content/entity-copy-options.js +14 -0
- package/dist/models/content/property-copy-method.d.ts +21 -0
- package/dist/models/content/property-copy-method.js +26 -0
- package/dist/models/content/property-copy-option.d.ts +34 -0
- package/dist/models/content/property-copy-option.js +12 -0
- package/dist/models/content/relation-copy-method.d.ts +21 -0
- package/dist/models/content/relation-copy-method.js +26 -0
- package/dist/models/content/relation-copy-option.d.ts +35 -0
- package/dist/models/content/relation-copy-option.js +12 -0
- package/dist/models/entity-copy-options-resource.d.ts +28 -0
- package/dist/models/entity-copy-options-resource.js +47 -0
- package/dist/models/entity-definition-collection-resource.js +4 -3
- package/dist/models/entity-definition-resource.d.ts +1 -1
- package/dist/models/entity-definition-resource.js +23 -21
- package/dist/models/entity-list-resource.js +4 -3
- package/dist/models/entity-path.d.ts +4 -0
- package/dist/models/entity-path.js +24 -0
- package/dist/models/entity-resource.d.ts +8 -0
- package/dist/models/entity-resource.js +70 -39
- package/dist/models/list-resource.js +10 -9
- package/dist/models/member-condition-resource.js +10 -9
- package/dist/models/member-definition-resource.js +16 -15
- package/dist/models/member-group-resource.js +13 -12
- package/dist/models/notifications/distribute-notification-resource.js +7 -6
- package/dist/models/notifications/mail-request-broadcast.js +1 -0
- package/dist/models/notifications/mail-request-by-id.js +1 -0
- package/dist/models/notifications/mail-request-by-username.js +1 -0
- package/dist/models/notifications/mail-request.js +1 -0
- package/dist/models/notifications/notification-level.js +1 -0
- package/dist/models/notifications/realtime-request-broadcast.js +1 -0
- package/dist/models/notifications/realtime-request-by-id.js +1 -0
- package/dist/models/notifications/realtime-request-by-username.js +1 -0
- package/dist/models/notifications/realtime-request.js +1 -0
- package/dist/models/notifications/request-by-id.js +1 -0
- package/dist/models/notifications/request-by-username.js +1 -0
- package/dist/models/notifications/validators/mail-validator.js +1 -0
- package/dist/models/notifications/validators/realtime-validator.js +1 -0
- package/dist/models/notifications/validators/request-by-id-validator.js +1 -0
- package/dist/models/notifications/validators/request-by-username-validator.js +1 -0
- package/dist/models/notifications/validators/validator-base.js +1 -0
- package/dist/models/option-lists/flat-option-list-value.js +1 -0
- package/dist/models/option-lists/hierarchical-options-list-value.js +1 -0
- package/dist/models/option-lists/option-list-collection-resource.js +5 -4
- package/dist/models/option-lists/option-list-description-resource.js +5 -4
- package/dist/models/option-lists/option-list-resource.js +12 -11
- package/dist/models/option-lists/option-list-value-resource.js +6 -5
- package/dist/models/pages/component-visualization.js +9 -8
- package/dist/models/pages/language-resource.js +7 -6
- package/dist/models/pages/menu-item.js +12 -11
- package/dist/models/pages/page-component-resource.js +18 -17
- package/dist/models/pages/page-resource.js +21 -20
- package/dist/models/pages/page-row-settings.js +26 -25
- package/dist/models/pages/portal-column-resource.js +5 -4
- package/dist/models/pages/portal-row-resource.js +5 -4
- package/dist/models/pages/portal-section-resource.js +5 -4
- package/dist/models/permissions-resource.js +4 -3
- package/dist/models/policies/condition-resource.js +6 -5
- package/dist/models/policies/member-policy-resource.js +6 -5
- package/dist/models/policies/policy-resource.js +16 -15
- package/dist/models/policies/rule-resource.js +12 -11
- package/dist/models/property-copy-option-resource.d.ts +19 -0
- package/dist/models/property-copy-option-resource.js +41 -0
- package/dist/models/property-definition-resource.js +35 -34
- package/dist/models/query-loading-resource.d.ts +5 -0
- package/dist/models/query-loading-resource.js +9 -3
- package/dist/models/query-result-resource.js +6 -5
- package/dist/models/relation-copy-option-resource.d.ts +20 -0
- package/dist/models/relation-copy-option-resource.js +41 -0
- package/dist/models/relation-definition-resource.js +23 -22
- package/dist/models/relation-map-resource.js +2 -1
- package/dist/models/relation-resource.js +13 -12
- package/dist/models/resource-containers/entity-definition-resource-container.js +1 -0
- package/dist/models/resource-containers/entity-resource-container.js +1 -0
- package/dist/models/resource.js +3 -2
- package/dist/models/search/aggregation-request-resource.js +13 -12
- package/dist/models/search/aggregation-response-resource.js +7 -6
- package/dist/models/search/all-facet-values-response.js +6 -5
- package/dist/models/search/all-facets-request.d.ts +3 -0
- package/dist/models/search/all-facets-request.js +17 -8
- package/dist/models/search/bucket-response-resource.js +8 -7
- package/dist/models/search/date-interval.js +1 -0
- package/dist/models/search/facet-response-resource.js +20 -19
- package/dist/models/search/field-filter-request-resource.js +14 -13
- package/dist/models/search/field-filter-response-resource.js +17 -16
- package/dist/models/search/field-filter-value-response-resource.js +5 -4
- package/dist/models/search/filter-operator.js +1 -0
- package/dist/models/search/full-text-response-resource.js +4 -3
- package/dist/models/search/group-category.js +6 -5
- package/dist/models/search/group-config.js +4 -3
- package/dist/models/search/group-item.js +7 -6
- package/dist/models/search/grouped-view-response-resource.js +12 -11
- package/dist/models/search/metric-option-request-resource.js +5 -4
- package/dist/models/search/metric-option-response-resource.js +5 -4
- package/dist/models/search/nested-relation-info.js +9 -8
- package/dist/models/search/requested-aggregation-type.js +1 -0
- package/dist/models/search/requested-filter-type.js +1 -0
- package/dist/models/search/search-group-request-resource.d.ts +1 -0
- package/dist/models/search/search-group-request-resource.js +8 -3
- package/dist/models/search/search-request.d.ts +2 -0
- package/dist/models/search/search-request.js +37 -28
- package/dist/models/search/search-response.js +24 -23
- package/dist/models/search/selection-pool-filter-resource.js +6 -5
- package/dist/models/search/sorting-request-resource.js +4 -3
- package/dist/models/search/sorting-response-resource.js +5 -4
- package/dist/models/search-document-resource.js +4 -3
- package/dist/models/set-password-request-resource.js +3 -2
- package/dist/models/setting-resource.d.ts +9 -0
- package/dist/models/setting-resource.js +40 -0
- package/dist/models/upload/array-buffer-upload-source.d.ts +8 -0
- package/dist/models/upload/array-buffer-upload-source.js +19 -15
- package/dist/models/upload/create-upload-response.js +5 -4
- package/dist/models/upload/http-upload-source.js +1 -0
- package/dist/models/upload/local-upload-source.js +2 -0
- package/dist/models/upload/upload-action.js +4 -3
- package/dist/models/upload/upload-configuration.js +4 -3
- package/dist/models/upload/upload-request-wrapper.js +8 -7
- package/dist/models/upload/upload-request.js +1 -0
- package/dist/models/user-entity-permissions-resource.js +13 -12
- package/dist/models/versionining/compatibility.js +1 -0
- package/dist/settings/fetch-setting.js +17 -16
- package/dist/settings/super-user-excluded-privileges.js +4 -3
- package/dist/settings/usage-rights-configuration.js +18 -17
- package/dist/type-guards.js +1 -0
- package/dist/utilities/array-utilities.js +1 -0
- package/package.json +20 -21
|
@@ -26,8 +26,9 @@ let LongPropertyDefinition = class LongPropertyDefinition extends property_defin
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
LongPropertyDefinition = __decorate([
|
|
29
|
-
ta_json_1.JsonObject(),
|
|
30
|
-
ta_json_1.JsonDiscriminatorValue(data_type_1.default.Long),
|
|
29
|
+
(0, ta_json_1.JsonObject)(),
|
|
30
|
+
(0, ta_json_1.JsonDiscriminatorValue)(data_type_1.default.Long),
|
|
31
31
|
__metadata("design:paramtypes", [String, Object])
|
|
32
32
|
], LongPropertyDefinition);
|
|
33
33
|
exports.LongPropertyDefinition = LongPropertyDefinition;
|
|
34
|
+
//# sourceMappingURL=long-property-definition.js.map
|
|
@@ -40,16 +40,17 @@ let StringPropertyDefinition = class StringPropertyDefinition extends property_d
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
__decorate([
|
|
43
|
-
ta_json_1.JsonProperty("content_type"),
|
|
43
|
+
(0, ta_json_1.JsonProperty)("content_type"),
|
|
44
44
|
__metadata("design:type", String)
|
|
45
45
|
], StringPropertyDefinition.prototype, "contentType", void 0);
|
|
46
46
|
__decorate([
|
|
47
|
-
ta_json_1.JsonProperty("validation_expression"),
|
|
47
|
+
(0, ta_json_1.JsonProperty)("validation_expression"),
|
|
48
48
|
__metadata("design:type", Object)
|
|
49
49
|
], StringPropertyDefinition.prototype, "validationExpression", void 0);
|
|
50
50
|
StringPropertyDefinition = __decorate([
|
|
51
|
-
ta_json_1.JsonObject(),
|
|
52
|
-
ta_json_1.JsonDiscriminatorValue(data_type_1.default.String),
|
|
51
|
+
(0, ta_json_1.JsonObject)(),
|
|
52
|
+
(0, ta_json_1.JsonDiscriminatorValue)(data_type_1.default.String),
|
|
53
53
|
__metadata("design:paramtypes", [String, Object])
|
|
54
54
|
], StringPropertyDefinition);
|
|
55
55
|
exports.StringPropertyDefinition = StringPropertyDefinition;
|
|
56
|
+
//# sourceMappingURL=string-property-definition.js.map
|
|
@@ -46,7 +46,7 @@ class RelationContainer {
|
|
|
46
46
|
getRelation(role) {
|
|
47
47
|
if (role == null) {
|
|
48
48
|
if (this.isSelfRelation) {
|
|
49
|
-
throw new Error(string_format_1.default(error_messages_1.default.Entity.SelfReferencingRelation, this.relationName));
|
|
49
|
+
throw new Error((0, string_format_1.default)(error_messages_1.default.Entity.SelfReferencingRelation, this.relationName));
|
|
50
50
|
}
|
|
51
51
|
if (this.parentRelation != null) {
|
|
52
52
|
return this.parentRelation;
|
|
@@ -62,7 +62,7 @@ class RelationContainer {
|
|
|
62
62
|
return this.childRelation;
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
|
-
throw new Error(string_format_1.default(error_messages_1.default.RelationRoleMapper.UnknownRole, role));
|
|
65
|
+
throw new Error((0, string_format_1.default)(error_messages_1.default.RelationRoleMapper.UnknownRole, role));
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
@@ -93,7 +93,7 @@ class RelationContainer {
|
|
|
93
93
|
return this.childRelation != null;
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
96
|
-
throw new Error(string_format_1.default(error_messages_1.default.RelationRoleMapper.UnknownRole, role));
|
|
96
|
+
throw new Error((0, string_format_1.default)(error_messages_1.default.RelationRoleMapper.UnknownRole, role));
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
@@ -111,8 +111,9 @@ class RelationContainer {
|
|
|
111
111
|
this._childRelation = relation;
|
|
112
112
|
}
|
|
113
113
|
else {
|
|
114
|
-
throw new Error(string_format_1.default(error_messages_1.default.RelationRoleMapper.UnknownRole, relation.role));
|
|
114
|
+
throw new Error((0, string_format_1.default)(error_messages_1.default.RelationRoleMapper.UnknownRole, relation.role));
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
exports.RelationContainer = RelationContainer;
|
|
119
|
+
//# sourceMappingURL=relation-container.js.map
|
|
@@ -36,85 +36,86 @@ let RelationDefinition = class RelationDefinition extends member_definition_1.Me
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
__decorate([
|
|
39
|
-
ta_json_1.JsonProperty("role"),
|
|
39
|
+
(0, ta_json_1.JsonProperty)("role"),
|
|
40
40
|
__metadata("design:type", Number)
|
|
41
41
|
], RelationDefinition.prototype, "role", void 0);
|
|
42
42
|
__decorate([
|
|
43
|
-
ta_json_1.JsonProperty("cardinality"),
|
|
43
|
+
(0, ta_json_1.JsonProperty)("cardinality"),
|
|
44
44
|
__metadata("design:type", Number)
|
|
45
45
|
], RelationDefinition.prototype, "cardinality", void 0);
|
|
46
46
|
__decorate([
|
|
47
|
-
ta_json_1.JsonProperty("associated_entitydefinition"),
|
|
47
|
+
(0, ta_json_1.JsonProperty)("associated_entitydefinition"),
|
|
48
48
|
__metadata("design:type", String)
|
|
49
49
|
], RelationDefinition.prototype, "associatedEntityDefinitionName", void 0);
|
|
50
50
|
__decorate([
|
|
51
|
-
ta_json_1.JsonProperty("child_is_mandatory"),
|
|
51
|
+
(0, ta_json_1.JsonProperty)("child_is_mandatory"),
|
|
52
52
|
__metadata("design:type", Boolean)
|
|
53
53
|
], RelationDefinition.prototype, "childIsMandatory", void 0);
|
|
54
54
|
__decorate([
|
|
55
|
-
ta_json_1.JsonProperty("parent_is_mandatory"),
|
|
55
|
+
(0, ta_json_1.JsonProperty)("parent_is_mandatory"),
|
|
56
56
|
__metadata("design:type", Boolean)
|
|
57
57
|
], RelationDefinition.prototype, "parentIsMandatory", void 0);
|
|
58
58
|
__decorate([
|
|
59
|
-
ta_json_1.JsonProperty("inherits_security"),
|
|
59
|
+
(0, ta_json_1.JsonProperty)("inherits_security"),
|
|
60
60
|
__metadata("design:type", Boolean)
|
|
61
61
|
], RelationDefinition.prototype, "inheritsSecurity", void 0);
|
|
62
62
|
__decorate([
|
|
63
|
-
ta_json_1.JsonProperty("allow_navigation"),
|
|
63
|
+
(0, ta_json_1.JsonProperty)("allow_navigation"),
|
|
64
64
|
__metadata("design:type", Boolean)
|
|
65
65
|
], RelationDefinition.prototype, "allowNavigation", void 0);
|
|
66
66
|
__decorate([
|
|
67
|
-
ta_json_1.JsonProperty("is_nested"),
|
|
67
|
+
(0, ta_json_1.JsonProperty)("is_nested"),
|
|
68
68
|
__metadata("design:type", Boolean)
|
|
69
69
|
], RelationDefinition.prototype, "isNested", void 0);
|
|
70
70
|
__decorate([
|
|
71
|
-
ta_json_1.JsonProperty("nested_properties"),
|
|
72
|
-
ta_json_1.JsonElementType(String),
|
|
71
|
+
(0, ta_json_1.JsonProperty)("nested_properties"),
|
|
72
|
+
(0, ta_json_1.JsonElementType)(String),
|
|
73
73
|
__metadata("design:type", Array)
|
|
74
74
|
], RelationDefinition.prototype, "nestedProperties", void 0);
|
|
75
75
|
__decorate([
|
|
76
|
-
ta_json_1.JsonProperty("nested_permissions"),
|
|
76
|
+
(0, ta_json_1.JsonProperty)("nested_permissions"),
|
|
77
77
|
__metadata("design:type", Boolean)
|
|
78
78
|
], RelationDefinition.prototype, "nestedPermissions", void 0);
|
|
79
79
|
__decorate([
|
|
80
|
-
ta_json_1.JsonProperty("is_taxonomy_relation"),
|
|
80
|
+
(0, ta_json_1.JsonProperty)("is_taxonomy_relation"),
|
|
81
81
|
__metadata("design:type", Boolean)
|
|
82
82
|
], RelationDefinition.prototype, "isTaxonomyRelation", void 0);
|
|
83
83
|
__decorate([
|
|
84
|
-
ta_json_1.JsonProperty("is_taxonomy_hierarchy_relation"),
|
|
84
|
+
(0, ta_json_1.JsonProperty)("is_taxonomy_hierarchy_relation"),
|
|
85
85
|
__metadata("design:type", Boolean)
|
|
86
86
|
], RelationDefinition.prototype, "isTaxonomyHierarchyRelation", void 0);
|
|
87
87
|
__decorate([
|
|
88
|
-
ta_json_1.JsonProperty("content_is_copied"),
|
|
88
|
+
(0, ta_json_1.JsonProperty)("content_is_copied"),
|
|
89
89
|
__metadata("design:type", Boolean)
|
|
90
90
|
], RelationDefinition.prototype, "contentIsCopied", void 0);
|
|
91
91
|
__decorate([
|
|
92
|
-
ta_json_1.JsonProperty("completion_is_copied"),
|
|
92
|
+
(0, ta_json_1.JsonProperty)("completion_is_copied"),
|
|
93
93
|
__metadata("design:type", Boolean)
|
|
94
94
|
], RelationDefinition.prototype, "completionIsCopied", void 0);
|
|
95
95
|
__decorate([
|
|
96
|
-
ta_json_1.JsonProperty("is_path_relation"),
|
|
96
|
+
(0, ta_json_1.JsonProperty)("is_path_relation"),
|
|
97
97
|
__metadata("design:type", Boolean)
|
|
98
98
|
], RelationDefinition.prototype, "isPathRelation", void 0);
|
|
99
99
|
__decorate([
|
|
100
|
-
ta_json_1.JsonProperty("is_path_hierarchy_relation"),
|
|
100
|
+
(0, ta_json_1.JsonProperty)("is_path_hierarchy_relation"),
|
|
101
101
|
__metadata("design:type", Boolean)
|
|
102
102
|
], RelationDefinition.prototype, "isPathHierarchyRelation", void 0);
|
|
103
103
|
__decorate([
|
|
104
|
-
ta_json_1.JsonProperty("path_hierarchy_score"),
|
|
104
|
+
(0, ta_json_1.JsonProperty)("path_hierarchy_score"),
|
|
105
105
|
__metadata("design:type", String)
|
|
106
106
|
], RelationDefinition.prototype, "pathHierarchyScore", void 0);
|
|
107
107
|
__decorate([
|
|
108
|
-
ta_json_1.JsonProperty("is_rendition_relation"),
|
|
108
|
+
(0, ta_json_1.JsonProperty)("is_rendition_relation"),
|
|
109
109
|
__metadata("design:type", Boolean)
|
|
110
110
|
], RelationDefinition.prototype, "isRenditionRelation", void 0);
|
|
111
111
|
__decorate([
|
|
112
|
-
ta_json_1.JsonProperty("associated_labels"),
|
|
112
|
+
(0, ta_json_1.JsonProperty)("associated_labels"),
|
|
113
113
|
__metadata("design:type", Object)
|
|
114
114
|
], RelationDefinition.prototype, "associatedLabels", void 0);
|
|
115
115
|
RelationDefinition = __decorate([
|
|
116
|
-
ta_json_1.JsonObject(),
|
|
117
|
-
ta_json_1.JsonDiscriminatorValue(data_type_1.default.Relation),
|
|
116
|
+
(0, ta_json_1.JsonObject)(),
|
|
117
|
+
(0, ta_json_1.JsonDiscriminatorValue)(data_type_1.default.Relation),
|
|
118
118
|
__metadata("design:paramtypes", [String, Object])
|
|
119
119
|
], RelationDefinition);
|
|
120
120
|
exports.RelationDefinition = RelationDefinition;
|
|
121
|
+
//# sourceMappingURL=relation-definition.js.map
|
|
@@ -63,7 +63,7 @@ export declare class RelationManager {
|
|
|
63
63
|
*/
|
|
64
64
|
private fetchRelationAsync;
|
|
65
65
|
/**
|
|
66
|
-
* Adds the relation to the loaded relations and updates the count.
|
|
66
|
+
* Adds the relation to the loaded relations and updates the count (when the relation doesn't exist yet).
|
|
67
67
|
* @param relation - Relation to add
|
|
68
68
|
*/
|
|
69
69
|
private addRelation;
|
|
@@ -13,15 +13,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.RelationManager = void 0;
|
|
16
|
-
const string_format_1 = __importDefault(require("string-format"));
|
|
17
16
|
const base_types_1 = require("../../base-types");
|
|
18
|
-
const error_messages_1 = __importDefault(require("../../error-messages"));
|
|
19
17
|
const guard_1 = __importDefault(require("../../guard"));
|
|
20
18
|
const culture_load_option_1 = require("../querying/culture-load-option");
|
|
21
19
|
const entity_load_configuration_1 = require("../querying/entity-load-configuration");
|
|
22
20
|
const load_options_1 = require("../querying/load-options");
|
|
23
21
|
const property_load_option_1 = require("../querying/property-load-option");
|
|
24
22
|
const relation_load_option_1 = require("../querying/relation-load-option");
|
|
23
|
+
const relation_specification_1 = require("../querying/relation-specification");
|
|
25
24
|
const lazy_loading_manager_1 = require("./lazy-loading-manager");
|
|
26
25
|
const relation_container_1 = require("./relation-container");
|
|
27
26
|
class RelationManager {
|
|
@@ -167,8 +166,8 @@ class RelationManager {
|
|
|
167
166
|
*/
|
|
168
167
|
fetchRelationAsync(relationName, role) {
|
|
169
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
-
const relationLoadOption = new relation_load_option_1.RelationLoadOption([relationName]);
|
|
171
|
-
const loadConfig = new entity_load_configuration_1.EntityLoadConfiguration(culture_load_option_1.CultureLoadOption.
|
|
169
|
+
const relationLoadOption = new relation_load_option_1.RelationLoadOption([new relation_specification_1.RelationSpecification(relationName, role)]);
|
|
170
|
+
const loadConfig = new entity_load_configuration_1.EntityLoadConfiguration(new culture_load_option_1.CultureLoadOption([...this._entity.cultures]), property_load_option_1.PropertyLoadOption.None, relationLoadOption);
|
|
172
171
|
const tempEntity = yield this._client.entities.getAsync(this._entity.id, loadConfig);
|
|
173
172
|
if (tempEntity == null) {
|
|
174
173
|
return null;
|
|
@@ -178,7 +177,7 @@ class RelationManager {
|
|
|
178
177
|
});
|
|
179
178
|
}
|
|
180
179
|
/**
|
|
181
|
-
* Adds the relation to the loaded relations and updates the count.
|
|
180
|
+
* Adds the relation to the loaded relations and updates the count (when the relation doesn't exist yet).
|
|
182
181
|
* @param relation - Relation to add
|
|
183
182
|
*/
|
|
184
183
|
addRelation(relation) {
|
|
@@ -188,10 +187,11 @@ class RelationManager {
|
|
|
188
187
|
this._relations[relation.name] = container;
|
|
189
188
|
}
|
|
190
189
|
if (container.relationExists(relation.role)) {
|
|
191
|
-
|
|
190
|
+
return;
|
|
192
191
|
}
|
|
193
192
|
container.setRelation(relation);
|
|
194
193
|
this._count++;
|
|
195
194
|
}
|
|
196
195
|
}
|
|
197
196
|
exports.RelationManager = RelationManager;
|
|
197
|
+
//# sourceMappingURL=relation-manager.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { MapNumberTo, MapStringTo, Nullable, Object_Unknown } from "../..";
|
|
1
|
+
import { MapNumberTo, MapStringTo, Nullable, Object_Unknown, Optional } from "../..";
|
|
2
|
+
import { IContentHubClient } from "../../clients/content-hub-client";
|
|
2
3
|
import DirtyValueCalculator from "../../dirty-value-calculator";
|
|
3
4
|
import { IMember, MemberBase } from "./member";
|
|
4
5
|
import { RelationRole } from "./relation-role";
|
|
@@ -41,6 +42,16 @@ export interface IRelation extends IMember {
|
|
|
41
42
|
* @param ids - The ids of the entities to link
|
|
42
43
|
*/
|
|
43
44
|
setIds(ids: Array<number>): void;
|
|
45
|
+
/**
|
|
46
|
+
* Sets the related entities.
|
|
47
|
+
*
|
|
48
|
+
* In case of an {@link IToManyRelation}, the list of ids will be set on the relation.
|
|
49
|
+
* In case of an {@link IToOneRelation}, ids can have at most one value.
|
|
50
|
+
*
|
|
51
|
+
* If the list is empty then the value will be set to null.
|
|
52
|
+
* @param identifiers - The identifiers of the entities to link
|
|
53
|
+
*/
|
|
54
|
+
setIdentifiersAsync(identifiers: Array<string>): Promise<void>;
|
|
44
55
|
/**
|
|
45
56
|
* Clears the value(s) of the relation.
|
|
46
57
|
*/
|
|
@@ -51,9 +62,11 @@ export declare abstract class RelationBase extends MemberBase implements IRelati
|
|
|
51
62
|
abstract readonly isMultiValue: boolean;
|
|
52
63
|
readonly properties: MapNumberTo<MapStringTo<Object_Unknown>>;
|
|
53
64
|
protected _dirtyValueCalculator: DirtyValueCalculator;
|
|
54
|
-
protected
|
|
65
|
+
protected client: Optional<IContentHubClient>;
|
|
66
|
+
protected constructor(name: string, properties?: Nullable<MapNumberTo<MapStringTo<Object_Unknown>>>, client?: IContentHubClient);
|
|
55
67
|
abstract getIds(): Array<number>;
|
|
56
68
|
abstract setIds(ids: Array<number>): void;
|
|
69
|
+
setIdentifiersAsync(identifiers: Array<string>): Promise<void>;
|
|
57
70
|
abstract clear(): void;
|
|
58
71
|
protected getTypeName(): string;
|
|
59
72
|
static isChildRelation(r: IRelation): r is IChildRelation;
|
|
@@ -72,7 +85,7 @@ export interface IChildRelation extends IRelation {
|
|
|
72
85
|
}
|
|
73
86
|
export declare abstract class ChildRelationBase extends RelationBase implements IChildRelation {
|
|
74
87
|
inheritsSecurity: boolean;
|
|
75
|
-
constructor(name: string, properties: Nullable<MapNumberTo<MapStringTo<Object_Unknown
|
|
88
|
+
constructor(name: string, properties: Nullable<MapNumberTo<MapStringTo<Object_Unknown>>>, client?: IContentHubClient);
|
|
76
89
|
}
|
|
77
90
|
/** Base interface for all parent relations. */
|
|
78
91
|
export interface IParentRelation extends IRelation {
|
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
2
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
15
|
exports.ChildRelationBase = exports.RelationBase = void 0;
|
|
16
|
+
const guard_1 = __importDefault(require("../../guard"));
|
|
17
|
+
const entity_load_configuration_1 = require("../querying/entity-load-configuration");
|
|
4
18
|
const member_1 = require("./member");
|
|
5
19
|
const member_definition_type_1 = require("./member-definition-type");
|
|
6
20
|
const relation_role_1 = require("./relation-role");
|
|
7
21
|
class RelationBase extends member_1.MemberBase {
|
|
8
|
-
constructor(name, properties = null) {
|
|
22
|
+
constructor(name, properties = null, client) {
|
|
9
23
|
super(name, member_definition_type_1.MemberDefinitionType.Relation);
|
|
24
|
+
this.client = client;
|
|
10
25
|
this.properties = properties == null ? {} : properties;
|
|
11
26
|
}
|
|
27
|
+
setIdentifiersAsync(identifiers) {
|
|
28
|
+
var _a;
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
guard_1.default.arrayNoneNullOrEmptyString(identifiers);
|
|
31
|
+
guard_1.default.notNullOrUndefined(this.client);
|
|
32
|
+
const entities = yield this.client.entities.getManyAsync(identifiers, entity_load_configuration_1.EntityLoadConfiguration.Minimal);
|
|
33
|
+
this.setIds((_a = entities === null || entities === void 0 ? void 0 : entities.filter(x => x.id !== null).map(x => x.id)) !== null && _a !== void 0 ? _a : []);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
12
36
|
getTypeName() {
|
|
13
37
|
return relation_role_1.RelationRole[this.role];
|
|
14
38
|
}
|
|
@@ -33,9 +57,10 @@ class RelationBase extends member_1.MemberBase {
|
|
|
33
57
|
}
|
|
34
58
|
exports.RelationBase = RelationBase;
|
|
35
59
|
class ChildRelationBase extends RelationBase {
|
|
36
|
-
constructor(name, properties) {
|
|
37
|
-
super(name, properties);
|
|
60
|
+
constructor(name, properties, client) {
|
|
61
|
+
super(name, properties, client);
|
|
38
62
|
this.inheritsSecurity = true;
|
|
39
63
|
}
|
|
40
64
|
}
|
|
41
65
|
exports.ChildRelationBase = ChildRelationBase;
|
|
66
|
+
//# sourceMappingURL=relation.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MapNumberTo, MapStringTo, Nullable, Object_Unknown } from "../../..";
|
|
2
|
+
import { IContentHubClient } from "../../../clients/content-hub-client";
|
|
2
3
|
import { ChildRelationBase, IChildRelation } from "../relation";
|
|
3
4
|
import { RelationRole } from "../relation-role";
|
|
4
5
|
import { IToManyRelation } from "./to-many-relation";
|
|
@@ -24,12 +25,14 @@ export declare class ChildToManyParentsRelation extends ChildRelationBase implem
|
|
|
24
25
|
readonly isMultiValue: boolean;
|
|
25
26
|
get isDirty(): boolean;
|
|
26
27
|
get parents(): Array<number>;
|
|
27
|
-
constructor(name: string, properties?: Nullable<MapNumberTo<MapStringTo<Object_Unknown
|
|
28
|
+
constructor(name: string, properties?: Nullable<MapNumberTo<MapStringTo<Object_Unknown>>>, client?: IContentHubClient);
|
|
28
29
|
getIds(): Array<number>;
|
|
29
30
|
setIds(ids: Array<number>): void;
|
|
30
31
|
clear(): void;
|
|
31
32
|
add(id: number): void;
|
|
32
33
|
addRange(ids: Array<number>): void;
|
|
34
|
+
addAsync(identifier: string): Promise<void>;
|
|
35
|
+
addRangeAsync(identifiers: Array<string>): Promise<void>;
|
|
33
36
|
startTracking(): void;
|
|
34
37
|
markClean(): void;
|
|
35
38
|
getParentProperties(id: number): MapStringTo<Object_Unknown>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
13
|
};
|
|
@@ -6,11 +15,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
15
|
exports.ChildToManyParentsRelation = void 0;
|
|
7
16
|
const dirty_value_calculator_1 = __importDefault(require("../../../dirty-value-calculator"));
|
|
8
17
|
const guard_1 = __importDefault(require("../../../guard"));
|
|
18
|
+
const entity_load_configuration_1 = require("../../querying/entity-load-configuration");
|
|
9
19
|
const relation_1 = require("../relation");
|
|
10
20
|
const relation_role_1 = require("../relation-role");
|
|
11
21
|
class ChildToManyParentsRelation extends relation_1.ChildRelationBase {
|
|
12
|
-
constructor(name, properties = null) {
|
|
13
|
-
super(name, properties);
|
|
22
|
+
constructor(name, properties = null, client) {
|
|
23
|
+
super(name, properties, client);
|
|
14
24
|
this._parents = [];
|
|
15
25
|
this.role = relation_role_1.RelationRole.Child;
|
|
16
26
|
this.isMultiValue = true;
|
|
@@ -51,6 +61,26 @@ class ChildToManyParentsRelation extends relation_1.ChildRelationBase {
|
|
|
51
61
|
}
|
|
52
62
|
});
|
|
53
63
|
}
|
|
64
|
+
addAsync(identifier) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
guard_1.default.notNullOrUndefined(this.client);
|
|
67
|
+
guard_1.default.stringNotNullOrEmpty(identifier);
|
|
68
|
+
const entity = yield this.client.entities.getAsync(identifier, entity_load_configuration_1.EntityLoadConfiguration.Minimal);
|
|
69
|
+
if (entity && entity.id) {
|
|
70
|
+
this.add(entity.id);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
addRangeAsync(identifiers) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
guard_1.default.notNullOrUndefined(this.client);
|
|
77
|
+
guard_1.default.arrayNoneNullOrEmptyString(identifiers);
|
|
78
|
+
const entities = yield this.client.entities.getManyAsync(identifiers, entity_load_configuration_1.EntityLoadConfiguration.Minimal);
|
|
79
|
+
if (entities) {
|
|
80
|
+
this.addRange(entities.filter(x => x.id !== null).map(x => x.id));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
54
84
|
startTracking() {
|
|
55
85
|
if (this.isTracking)
|
|
56
86
|
return;
|
|
@@ -68,3 +98,4 @@ class ChildToManyParentsRelation extends relation_1.ChildRelationBase {
|
|
|
68
98
|
}
|
|
69
99
|
}
|
|
70
100
|
exports.ChildToManyParentsRelation = ChildToManyParentsRelation;
|
|
101
|
+
//# sourceMappingURL=child-to-many-parents-relation.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MapNumberTo, MapStringTo, Nullable, Object_Unknown } from "../../../base-types";
|
|
2
|
+
import { IContentHubClient } from "../../../clients/content-hub-client";
|
|
2
3
|
import { ChildRelationBase, IChildRelation } from "../relation";
|
|
3
4
|
import { RelationRole } from "../relation-role";
|
|
4
5
|
import { IToOneRelation } from "./to-one-relation";
|
|
@@ -21,12 +22,13 @@ export declare class ChildToOneParentRelation extends ChildRelationBase implemen
|
|
|
21
22
|
get isDirty(): boolean;
|
|
22
23
|
get parent(): Nullable<number>;
|
|
23
24
|
set parent(id: Nullable<number>);
|
|
24
|
-
constructor(name: string, properties?: Nullable<MapNumberTo<MapStringTo<Object_Unknown
|
|
25
|
+
constructor(name: string, properties?: Nullable<MapNumberTo<MapStringTo<Object_Unknown>>>, client?: IContentHubClient);
|
|
25
26
|
getIds(): Array<number>;
|
|
26
27
|
setIds(ids: Array<number>): void;
|
|
27
28
|
clear(): void;
|
|
28
29
|
getId(): Nullable<number>;
|
|
29
30
|
setId(id: Nullable<number>): void;
|
|
31
|
+
setIdentifierAsync(identifier: Nullable<string>): Promise<void>;
|
|
30
32
|
startTracking(): void;
|
|
31
33
|
markClean(): void;
|
|
32
34
|
getParentProperties(): MapStringTo<Object_Unknown>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
13
|
};
|
|
@@ -6,11 +15,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
15
|
exports.ChildToOneParentRelation = void 0;
|
|
7
16
|
const dirty_value_calculator_1 = __importDefault(require("../../../dirty-value-calculator"));
|
|
8
17
|
const guard_1 = __importDefault(require("../../../guard"));
|
|
18
|
+
const entity_load_configuration_1 = require("../../querying/entity-load-configuration");
|
|
9
19
|
const relation_1 = require("../relation");
|
|
10
20
|
const relation_role_1 = require("../relation-role");
|
|
11
21
|
class ChildToOneParentRelation extends relation_1.ChildRelationBase {
|
|
12
|
-
constructor(name, properties = null) {
|
|
13
|
-
super(name, properties);
|
|
22
|
+
constructor(name, properties = null, client) {
|
|
23
|
+
super(name, properties, client);
|
|
14
24
|
this._parent = null;
|
|
15
25
|
this.role = relation_role_1.RelationRole.Child;
|
|
16
26
|
this.isMultiValue = false;
|
|
@@ -58,6 +68,20 @@ class ChildToOneParentRelation extends relation_1.ChildRelationBase {
|
|
|
58
68
|
guard_1.default.validIdOrNull(id);
|
|
59
69
|
this._parent = id;
|
|
60
70
|
}
|
|
71
|
+
setIdentifierAsync(identifier) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
guard_1.default.notNullOrUndefined(this.client);
|
|
74
|
+
guard_1.default.stringNotNullOrEmpty(identifier);
|
|
75
|
+
if (identifier) {
|
|
76
|
+
const entity = yield this.client.entities.getAsync(identifier, entity_load_configuration_1.EntityLoadConfiguration.Minimal);
|
|
77
|
+
if (entity && entity.id) {
|
|
78
|
+
this.setId(entity.id);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
this.setId(null);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
61
85
|
startTracking() {
|
|
62
86
|
if (this.isTracking)
|
|
63
87
|
return;
|
|
@@ -78,3 +102,4 @@ class ChildToOneParentRelation extends relation_1.ChildRelationBase {
|
|
|
78
102
|
}
|
|
79
103
|
}
|
|
80
104
|
exports.ChildToOneParentRelation = ChildToOneParentRelation;
|
|
105
|
+
//# sourceMappingURL=child-to-one-parent-relation.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MapNumberTo, MapStringTo, Nullable, Object_Unknown } from "../../..";
|
|
2
|
+
import { IContentHubClient } from "../../../clients/content-hub-client";
|
|
2
3
|
import { IParentRelation, RelationBase } from "../relation";
|
|
3
4
|
import { RelationRole } from "../relation-role";
|
|
4
5
|
import { IToManyRelation } from "./to-many-relation";
|
|
@@ -24,12 +25,14 @@ export declare class ParentToManyChildrenRelation extends RelationBase implement
|
|
|
24
25
|
readonly isMultiValue: boolean;
|
|
25
26
|
get isDirty(): boolean;
|
|
26
27
|
get children(): Array<number>;
|
|
27
|
-
constructor(name: string, properties?: Nullable<MapNumberTo<MapStringTo<Object_Unknown
|
|
28
|
+
constructor(name: string, properties?: Nullable<MapNumberTo<MapStringTo<Object_Unknown>>>, client?: IContentHubClient);
|
|
28
29
|
getIds(): Array<number>;
|
|
29
30
|
setIds(ids: Array<number>): void;
|
|
30
31
|
clear(): void;
|
|
31
32
|
add(id: number): void;
|
|
32
33
|
addRange(ids: Array<number>): void;
|
|
34
|
+
addAsync(identifier: string): Promise<void>;
|
|
35
|
+
addRangeAsync(identifiers: Array<string>): Promise<void>;
|
|
33
36
|
startTracking(): void;
|
|
34
37
|
markClean(): void;
|
|
35
38
|
getChildProperties(id: number): MapStringTo<Object_Unknown>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
13
|
};
|
|
@@ -6,11 +15,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
15
|
exports.ParentToManyChildrenRelation = void 0;
|
|
7
16
|
const dirty_value_calculator_1 = __importDefault(require("../../../dirty-value-calculator"));
|
|
8
17
|
const guard_1 = __importDefault(require("../../../guard"));
|
|
18
|
+
const entity_load_configuration_1 = require("../../querying/entity-load-configuration");
|
|
9
19
|
const relation_1 = require("../relation");
|
|
10
20
|
const relation_role_1 = require("../relation-role");
|
|
11
21
|
class ParentToManyChildrenRelation extends relation_1.RelationBase {
|
|
12
|
-
constructor(name, properties = null) {
|
|
13
|
-
super(name, properties);
|
|
22
|
+
constructor(name, properties = null, client) {
|
|
23
|
+
super(name, properties, client);
|
|
14
24
|
this._children = [];
|
|
15
25
|
this.role = relation_role_1.RelationRole.Parent;
|
|
16
26
|
this.isMultiValue = true;
|
|
@@ -51,6 +61,26 @@ class ParentToManyChildrenRelation extends relation_1.RelationBase {
|
|
|
51
61
|
}
|
|
52
62
|
});
|
|
53
63
|
}
|
|
64
|
+
addAsync(identifier) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
guard_1.default.notNullOrUndefined(this.client);
|
|
67
|
+
guard_1.default.stringNotNullOrEmpty(identifier);
|
|
68
|
+
const entity = yield this.client.entities.getAsync(identifier, entity_load_configuration_1.EntityLoadConfiguration.Minimal);
|
|
69
|
+
if (entity && entity.id) {
|
|
70
|
+
this.add(entity.id);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
addRangeAsync(identifiers) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
guard_1.default.notNullOrUndefined(this.client);
|
|
77
|
+
guard_1.default.arrayNoneNullOrEmptyString(identifiers);
|
|
78
|
+
const entities = yield this.client.entities.getManyAsync(identifiers, entity_load_configuration_1.EntityLoadConfiguration.Minimal);
|
|
79
|
+
if (entities) {
|
|
80
|
+
this.addRange(entities.filter(x => x.id !== null).map(x => x.id));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
54
84
|
startTracking() {
|
|
55
85
|
if (this.isTracking)
|
|
56
86
|
return;
|
|
@@ -68,3 +98,4 @@ class ParentToManyChildrenRelation extends relation_1.RelationBase {
|
|
|
68
98
|
}
|
|
69
99
|
}
|
|
70
100
|
exports.ParentToManyChildrenRelation = ParentToManyChildrenRelation;
|
|
101
|
+
//# sourceMappingURL=parent-to-many-children-relation.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MapNumberTo, MapStringTo, Nullable, Object_Unknown } from "../../../base-types";
|
|
2
|
+
import { IContentHubClient } from "../../../clients/content-hub-client";
|
|
2
3
|
import { IParentRelation, RelationBase } from "../relation";
|
|
3
4
|
import { RelationRole } from "../relation-role";
|
|
4
5
|
import { IToOneRelation } from "./to-one-relation";
|
|
@@ -24,9 +25,10 @@ export declare class ParentToOneChildRelation extends RelationBase implements IP
|
|
|
24
25
|
get child(): Nullable<number>;
|
|
25
26
|
set child(id: Nullable<number>);
|
|
26
27
|
get isDirty(): boolean;
|
|
27
|
-
constructor(name: string, properties?: Nullable<MapNumberTo<MapStringTo<Object_Unknown
|
|
28
|
+
constructor(name: string, properties?: Nullable<MapNumberTo<MapStringTo<Object_Unknown>>>, client?: IContentHubClient);
|
|
28
29
|
getIds(): Array<number>;
|
|
29
30
|
setIds(ids: Array<number>): void;
|
|
31
|
+
setIdentifierAsync(identifier: Nullable<string>): Promise<void>;
|
|
30
32
|
clear(): void;
|
|
31
33
|
getId(): Nullable<number>;
|
|
32
34
|
setId(id: Nullable<number>): void;
|