@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,76 @@
|
|
|
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.EntityFactory = exports.EntityFactoryBase = void 0;
|
|
16
|
+
const string_format_1 = __importDefault(require("string-format"));
|
|
17
|
+
const entity_construction_args_1 = require("../contracts/base/entity-construction-args");
|
|
18
|
+
const culture_load_option_1 = require("../contracts/querying/culture-load-option");
|
|
19
|
+
const error_messages_1 = __importDefault(require("../error-messages"));
|
|
20
|
+
const argument_error_1 = require("../errors/argument-error");
|
|
21
|
+
const guard_1 = __importDefault(require("../guard"));
|
|
22
|
+
const load_options_mapper_1 = require("../mappers/load-options-mapper");
|
|
23
|
+
const property_factory_1 = require("./property-factory");
|
|
24
|
+
class EntityFactoryBase {
|
|
25
|
+
constructor(client, relationFactory, cultureLoader, entityCreator) {
|
|
26
|
+
guard_1.default.notNullOrUndefined(client);
|
|
27
|
+
guard_1.default.notNullOrUndefined(relationFactory);
|
|
28
|
+
guard_1.default.notNullOrUndefined(cultureLoader);
|
|
29
|
+
guard_1.default.notNullOrUndefined(entityCreator);
|
|
30
|
+
this._client = client;
|
|
31
|
+
this._relationFactory = relationFactory;
|
|
32
|
+
this._cultureLoader = cultureLoader;
|
|
33
|
+
this._entityCreator = entityCreator;
|
|
34
|
+
}
|
|
35
|
+
createAsync(param, cultureLoadOption = culture_load_option_1.CultureLoadOption.Default) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
let definition;
|
|
38
|
+
if (typeof param === "string") {
|
|
39
|
+
guard_1.default.stringNotNullOrEmpty(param);
|
|
40
|
+
definition = yield this.getEntityDefinitionAsync(param);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
guard_1.default.notNullOrUndefined(param);
|
|
44
|
+
definition = param;
|
|
45
|
+
}
|
|
46
|
+
const cultures = yield load_options_mapper_1.LoadOptionsMapper.mapCultureLoadOptionsAsync(cultureLoadOption, this._cultureLoader);
|
|
47
|
+
const properties = property_factory_1.PropertyFactory.createProperties(definition.getPropertyDefinitions(), cultures);
|
|
48
|
+
const relations = this._relationFactory.createRelations(definition.getRelationDefinitions());
|
|
49
|
+
const args = new entity_construction_args_1.EntityConstructionArgs(definition.name, {
|
|
50
|
+
cultures: cultures,
|
|
51
|
+
properties: properties,
|
|
52
|
+
relations: relations,
|
|
53
|
+
});
|
|
54
|
+
const entity = this._entityCreator.createTypedEntity(args);
|
|
55
|
+
entity.startTracking();
|
|
56
|
+
return entity;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
getEntityDefinitionAsync(definitionName) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const definition = yield this._client.entityDefinitions.getCachedAsync(definitionName);
|
|
62
|
+
if (definition == null) {
|
|
63
|
+
const errorMessage = string_format_1.default(error_messages_1.default.EntityFactory.DefinitionDoesNotExist, definitionName);
|
|
64
|
+
throw new argument_error_1.ArgumentError(errorMessage);
|
|
65
|
+
}
|
|
66
|
+
return definition;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.EntityFactoryBase = EntityFactoryBase;
|
|
71
|
+
class EntityFactory extends EntityFactoryBase {
|
|
72
|
+
constructor(client, relationFactory, cultureLoader, entityCreator) {
|
|
73
|
+
super(client, relationFactory, cultureLoader, entityCreator);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.EntityFactory = EntityFactory;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MapCultureTo } from "../base-types";
|
|
2
|
+
import { IFlatOptionList } from "../contracts/base/option-lists/flat-option-list";
|
|
3
|
+
import { IHierarchicalOptionList } from "../contracts/base/option-lists/hierarchical-option-list";
|
|
4
|
+
/**
|
|
5
|
+
* A factory to create option lists.
|
|
6
|
+
*/
|
|
7
|
+
export interface IOptionListFactory {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new flat option list with the specified name.
|
|
10
|
+
* @param name - Name of the option list
|
|
11
|
+
* @param labels - Optional translations
|
|
12
|
+
* @returns A new flat option list instance.
|
|
13
|
+
*/
|
|
14
|
+
createFlatOptionList(name: string, labels?: MapCultureTo<string>): IFlatOptionList;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new hierarchical option list with the specified name.
|
|
17
|
+
* @param name - Name of the option list
|
|
18
|
+
* @param labels - Optional translations
|
|
19
|
+
* @returns A new hierarchical option list instance.
|
|
20
|
+
*/
|
|
21
|
+
createHierarchicalOptionList(name: string, labels?: MapCultureTo<string>): IHierarchicalOptionList;
|
|
22
|
+
}
|
|
23
|
+
export declare class OptionListFactory implements IOptionListFactory {
|
|
24
|
+
createFlatOptionList(name: string, labels?: MapCultureTo<string>): IFlatOptionList;
|
|
25
|
+
createHierarchicalOptionList(name: string, labels?: MapCultureTo<string>): IHierarchicalOptionList;
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.OptionListFactory = void 0;
|
|
7
|
+
const flat_option_list_1 = __importDefault(require("../contracts/base/option-lists/flat-option-list"));
|
|
8
|
+
const hierarchical_option_list_1 = __importDefault(require("../contracts/base/option-lists/hierarchical-option-list"));
|
|
9
|
+
const guard_1 = __importDefault(require("../guard"));
|
|
10
|
+
class OptionListFactory {
|
|
11
|
+
createFlatOptionList(name, labels) {
|
|
12
|
+
guard_1.default.stringNotNullOrEmpty(name);
|
|
13
|
+
const optionList = new flat_option_list_1.default(name, labels);
|
|
14
|
+
return optionList;
|
|
15
|
+
}
|
|
16
|
+
createHierarchicalOptionList(name, labels) {
|
|
17
|
+
guard_1.default.stringNotNullOrEmpty(name);
|
|
18
|
+
const optionList = new hierarchical_option_list_1.default(name, labels);
|
|
19
|
+
return optionList;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.OptionListFactory = OptionListFactory;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IPropertyDefinition } from "../contracts/base";
|
|
2
|
+
import { ICultureInsensitiveProperty } from "../contracts/base/culture-insensitive-property";
|
|
3
|
+
import { ICultureSensitiveProperty } from "../contracts/base/culture-sensitive-property";
|
|
4
|
+
import { IProperty } from "../contracts/base/property";
|
|
5
|
+
import CultureInfo from "../culture-info";
|
|
6
|
+
export declare class PropertyFactory {
|
|
7
|
+
static createProperties(definitions: Array<IPropertyDefinition>, cultures?: Array<CultureInfo>): Array<IProperty>;
|
|
8
|
+
static createCultureSensitiveProperty(definition: IPropertyDefinition, cultures: Array<CultureInfo>): ICultureSensitiveProperty;
|
|
9
|
+
static createCultureInsensitiveProperty(definition: IPropertyDefinition): ICultureInsensitiveProperty;
|
|
10
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PropertyFactory = void 0;
|
|
7
|
+
const string_format_1 = __importDefault(require("string-format"));
|
|
8
|
+
const base_1 = require("../contracts/base");
|
|
9
|
+
const culture_insensitive_property_1 = require("../contracts/base/culture-insensitive-property");
|
|
10
|
+
const culture_sensitive_property_1 = require("../contracts/base/culture-sensitive-property");
|
|
11
|
+
const error_messages_1 = __importDefault(require("../error-messages"));
|
|
12
|
+
const argument_error_1 = require("../errors/argument-error");
|
|
13
|
+
const guard_1 = __importDefault(require("../guard"));
|
|
14
|
+
class PropertyFactory {
|
|
15
|
+
static createProperties(definitions, cultures) {
|
|
16
|
+
if (definitions == null) {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
const list = [];
|
|
20
|
+
for (const definition of definitions) {
|
|
21
|
+
if (definition.isMultiLanguage && cultures != undefined && cultures.length > 0) {
|
|
22
|
+
const property = this.createCultureSensitiveProperty(definition, cultures);
|
|
23
|
+
list.push(property);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
const property = this.createCultureInsensitiveProperty(definition);
|
|
27
|
+
list.push(property);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return list;
|
|
31
|
+
}
|
|
32
|
+
static createCultureSensitiveProperty(definition, cultures) {
|
|
33
|
+
guard_1.default.notNullOrUndefined(definition);
|
|
34
|
+
guard_1.default.notNullOrUndefined(cultures);
|
|
35
|
+
guard_1.default.arrayNotEmpty(cultures);
|
|
36
|
+
guard_1.default.arrayNoneNullOrInvariantCulture(cultures);
|
|
37
|
+
if (!definition.isMultiLanguage) {
|
|
38
|
+
const errorMessage = string_format_1.default(error_messages_1.default.PropertyFactory.MustBeCultureSensitive);
|
|
39
|
+
throw new argument_error_1.ArgumentError(errorMessage);
|
|
40
|
+
}
|
|
41
|
+
const property = new culture_sensitive_property_1.CultureSensitiveProperty(definition.name, new base_1.TypeInfo(definition.dataType, definition.isMultiValue), cultures);
|
|
42
|
+
return property;
|
|
43
|
+
}
|
|
44
|
+
static createCultureInsensitiveProperty(definition) {
|
|
45
|
+
guard_1.default.notNullOrUndefined(definition);
|
|
46
|
+
if (definition.isMultiLanguage) {
|
|
47
|
+
const errorMessage = string_format_1.default(error_messages_1.default.PropertyFactory.CannotBeCultureSensitive, definition.name);
|
|
48
|
+
throw new argument_error_1.ArgumentError(errorMessage);
|
|
49
|
+
}
|
|
50
|
+
const property = new culture_insensitive_property_1.CultureInsensitiveProperty(definition.name, new base_1.TypeInfo(definition.dataType, definition.isMultiValue));
|
|
51
|
+
return property;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.PropertyFactory = PropertyFactory;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { IExtendedContentHubClient } from "../clients/extended-client";
|
|
2
|
+
import { IRelation } from "../contracts/base/relation";
|
|
3
|
+
import { IRelationDefinition } from "../contracts/base/relation-definition";
|
|
4
|
+
import { IChildToManyParentsRelation } from "../contracts/base/relations/child-to-many-parents-relation";
|
|
5
|
+
import { IChildToOneParentRelation } from "../contracts/base/relations/child-to-one-parent-relation";
|
|
6
|
+
import { IParentToManyChildrenRelation } from "../contracts/base/relations/parent-to-many-children-relation";
|
|
7
|
+
import { IParentToOneChildRelation } from "../contracts/base/relations/parent-to-one-child-relation";
|
|
8
|
+
export interface IRelationFactory {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a {@link IChildToManyParentsRelation}.
|
|
11
|
+
* @param definition - The relation definition
|
|
12
|
+
* @returns A new relation.
|
|
13
|
+
*/
|
|
14
|
+
createChildToManyParentsRelation(definition: IRelationDefinition): IChildToManyParentsRelation;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a {@link IChildToOneParentRelation}.
|
|
17
|
+
* @param definition - The relation definition
|
|
18
|
+
* @returns A new relation.
|
|
19
|
+
*/
|
|
20
|
+
createChildToOneParentRelation(definition: IRelationDefinition): IChildToOneParentRelation;
|
|
21
|
+
/**
|
|
22
|
+
* Creates a {@link IParentToManyChildrenRelation}.
|
|
23
|
+
* @param definition - The relation definition
|
|
24
|
+
* @returns A new relation.
|
|
25
|
+
*/
|
|
26
|
+
createParentToManyChildrenRelation(definition: IRelationDefinition): IParentToManyChildrenRelation;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a {@link IParentToOneChildRelation}.
|
|
29
|
+
* @param definition - The relation definition
|
|
30
|
+
* @returns A new relation.
|
|
31
|
+
*/
|
|
32
|
+
createParentToOneChildRelation(definition: IRelationDefinition): IParentToOneChildRelation;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a {@link IRelation}.
|
|
35
|
+
* @param definition - The relation definition
|
|
36
|
+
* @returns A new relation.
|
|
37
|
+
*/
|
|
38
|
+
createRelation(definition: IRelationDefinition): IRelation;
|
|
39
|
+
/**
|
|
40
|
+
* Creates a new {@link IRelation} collection.
|
|
41
|
+
* @param definition - The relation definition
|
|
42
|
+
* @returns A collection of relations.
|
|
43
|
+
*/
|
|
44
|
+
createRelations(definitions: Array<IRelationDefinition>): Array<IRelation>;
|
|
45
|
+
}
|
|
46
|
+
export declare class RelationFactory implements IRelationFactory {
|
|
47
|
+
private readonly _client;
|
|
48
|
+
constructor(client: IExtendedContentHubClient);
|
|
49
|
+
createChildToManyParentsRelation(definition: IRelationDefinition): IChildToManyParentsRelation;
|
|
50
|
+
createChildToOneParentRelation(definition: IRelationDefinition): IChildToOneParentRelation;
|
|
51
|
+
createParentToManyChildrenRelation(definition: IRelationDefinition): IParentToManyChildrenRelation;
|
|
52
|
+
createParentToOneChildRelation(definition: IRelationDefinition): IParentToOneChildRelation;
|
|
53
|
+
createRelation(definition: IRelationDefinition): IRelation;
|
|
54
|
+
createRelations(definitions: Array<IRelationDefinition>): Array<IRelation>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.RelationFactory = void 0;
|
|
7
|
+
const relation_cardinality_1 = require("../contracts/base/relation-cardinality");
|
|
8
|
+
const relation_role_1 = require("../contracts/base/relation-role");
|
|
9
|
+
const child_to_many_parents_relation_1 = require("../contracts/base/relations/child-to-many-parents-relation");
|
|
10
|
+
const child_to_one_parent_relation_1 = require("../contracts/base/relations/child-to-one-parent-relation");
|
|
11
|
+
const parent_to_many_children_relation_1 = require("../contracts/base/relations/parent-to-many-children-relation");
|
|
12
|
+
const parent_to_one_child_relation_1 = require("../contracts/base/relations/parent-to-one-child-relation");
|
|
13
|
+
const guard_1 = __importDefault(require("../guard"));
|
|
14
|
+
class RelationFactory {
|
|
15
|
+
constructor(client) {
|
|
16
|
+
this._client = client;
|
|
17
|
+
}
|
|
18
|
+
createChildToManyParentsRelation(definition) {
|
|
19
|
+
const relation = new child_to_many_parents_relation_1.ChildToManyParentsRelation(definition.name);
|
|
20
|
+
return relation;
|
|
21
|
+
}
|
|
22
|
+
createChildToOneParentRelation(definition) {
|
|
23
|
+
const relation = new child_to_one_parent_relation_1.ChildToOneParentRelation(definition.name);
|
|
24
|
+
return relation;
|
|
25
|
+
}
|
|
26
|
+
createParentToManyChildrenRelation(definition) {
|
|
27
|
+
const relation = new parent_to_many_children_relation_1.ParentToManyChildrenRelation(definition.name);
|
|
28
|
+
return relation;
|
|
29
|
+
}
|
|
30
|
+
createParentToOneChildRelation(definition) {
|
|
31
|
+
const relation = new parent_to_one_child_relation_1.ParentToOneChildRelation(definition.name);
|
|
32
|
+
return relation;
|
|
33
|
+
}
|
|
34
|
+
createRelation(definition) {
|
|
35
|
+
guard_1.default.notNullOrUndefined(definition);
|
|
36
|
+
let result = null;
|
|
37
|
+
if (definition.role === relation_role_1.RelationRole.Parent) {
|
|
38
|
+
if (definition.cardinality === relation_cardinality_1.RelationCardinality.ManyToMany ||
|
|
39
|
+
definition.cardinality === relation_cardinality_1.RelationCardinality.OneToMany) {
|
|
40
|
+
result = this.createParentToManyChildrenRelation(definition);
|
|
41
|
+
}
|
|
42
|
+
else if (definition.cardinality === relation_cardinality_1.RelationCardinality.OneToOne) {
|
|
43
|
+
result = this.createParentToOneChildRelation(definition);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else if (definition.role === relation_role_1.RelationRole.Child) {
|
|
47
|
+
if (definition.cardinality === relation_cardinality_1.RelationCardinality.ManyToMany) {
|
|
48
|
+
result = this.createChildToManyParentsRelation(definition);
|
|
49
|
+
}
|
|
50
|
+
else if (definition.cardinality === relation_cardinality_1.RelationCardinality.OneToOne ||
|
|
51
|
+
definition.cardinality === relation_cardinality_1.RelationCardinality.OneToMany) {
|
|
52
|
+
result = this.createChildToOneParentRelation(definition);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (result === null) {
|
|
56
|
+
throw `Relation with name '${definition.name}', cardinality '${definition.cardinality}' and role '${definition.role}' not supported.`; //TODO
|
|
57
|
+
}
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
createRelations(definitions) {
|
|
61
|
+
if (!definitions || !definitions.length) {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
const list = definitions.map(definition => {
|
|
65
|
+
return this.createRelation(definition);
|
|
66
|
+
});
|
|
67
|
+
return list;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.RelationFactory = RelationFactory;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Nullable } from "./base-types";
|
|
2
|
+
/**
|
|
3
|
+
* Represents the file version of an assembly
|
|
4
|
+
*/
|
|
5
|
+
export declare class FileVersion {
|
|
6
|
+
major: number;
|
|
7
|
+
minor: number;
|
|
8
|
+
patch: number;
|
|
9
|
+
revision: number;
|
|
10
|
+
constructor(major: number, minor: number, patch?: number, revision?: number);
|
|
11
|
+
/**
|
|
12
|
+
* Parses a file version string (format: `<major>.<minor>.<patch>.<revision>`) to an instance.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Throws an error when parsing fails.
|
|
16
|
+
*
|
|
17
|
+
* @param fileVersion - The file version string to parse
|
|
18
|
+
* @returns A file version instance.
|
|
19
|
+
*/
|
|
20
|
+
static parse(fileVersion: string): FileVersion;
|
|
21
|
+
/**
|
|
22
|
+
* Tries to parse a file version string (see {@link FileVersion.parse}) and returns `null` or the specified default
|
|
23
|
+
* value when it fails.
|
|
24
|
+
*
|
|
25
|
+
* @param fileVersion - The file version string to parse
|
|
26
|
+
* @param defaultValue - The value to return when parsing fails
|
|
27
|
+
* @returns A file version instance or `null`.
|
|
28
|
+
*/
|
|
29
|
+
static tryParse(fileVersion: string, defaultValue?: Nullable<FileVersion>): Nullable<FileVersion>;
|
|
30
|
+
/**
|
|
31
|
+
* Compares if the current instance is smaller than the specified version.
|
|
32
|
+
*
|
|
33
|
+
* @param otherVersion - The version to compare the current instance to
|
|
34
|
+
* @returns A boolean with the result.
|
|
35
|
+
*/
|
|
36
|
+
smallerThan(otherVersion: FileVersion): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Compares if the current instance is smaller or equal than the specified version.
|
|
39
|
+
*
|
|
40
|
+
* @param otherVersion - The version to compare the current instance to
|
|
41
|
+
* @returns A boolean with the result.
|
|
42
|
+
*/
|
|
43
|
+
smallerThanOrEqual(otherVersion: FileVersion): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Compares if the current instance is greater than the specified version.
|
|
46
|
+
*
|
|
47
|
+
* @param otherVersion - The version to compare the current instance to
|
|
48
|
+
* @returns A boolean with the result.
|
|
49
|
+
*/
|
|
50
|
+
greaterThan(otherVersion: FileVersion): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Compares if the current instance is greater or equal than the specified version.
|
|
53
|
+
*
|
|
54
|
+
* @param otherVersion - The version to compare the current instance to
|
|
55
|
+
* @returns A boolean with the result.
|
|
56
|
+
*/
|
|
57
|
+
greaterThanOrEqual(otherVersion: FileVersion): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Compares if the current instance equals (by values) the specified file.
|
|
60
|
+
*
|
|
61
|
+
* @param otherVersion - The version to compare the current instance to
|
|
62
|
+
* @returns A boolean with the result.
|
|
63
|
+
*/
|
|
64
|
+
equals(otherVersion: FileVersion): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Compare the current instance with the specified file.
|
|
67
|
+
*
|
|
68
|
+
* @param otherVersion - The version to compare the current instance to
|
|
69
|
+
* @returns 0 when the versions are equal,.
|
|
70
|
+
* 1 when the current instance is greater,
|
|
71
|
+
* -1 when the current instance is smaller
|
|
72
|
+
*/
|
|
73
|
+
compareTo(otherVersion: FileVersion): 1 | 0 | -1;
|
|
74
|
+
/**
|
|
75
|
+
* Gets the file version string representation for this instance.
|
|
76
|
+
*/
|
|
77
|
+
toString(): string;
|
|
78
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FileVersion = void 0;
|
|
7
|
+
const guard_1 = __importDefault(require("./guard"));
|
|
8
|
+
/**
|
|
9
|
+
* Represents the file version of an assembly
|
|
10
|
+
*/
|
|
11
|
+
class FileVersion {
|
|
12
|
+
constructor(major, minor, patch = 0, revision = 0) {
|
|
13
|
+
this.major = major;
|
|
14
|
+
this.minor = minor;
|
|
15
|
+
this.patch = patch;
|
|
16
|
+
this.revision = revision;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Parses a file version string (format: `<major>.<minor>.<patch>.<revision>`) to an instance.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Throws an error when parsing fails.
|
|
23
|
+
*
|
|
24
|
+
* @param fileVersion - The file version string to parse
|
|
25
|
+
* @returns A file version instance.
|
|
26
|
+
*/
|
|
27
|
+
static parse(fileVersion) {
|
|
28
|
+
guard_1.default.stringNotNullOrEmpty(fileVersion);
|
|
29
|
+
try {
|
|
30
|
+
if (!/^(\d+\.){3}\d+$/.test(fileVersion)) {
|
|
31
|
+
throw 0;
|
|
32
|
+
}
|
|
33
|
+
const parts = fileVersion.split(".");
|
|
34
|
+
if (parts.length !== 4)
|
|
35
|
+
throw 0;
|
|
36
|
+
const major = parseInt(parts[0]);
|
|
37
|
+
const minor = parseInt(parts[1]);
|
|
38
|
+
const patch = parseInt(parts[2]);
|
|
39
|
+
const revision = parseInt(parts[3]);
|
|
40
|
+
if (isNaN(major + minor + patch + revision))
|
|
41
|
+
throw 0;
|
|
42
|
+
return new FileVersion(major, minor, patch, revision);
|
|
43
|
+
}
|
|
44
|
+
catch (ex) {
|
|
45
|
+
throw "Invalid version format. (Format: <major>.<minor>.<patch>.<revision>)";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Tries to parse a file version string (see {@link FileVersion.parse}) and returns `null` or the specified default
|
|
50
|
+
* value when it fails.
|
|
51
|
+
*
|
|
52
|
+
* @param fileVersion - The file version string to parse
|
|
53
|
+
* @param defaultValue - The value to return when parsing fails
|
|
54
|
+
* @returns A file version instance or `null`.
|
|
55
|
+
*/
|
|
56
|
+
static tryParse(fileVersion, defaultValue = null) {
|
|
57
|
+
try {
|
|
58
|
+
return FileVersion.parse(fileVersion);
|
|
59
|
+
}
|
|
60
|
+
catch (ex) {
|
|
61
|
+
return defaultValue;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Compares if the current instance is smaller than the specified version.
|
|
66
|
+
*
|
|
67
|
+
* @param otherVersion - The version to compare the current instance to
|
|
68
|
+
* @returns A boolean with the result.
|
|
69
|
+
*/
|
|
70
|
+
smallerThan(otherVersion) {
|
|
71
|
+
return this.compareTo(otherVersion) === -1;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Compares if the current instance is smaller or equal than the specified version.
|
|
75
|
+
*
|
|
76
|
+
* @param otherVersion - The version to compare the current instance to
|
|
77
|
+
* @returns A boolean with the result.
|
|
78
|
+
*/
|
|
79
|
+
smallerThanOrEqual(otherVersion) {
|
|
80
|
+
return this.compareTo(otherVersion) !== 1;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Compares if the current instance is greater than the specified version.
|
|
84
|
+
*
|
|
85
|
+
* @param otherVersion - The version to compare the current instance to
|
|
86
|
+
* @returns A boolean with the result.
|
|
87
|
+
*/
|
|
88
|
+
greaterThan(otherVersion) {
|
|
89
|
+
return this.compareTo(otherVersion) === 1;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Compares if the current instance is greater or equal than the specified version.
|
|
93
|
+
*
|
|
94
|
+
* @param otherVersion - The version to compare the current instance to
|
|
95
|
+
* @returns A boolean with the result.
|
|
96
|
+
*/
|
|
97
|
+
greaterThanOrEqual(otherVersion) {
|
|
98
|
+
return this.compareTo(otherVersion) !== -1;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Compares if the current instance equals (by values) the specified file.
|
|
102
|
+
*
|
|
103
|
+
* @param otherVersion - The version to compare the current instance to
|
|
104
|
+
* @returns A boolean with the result.
|
|
105
|
+
*/
|
|
106
|
+
equals(otherVersion) {
|
|
107
|
+
return this.compareTo(otherVersion) === 0;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Compare the current instance with the specified file.
|
|
111
|
+
*
|
|
112
|
+
* @param otherVersion - The version to compare the current instance to
|
|
113
|
+
* @returns 0 when the versions are equal,.
|
|
114
|
+
* 1 when the current instance is greater,
|
|
115
|
+
* -1 when the current instance is smaller
|
|
116
|
+
*/
|
|
117
|
+
compareTo(otherVersion) {
|
|
118
|
+
if (otherVersion == null) {
|
|
119
|
+
return 1;
|
|
120
|
+
}
|
|
121
|
+
else if (this.major !== otherVersion.major) {
|
|
122
|
+
return this.major < otherVersion.major ? -1 : 1;
|
|
123
|
+
}
|
|
124
|
+
else if (this.minor !== otherVersion.minor) {
|
|
125
|
+
return this.minor < otherVersion.minor ? -1 : 1;
|
|
126
|
+
}
|
|
127
|
+
else if (this.patch !== otherVersion.patch) {
|
|
128
|
+
return this.patch < otherVersion.patch ? -1 : 1;
|
|
129
|
+
}
|
|
130
|
+
else if (this.revision !== otherVersion.revision) {
|
|
131
|
+
return this.revision < otherVersion.revision ? -1 : 1;
|
|
132
|
+
}
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Gets the file version string representation for this instance.
|
|
137
|
+
*/
|
|
138
|
+
toString() {
|
|
139
|
+
if (isNaN(this.major + this.minor + this.patch + this.revision))
|
|
140
|
+
return "";
|
|
141
|
+
return `${this.major}.${this.minor}.${this.patch}.${this.revision}`;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
exports.FileVersion = FileVersion;
|
package/dist/guard.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import CultureInfo from "./culture-info";
|
|
2
|
+
export default class Guard {
|
|
3
|
+
static notNull(value: unknown, valueName?: string): void;
|
|
4
|
+
static notUndefined(value: unknown, valueName?: string): void;
|
|
5
|
+
static notNullOrUndefined(value: unknown, valueName?: string): void;
|
|
6
|
+
static parsableInteger(value: any, valueName?: string): void;
|
|
7
|
+
static parsableFloat(value: any, valueName?: string): void;
|
|
8
|
+
static isString: (value: string) => void;
|
|
9
|
+
static isInteger: (value: number) => void;
|
|
10
|
+
static arrayNotEmpty: (value: unknown[]) => void;
|
|
11
|
+
static arrayMaxOne: (value: unknown[]) => void;
|
|
12
|
+
static arrayNoneNullOrUndefined(value: Array<unknown>, valueName?: string, isOptional?: boolean): void;
|
|
13
|
+
static arrayNoneNullOrEmptyString(value: Array<unknown>, valueName?: string, isOptional?: boolean): void;
|
|
14
|
+
static arrayNoneNullOrInvariantCulture(value: Array<CultureInfo>, valueName?: string, isOptional?: boolean): void;
|
|
15
|
+
static isStringArray(value: Array<unknown>, valueName?: string, isOptional?: boolean): void;
|
|
16
|
+
static isIntegerArray(value: Array<unknown>, valueName?: string, isOptional?: boolean): void;
|
|
17
|
+
static isNumberArray(value: Array<unknown>, valueName?: string, isOptional?: boolean): void;
|
|
18
|
+
static stringNotNullOrEmpty: (value: string) => void;
|
|
19
|
+
static validId: (value: number) => void;
|
|
20
|
+
static validIdOrNull: (value: number | null) => void;
|
|
21
|
+
static validIds: (value: unknown[]) => void;
|
|
22
|
+
static notInvariantCulture: (culture: CultureInfo) => void;
|
|
23
|
+
static notNegative: (value: number) => void;
|
|
24
|
+
static greaterThan: (number: number, minValue: number) => void;
|
|
25
|
+
static greaterThanOrEqual: (number: number, minValue: number) => void;
|
|
26
|
+
static lessThan: (number: number, maxValue: number) => void;
|
|
27
|
+
static lessThanOrEqual: (number: number, maxValue: number) => void;
|
|
28
|
+
static isNumber: (value: number) => void;
|
|
29
|
+
}
|