@sitecore/sc-contenthub-webclient-sdk 0.9.7
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/LICENSE +24 -0
- package/dist/api/api-info-resource.d.ts +8 -0
- package/dist/api/api-info-resource.js +42 -0
- package/dist/api/api-info.d.ts +29 -0
- package/dist/api/api-info.js +14 -0
- package/dist/api/api-resource.d.ts +4 -0
- package/dist/api/api-resource.js +16 -0
- package/dist/api/api-routes-dictionary.d.ts +8 -0
- package/dist/api/api-routes-dictionary.js +10 -0
- package/dist/authentication/oauth-grant-base.d.ts +6 -0
- package/dist/authentication/oauth-grant-base.js +42 -0
- package/dist/authentication/oauth-grant-type.d.ts +4 -0
- package/dist/authentication/oauth-grant-type.js +8 -0
- package/dist/authentication/oauth-password-grant.d.ts +8 -0
- package/dist/authentication/oauth-password-grant.js +45 -0
- package/dist/authentication/oauth-refreshtoken-grant.d.ts +7 -0
- package/dist/authentication/oauth-refreshtoken-grant.js +39 -0
- package/dist/authentication/token-info.d.ts +6 -0
- package/dist/authentication/token-info.js +35 -0
- package/dist/base-types.d.ts +56 -0
- package/dist/base-types.js +32 -0
- package/dist/caches/culture-cache.d.ts +8 -0
- package/dist/caches/culture-cache.js +21 -0
- package/dist/caches/entity-definition-cache.d.ts +44 -0
- package/dist/caches/entity-definition-cache.js +96 -0
- package/dist/clients/api-client.d.ts +56 -0
- package/dist/clients/api-client.js +107 -0
- package/dist/clients/commands-client.d.ts +16 -0
- package/dist/clients/commands-client.js +40 -0
- package/dist/clients/content-hub-client.d.ts +75 -0
- package/dist/clients/content-hub-client.js +66 -0
- package/dist/clients/culture-client.d.ts +36 -0
- package/dist/clients/culture-client.js +43 -0
- package/dist/clients/culture-loader.d.ts +41 -0
- package/dist/clients/culture-loader.js +103 -0
- package/dist/clients/entities-client.d.ts +201 -0
- package/dist/clients/entities-client.js +271 -0
- package/dist/clients/entity-definitions-client.d.ts +87 -0
- package/dist/clients/entity-definitions-client.js +354 -0
- package/dist/clients/extended-client.d.ts +11 -0
- package/dist/clients/extended-client.js +2 -0
- package/dist/clients/internal-client.d.ts +46 -0
- package/dist/clients/internal-client.js +240 -0
- package/dist/clients/notifications-client.d.ts +35 -0
- package/dist/clients/notifications-client.js +128 -0
- package/dist/clients/option-list-client.d.ts +49 -0
- package/dist/clients/option-list-client.js +85 -0
- package/dist/clients/pages-client.d.ts +36 -0
- package/dist/clients/pages-client.js +52 -0
- package/dist/clients/policies-client.d.ts +47 -0
- package/dist/clients/policies-client.js +92 -0
- package/dist/clients/querying-client.d.ts +34 -0
- package/dist/clients/querying-client.js +95 -0
- package/dist/clients/raw-client.d.ts +29 -0
- package/dist/clients/raw-client.js +79 -0
- package/dist/clients/request-message.d.ts +25 -0
- package/dist/clients/request-message.js +12 -0
- package/dist/clients/response-handler.d.ts +30 -0
- package/dist/clients/response-handler.js +145 -0
- package/dist/clients/response-message.d.ts +45 -0
- package/dist/clients/response-message.js +34 -0
- package/dist/clients/schema-querying.d.ts +16 -0
- package/dist/clients/schema-querying.js +70 -0
- package/dist/clients/search-client.d.ts +16 -0
- package/dist/clients/search-client.js +36 -0
- package/dist/clients/settings-client.d.ts +37 -0
- package/dist/clients/settings-client.js +126 -0
- package/dist/clients/users-client.d.ts +150 -0
- package/dist/clients/users-client.js +317 -0
- package/dist/clients/web-content-hub-client.d.ts +13 -0
- package/dist/clients/web-content-hub-client.js +2 -0
- package/dist/constants/api.d.ts +130 -0
- package/dist/constants/api.js +133 -0
- package/dist/constants/defaults.d.ts +7 -0
- package/dist/constants/defaults.js +10 -0
- package/dist/constants/definitions.d.ts +62 -0
- package/dist/constants/definitions.js +88 -0
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/index.js +30 -0
- package/dist/constants/notifications.d.ts +7 -0
- package/dist/constants/notifications.js +10 -0
- package/dist/contracts/base/culture-insensitive-property.d.ts +28 -0
- package/dist/contracts/base/culture-insensitive-property.js +47 -0
- package/dist/contracts/base/culture-sensitive-property.d.ts +49 -0
- package/dist/contracts/base/culture-sensitive-property.js +113 -0
- package/dist/contracts/base/data-type.d.ts +18 -0
- package/dist/contracts/base/data-type.js +24 -0
- package/dist/contracts/base/entity-base.d.ts +65 -0
- package/dist/contracts/base/entity-base.js +362 -0
- package/dist/contracts/base/entity-construction-args.d.ts +15 -0
- package/dist/contracts/base/entity-construction-args.js +16 -0
- package/dist/contracts/base/entity-definition.d.ts +108 -0
- package/dist/contracts/base/entity-definition.js +126 -0
- package/dist/contracts/base/entity.d.ts +237 -0
- package/dist/contracts/base/entity.js +76 -0
- package/dist/contracts/base/index.d.ts +14 -0
- package/dist/contracts/base/index.js +26 -0
- package/dist/contracts/base/json-content-type.d.ts +9 -0
- package/dist/contracts/base/json-content-type.js +13 -0
- package/dist/contracts/base/lazy-loading-manager.d.ts +4 -0
- package/dist/contracts/base/lazy-loading-manager.js +17 -0
- package/dist/contracts/base/member-condition.d.ts +48 -0
- package/dist/contracts/base/member-condition.js +125 -0
- package/dist/contracts/base/member-definition-type.d.ts +13 -0
- package/dist/contracts/base/member-definition-type.js +17 -0
- package/dist/contracts/base/member-definition.d.ts +77 -0
- package/dist/contracts/base/member-definition.js +101 -0
- package/dist/contracts/base/member-group.d.ts +54 -0
- package/dist/contracts/base/member-group.js +61 -0
- package/dist/contracts/base/member.d.ts +32 -0
- package/dist/contracts/base/member.js +26 -0
- package/dist/contracts/base/option-lists/flat-option-list-value.d.ts +4 -0
- package/dist/contracts/base/option-lists/flat-option-list-value.js +9 -0
- package/dist/contracts/base/option-lists/flat-option-list.d.ts +9 -0
- package/dist/contracts/base/option-lists/flat-option-list.js +11 -0
- package/dist/contracts/base/option-lists/hierarchical-option-list.d.ts +9 -0
- package/dist/contracts/base/option-lists/hierarchical-option-list.js +11 -0
- package/dist/contracts/base/option-lists/hierarchical-options-list-value.d.ts +7 -0
- package/dist/contracts/base/option-lists/hierarchical-options-list-value.js +14 -0
- package/dist/contracts/base/option-lists/option-list-base.d.ts +23 -0
- package/dist/contracts/base/option-lists/option-list-base.js +33 -0
- package/dist/contracts/base/option-lists/option-list-type.d.ts +13 -0
- package/dist/contracts/base/option-lists/option-list-type.js +17 -0
- package/dist/contracts/base/option-lists/option-list-value-base.d.ts +7 -0
- package/dist/contracts/base/option-lists/option-list-value-base.js +14 -0
- package/dist/contracts/base/option-lists/option-list-value.d.ts +30 -0
- package/dist/contracts/base/option-lists/option-list-value.js +2 -0
- package/dist/contracts/base/option-lists/option-list.d.ts +40 -0
- package/dist/contracts/base/option-lists/option-list.js +2 -0
- package/dist/contracts/base/property-definition.d.ts +61 -0
- package/dist/contracts/base/property-definition.js +76 -0
- package/dist/contracts/base/property-definitions/boolean-property-definition.d.ts +7 -0
- package/dist/contracts/base/property-definitions/boolean-property-definition.js +33 -0
- package/dist/contracts/base/property-definitions/datetime-property-definition.d.ts +7 -0
- package/dist/contracts/base/property-definitions/datetime-property-definition.js +33 -0
- package/dist/contracts/base/property-definitions/datetimeoffset-property-definition.d.ts +7 -0
- package/dist/contracts/base/property-definitions/datetimeoffset-property-definition.js +33 -0
- package/dist/contracts/base/property-definitions/decimal-property-definition.d.ts +7 -0
- package/dist/contracts/base/property-definitions/decimal-property-definition.js +33 -0
- package/dist/contracts/base/property-definitions/index.d.ts +8 -0
- package/dist/contracts/base/property-definitions/index.js +20 -0
- package/dist/contracts/base/property-definitions/integer-property-definition.d.ts +7 -0
- package/dist/contracts/base/property-definitions/integer-property-definition.js +33 -0
- package/dist/contracts/base/property-definitions/json-property-definition.d.ts +10 -0
- package/dist/contracts/base/property-definitions/json-property-definition.js +38 -0
- package/dist/contracts/base/property-definitions/long-property-definition.d.ts +7 -0
- package/dist/contracts/base/property-definitions/long-property-definition.js +33 -0
- package/dist/contracts/base/property-definitions/string-property-definition.d.ts +33 -0
- package/dist/contracts/base/property-definitions/string-property-definition.js +55 -0
- package/dist/contracts/base/property-manager.d.ts +19 -0
- package/dist/contracts/base/property-manager.js +114 -0
- package/dist/contracts/base/property.d.ts +21 -0
- package/dist/contracts/base/property.js +30 -0
- package/dist/contracts/base/relation-cardinality.d.ts +19 -0
- package/dist/contracts/base/relation-cardinality.js +22 -0
- package/dist/contracts/base/relation-container.d.ts +40 -0
- package/dist/contracts/base/relation-container.js +118 -0
- package/dist/contracts/base/relation-definition.d.ts +123 -0
- package/dist/contracts/base/relation-definition.js +116 -0
- package/dist/contracts/base/relation-manager.d.ts +70 -0
- package/dist/contracts/base/relation-manager.js +197 -0
- package/dist/contracts/base/relation-role.d.ts +14 -0
- package/dist/contracts/base/relation-role.js +17 -0
- package/dist/contracts/base/relation.d.ts +74 -0
- package/dist/contracts/base/relation.js +40 -0
- package/dist/contracts/base/relations/child-to-many-parents-relation.d.ts +27 -0
- package/dist/contracts/base/relations/child-to-many-parents-relation.js +67 -0
- package/dist/contracts/base/relations/child-to-one-parent-relation.d.ts +26 -0
- package/dist/contracts/base/relations/child-to-one-parent-relation.js +74 -0
- package/dist/contracts/base/relations/parent-to-many-children-relation.d.ts +27 -0
- package/dist/contracts/base/relations/parent-to-many-children-relation.js +67 -0
- package/dist/contracts/base/relations/parent-to-one-child-relation.d.ts +29 -0
- package/dist/contracts/base/relations/parent-to-one-child-relation.js +74 -0
- package/dist/contracts/base/relations/to-many-relation.d.ts +16 -0
- package/dist/contracts/base/relations/to-many-relation.js +2 -0
- package/dist/contracts/base/relations/to-one-relation.d.ts +18 -0
- package/dist/contracts/base/relations/to-one-relation.js +2 -0
- package/dist/contracts/base/rendition.d.ts +14 -0
- package/dist/contracts/base/rendition.js +13 -0
- package/dist/contracts/base/resource.d.ts +21 -0
- package/dist/contracts/base/resource.js +2 -0
- package/dist/contracts/base/string-content-type.d.ts +21 -0
- package/dist/contracts/base/string-content-type.js +25 -0
- package/dist/contracts/base/typed-entity.d.ts +11 -0
- package/dist/contracts/base/typed-entity.js +2 -0
- package/dist/contracts/base/users.d.ts +0 -0
- package/dist/contracts/base/users.js +1 -0
- package/dist/contracts/base/view-mode.d.ts +4 -0
- package/dist/contracts/base/view-mode.js +8 -0
- package/dist/contracts/content/asset.d.ts +22 -0
- package/dist/contracts/content/asset.js +67 -0
- package/dist/contracts/content/final-life-cycle-status.d.ts +7 -0
- package/dist/contracts/content/final-life-cycle-status.js +11 -0
- package/dist/contracts/dirty-tracking/dirty-tracking.d.ts +10 -0
- package/dist/contracts/dirty-tracking/dirty-tracking.js +2 -0
- package/dist/contracts/notifications/mail-template.d.ts +44 -0
- package/dist/contracts/notifications/mail-template.js +2 -0
- package/dist/contracts/policies/condition.d.ts +16 -0
- package/dist/contracts/policies/condition.js +10 -0
- package/dist/contracts/policies/member-policy.d.ts +31 -0
- package/dist/contracts/policies/member-policy.js +12 -0
- package/dist/contracts/policies/policy.d.ts +19 -0
- package/dist/contracts/policies/policy.js +11 -0
- package/dist/contracts/policies/rule-type.d.ts +7 -0
- package/dist/contracts/policies/rule-type.js +11 -0
- package/dist/contracts/policies/rule.d.ts +58 -0
- package/dist/contracts/policies/rule.js +19 -0
- package/dist/contracts/policies/user-group-policy.d.ts +10 -0
- package/dist/contracts/policies/user-group-policy.js +17 -0
- package/dist/contracts/policies/user-policy.d.ts +10 -0
- package/dist/contracts/policies/user-policy.js +17 -0
- package/dist/contracts/querying/culture-load-option.d.ts +35 -0
- package/dist/contracts/querying/culture-load-option.js +69 -0
- package/dist/contracts/querying/entity-definition-id-iterator.d.ts +9 -0
- package/dist/contracts/querying/entity-definition-id-iterator.js +30 -0
- package/dist/contracts/querying/entity-definition-id-query-result.d.ts +10 -0
- package/dist/contracts/querying/entity-definition-id-query-result.js +22 -0
- package/dist/contracts/querying/entity-definition-iterator.d.ts +16 -0
- package/dist/contracts/querying/entity-definition-iterator.js +30 -0
- package/dist/contracts/querying/entity-definition-query-result.d.ts +21 -0
- package/dist/contracts/querying/entity-definition-query-result.js +22 -0
- package/dist/contracts/querying/entity-iterator.d.ts +13 -0
- package/dist/contracts/querying/entity-iterator.js +30 -0
- package/dist/contracts/querying/entity-load-configuration-builder.d.ts +76 -0
- package/dist/contracts/querying/entity-load-configuration-builder.js +101 -0
- package/dist/contracts/querying/entity-load-configuration.d.ts +51 -0
- package/dist/contracts/querying/entity-load-configuration.js +67 -0
- package/dist/contracts/querying/entity-load-option.d.ts +35 -0
- package/dist/contracts/querying/entity-load-option.js +94 -0
- package/dist/contracts/querying/entity-query-result.d.ts +23 -0
- package/dist/contracts/querying/entity-query-result.js +33 -0
- package/dist/contracts/querying/filters/comparison-operator.d.ts +11 -0
- package/dist/contracts/querying/filters/comparison-operator.js +15 -0
- package/dist/contracts/querying/filters/composite-filter-operator.d.ts +4 -0
- package/dist/contracts/querying/filters/composite-filter-operator.js +8 -0
- package/dist/contracts/querying/filters/composite-query-filter.d.ts +19 -0
- package/dist/contracts/querying/filters/composite-query-filter.js +49 -0
- package/dist/contracts/querying/filters/createdby-query-filter.d.ts +5 -0
- package/dist/contracts/querying/filters/createdby-query-filter.js +30 -0
- package/dist/contracts/querying/filters/createdon-query-filter.d.ts +19 -0
- package/dist/contracts/querying/filters/createdon-query-filter.js +45 -0
- package/dist/contracts/querying/filters/definition-query-filter.d.ts +34 -0
- package/dist/contracts/querying/filters/definition-query-filter.js +58 -0
- package/dist/contracts/querying/filters/filter-data-type.d.ts +11 -0
- package/dist/contracts/querying/filters/filter-data-type.js +15 -0
- package/dist/contracts/querying/filters/filter-type.d.ts +18 -0
- package/dist/contracts/querying/filters/filter-type.js +22 -0
- package/dist/contracts/querying/filters/id-query-filter.d.ts +25 -0
- package/dist/contracts/querying/filters/id-query-filter.js +49 -0
- package/dist/contracts/querying/filters/identifier-query-filter.d.ts +25 -0
- package/dist/contracts/querying/filters/identifier-query-filter.js +49 -0
- package/dist/contracts/querying/filters/index.d.ts +20 -0
- package/dist/contracts/querying/filters/index.js +32 -0
- package/dist/contracts/querying/filters/modifiedby-query-filter.d.ts +5 -0
- package/dist/contracts/querying/filters/modifiedby-query-filter.js +30 -0
- package/dist/contracts/querying/filters/modifiedon-query-filter.d.ts +19 -0
- package/dist/contracts/querying/filters/modifiedon-query-filter.js +45 -0
- package/dist/contracts/querying/filters/modules-query-filter.d.ts +14 -0
- package/dist/contracts/querying/filters/modules-query-filter.js +43 -0
- package/dist/contracts/querying/filters/not-query-filter.d.ts +14 -0
- package/dist/contracts/querying/filters/not-query-filter.js +39 -0
- package/dist/contracts/querying/filters/property-query-filter.d.ts +38 -0
- package/dist/contracts/querying/filters/property-query-filter.js +63 -0
- package/dist/contracts/querying/filters/query-filter.d.ts +10 -0
- package/dist/contracts/querying/filters/query-filter.js +28 -0
- package/dist/contracts/querying/filters/relation-connection-type.d.ts +15 -0
- package/dist/contracts/querying/filters/relation-connection-type.js +19 -0
- package/dist/contracts/querying/filters/relation-query-filter.d.ts +23 -0
- package/dist/contracts/querying/filters/relation-query-filter.js +48 -0
- package/dist/contracts/querying/filters/secured-ancestors-query-filter.d.ts +24 -0
- package/dist/contracts/querying/filters/secured-ancestors-query-filter.js +53 -0
- package/dist/contracts/querying/filters/user-query-filter.d.ts +37 -0
- package/dist/contracts/querying/filters/user-query-filter.js +61 -0
- package/dist/contracts/querying/id-iterator.d.ts +11 -0
- package/dist/contracts/querying/id-iterator.js +19 -0
- package/dist/contracts/querying/id-query-result.d.ts +17 -0
- package/dist/contracts/querying/id-query-result.js +24 -0
- package/dist/contracts/querying/iterator.d.ts +9 -0
- package/dist/contracts/querying/iterator.js +2 -0
- package/dist/contracts/querying/load-option.d.ts +4 -0
- package/dist/contracts/querying/load-option.js +2 -0
- package/dist/contracts/querying/load-options.d.ts +6 -0
- package/dist/contracts/querying/load-options.js +10 -0
- package/dist/contracts/querying/loading-query-iterator.d.ts +17 -0
- package/dist/contracts/querying/loading-query-iterator.js +57 -0
- package/dist/contracts/querying/member-load-option.d.ts +11 -0
- package/dist/contracts/querying/member-load-option.js +15 -0
- package/dist/contracts/querying/minimal-schema.d.ts +8 -0
- package/dist/contracts/querying/minimal-schema.js +48 -0
- package/dist/contracts/querying/property-data.d.ts +8 -0
- package/dist/contracts/querying/property-data.js +43 -0
- package/dist/contracts/querying/property-load-option.d.ts +30 -0
- package/dist/contracts/querying/property-load-option.js +70 -0
- package/dist/contracts/querying/query-iterator.d.ts +18 -0
- package/dist/contracts/querying/query-iterator.js +54 -0
- package/dist/contracts/querying/query-load-configuration.d.ts +39 -0
- package/dist/contracts/querying/query-load-configuration.js +86 -0
- package/dist/contracts/querying/query-request.d.ts +6 -0
- package/dist/contracts/querying/query-request.js +30 -0
- package/dist/contracts/querying/query-result-paging-manager.d.ts +9 -0
- package/dist/contracts/querying/query-result-paging-manager.js +22 -0
- package/dist/contracts/querying/query-result.d.ts +5 -0
- package/dist/contracts/querying/query-result.js +2 -0
- package/dist/contracts/querying/query-sort-order.d.ts +13 -0
- package/dist/contracts/querying/query-sort-order.js +17 -0
- package/dist/contracts/querying/query.d.ts +23 -0
- package/dist/contracts/querying/query.js +56 -0
- package/dist/contracts/querying/relation-data.d.ts +7 -0
- package/dist/contracts/querying/relation-data.js +38 -0
- package/dist/contracts/querying/relation-load-option.d.ts +31 -0
- package/dist/contracts/querying/relation-load-option.js +74 -0
- package/dist/contracts/querying/relation-specification.d.ts +33 -0
- package/dist/contracts/querying/relation-specification.js +52 -0
- package/dist/contracts/querying/schema-querying.d.ts +20 -0
- package/dist/contracts/querying/schema-querying.js +2 -0
- package/dist/contracts/querying/scroll-request.d.ts +7 -0
- package/dist/contracts/querying/scroll-request.js +33 -0
- package/dist/contracts/querying/skip-take-iterator-base.d.ts +14 -0
- package/dist/contracts/querying/skip-take-iterator-base.js +60 -0
- package/dist/contracts/querying/sort-field-type.d.ts +13 -0
- package/dist/contracts/querying/sort-field-type.js +17 -0
- package/dist/contracts/querying/sorting.d.ts +25 -0
- package/dist/contracts/querying/sorting.js +44 -0
- package/dist/contracts/users/user-group-combine-method.d.ts +4 -0
- package/dist/contracts/users/user-group-combine-method.js +8 -0
- package/dist/contracts/users/user-group-configuration.d.ts +11 -0
- package/dist/contracts/users/user-group-configuration.js +35 -0
- package/dist/contracts/users/user-profile.d.ts +4 -0
- package/dist/contracts/users/user-profile.js +2 -0
- package/dist/contracts/users/user.d.ts +24 -0
- package/dist/contracts/users/user.js +64 -0
- package/dist/converters/api-resource-converter.d.ts +16 -0
- package/dist/converters/api-resource-converter.js +45 -0
- package/dist/converters/file-version-converter.d.ts +22 -0
- package/dist/converters/file-version-converter.js +43 -0
- package/dist/converters/index.d.ts +6 -0
- package/dist/converters/index.js +18 -0
- package/dist/converters/member-condition-converter.d.ts +20 -0
- package/dist/converters/member-condition-converter.js +50 -0
- package/dist/converters/member-condition-resource-converter.d.ts +21 -0
- package/dist/converters/member-condition-resource-converter.js +53 -0
- package/dist/converters/minimal-schema-relation-cardinality-converter.d.ts +11 -0
- package/dist/converters/minimal-schema-relation-cardinality-converter.js +33 -0
- package/dist/converters/page-resource-menus-converter.d.ts +19 -0
- package/dist/converters/page-resource-menus-converter.js +45 -0
- package/dist/converters/page-resource-zones-converter.d.ts +19 -0
- package/dist/converters/page-resource-zones-converter.js +45 -0
- package/dist/converters/relation-map-resource-converter.d.ts +6 -0
- package/dist/converters/relation-map-resource-converter.js +38 -0
- package/dist/converters/relation-resource-converter.d.ts +22 -0
- package/dist/converters/relation-resource-converter.js +51 -0
- package/dist/converters/renditions-converter.d.ts +20 -0
- package/dist/converters/renditions-converter.js +44 -0
- package/dist/converters/string-to-any-map-converter.d.ts +20 -0
- package/dist/converters/string-to-any-map-converter.js +34 -0
- package/dist/culture-info.d.ts +5 -0
- package/dist/culture-info.js +7 -0
- package/dist/dirty-value-calculator.d.ts +7 -0
- package/dist/dirty-value-calculator.js +29 -0
- package/dist/entity-link.d.ts +8 -0
- package/dist/entity-link.js +40 -0
- package/dist/error-messages.d.ts +57 -0
- package/dist/error-messages.js +64 -0
- package/dist/errors/argument-error.d.ts +4 -0
- package/dist/errors/argument-error.js +11 -0
- package/dist/errors/authentication-error.d.ts +5 -0
- package/dist/errors/authentication-error.js +12 -0
- package/dist/errors/bad-request-error.d.ts +5 -0
- package/dist/errors/bad-request-error.js +11 -0
- package/dist/errors/forbidden-error.d.ts +4 -0
- package/dist/errors/forbidden-error.js +11 -0
- package/dist/errors/internal-error.d.ts +4 -0
- package/dist/errors/internal-error.js +11 -0
- package/dist/errors/invalid-operation-error.d.ts +4 -0
- package/dist/errors/invalid-operation-error.js +11 -0
- package/dist/errors/not-found-error.d.ts +5 -0
- package/dist/errors/not-found-error.js +11 -0
- package/dist/errors/not-implemented-error.d.ts +4 -0
- package/dist/errors/not-implemented-error.js +11 -0
- package/dist/errors/not-loaded-error.d.ts +4 -0
- package/dist/errors/not-loaded-error.js +11 -0
- package/dist/errors/not-supported-error.d.ts +4 -0
- package/dist/errors/not-supported-error.js +11 -0
- package/dist/errors/schema-error.d.ts +4 -0
- package/dist/errors/schema-error.js +11 -0
- package/dist/errors/validation-error.d.ts +6 -0
- package/dist/errors/validation-error.js +12 -0
- package/dist/errors/validation-failure.d.ts +7 -0
- package/dist/errors/validation-failure.js +14 -0
- package/dist/errors/web-api-error.d.ts +13 -0
- package/dist/errors/web-api-error.js +13 -0
- package/dist/factories/entity-factory.d.ts +38 -0
- package/dist/factories/entity-factory.js +76 -0
- package/dist/factories/option-list-factory.d.ts +26 -0
- package/dist/factories/option-list-factory.js +22 -0
- package/dist/factories/property-factory.d.ts +10 -0
- package/dist/factories/property-factory.js +54 -0
- package/dist/factories/relation-factory.d.ts +55 -0
- package/dist/factories/relation-factory.js +70 -0
- package/dist/fileversion.d.ts +78 -0
- package/dist/fileversion.js +144 -0
- package/dist/guard.d.ts +29 -0
- package/dist/guard.js +142 -0
- package/dist/http-method.d.ts +9 -0
- package/dist/http-method.js +13 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +22 -0
- package/dist/link-helper.d.ts +209 -0
- package/dist/link-helper.js +371 -0
- package/dist/link.d.ts +9 -0
- package/dist/link.js +78 -0
- package/dist/logging/log-level.d.ts +6 -0
- package/dist/logging/log-level.js +10 -0
- package/dist/logging/logger-base.d.ts +26 -0
- package/dist/logging/logger-base.js +98 -0
- package/dist/logging/logger.d.ts +16 -0
- package/dist/logging/logger.js +2 -0
- package/dist/logging/null-logger.d.ts +7 -0
- package/dist/logging/null-logger.js +13 -0
- package/dist/mappers/api-resource-mapper.d.ts +5 -0
- package/dist/mappers/api-resource-mapper.js +16 -0
- package/dist/mappers/condition-mapper.d.ts +36 -0
- package/dist/mappers/condition-mapper.js +112 -0
- package/dist/mappers/entity-definition-mapper.d.ts +13 -0
- package/dist/mappers/entity-definition-mapper.js +88 -0
- package/dist/mappers/entity-mapper.d.ts +19 -0
- package/dist/mappers/entity-mapper.js +134 -0
- package/dist/mappers/final-life-cycle-status-mapper.d.ts +6 -0
- package/dist/mappers/final-life-cycle-status-mapper.js +51 -0
- package/dist/mappers/load-options-mapper.d.ts +16 -0
- package/dist/mappers/load-options-mapper.js +100 -0
- package/dist/mappers/mapping-utilities.d.ts +7 -0
- package/dist/mappers/mapping-utilities.js +19 -0
- package/dist/mappers/member-condition-mapper.d.ts +12 -0
- package/dist/mappers/member-condition-mapper.js +119 -0
- package/dist/mappers/member-definition-mapper.d.ts +19 -0
- package/dist/mappers/member-definition-mapper.js +266 -0
- package/dist/mappers/member-group-mapper.d.ts +14 -0
- package/dist/mappers/member-group-mapper.js +95 -0
- package/dist/mappers/member-security-mapper.d.ts +34 -0
- package/dist/mappers/member-security-mapper.js +101 -0
- package/dist/mappers/notification-mapper.d.ts +5 -0
- package/dist/mappers/notification-mapper.js +17 -0
- package/dist/mappers/option-list-mapper.d.ts +18 -0
- package/dist/mappers/option-list-mapper.js +131 -0
- package/dist/mappers/policy-mapper.d.ts +29 -0
- package/dist/mappers/policy-mapper.js +124 -0
- package/dist/mappers/property-mapper.d.ts +21 -0
- package/dist/mappers/property-mapper.js +339 -0
- package/dist/mappers/querying-mapper.d.ts +16 -0
- package/dist/mappers/querying-mapper.js +96 -0
- package/dist/mappers/relation-cardinality-mapper.d.ts +5 -0
- package/dist/mappers/relation-cardinality-mapper.js +37 -0
- package/dist/mappers/relation-mapper.d.ts +16 -0
- package/dist/mappers/relation-mapper.js +202 -0
- package/dist/mappers/relation-role-mapper.d.ts +5 -0
- package/dist/mappers/relation-role-mapper.js +29 -0
- package/dist/mappers/rendition-mapper.d.ts +9 -0
- package/dist/mappers/rendition-mapper.js +34 -0
- package/dist/mappers/rule-type-mapper.d.ts +6 -0
- package/dist/mappers/rule-type-mapper.js +33 -0
- package/dist/mappers/rules-mapper.d.ts +35 -0
- package/dist/mappers/rules-mapper.js +123 -0
- package/dist/mappers/typed-entity-creator.d.ts +27 -0
- package/dist/mappers/typed-entity-creator.js +76 -0
- package/dist/models/entity-definition-collection-resource.d.ts +5 -0
- package/dist/models/entity-definition-collection-resource.js +26 -0
- package/dist/models/entity-definition-resource.d.ts +23 -0
- package/dist/models/entity-definition-resource.js +98 -0
- package/dist/models/entity-list-resource.d.ts +5 -0
- package/dist/models/entity-list-resource.js +26 -0
- package/dist/models/entity-resource.d.ts +36 -0
- package/dist/models/entity-resource.js +142 -0
- package/dist/models/list-resource.d.ts +13 -0
- package/dist/models/list-resource.js +50 -0
- package/dist/models/member-condition-resource.d.ts +32 -0
- package/dist/models/member-condition-resource.js +95 -0
- package/dist/models/member-definition-resource.d.ts +15 -0
- package/dist/models/member-definition-resource.js +71 -0
- package/dist/models/member-group-resource.d.ts +14 -0
- package/dist/models/member-group-resource.js +61 -0
- package/dist/models/notifications/distribute-notification-resource.d.ts +7 -0
- package/dist/models/notifications/distribute-notification-resource.js +37 -0
- package/dist/models/notifications/mail-request-broadcast.d.ts +7 -0
- package/dist/models/notifications/mail-request-broadcast.js +18 -0
- package/dist/models/notifications/mail-request-by-id.d.ts +9 -0
- package/dist/models/notifications/mail-request-by-id.js +28 -0
- package/dist/models/notifications/mail-request-by-username.d.ts +9 -0
- package/dist/models/notifications/mail-request-by-username.js +28 -0
- package/dist/models/notifications/mail-request.d.ts +26 -0
- package/dist/models/notifications/mail-request.js +12 -0
- package/dist/models/notifications/notification-level.d.ts +8 -0
- package/dist/models/notifications/notification-level.js +12 -0
- package/dist/models/notifications/realtime-request-broadcast.d.ts +7 -0
- package/dist/models/notifications/realtime-request-broadcast.js +18 -0
- package/dist/models/notifications/realtime-request-by-id.d.ts +9 -0
- package/dist/models/notifications/realtime-request-by-id.js +28 -0
- package/dist/models/notifications/realtime-request-by-username.d.ts +9 -0
- package/dist/models/notifications/realtime-request-by-username.js +28 -0
- package/dist/models/notifications/realtime-request.d.ts +60 -0
- package/dist/models/notifications/realtime-request.js +41 -0
- package/dist/models/notifications/request-by-id.d.ts +13 -0
- package/dist/models/notifications/request-by-id.js +2 -0
- package/dist/models/notifications/request-by-username.d.ts +13 -0
- package/dist/models/notifications/request-by-username.js +2 -0
- package/dist/models/notifications/validators/mail-validator.d.ts +6 -0
- package/dist/models/notifications/validators/mail-validator.js +23 -0
- package/dist/models/notifications/validators/realtime-validator.d.ts +5 -0
- package/dist/models/notifications/validators/realtime-validator.js +14 -0
- package/dist/models/notifications/validators/request-by-id-validator.d.ts +6 -0
- package/dist/models/notifications/validators/request-by-id-validator.js +31 -0
- package/dist/models/notifications/validators/request-by-username-validator.d.ts +6 -0
- package/dist/models/notifications/validators/request-by-username-validator.js +31 -0
- package/dist/models/notifications/validators/validator-base.d.ts +6 -0
- package/dist/models/notifications/validators/validator-base.js +16 -0
- package/dist/models/option-lists/flat-option-list-value.d.ts +4 -0
- package/dist/models/option-lists/flat-option-list-value.js +9 -0
- package/dist/models/option-lists/hierarchical-options-list-value.d.ts +7 -0
- package/dist/models/option-lists/hierarchical-options-list-value.js +14 -0
- package/dist/models/option-lists/option-list-collection-resource.d.ts +6 -0
- package/dist/models/option-lists/option-list-collection-resource.js +32 -0
- package/dist/models/option-lists/option-list-description-resource.d.ts +5 -0
- package/dist/models/option-lists/option-list-description-resource.js +31 -0
- package/dist/models/option-lists/option-list-resource.d.ts +16 -0
- package/dist/models/option-lists/option-list-resource.js +62 -0
- package/dist/models/option-lists/option-list-value-resource.d.ts +6 -0
- package/dist/models/option-lists/option-list-value-resource.js +32 -0
- package/dist/models/pages/component-visualization.d.ts +10 -0
- package/dist/models/pages/component-visualization.js +54 -0
- package/dist/models/pages/language-resource.d.ts +10 -0
- package/dist/models/pages/language-resource.js +47 -0
- package/dist/models/pages/menu-item.d.ts +12 -0
- package/dist/models/pages/menu-item.js +66 -0
- package/dist/models/pages/page-component-resource.d.ts +20 -0
- package/dist/models/pages/page-component-resource.js +87 -0
- package/dist/models/pages/page-resource.d.ts +23 -0
- package/dist/models/pages/page-resource.js +100 -0
- package/dist/models/pages/page-row-settings.d.ts +27 -0
- package/dist/models/pages/page-row-settings.js +119 -0
- package/dist/models/pages/portal-column-resource.d.ts +6 -0
- package/dist/models/pages/portal-column-resource.js +37 -0
- package/dist/models/pages/portal-row-resource.d.ts +7 -0
- package/dist/models/pages/portal-row-resource.js +38 -0
- package/dist/models/pages/portal-section-resource.d.ts +6 -0
- package/dist/models/pages/portal-section-resource.js +37 -0
- package/dist/models/permissions-resource.d.ts +4 -0
- package/dist/models/permissions-resource.js +28 -0
- package/dist/models/policies/condition-resource.d.ts +21 -0
- package/dist/models/policies/condition-resource.js +53 -0
- package/dist/models/policies/member-policy-resource.d.ts +8 -0
- package/dist/models/policies/member-policy-resource.js +43 -0
- package/dist/models/policies/policy-resource.d.ts +50 -0
- package/dist/models/policies/policy-resource.js +89 -0
- package/dist/models/policies/rule-resource.d.ts +49 -0
- package/dist/models/policies/rule-resource.js +78 -0
- package/dist/models/property-definition-resource.d.ts +45 -0
- package/dist/models/property-definition-resource.js +198 -0
- package/dist/models/query-loading-resource.d.ts +4 -0
- package/dist/models/query-loading-resource.js +28 -0
- package/dist/models/query-result-resource.d.ts +9 -0
- package/dist/models/query-result-resource.js +34 -0
- package/dist/models/relation-definition-resource.d.ts +29 -0
- package/dist/models/relation-definition-resource.js +115 -0
- package/dist/models/relation-map-resource.d.ts +6 -0
- package/dist/models/relation-map-resource.js +16 -0
- package/dist/models/relation-resource.d.ts +21 -0
- package/dist/models/relation-resource.js +93 -0
- package/dist/models/resource-containers/entity-definition-resource-container.d.ts +8 -0
- package/dist/models/resource-containers/entity-definition-resource-container.js +2 -0
- package/dist/models/resource-containers/entity-resource-container.d.ts +8 -0
- package/dist/models/resource-containers/entity-resource-container.js +2 -0
- package/dist/models/resource.d.ts +4 -0
- package/dist/models/resource.js +26 -0
- package/dist/models/search/aggregation-request-resource.d.ts +16 -0
- package/dist/models/search/aggregation-request-resource.js +72 -0
- package/dist/models/search/aggregation-response-resource.d.ts +8 -0
- package/dist/models/search/aggregation-response-resource.js +41 -0
- package/dist/models/search/bucket-response-resource.d.ts +8 -0
- package/dist/models/search/bucket-response-resource.js +46 -0
- package/dist/models/search/date-interval.d.ts +10 -0
- package/dist/models/search/date-interval.js +14 -0
- package/dist/models/search/facet-response-resource.d.ts +20 -0
- package/dist/models/search/facet-response-resource.js +98 -0
- package/dist/models/search/field-filter-request-resource.d.ts +16 -0
- package/dist/models/search/field-filter-request-resource.js +76 -0
- package/dist/models/search/field-filter-response-resource.d.ts +17 -0
- package/dist/models/search/field-filter-response-resource.js +84 -0
- package/dist/models/search/field-filter-value-response-resource.d.ts +6 -0
- package/dist/models/search/field-filter-value-response-resource.js +31 -0
- package/dist/models/search/filter-operator.d.ts +86 -0
- package/dist/models/search/filter-operator.js +90 -0
- package/dist/models/search/full-text-response-resource.d.ts +4 -0
- package/dist/models/search/full-text-response-resource.js +27 -0
- package/dist/models/search/group-category.d.ts +6 -0
- package/dist/models/search/group-category.js +35 -0
- package/dist/models/search/group-config.d.ts +4 -0
- package/dist/models/search/group-config.js +27 -0
- package/dist/models/search/group-item.d.ts +10 -0
- package/dist/models/search/group-item.js +44 -0
- package/dist/models/search/grouped-view-response-resource.d.ts +15 -0
- package/dist/models/search/grouped-view-response-resource.js +65 -0
- package/dist/models/search/metric-option-request-resource.d.ts +7 -0
- package/dist/models/search/metric-option-request-resource.js +37 -0
- package/dist/models/search/metric-option-response-resource.d.ts +5 -0
- package/dist/models/search/metric-option-response-resource.js +31 -0
- package/dist/models/search/nested-relation-info.d.ts +11 -0
- package/dist/models/search/nested-relation-info.js +96 -0
- package/dist/models/search/requested-aggregation-type.d.ts +5 -0
- package/dist/models/search/requested-aggregation-type.js +9 -0
- package/dist/models/search/requested-filter-type.d.ts +6 -0
- package/dist/models/search/requested-filter-type.js +10 -0
- package/dist/models/search/search-group-request-resource.d.ts +5 -0
- package/dist/models/search/search-group-request-resource.js +31 -0
- package/dist/models/search/search-request.d.ts +41 -0
- package/dist/models/search/search-request.js +131 -0
- package/dist/models/search/search-response.d.ts +36 -0
- package/dist/models/search/search-response.js +123 -0
- package/dist/models/search/selection-pool-filter-resource.d.ts +7 -0
- package/dist/models/search/selection-pool-filter-resource.js +38 -0
- package/dist/models/search/sorting-request-resource.d.ts +5 -0
- package/dist/models/search/sorting-request-resource.js +32 -0
- package/dist/models/search/sorting-response-resource.d.ts +6 -0
- package/dist/models/search/sorting-response-resource.js +34 -0
- package/dist/models/search-document-resource.d.ts +7 -0
- package/dist/models/search-document-resource.js +33 -0
- package/dist/models/set-password-request-resource.d.ts +5 -0
- package/dist/models/set-password-request-resource.js +31 -0
- package/dist/settings/fetch-setting.d.ts +12 -0
- package/dist/settings/fetch-setting.js +61 -0
- package/dist/settings/super-user-excluded-privileges.d.ts +3 -0
- package/dist/settings/super-user-excluded-privileges.js +27 -0
- package/dist/settings/usage-rights-configuration.d.ts +24 -0
- package/dist/settings/usage-rights-configuration.js +90 -0
- package/dist/type-guards.d.ts +20 -0
- package/dist/type-guards.js +28 -0
- package/package.json +78 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { Nullable, NullableResultPromise } from "../base-types";
|
|
2
|
+
import { IEntity } from "../contracts/base/entity";
|
|
3
|
+
import { IEntityIterator } from "../contracts/querying/entity-iterator";
|
|
4
|
+
import { IEntityLoadConfiguration } from "../contracts/querying/entity-load-configuration";
|
|
5
|
+
import { IEntityQueryResult } from "../contracts/querying/entity-query-result";
|
|
6
|
+
import { IIdIterator } from "../contracts/querying/id-iterator";
|
|
7
|
+
import { IIdQueryResult } from "../contracts/querying/id-query-result";
|
|
8
|
+
import { Sorting } from "../contracts/querying/sorting";
|
|
9
|
+
import { IExtendedContentHubClient } from "./extended-client";
|
|
10
|
+
/**
|
|
11
|
+
* Interface for the client responsible for getting, saving and deleting entities.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* When possible, always include the specific properties and relations that are required when fetching entities.
|
|
15
|
+
*/
|
|
16
|
+
export interface IEntitiesClient {
|
|
17
|
+
/**
|
|
18
|
+
* Gets the {@link IEntity} instance with the specified `id`.
|
|
19
|
+
* @param id - The id of the entity to get
|
|
20
|
+
* @param loadConfiguration - The loading configuration for the entity
|
|
21
|
+
* @returns The entity or `null` when it was not found.
|
|
22
|
+
*/
|
|
23
|
+
getAsync(id: number, loadConfiguration?: Nullable<IEntityLoadConfiguration>): NullableResultPromise<IEntity>;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the {@link IEntity} instance with the specified `identifier`.
|
|
26
|
+
* @param identifier - The identifier of the entity to get
|
|
27
|
+
* @param loadConfiguration - The loading configuration for the entity
|
|
28
|
+
* @returns The entity or `null` when it was not found.
|
|
29
|
+
*/
|
|
30
|
+
getAsync(identifier: string, loadConfiguration?: Nullable<IEntityLoadConfiguration>): NullableResultPromise<IEntity>;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the {@link IEntity} instance with the specified `id` or `identifier`.
|
|
33
|
+
* @param param - The id or identifier of the entity to get
|
|
34
|
+
* @param loadConfiguration - The loading configuration for the entity
|
|
35
|
+
* @returns The entity or `null` when it was not found.
|
|
36
|
+
*/
|
|
37
|
+
getAsync(param: number | string, loadConfiguration?: Nullable<IEntityLoadConfiguration>): NullableResultPromise<IEntity>;
|
|
38
|
+
/**
|
|
39
|
+
* Gets the {@link IEntity} instances with the specified `ids`.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* The returned list of entities can be empty or contain fewer items than the list of ids.
|
|
43
|
+
* The order of the entities in the returned list can be different than the order of the requested ids.
|
|
44
|
+
*
|
|
45
|
+
* @param ids - The ids of the entities to get
|
|
46
|
+
* @param loadConfiguration - The loading configuration for an entity
|
|
47
|
+
* @returns List of entities.
|
|
48
|
+
*/
|
|
49
|
+
getManyAsync(ids: Array<number>, loadConfiguration?: Nullable<IEntityLoadConfiguration>): Promise<Array<IEntity>>;
|
|
50
|
+
/**
|
|
51
|
+
* Gets the {@link IEntity} instances with the specified `identifiers`.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* The returned list of entities can be empty or contain fewer items than the list of identifiers.
|
|
55
|
+
* The order of the entities in the returned list can be different than the order of the requested identifiers.
|
|
56
|
+
*
|
|
57
|
+
* @param identifiers - The identifiers of the entities to get
|
|
58
|
+
* @param loadConfiguration - The loading configuration for an entity
|
|
59
|
+
* @returns List of entities.
|
|
60
|
+
*/
|
|
61
|
+
getManyAsync(identifiers: Array<string>, loadConfiguration?: Nullable<IEntityLoadConfiguration>): Promise<Array<IEntity>>;
|
|
62
|
+
/**
|
|
63
|
+
* Gets the {@link IEntity} instances with the specified `ids` or `identifiers`.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* The returned list of entities can be empty or contain fewer items than the list of identifiers.
|
|
67
|
+
* The order of the entities in the returned list can be different than the order of the requested identifiers.
|
|
68
|
+
*
|
|
69
|
+
* @param param - The ids or identifiers of the entities to get
|
|
70
|
+
* @param loadConfiguration - The loading configuration for an entity
|
|
71
|
+
* @returns List of entities.
|
|
72
|
+
*/
|
|
73
|
+
getManyAsync(param: Array<number> | Array<string>, loadConfiguration?: Nullable<IEntityLoadConfiguration>): Promise<Array<IEntity>>;
|
|
74
|
+
/**
|
|
75
|
+
* Queries the {@link IEntity} instances for the specified `definitionName`.
|
|
76
|
+
*
|
|
77
|
+
* @param definitionName - The name of the definition to get entities for (case insensitive)
|
|
78
|
+
* @param loadConfiguration - The loading configuration for an entity
|
|
79
|
+
* @param skip - Skip the specified number of entities (optional)
|
|
80
|
+
* @param take - Take only the specified number of entities (optional, default: {@link ENTITIES.take})
|
|
81
|
+
* @param sorting - Sorting options
|
|
82
|
+
* @returns List of entities.
|
|
83
|
+
*/
|
|
84
|
+
getByDefinitionAsync(definitionName: string, loadConfiguration?: Nullable<IEntityLoadConfiguration>, skip?: number, take?: number, sorting?: Array<Sorting>): Promise<IEntityQueryResult>;
|
|
85
|
+
/**
|
|
86
|
+
* Queries the {@link IEntity} ids for the specified `definitionName`.
|
|
87
|
+
*
|
|
88
|
+
* @param definitionName - The name of the definition to get entity ids for (case insensitive)
|
|
89
|
+
* @param skip - Skip the specified number of entities (optional)
|
|
90
|
+
* @param take - Take only the specified number of entities (optional, default: {@link ENTITIES.take})
|
|
91
|
+
* @returns List of entity ids.
|
|
92
|
+
*/
|
|
93
|
+
getIdsByDefinitionAsync(definitionName: string, skip?: number, take?: number): Promise<IIdQueryResult>;
|
|
94
|
+
/**
|
|
95
|
+
* Creates an {@link IEntityIterator} instance for the specified definition that returns instances.
|
|
96
|
+
* Results are sorted ascending on creation date.
|
|
97
|
+
*
|
|
98
|
+
* @param definition - The name of the definition to get entities for
|
|
99
|
+
* @param loadConfiguration - Load configuration
|
|
100
|
+
* @returns The iterator.
|
|
101
|
+
*/
|
|
102
|
+
getEntityIterator(definition: string, loadConfiguration?: Nullable<IEntityLoadConfiguration>): IEntityIterator;
|
|
103
|
+
/**
|
|
104
|
+
* Creates an {@link IIdIterator} instance for the specified definition that returns instances.
|
|
105
|
+
* Results are sorted ascending on creation date.
|
|
106
|
+
*
|
|
107
|
+
* @param definition - The name of the definition to get entity ids for
|
|
108
|
+
* @returns The iterator.
|
|
109
|
+
*/
|
|
110
|
+
getEntityIdIterator(definition: string): IIdIterator;
|
|
111
|
+
/**
|
|
112
|
+
* Save the specified {@link IEntity}.
|
|
113
|
+
*
|
|
114
|
+
* @remarks
|
|
115
|
+
* The existing {@link IEntity} will not be updated in any way.
|
|
116
|
+
* If any information is needed that was generated on the server after persisting, the entity will need to be
|
|
117
|
+
* fetched again.
|
|
118
|
+
*
|
|
119
|
+
* @param entity - Entity to save
|
|
120
|
+
* @returns The id of the entity.
|
|
121
|
+
*/
|
|
122
|
+
saveAsync(entity: IEntity): Promise<number>;
|
|
123
|
+
/**
|
|
124
|
+
* Deletes the {@link IEntity} with specified id.
|
|
125
|
+
*
|
|
126
|
+
* @param entityId - The id of the entity to delete
|
|
127
|
+
*/
|
|
128
|
+
deleteAsync(entityId: number): Promise<void>;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The client responsible for getting, saving and deleting entities.
|
|
132
|
+
*/
|
|
133
|
+
export declare class EntitiesClient implements IEntitiesClient {
|
|
134
|
+
private readonly _client;
|
|
135
|
+
constructor(client: IExtendedContentHubClient);
|
|
136
|
+
/**
|
|
137
|
+
* Gets the {@link IEntity} instance with the specified `id` or `identifier`.
|
|
138
|
+
* @param param - The id or identifier of the entity to get
|
|
139
|
+
* @param loadConfiguration - The loading configuration for the entity
|
|
140
|
+
* @returns The entity or `null` when it was not found.
|
|
141
|
+
*/
|
|
142
|
+
getAsync(param: string | number, loadConfiguration?: Nullable<IEntityLoadConfiguration>): NullableResultPromise<IEntity>;
|
|
143
|
+
/**
|
|
144
|
+
* Gets the {@link IEntity} instances with the specified `ids` or `identifiers`.
|
|
145
|
+
*
|
|
146
|
+
* @remarks
|
|
147
|
+
* The returned list of entities can be empty or contain fewer items than the list of identifiers.
|
|
148
|
+
* The order of the entities in the returned list can be different than the order of the requested identifiers.
|
|
149
|
+
*
|
|
150
|
+
* @param param - The ids or identifiers of the entities to get
|
|
151
|
+
* @param loadConfiguration - The loading configuration for an entity
|
|
152
|
+
* @returns List of entities.
|
|
153
|
+
*/
|
|
154
|
+
getManyAsync(param: Array<number> | Array<string>, loadConfiguration?: Nullable<IEntityLoadConfiguration>): Promise<Array<IEntity>>;
|
|
155
|
+
/**
|
|
156
|
+
* {@inheritDoc}
|
|
157
|
+
*/
|
|
158
|
+
getByDefinitionAsync(definitionName: string, loadConfiguration?: Nullable<IEntityLoadConfiguration>, skip?: number, take?: number, sorting?: Array<Sorting>): Promise<IEntityQueryResult>;
|
|
159
|
+
/**
|
|
160
|
+
* {@inheritDoc}
|
|
161
|
+
*/
|
|
162
|
+
getIdsByDefinitionAsync(definitionName: string, skip?: number, take?: number): Promise<IIdQueryResult>;
|
|
163
|
+
/**
|
|
164
|
+
* {@inheritDoc}
|
|
165
|
+
*/
|
|
166
|
+
getEntityIterator(definition: string, loadConfiguration?: Nullable<IEntityLoadConfiguration>): IEntityIterator;
|
|
167
|
+
/**
|
|
168
|
+
* {@inheritDoc}
|
|
169
|
+
*/
|
|
170
|
+
getEntityIdIterator(definition: string): IIdIterator;
|
|
171
|
+
/**
|
|
172
|
+
* {@inheritDoc}
|
|
173
|
+
*/
|
|
174
|
+
saveAsync(entity: IEntity): Promise<number>;
|
|
175
|
+
/**
|
|
176
|
+
* {@inheritDoc}
|
|
177
|
+
*/
|
|
178
|
+
deleteAsync(entityId: number): Promise<void>;
|
|
179
|
+
/**
|
|
180
|
+
* Creates the specified {@link IEntity} in the system.
|
|
181
|
+
*
|
|
182
|
+
* @param entity - The entity to create/save in the system
|
|
183
|
+
*/
|
|
184
|
+
private createEntityAsync;
|
|
185
|
+
/**
|
|
186
|
+
* Update the specified {@link IEntity}.
|
|
187
|
+
*
|
|
188
|
+
* @param entity - The entity to update
|
|
189
|
+
*/
|
|
190
|
+
private updateEntityAsync;
|
|
191
|
+
/**
|
|
192
|
+
* Get an {@link IEntity} or `null` from the specified {@link IEntityQueryResult}.
|
|
193
|
+
*
|
|
194
|
+
* @remarks
|
|
195
|
+
* Throws an {@link InternalError} if multiple results where available.
|
|
196
|
+
*
|
|
197
|
+
* @param queryResult - The query result (should contain one or no items)
|
|
198
|
+
* @returns An {@link IEntity} or `null`.
|
|
199
|
+
*/
|
|
200
|
+
private static single;
|
|
201
|
+
}
|
|
@@ -0,0 +1,271 @@
|
|
|
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
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.EntitiesClient = void 0;
|
|
16
|
+
const ta_json_1 = require("ta-json");
|
|
17
|
+
const api_1 = require("../constants/api");
|
|
18
|
+
const defaults_1 = require("../constants/defaults");
|
|
19
|
+
const entity_iterator_1 = require("../contracts/querying/entity-iterator");
|
|
20
|
+
const entity_load_configuration_1 = require("../contracts/querying/entity-load-configuration");
|
|
21
|
+
const filters_1 = require("../contracts/querying/filters");
|
|
22
|
+
const id_iterator_1 = require("../contracts/querying/id-iterator");
|
|
23
|
+
const query_1 = require("../contracts/querying/query");
|
|
24
|
+
const error_messages_1 = __importDefault(require("../error-messages"));
|
|
25
|
+
const internal_error_1 = require("../errors/internal-error");
|
|
26
|
+
const web_api_error_1 = require("../errors/web-api-error");
|
|
27
|
+
const guard_1 = __importDefault(require("../guard"));
|
|
28
|
+
const link_1 = __importDefault(require("../link"));
|
|
29
|
+
const type_guards_1 = require("../type-guards");
|
|
30
|
+
const response_handler_1 = require("./response-handler");
|
|
31
|
+
/**
|
|
32
|
+
* The client responsible for getting, saving and deleting entities.
|
|
33
|
+
*/
|
|
34
|
+
class EntitiesClient {
|
|
35
|
+
constructor(client) {
|
|
36
|
+
guard_1.default.notNullOrUndefined(client);
|
|
37
|
+
this._client = client;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Gets the {@link IEntity} instance with the specified `id` or `identifier`.
|
|
41
|
+
* @param param - The id or identifier of the entity to get
|
|
42
|
+
* @param loadConfiguration - The loading configuration for the entity
|
|
43
|
+
* @returns The entity or `null` when it was not found.
|
|
44
|
+
*/
|
|
45
|
+
getAsync(param, loadConfiguration) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
let query;
|
|
48
|
+
if (typeof param === "string") {
|
|
49
|
+
guard_1.default.stringNotNullOrEmpty(param);
|
|
50
|
+
query = new query_1.Query({
|
|
51
|
+
filter: new filters_1.IdentifierQueryFilter({
|
|
52
|
+
operator: filters_1.ComparisonOperator.Equals,
|
|
53
|
+
value: param,
|
|
54
|
+
}),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
guard_1.default.validId(param);
|
|
59
|
+
query = new query_1.Query({
|
|
60
|
+
filter: new filters_1.IdQueryFilter({
|
|
61
|
+
operator: filters_1.ComparisonOperator.Equals,
|
|
62
|
+
value: param,
|
|
63
|
+
}),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
const result = yield this._client.querying.queryAsync(query, loadConfiguration || null);
|
|
67
|
+
const entity = EntitiesClient.single(result);
|
|
68
|
+
return entity;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Gets the {@link IEntity} instances with the specified `ids` or `identifiers`.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* The returned list of entities can be empty or contain fewer items than the list of identifiers.
|
|
76
|
+
* The order of the entities in the returned list can be different than the order of the requested identifiers.
|
|
77
|
+
*
|
|
78
|
+
* @param param - The ids or identifiers of the entities to get
|
|
79
|
+
* @param loadConfiguration - The loading configuration for an entity
|
|
80
|
+
* @returns List of entities.
|
|
81
|
+
*/
|
|
82
|
+
getManyAsync(param, loadConfiguration) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
if (param == null || param.length === 0)
|
|
85
|
+
return [];
|
|
86
|
+
let query;
|
|
87
|
+
if (type_guards_1.TypeGuards.isStringArray(param)) {
|
|
88
|
+
const identifiers = param;
|
|
89
|
+
guard_1.default.arrayNoneNullOrEmptyString(identifiers);
|
|
90
|
+
query = new query_1.Query({
|
|
91
|
+
filter: new filters_1.IdentifierQueryFilter({
|
|
92
|
+
operator: filters_1.ComparisonOperator.Equals,
|
|
93
|
+
values: identifiers,
|
|
94
|
+
}),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
const ids = param;
|
|
99
|
+
guard_1.default.arrayNoneNullOrUndefined(ids);
|
|
100
|
+
guard_1.default.validIds(ids);
|
|
101
|
+
query = new query_1.Query({
|
|
102
|
+
filter: new filters_1.IdQueryFilter({
|
|
103
|
+
operator: filters_1.ComparisonOperator.Equals,
|
|
104
|
+
values: ids,
|
|
105
|
+
}),
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
const result = yield this._client.querying.queryAsync(query, loadConfiguration || null);
|
|
109
|
+
return result.items;
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* {@inheritDoc}
|
|
114
|
+
*/
|
|
115
|
+
getByDefinitionAsync(definitionName, loadConfiguration, skip = defaults_1.ENTITIES.skip, take = defaults_1.ENTITIES.take, sorting) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
guard_1.default.stringNotNullOrEmpty(definitionName);
|
|
118
|
+
guard_1.default.notNegative(skip);
|
|
119
|
+
guard_1.default.notNegative(take);
|
|
120
|
+
const query = new query_1.Query({
|
|
121
|
+
filter: new filters_1.DefinitionQueryFilter({
|
|
122
|
+
name: definitionName,
|
|
123
|
+
operator: filters_1.ComparisonOperator.Equals,
|
|
124
|
+
}),
|
|
125
|
+
skip: skip,
|
|
126
|
+
take: take,
|
|
127
|
+
sorting: sorting,
|
|
128
|
+
});
|
|
129
|
+
return this._client.querying.queryAsync(query, loadConfiguration);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* {@inheritDoc}
|
|
134
|
+
*/
|
|
135
|
+
getIdsByDefinitionAsync(definitionName, skip, take) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
guard_1.default.stringNotNullOrEmpty(definitionName);
|
|
138
|
+
if (skip != null)
|
|
139
|
+
guard_1.default.notNegative(skip);
|
|
140
|
+
if (take != null)
|
|
141
|
+
guard_1.default.notNegative(take);
|
|
142
|
+
const query = new query_1.Query({
|
|
143
|
+
filter: new filters_1.DefinitionQueryFilter({
|
|
144
|
+
name: definitionName,
|
|
145
|
+
operator: filters_1.ComparisonOperator.Equals,
|
|
146
|
+
}),
|
|
147
|
+
skip: skip,
|
|
148
|
+
take: take,
|
|
149
|
+
});
|
|
150
|
+
const result = yield this._client.querying.queryIdsAsync(query);
|
|
151
|
+
return result;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* {@inheritDoc}
|
|
156
|
+
*/
|
|
157
|
+
getEntityIterator(definition, loadConfiguration) {
|
|
158
|
+
guard_1.default.stringNotNullOrEmpty(definition);
|
|
159
|
+
loadConfiguration = loadConfiguration || entity_load_configuration_1.EntityLoadConfiguration.Default;
|
|
160
|
+
const query = new query_1.Query({
|
|
161
|
+
filter: new filters_1.DefinitionQueryFilter({
|
|
162
|
+
name: definition,
|
|
163
|
+
operator: filters_1.ComparisonOperator.Equals,
|
|
164
|
+
}),
|
|
165
|
+
});
|
|
166
|
+
return new entity_iterator_1.EntityIterator(this._client, query, loadConfiguration);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* {@inheritDoc}
|
|
170
|
+
*/
|
|
171
|
+
getEntityIdIterator(definition) {
|
|
172
|
+
guard_1.default.stringNotNullOrEmpty(definition);
|
|
173
|
+
const query = new query_1.Query({
|
|
174
|
+
filter: new filters_1.DefinitionQueryFilter({
|
|
175
|
+
name: definition,
|
|
176
|
+
operator: filters_1.ComparisonOperator.Equals,
|
|
177
|
+
}),
|
|
178
|
+
});
|
|
179
|
+
return new id_iterator_1.EntityIdIterator(this._client, query);
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* {@inheritDoc}
|
|
183
|
+
*/
|
|
184
|
+
saveAsync(entity) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
guard_1.default.notNullOrUndefined(entity);
|
|
187
|
+
let id;
|
|
188
|
+
if (entity.isNew) {
|
|
189
|
+
id = yield this.createEntityAsync(entity);
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
yield this.updateEntityAsync(entity);
|
|
193
|
+
id = entity.id;
|
|
194
|
+
}
|
|
195
|
+
entity.markClean();
|
|
196
|
+
return id;
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* {@inheritDoc}
|
|
201
|
+
*/
|
|
202
|
+
deleteAsync(entityId) {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
guard_1.default.validId(entityId);
|
|
205
|
+
const link = yield this._client.linkHelper.entityToLinkAsync(entityId);
|
|
206
|
+
const response = yield this._client.raw.deleteAsync(link.href);
|
|
207
|
+
response_handler_1.ResponseHandler.handleErrors(response);
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Creates the specified {@link IEntity} in the system.
|
|
212
|
+
*
|
|
213
|
+
* @param entity - The entity to create/save in the system
|
|
214
|
+
*/
|
|
215
|
+
createEntityAsync(entity) {
|
|
216
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
217
|
+
const link = yield this._client.linkHelper.entitiesLinkAsync();
|
|
218
|
+
const resource = yield this._client.entityMapper.toResourceAsync(entity);
|
|
219
|
+
const response = yield this._client.raw.postAsync(link.href, ta_json_1.TaJson.serialize(resource));
|
|
220
|
+
response_handler_1.ResponseHandler.handleErrors(response);
|
|
221
|
+
const href = response.responseHeaders[api_1.HEADERS.location];
|
|
222
|
+
if (!href) {
|
|
223
|
+
throw new web_api_error_1.WebApiError(error_messages_1.default.EntitiesClient.UnableToExtractLocationHeaderFromResponse, response.statusCode, response);
|
|
224
|
+
}
|
|
225
|
+
const id = yield this._client.linkHelper.idFromEntityAsync(new link_1.default(href));
|
|
226
|
+
if (id === null || id === 0) {
|
|
227
|
+
throw new internal_error_1.InternalError(error_messages_1.default.EntitiesClient.UnableToExtractEntityIdFromHeader);
|
|
228
|
+
}
|
|
229
|
+
return id;
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Update the specified {@link IEntity}.
|
|
234
|
+
*
|
|
235
|
+
* @param entity - The entity to update
|
|
236
|
+
*/
|
|
237
|
+
updateEntityAsync(entity) {
|
|
238
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
239
|
+
// Check if the entity is loaded in only one culture to improve save performance.
|
|
240
|
+
let culture = null;
|
|
241
|
+
if (entity.cultures.length === 1) {
|
|
242
|
+
culture = entity.cultures[0];
|
|
243
|
+
}
|
|
244
|
+
const link = yield this._client.linkHelper.entityToLinkAsync(entity.id, culture !== null && culture !== void 0 ? culture : undefined);
|
|
245
|
+
const resource = yield this._client.entityMapper.mapDirtiesToResourceAsync(entity);
|
|
246
|
+
const response = yield this._client.raw.putAsync(link.href, ta_json_1.TaJson.serialize(resource));
|
|
247
|
+
response_handler_1.ResponseHandler.handleErrors(response);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Get an {@link IEntity} or `null` from the specified {@link IEntityQueryResult}.
|
|
252
|
+
*
|
|
253
|
+
* @remarks
|
|
254
|
+
* Throws an {@link InternalError} if multiple results where available.
|
|
255
|
+
*
|
|
256
|
+
* @param queryResult - The query result (should contain one or no items)
|
|
257
|
+
* @returns An {@link IEntity} or `null`.
|
|
258
|
+
*/
|
|
259
|
+
static single(queryResult) {
|
|
260
|
+
if (queryResult.totalNumberOfResults === 0) {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
else if (queryResult.totalNumberOfResults === 1) {
|
|
264
|
+
return queryResult.items[0];
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
throw new internal_error_1.InternalError(error_messages_1.default.QueryingClient.MultipleResultsWhenOneExpected);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
exports.EntitiesClient = EntitiesClient;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { MapNumberTo, MapStringTo, NullableResultPromise } from "../base-types";
|
|
2
|
+
import { IEntityDefinition } from "../contracts/base/entity-definition";
|
|
3
|
+
import { IEntityDefinitionIterator } from "../contracts/querying/entity-definition-iterator";
|
|
4
|
+
import { IEntityDefinitionQueryResult } from "../contracts/querying/entity-definition-query-result";
|
|
5
|
+
import { IIdIterator } from "../contracts/querying/id-iterator";
|
|
6
|
+
import { IIdQueryResult } from "../contracts/querying/id-query-result";
|
|
7
|
+
import { IExtendedContentHubClient } from "./extended-client";
|
|
8
|
+
export interface IEntityDefinitionsClient {
|
|
9
|
+
/**
|
|
10
|
+
* Get the {@link IEntityDefinition} instance by the specified name.
|
|
11
|
+
* @param name - The name of the definition
|
|
12
|
+
* @returns Promise which resolves to an {@link IEntityDefinition} or null.
|
|
13
|
+
*/
|
|
14
|
+
getAsync(name: string): NullableResultPromise<IEntityDefinition>;
|
|
15
|
+
/**
|
|
16
|
+
* Get the {@link IEntityDefinition} instance by the specified id.
|
|
17
|
+
* @param id - The id of the definition
|
|
18
|
+
* @returns Promise which resolves to an {@link IEntityDefinition} or null.
|
|
19
|
+
*/
|
|
20
|
+
getAsync(id: number): NullableResultPromise<IEntityDefinition>;
|
|
21
|
+
/**
|
|
22
|
+
* Get all the {@link IEntityDefinition}s
|
|
23
|
+
* @returns Promise which resolved to an array of {@link IEntityDefinition}s.
|
|
24
|
+
*/
|
|
25
|
+
getAllAsync(): Promise<Array<IEntityDefinition>>;
|
|
26
|
+
/**
|
|
27
|
+
* Get all the {@link IEntityDefinition}s (cached).
|
|
28
|
+
* @returns Promise which resolved to an array of {@link IEntityDefinition}s.
|
|
29
|
+
*/
|
|
30
|
+
getAllCachedAsync(): Promise<Array<IEntityDefinition>>;
|
|
31
|
+
/**
|
|
32
|
+
* Get the cached {@link IEntityDefinition} instance by the specified name.
|
|
33
|
+
* @param name - The name of the definition
|
|
34
|
+
* @returns Promise which resolves to an {@link IEntityDefinition} or null.
|
|
35
|
+
*/
|
|
36
|
+
getCachedAsync(name: string): NullableResultPromise<IEntityDefinition>;
|
|
37
|
+
getCachedAsync(id: number): NullableResultPromise<IEntityDefinition>;
|
|
38
|
+
getNameAsync(id: number): NullableResultPromise<string>;
|
|
39
|
+
getNameCachedAsync(id: number): NullableResultPromise<string>;
|
|
40
|
+
getIdAsync(name: string): NullableResultPromise<number>;
|
|
41
|
+
getIdCachedAsync(name: string): NullableResultPromise<number>;
|
|
42
|
+
getManyAsync(names: Array<string>): Promise<Array<IEntityDefinition>>;
|
|
43
|
+
getManyAsync(ids: Array<number>): Promise<Array<IEntityDefinition>>;
|
|
44
|
+
getManyCachedAsync(names: Array<string>): Promise<Array<IEntityDefinition>>;
|
|
45
|
+
getManyCachedAsync(ids: Array<number>): Promise<Array<IEntityDefinition>>;
|
|
46
|
+
getNamesAsync(ids: Array<number>): Promise<MapNumberTo<string>>;
|
|
47
|
+
getNamesCachedAsync(ids: Array<number>): Promise<MapNumberTo<string>>;
|
|
48
|
+
getIdsAsync(names: Array<string>): Promise<MapStringTo<number>>;
|
|
49
|
+
getIdsCachedAsync(names: Array<string>): Promise<MapStringTo<number>>;
|
|
50
|
+
saveAsync(definition: IEntityDefinition): Promise<number>;
|
|
51
|
+
deleteAsync(name: string): Promise<void>;
|
|
52
|
+
deleteAsync(id: number): Promise<void>;
|
|
53
|
+
getRangeAsync(skip: number, take: number): Promise<IEntityDefinitionQueryResult>;
|
|
54
|
+
getRangeIdsAsync(skip: number, take: number): Promise<IIdQueryResult>;
|
|
55
|
+
createEntityDefinitionIterator(pageSize: number): IEntityDefinitionIterator;
|
|
56
|
+
createEntityDefinitionIdIterator(pageSize: number): IIdIterator;
|
|
57
|
+
}
|
|
58
|
+
export declare class EntityDefinitionsClient implements IEntityDefinitionsClient {
|
|
59
|
+
private static _batchSize;
|
|
60
|
+
private readonly _client;
|
|
61
|
+
private readonly _cache;
|
|
62
|
+
constructor(client: IExtendedContentHubClient);
|
|
63
|
+
getAllCachedAsync(): Promise<Array<IEntityDefinition>>;
|
|
64
|
+
getAllAsync(): Promise<Array<IEntityDefinition>>;
|
|
65
|
+
getAsync(param: string | number): NullableResultPromise<IEntityDefinition>;
|
|
66
|
+
getCachedAsync(param: string | number): NullableResultPromise<IEntityDefinition>;
|
|
67
|
+
getNameAsync(id: number): NullableResultPromise<string>;
|
|
68
|
+
getNameCachedAsync(id: number): NullableResultPromise<string>;
|
|
69
|
+
getIdAsync(name: string): NullableResultPromise<number>;
|
|
70
|
+
getIdCachedAsync(name: string): NullableResultPromise<number>;
|
|
71
|
+
getManyAsync(param: Array<string> | Array<number>): Promise<Array<IEntityDefinition>>;
|
|
72
|
+
getManyCachedAsync(param: Array<string> | Array<number>): Promise<Array<IEntityDefinition>>;
|
|
73
|
+
getNamesAsync(ids: Array<number>): Promise<MapNumberTo<string>>;
|
|
74
|
+
getNamesCachedAsync(ids: Array<number>): Promise<MapNumberTo<string>>;
|
|
75
|
+
getIdsAsync(names: Array<string>): Promise<MapStringTo<number>>;
|
|
76
|
+
getIdsCachedAsync(names: Array<string>): Promise<MapStringTo<number>>;
|
|
77
|
+
saveAsync(definition: IEntityDefinition): Promise<number>;
|
|
78
|
+
deleteAsync(param: string | number): Promise<void>;
|
|
79
|
+
getRangeAsync(skip: number, take: number): Promise<IEntityDefinitionQueryResult>;
|
|
80
|
+
getRangeIdsAsync(skip: number, take: number): Promise<IIdQueryResult>;
|
|
81
|
+
createEntityDefinitionIterator(pageSize: number): IEntityDefinitionIterator;
|
|
82
|
+
createEntityDefinitionIdIterator(pageSize: number): IIdIterator;
|
|
83
|
+
private getDefinitionsSkipTake;
|
|
84
|
+
private getDefinitionAsync;
|
|
85
|
+
private getDefinitionsBatchedAsync;
|
|
86
|
+
private getAllBatchedAsync;
|
|
87
|
+
}
|