@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.
Files changed (636) hide show
  1. package/LICENSE +24 -0
  2. package/dist/api/api-info-resource.d.ts +8 -0
  3. package/dist/api/api-info-resource.js +42 -0
  4. package/dist/api/api-info.d.ts +29 -0
  5. package/dist/api/api-info.js +14 -0
  6. package/dist/api/api-resource.d.ts +4 -0
  7. package/dist/api/api-resource.js +16 -0
  8. package/dist/api/api-routes-dictionary.d.ts +8 -0
  9. package/dist/api/api-routes-dictionary.js +10 -0
  10. package/dist/authentication/oauth-grant-base.d.ts +6 -0
  11. package/dist/authentication/oauth-grant-base.js +42 -0
  12. package/dist/authentication/oauth-grant-type.d.ts +4 -0
  13. package/dist/authentication/oauth-grant-type.js +8 -0
  14. package/dist/authentication/oauth-password-grant.d.ts +8 -0
  15. package/dist/authentication/oauth-password-grant.js +45 -0
  16. package/dist/authentication/oauth-refreshtoken-grant.d.ts +7 -0
  17. package/dist/authentication/oauth-refreshtoken-grant.js +39 -0
  18. package/dist/authentication/token-info.d.ts +6 -0
  19. package/dist/authentication/token-info.js +35 -0
  20. package/dist/base-types.d.ts +56 -0
  21. package/dist/base-types.js +32 -0
  22. package/dist/caches/culture-cache.d.ts +8 -0
  23. package/dist/caches/culture-cache.js +21 -0
  24. package/dist/caches/entity-definition-cache.d.ts +44 -0
  25. package/dist/caches/entity-definition-cache.js +96 -0
  26. package/dist/clients/api-client.d.ts +56 -0
  27. package/dist/clients/api-client.js +107 -0
  28. package/dist/clients/commands-client.d.ts +16 -0
  29. package/dist/clients/commands-client.js +40 -0
  30. package/dist/clients/content-hub-client.d.ts +75 -0
  31. package/dist/clients/content-hub-client.js +66 -0
  32. package/dist/clients/culture-client.d.ts +36 -0
  33. package/dist/clients/culture-client.js +43 -0
  34. package/dist/clients/culture-loader.d.ts +41 -0
  35. package/dist/clients/culture-loader.js +103 -0
  36. package/dist/clients/entities-client.d.ts +201 -0
  37. package/dist/clients/entities-client.js +271 -0
  38. package/dist/clients/entity-definitions-client.d.ts +87 -0
  39. package/dist/clients/entity-definitions-client.js +354 -0
  40. package/dist/clients/extended-client.d.ts +11 -0
  41. package/dist/clients/extended-client.js +2 -0
  42. package/dist/clients/internal-client.d.ts +46 -0
  43. package/dist/clients/internal-client.js +240 -0
  44. package/dist/clients/notifications-client.d.ts +35 -0
  45. package/dist/clients/notifications-client.js +128 -0
  46. package/dist/clients/option-list-client.d.ts +49 -0
  47. package/dist/clients/option-list-client.js +85 -0
  48. package/dist/clients/pages-client.d.ts +36 -0
  49. package/dist/clients/pages-client.js +52 -0
  50. package/dist/clients/policies-client.d.ts +47 -0
  51. package/dist/clients/policies-client.js +92 -0
  52. package/dist/clients/querying-client.d.ts +34 -0
  53. package/dist/clients/querying-client.js +95 -0
  54. package/dist/clients/raw-client.d.ts +29 -0
  55. package/dist/clients/raw-client.js +79 -0
  56. package/dist/clients/request-message.d.ts +25 -0
  57. package/dist/clients/request-message.js +12 -0
  58. package/dist/clients/response-handler.d.ts +30 -0
  59. package/dist/clients/response-handler.js +145 -0
  60. package/dist/clients/response-message.d.ts +45 -0
  61. package/dist/clients/response-message.js +34 -0
  62. package/dist/clients/schema-querying.d.ts +16 -0
  63. package/dist/clients/schema-querying.js +70 -0
  64. package/dist/clients/search-client.d.ts +16 -0
  65. package/dist/clients/search-client.js +36 -0
  66. package/dist/clients/settings-client.d.ts +37 -0
  67. package/dist/clients/settings-client.js +126 -0
  68. package/dist/clients/users-client.d.ts +150 -0
  69. package/dist/clients/users-client.js +317 -0
  70. package/dist/clients/web-content-hub-client.d.ts +13 -0
  71. package/dist/clients/web-content-hub-client.js +2 -0
  72. package/dist/constants/api.d.ts +130 -0
  73. package/dist/constants/api.js +133 -0
  74. package/dist/constants/defaults.d.ts +7 -0
  75. package/dist/constants/defaults.js +10 -0
  76. package/dist/constants/definitions.d.ts +62 -0
  77. package/dist/constants/definitions.js +88 -0
  78. package/dist/constants/index.d.ts +5 -0
  79. package/dist/constants/index.js +30 -0
  80. package/dist/constants/notifications.d.ts +7 -0
  81. package/dist/constants/notifications.js +10 -0
  82. package/dist/contracts/base/culture-insensitive-property.d.ts +28 -0
  83. package/dist/contracts/base/culture-insensitive-property.js +47 -0
  84. package/dist/contracts/base/culture-sensitive-property.d.ts +49 -0
  85. package/dist/contracts/base/culture-sensitive-property.js +113 -0
  86. package/dist/contracts/base/data-type.d.ts +18 -0
  87. package/dist/contracts/base/data-type.js +24 -0
  88. package/dist/contracts/base/entity-base.d.ts +65 -0
  89. package/dist/contracts/base/entity-base.js +362 -0
  90. package/dist/contracts/base/entity-construction-args.d.ts +15 -0
  91. package/dist/contracts/base/entity-construction-args.js +16 -0
  92. package/dist/contracts/base/entity-definition.d.ts +108 -0
  93. package/dist/contracts/base/entity-definition.js +126 -0
  94. package/dist/contracts/base/entity.d.ts +237 -0
  95. package/dist/contracts/base/entity.js +76 -0
  96. package/dist/contracts/base/index.d.ts +14 -0
  97. package/dist/contracts/base/index.js +26 -0
  98. package/dist/contracts/base/json-content-type.d.ts +9 -0
  99. package/dist/contracts/base/json-content-type.js +13 -0
  100. package/dist/contracts/base/lazy-loading-manager.d.ts +4 -0
  101. package/dist/contracts/base/lazy-loading-manager.js +17 -0
  102. package/dist/contracts/base/member-condition.d.ts +48 -0
  103. package/dist/contracts/base/member-condition.js +125 -0
  104. package/dist/contracts/base/member-definition-type.d.ts +13 -0
  105. package/dist/contracts/base/member-definition-type.js +17 -0
  106. package/dist/contracts/base/member-definition.d.ts +77 -0
  107. package/dist/contracts/base/member-definition.js +101 -0
  108. package/dist/contracts/base/member-group.d.ts +54 -0
  109. package/dist/contracts/base/member-group.js +61 -0
  110. package/dist/contracts/base/member.d.ts +32 -0
  111. package/dist/contracts/base/member.js +26 -0
  112. package/dist/contracts/base/option-lists/flat-option-list-value.d.ts +4 -0
  113. package/dist/contracts/base/option-lists/flat-option-list-value.js +9 -0
  114. package/dist/contracts/base/option-lists/flat-option-list.d.ts +9 -0
  115. package/dist/contracts/base/option-lists/flat-option-list.js +11 -0
  116. package/dist/contracts/base/option-lists/hierarchical-option-list.d.ts +9 -0
  117. package/dist/contracts/base/option-lists/hierarchical-option-list.js +11 -0
  118. package/dist/contracts/base/option-lists/hierarchical-options-list-value.d.ts +7 -0
  119. package/dist/contracts/base/option-lists/hierarchical-options-list-value.js +14 -0
  120. package/dist/contracts/base/option-lists/option-list-base.d.ts +23 -0
  121. package/dist/contracts/base/option-lists/option-list-base.js +33 -0
  122. package/dist/contracts/base/option-lists/option-list-type.d.ts +13 -0
  123. package/dist/contracts/base/option-lists/option-list-type.js +17 -0
  124. package/dist/contracts/base/option-lists/option-list-value-base.d.ts +7 -0
  125. package/dist/contracts/base/option-lists/option-list-value-base.js +14 -0
  126. package/dist/contracts/base/option-lists/option-list-value.d.ts +30 -0
  127. package/dist/contracts/base/option-lists/option-list-value.js +2 -0
  128. package/dist/contracts/base/option-lists/option-list.d.ts +40 -0
  129. package/dist/contracts/base/option-lists/option-list.js +2 -0
  130. package/dist/contracts/base/property-definition.d.ts +61 -0
  131. package/dist/contracts/base/property-definition.js +76 -0
  132. package/dist/contracts/base/property-definitions/boolean-property-definition.d.ts +7 -0
  133. package/dist/contracts/base/property-definitions/boolean-property-definition.js +33 -0
  134. package/dist/contracts/base/property-definitions/datetime-property-definition.d.ts +7 -0
  135. package/dist/contracts/base/property-definitions/datetime-property-definition.js +33 -0
  136. package/dist/contracts/base/property-definitions/datetimeoffset-property-definition.d.ts +7 -0
  137. package/dist/contracts/base/property-definitions/datetimeoffset-property-definition.js +33 -0
  138. package/dist/contracts/base/property-definitions/decimal-property-definition.d.ts +7 -0
  139. package/dist/contracts/base/property-definitions/decimal-property-definition.js +33 -0
  140. package/dist/contracts/base/property-definitions/index.d.ts +8 -0
  141. package/dist/contracts/base/property-definitions/index.js +20 -0
  142. package/dist/contracts/base/property-definitions/integer-property-definition.d.ts +7 -0
  143. package/dist/contracts/base/property-definitions/integer-property-definition.js +33 -0
  144. package/dist/contracts/base/property-definitions/json-property-definition.d.ts +10 -0
  145. package/dist/contracts/base/property-definitions/json-property-definition.js +38 -0
  146. package/dist/contracts/base/property-definitions/long-property-definition.d.ts +7 -0
  147. package/dist/contracts/base/property-definitions/long-property-definition.js +33 -0
  148. package/dist/contracts/base/property-definitions/string-property-definition.d.ts +33 -0
  149. package/dist/contracts/base/property-definitions/string-property-definition.js +55 -0
  150. package/dist/contracts/base/property-manager.d.ts +19 -0
  151. package/dist/contracts/base/property-manager.js +114 -0
  152. package/dist/contracts/base/property.d.ts +21 -0
  153. package/dist/contracts/base/property.js +30 -0
  154. package/dist/contracts/base/relation-cardinality.d.ts +19 -0
  155. package/dist/contracts/base/relation-cardinality.js +22 -0
  156. package/dist/contracts/base/relation-container.d.ts +40 -0
  157. package/dist/contracts/base/relation-container.js +118 -0
  158. package/dist/contracts/base/relation-definition.d.ts +123 -0
  159. package/dist/contracts/base/relation-definition.js +116 -0
  160. package/dist/contracts/base/relation-manager.d.ts +70 -0
  161. package/dist/contracts/base/relation-manager.js +197 -0
  162. package/dist/contracts/base/relation-role.d.ts +14 -0
  163. package/dist/contracts/base/relation-role.js +17 -0
  164. package/dist/contracts/base/relation.d.ts +74 -0
  165. package/dist/contracts/base/relation.js +40 -0
  166. package/dist/contracts/base/relations/child-to-many-parents-relation.d.ts +27 -0
  167. package/dist/contracts/base/relations/child-to-many-parents-relation.js +67 -0
  168. package/dist/contracts/base/relations/child-to-one-parent-relation.d.ts +26 -0
  169. package/dist/contracts/base/relations/child-to-one-parent-relation.js +74 -0
  170. package/dist/contracts/base/relations/parent-to-many-children-relation.d.ts +27 -0
  171. package/dist/contracts/base/relations/parent-to-many-children-relation.js +67 -0
  172. package/dist/contracts/base/relations/parent-to-one-child-relation.d.ts +29 -0
  173. package/dist/contracts/base/relations/parent-to-one-child-relation.js +74 -0
  174. package/dist/contracts/base/relations/to-many-relation.d.ts +16 -0
  175. package/dist/contracts/base/relations/to-many-relation.js +2 -0
  176. package/dist/contracts/base/relations/to-one-relation.d.ts +18 -0
  177. package/dist/contracts/base/relations/to-one-relation.js +2 -0
  178. package/dist/contracts/base/rendition.d.ts +14 -0
  179. package/dist/contracts/base/rendition.js +13 -0
  180. package/dist/contracts/base/resource.d.ts +21 -0
  181. package/dist/contracts/base/resource.js +2 -0
  182. package/dist/contracts/base/string-content-type.d.ts +21 -0
  183. package/dist/contracts/base/string-content-type.js +25 -0
  184. package/dist/contracts/base/typed-entity.d.ts +11 -0
  185. package/dist/contracts/base/typed-entity.js +2 -0
  186. package/dist/contracts/base/users.d.ts +0 -0
  187. package/dist/contracts/base/users.js +1 -0
  188. package/dist/contracts/base/view-mode.d.ts +4 -0
  189. package/dist/contracts/base/view-mode.js +8 -0
  190. package/dist/contracts/content/asset.d.ts +22 -0
  191. package/dist/contracts/content/asset.js +67 -0
  192. package/dist/contracts/content/final-life-cycle-status.d.ts +7 -0
  193. package/dist/contracts/content/final-life-cycle-status.js +11 -0
  194. package/dist/contracts/dirty-tracking/dirty-tracking.d.ts +10 -0
  195. package/dist/contracts/dirty-tracking/dirty-tracking.js +2 -0
  196. package/dist/contracts/notifications/mail-template.d.ts +44 -0
  197. package/dist/contracts/notifications/mail-template.js +2 -0
  198. package/dist/contracts/policies/condition.d.ts +16 -0
  199. package/dist/contracts/policies/condition.js +10 -0
  200. package/dist/contracts/policies/member-policy.d.ts +31 -0
  201. package/dist/contracts/policies/member-policy.js +12 -0
  202. package/dist/contracts/policies/policy.d.ts +19 -0
  203. package/dist/contracts/policies/policy.js +11 -0
  204. package/dist/contracts/policies/rule-type.d.ts +7 -0
  205. package/dist/contracts/policies/rule-type.js +11 -0
  206. package/dist/contracts/policies/rule.d.ts +58 -0
  207. package/dist/contracts/policies/rule.js +19 -0
  208. package/dist/contracts/policies/user-group-policy.d.ts +10 -0
  209. package/dist/contracts/policies/user-group-policy.js +17 -0
  210. package/dist/contracts/policies/user-policy.d.ts +10 -0
  211. package/dist/contracts/policies/user-policy.js +17 -0
  212. package/dist/contracts/querying/culture-load-option.d.ts +35 -0
  213. package/dist/contracts/querying/culture-load-option.js +69 -0
  214. package/dist/contracts/querying/entity-definition-id-iterator.d.ts +9 -0
  215. package/dist/contracts/querying/entity-definition-id-iterator.js +30 -0
  216. package/dist/contracts/querying/entity-definition-id-query-result.d.ts +10 -0
  217. package/dist/contracts/querying/entity-definition-id-query-result.js +22 -0
  218. package/dist/contracts/querying/entity-definition-iterator.d.ts +16 -0
  219. package/dist/contracts/querying/entity-definition-iterator.js +30 -0
  220. package/dist/contracts/querying/entity-definition-query-result.d.ts +21 -0
  221. package/dist/contracts/querying/entity-definition-query-result.js +22 -0
  222. package/dist/contracts/querying/entity-iterator.d.ts +13 -0
  223. package/dist/contracts/querying/entity-iterator.js +30 -0
  224. package/dist/contracts/querying/entity-load-configuration-builder.d.ts +76 -0
  225. package/dist/contracts/querying/entity-load-configuration-builder.js +101 -0
  226. package/dist/contracts/querying/entity-load-configuration.d.ts +51 -0
  227. package/dist/contracts/querying/entity-load-configuration.js +67 -0
  228. package/dist/contracts/querying/entity-load-option.d.ts +35 -0
  229. package/dist/contracts/querying/entity-load-option.js +94 -0
  230. package/dist/contracts/querying/entity-query-result.d.ts +23 -0
  231. package/dist/contracts/querying/entity-query-result.js +33 -0
  232. package/dist/contracts/querying/filters/comparison-operator.d.ts +11 -0
  233. package/dist/contracts/querying/filters/comparison-operator.js +15 -0
  234. package/dist/contracts/querying/filters/composite-filter-operator.d.ts +4 -0
  235. package/dist/contracts/querying/filters/composite-filter-operator.js +8 -0
  236. package/dist/contracts/querying/filters/composite-query-filter.d.ts +19 -0
  237. package/dist/contracts/querying/filters/composite-query-filter.js +49 -0
  238. package/dist/contracts/querying/filters/createdby-query-filter.d.ts +5 -0
  239. package/dist/contracts/querying/filters/createdby-query-filter.js +30 -0
  240. package/dist/contracts/querying/filters/createdon-query-filter.d.ts +19 -0
  241. package/dist/contracts/querying/filters/createdon-query-filter.js +45 -0
  242. package/dist/contracts/querying/filters/definition-query-filter.d.ts +34 -0
  243. package/dist/contracts/querying/filters/definition-query-filter.js +58 -0
  244. package/dist/contracts/querying/filters/filter-data-type.d.ts +11 -0
  245. package/dist/contracts/querying/filters/filter-data-type.js +15 -0
  246. package/dist/contracts/querying/filters/filter-type.d.ts +18 -0
  247. package/dist/contracts/querying/filters/filter-type.js +22 -0
  248. package/dist/contracts/querying/filters/id-query-filter.d.ts +25 -0
  249. package/dist/contracts/querying/filters/id-query-filter.js +49 -0
  250. package/dist/contracts/querying/filters/identifier-query-filter.d.ts +25 -0
  251. package/dist/contracts/querying/filters/identifier-query-filter.js +49 -0
  252. package/dist/contracts/querying/filters/index.d.ts +20 -0
  253. package/dist/contracts/querying/filters/index.js +32 -0
  254. package/dist/contracts/querying/filters/modifiedby-query-filter.d.ts +5 -0
  255. package/dist/contracts/querying/filters/modifiedby-query-filter.js +30 -0
  256. package/dist/contracts/querying/filters/modifiedon-query-filter.d.ts +19 -0
  257. package/dist/contracts/querying/filters/modifiedon-query-filter.js +45 -0
  258. package/dist/contracts/querying/filters/modules-query-filter.d.ts +14 -0
  259. package/dist/contracts/querying/filters/modules-query-filter.js +43 -0
  260. package/dist/contracts/querying/filters/not-query-filter.d.ts +14 -0
  261. package/dist/contracts/querying/filters/not-query-filter.js +39 -0
  262. package/dist/contracts/querying/filters/property-query-filter.d.ts +38 -0
  263. package/dist/contracts/querying/filters/property-query-filter.js +63 -0
  264. package/dist/contracts/querying/filters/query-filter.d.ts +10 -0
  265. package/dist/contracts/querying/filters/query-filter.js +28 -0
  266. package/dist/contracts/querying/filters/relation-connection-type.d.ts +15 -0
  267. package/dist/contracts/querying/filters/relation-connection-type.js +19 -0
  268. package/dist/contracts/querying/filters/relation-query-filter.d.ts +23 -0
  269. package/dist/contracts/querying/filters/relation-query-filter.js +48 -0
  270. package/dist/contracts/querying/filters/secured-ancestors-query-filter.d.ts +24 -0
  271. package/dist/contracts/querying/filters/secured-ancestors-query-filter.js +53 -0
  272. package/dist/contracts/querying/filters/user-query-filter.d.ts +37 -0
  273. package/dist/contracts/querying/filters/user-query-filter.js +61 -0
  274. package/dist/contracts/querying/id-iterator.d.ts +11 -0
  275. package/dist/contracts/querying/id-iterator.js +19 -0
  276. package/dist/contracts/querying/id-query-result.d.ts +17 -0
  277. package/dist/contracts/querying/id-query-result.js +24 -0
  278. package/dist/contracts/querying/iterator.d.ts +9 -0
  279. package/dist/contracts/querying/iterator.js +2 -0
  280. package/dist/contracts/querying/load-option.d.ts +4 -0
  281. package/dist/contracts/querying/load-option.js +2 -0
  282. package/dist/contracts/querying/load-options.d.ts +6 -0
  283. package/dist/contracts/querying/load-options.js +10 -0
  284. package/dist/contracts/querying/loading-query-iterator.d.ts +17 -0
  285. package/dist/contracts/querying/loading-query-iterator.js +57 -0
  286. package/dist/contracts/querying/member-load-option.d.ts +11 -0
  287. package/dist/contracts/querying/member-load-option.js +15 -0
  288. package/dist/contracts/querying/minimal-schema.d.ts +8 -0
  289. package/dist/contracts/querying/minimal-schema.js +48 -0
  290. package/dist/contracts/querying/property-data.d.ts +8 -0
  291. package/dist/contracts/querying/property-data.js +43 -0
  292. package/dist/contracts/querying/property-load-option.d.ts +30 -0
  293. package/dist/contracts/querying/property-load-option.js +70 -0
  294. package/dist/contracts/querying/query-iterator.d.ts +18 -0
  295. package/dist/contracts/querying/query-iterator.js +54 -0
  296. package/dist/contracts/querying/query-load-configuration.d.ts +39 -0
  297. package/dist/contracts/querying/query-load-configuration.js +86 -0
  298. package/dist/contracts/querying/query-request.d.ts +6 -0
  299. package/dist/contracts/querying/query-request.js +30 -0
  300. package/dist/contracts/querying/query-result-paging-manager.d.ts +9 -0
  301. package/dist/contracts/querying/query-result-paging-manager.js +22 -0
  302. package/dist/contracts/querying/query-result.d.ts +5 -0
  303. package/dist/contracts/querying/query-result.js +2 -0
  304. package/dist/contracts/querying/query-sort-order.d.ts +13 -0
  305. package/dist/contracts/querying/query-sort-order.js +17 -0
  306. package/dist/contracts/querying/query.d.ts +23 -0
  307. package/dist/contracts/querying/query.js +56 -0
  308. package/dist/contracts/querying/relation-data.d.ts +7 -0
  309. package/dist/contracts/querying/relation-data.js +38 -0
  310. package/dist/contracts/querying/relation-load-option.d.ts +31 -0
  311. package/dist/contracts/querying/relation-load-option.js +74 -0
  312. package/dist/contracts/querying/relation-specification.d.ts +33 -0
  313. package/dist/contracts/querying/relation-specification.js +52 -0
  314. package/dist/contracts/querying/schema-querying.d.ts +20 -0
  315. package/dist/contracts/querying/schema-querying.js +2 -0
  316. package/dist/contracts/querying/scroll-request.d.ts +7 -0
  317. package/dist/contracts/querying/scroll-request.js +33 -0
  318. package/dist/contracts/querying/skip-take-iterator-base.d.ts +14 -0
  319. package/dist/contracts/querying/skip-take-iterator-base.js +60 -0
  320. package/dist/contracts/querying/sort-field-type.d.ts +13 -0
  321. package/dist/contracts/querying/sort-field-type.js +17 -0
  322. package/dist/contracts/querying/sorting.d.ts +25 -0
  323. package/dist/contracts/querying/sorting.js +44 -0
  324. package/dist/contracts/users/user-group-combine-method.d.ts +4 -0
  325. package/dist/contracts/users/user-group-combine-method.js +8 -0
  326. package/dist/contracts/users/user-group-configuration.d.ts +11 -0
  327. package/dist/contracts/users/user-group-configuration.js +35 -0
  328. package/dist/contracts/users/user-profile.d.ts +4 -0
  329. package/dist/contracts/users/user-profile.js +2 -0
  330. package/dist/contracts/users/user.d.ts +24 -0
  331. package/dist/contracts/users/user.js +64 -0
  332. package/dist/converters/api-resource-converter.d.ts +16 -0
  333. package/dist/converters/api-resource-converter.js +45 -0
  334. package/dist/converters/file-version-converter.d.ts +22 -0
  335. package/dist/converters/file-version-converter.js +43 -0
  336. package/dist/converters/index.d.ts +6 -0
  337. package/dist/converters/index.js +18 -0
  338. package/dist/converters/member-condition-converter.d.ts +20 -0
  339. package/dist/converters/member-condition-converter.js +50 -0
  340. package/dist/converters/member-condition-resource-converter.d.ts +21 -0
  341. package/dist/converters/member-condition-resource-converter.js +53 -0
  342. package/dist/converters/minimal-schema-relation-cardinality-converter.d.ts +11 -0
  343. package/dist/converters/minimal-schema-relation-cardinality-converter.js +33 -0
  344. package/dist/converters/page-resource-menus-converter.d.ts +19 -0
  345. package/dist/converters/page-resource-menus-converter.js +45 -0
  346. package/dist/converters/page-resource-zones-converter.d.ts +19 -0
  347. package/dist/converters/page-resource-zones-converter.js +45 -0
  348. package/dist/converters/relation-map-resource-converter.d.ts +6 -0
  349. package/dist/converters/relation-map-resource-converter.js +38 -0
  350. package/dist/converters/relation-resource-converter.d.ts +22 -0
  351. package/dist/converters/relation-resource-converter.js +51 -0
  352. package/dist/converters/renditions-converter.d.ts +20 -0
  353. package/dist/converters/renditions-converter.js +44 -0
  354. package/dist/converters/string-to-any-map-converter.d.ts +20 -0
  355. package/dist/converters/string-to-any-map-converter.js +34 -0
  356. package/dist/culture-info.d.ts +5 -0
  357. package/dist/culture-info.js +7 -0
  358. package/dist/dirty-value-calculator.d.ts +7 -0
  359. package/dist/dirty-value-calculator.js +29 -0
  360. package/dist/entity-link.d.ts +8 -0
  361. package/dist/entity-link.js +40 -0
  362. package/dist/error-messages.d.ts +57 -0
  363. package/dist/error-messages.js +64 -0
  364. package/dist/errors/argument-error.d.ts +4 -0
  365. package/dist/errors/argument-error.js +11 -0
  366. package/dist/errors/authentication-error.d.ts +5 -0
  367. package/dist/errors/authentication-error.js +12 -0
  368. package/dist/errors/bad-request-error.d.ts +5 -0
  369. package/dist/errors/bad-request-error.js +11 -0
  370. package/dist/errors/forbidden-error.d.ts +4 -0
  371. package/dist/errors/forbidden-error.js +11 -0
  372. package/dist/errors/internal-error.d.ts +4 -0
  373. package/dist/errors/internal-error.js +11 -0
  374. package/dist/errors/invalid-operation-error.d.ts +4 -0
  375. package/dist/errors/invalid-operation-error.js +11 -0
  376. package/dist/errors/not-found-error.d.ts +5 -0
  377. package/dist/errors/not-found-error.js +11 -0
  378. package/dist/errors/not-implemented-error.d.ts +4 -0
  379. package/dist/errors/not-implemented-error.js +11 -0
  380. package/dist/errors/not-loaded-error.d.ts +4 -0
  381. package/dist/errors/not-loaded-error.js +11 -0
  382. package/dist/errors/not-supported-error.d.ts +4 -0
  383. package/dist/errors/not-supported-error.js +11 -0
  384. package/dist/errors/schema-error.d.ts +4 -0
  385. package/dist/errors/schema-error.js +11 -0
  386. package/dist/errors/validation-error.d.ts +6 -0
  387. package/dist/errors/validation-error.js +12 -0
  388. package/dist/errors/validation-failure.d.ts +7 -0
  389. package/dist/errors/validation-failure.js +14 -0
  390. package/dist/errors/web-api-error.d.ts +13 -0
  391. package/dist/errors/web-api-error.js +13 -0
  392. package/dist/factories/entity-factory.d.ts +38 -0
  393. package/dist/factories/entity-factory.js +76 -0
  394. package/dist/factories/option-list-factory.d.ts +26 -0
  395. package/dist/factories/option-list-factory.js +22 -0
  396. package/dist/factories/property-factory.d.ts +10 -0
  397. package/dist/factories/property-factory.js +54 -0
  398. package/dist/factories/relation-factory.d.ts +55 -0
  399. package/dist/factories/relation-factory.js +70 -0
  400. package/dist/fileversion.d.ts +78 -0
  401. package/dist/fileversion.js +144 -0
  402. package/dist/guard.d.ts +29 -0
  403. package/dist/guard.js +142 -0
  404. package/dist/http-method.d.ts +9 -0
  405. package/dist/http-method.js +13 -0
  406. package/dist/index.d.ts +10 -0
  407. package/dist/index.js +22 -0
  408. package/dist/link-helper.d.ts +209 -0
  409. package/dist/link-helper.js +371 -0
  410. package/dist/link.d.ts +9 -0
  411. package/dist/link.js +78 -0
  412. package/dist/logging/log-level.d.ts +6 -0
  413. package/dist/logging/log-level.js +10 -0
  414. package/dist/logging/logger-base.d.ts +26 -0
  415. package/dist/logging/logger-base.js +98 -0
  416. package/dist/logging/logger.d.ts +16 -0
  417. package/dist/logging/logger.js +2 -0
  418. package/dist/logging/null-logger.d.ts +7 -0
  419. package/dist/logging/null-logger.js +13 -0
  420. package/dist/mappers/api-resource-mapper.d.ts +5 -0
  421. package/dist/mappers/api-resource-mapper.js +16 -0
  422. package/dist/mappers/condition-mapper.d.ts +36 -0
  423. package/dist/mappers/condition-mapper.js +112 -0
  424. package/dist/mappers/entity-definition-mapper.d.ts +13 -0
  425. package/dist/mappers/entity-definition-mapper.js +88 -0
  426. package/dist/mappers/entity-mapper.d.ts +19 -0
  427. package/dist/mappers/entity-mapper.js +134 -0
  428. package/dist/mappers/final-life-cycle-status-mapper.d.ts +6 -0
  429. package/dist/mappers/final-life-cycle-status-mapper.js +51 -0
  430. package/dist/mappers/load-options-mapper.d.ts +16 -0
  431. package/dist/mappers/load-options-mapper.js +100 -0
  432. package/dist/mappers/mapping-utilities.d.ts +7 -0
  433. package/dist/mappers/mapping-utilities.js +19 -0
  434. package/dist/mappers/member-condition-mapper.d.ts +12 -0
  435. package/dist/mappers/member-condition-mapper.js +119 -0
  436. package/dist/mappers/member-definition-mapper.d.ts +19 -0
  437. package/dist/mappers/member-definition-mapper.js +266 -0
  438. package/dist/mappers/member-group-mapper.d.ts +14 -0
  439. package/dist/mappers/member-group-mapper.js +95 -0
  440. package/dist/mappers/member-security-mapper.d.ts +34 -0
  441. package/dist/mappers/member-security-mapper.js +101 -0
  442. package/dist/mappers/notification-mapper.d.ts +5 -0
  443. package/dist/mappers/notification-mapper.js +17 -0
  444. package/dist/mappers/option-list-mapper.d.ts +18 -0
  445. package/dist/mappers/option-list-mapper.js +131 -0
  446. package/dist/mappers/policy-mapper.d.ts +29 -0
  447. package/dist/mappers/policy-mapper.js +124 -0
  448. package/dist/mappers/property-mapper.d.ts +21 -0
  449. package/dist/mappers/property-mapper.js +339 -0
  450. package/dist/mappers/querying-mapper.d.ts +16 -0
  451. package/dist/mappers/querying-mapper.js +96 -0
  452. package/dist/mappers/relation-cardinality-mapper.d.ts +5 -0
  453. package/dist/mappers/relation-cardinality-mapper.js +37 -0
  454. package/dist/mappers/relation-mapper.d.ts +16 -0
  455. package/dist/mappers/relation-mapper.js +202 -0
  456. package/dist/mappers/relation-role-mapper.d.ts +5 -0
  457. package/dist/mappers/relation-role-mapper.js +29 -0
  458. package/dist/mappers/rendition-mapper.d.ts +9 -0
  459. package/dist/mappers/rendition-mapper.js +34 -0
  460. package/dist/mappers/rule-type-mapper.d.ts +6 -0
  461. package/dist/mappers/rule-type-mapper.js +33 -0
  462. package/dist/mappers/rules-mapper.d.ts +35 -0
  463. package/dist/mappers/rules-mapper.js +123 -0
  464. package/dist/mappers/typed-entity-creator.d.ts +27 -0
  465. package/dist/mappers/typed-entity-creator.js +76 -0
  466. package/dist/models/entity-definition-collection-resource.d.ts +5 -0
  467. package/dist/models/entity-definition-collection-resource.js +26 -0
  468. package/dist/models/entity-definition-resource.d.ts +23 -0
  469. package/dist/models/entity-definition-resource.js +98 -0
  470. package/dist/models/entity-list-resource.d.ts +5 -0
  471. package/dist/models/entity-list-resource.js +26 -0
  472. package/dist/models/entity-resource.d.ts +36 -0
  473. package/dist/models/entity-resource.js +142 -0
  474. package/dist/models/list-resource.d.ts +13 -0
  475. package/dist/models/list-resource.js +50 -0
  476. package/dist/models/member-condition-resource.d.ts +32 -0
  477. package/dist/models/member-condition-resource.js +95 -0
  478. package/dist/models/member-definition-resource.d.ts +15 -0
  479. package/dist/models/member-definition-resource.js +71 -0
  480. package/dist/models/member-group-resource.d.ts +14 -0
  481. package/dist/models/member-group-resource.js +61 -0
  482. package/dist/models/notifications/distribute-notification-resource.d.ts +7 -0
  483. package/dist/models/notifications/distribute-notification-resource.js +37 -0
  484. package/dist/models/notifications/mail-request-broadcast.d.ts +7 -0
  485. package/dist/models/notifications/mail-request-broadcast.js +18 -0
  486. package/dist/models/notifications/mail-request-by-id.d.ts +9 -0
  487. package/dist/models/notifications/mail-request-by-id.js +28 -0
  488. package/dist/models/notifications/mail-request-by-username.d.ts +9 -0
  489. package/dist/models/notifications/mail-request-by-username.js +28 -0
  490. package/dist/models/notifications/mail-request.d.ts +26 -0
  491. package/dist/models/notifications/mail-request.js +12 -0
  492. package/dist/models/notifications/notification-level.d.ts +8 -0
  493. package/dist/models/notifications/notification-level.js +12 -0
  494. package/dist/models/notifications/realtime-request-broadcast.d.ts +7 -0
  495. package/dist/models/notifications/realtime-request-broadcast.js +18 -0
  496. package/dist/models/notifications/realtime-request-by-id.d.ts +9 -0
  497. package/dist/models/notifications/realtime-request-by-id.js +28 -0
  498. package/dist/models/notifications/realtime-request-by-username.d.ts +9 -0
  499. package/dist/models/notifications/realtime-request-by-username.js +28 -0
  500. package/dist/models/notifications/realtime-request.d.ts +60 -0
  501. package/dist/models/notifications/realtime-request.js +41 -0
  502. package/dist/models/notifications/request-by-id.d.ts +13 -0
  503. package/dist/models/notifications/request-by-id.js +2 -0
  504. package/dist/models/notifications/request-by-username.d.ts +13 -0
  505. package/dist/models/notifications/request-by-username.js +2 -0
  506. package/dist/models/notifications/validators/mail-validator.d.ts +6 -0
  507. package/dist/models/notifications/validators/mail-validator.js +23 -0
  508. package/dist/models/notifications/validators/realtime-validator.d.ts +5 -0
  509. package/dist/models/notifications/validators/realtime-validator.js +14 -0
  510. package/dist/models/notifications/validators/request-by-id-validator.d.ts +6 -0
  511. package/dist/models/notifications/validators/request-by-id-validator.js +31 -0
  512. package/dist/models/notifications/validators/request-by-username-validator.d.ts +6 -0
  513. package/dist/models/notifications/validators/request-by-username-validator.js +31 -0
  514. package/dist/models/notifications/validators/validator-base.d.ts +6 -0
  515. package/dist/models/notifications/validators/validator-base.js +16 -0
  516. package/dist/models/option-lists/flat-option-list-value.d.ts +4 -0
  517. package/dist/models/option-lists/flat-option-list-value.js +9 -0
  518. package/dist/models/option-lists/hierarchical-options-list-value.d.ts +7 -0
  519. package/dist/models/option-lists/hierarchical-options-list-value.js +14 -0
  520. package/dist/models/option-lists/option-list-collection-resource.d.ts +6 -0
  521. package/dist/models/option-lists/option-list-collection-resource.js +32 -0
  522. package/dist/models/option-lists/option-list-description-resource.d.ts +5 -0
  523. package/dist/models/option-lists/option-list-description-resource.js +31 -0
  524. package/dist/models/option-lists/option-list-resource.d.ts +16 -0
  525. package/dist/models/option-lists/option-list-resource.js +62 -0
  526. package/dist/models/option-lists/option-list-value-resource.d.ts +6 -0
  527. package/dist/models/option-lists/option-list-value-resource.js +32 -0
  528. package/dist/models/pages/component-visualization.d.ts +10 -0
  529. package/dist/models/pages/component-visualization.js +54 -0
  530. package/dist/models/pages/language-resource.d.ts +10 -0
  531. package/dist/models/pages/language-resource.js +47 -0
  532. package/dist/models/pages/menu-item.d.ts +12 -0
  533. package/dist/models/pages/menu-item.js +66 -0
  534. package/dist/models/pages/page-component-resource.d.ts +20 -0
  535. package/dist/models/pages/page-component-resource.js +87 -0
  536. package/dist/models/pages/page-resource.d.ts +23 -0
  537. package/dist/models/pages/page-resource.js +100 -0
  538. package/dist/models/pages/page-row-settings.d.ts +27 -0
  539. package/dist/models/pages/page-row-settings.js +119 -0
  540. package/dist/models/pages/portal-column-resource.d.ts +6 -0
  541. package/dist/models/pages/portal-column-resource.js +37 -0
  542. package/dist/models/pages/portal-row-resource.d.ts +7 -0
  543. package/dist/models/pages/portal-row-resource.js +38 -0
  544. package/dist/models/pages/portal-section-resource.d.ts +6 -0
  545. package/dist/models/pages/portal-section-resource.js +37 -0
  546. package/dist/models/permissions-resource.d.ts +4 -0
  547. package/dist/models/permissions-resource.js +28 -0
  548. package/dist/models/policies/condition-resource.d.ts +21 -0
  549. package/dist/models/policies/condition-resource.js +53 -0
  550. package/dist/models/policies/member-policy-resource.d.ts +8 -0
  551. package/dist/models/policies/member-policy-resource.js +43 -0
  552. package/dist/models/policies/policy-resource.d.ts +50 -0
  553. package/dist/models/policies/policy-resource.js +89 -0
  554. package/dist/models/policies/rule-resource.d.ts +49 -0
  555. package/dist/models/policies/rule-resource.js +78 -0
  556. package/dist/models/property-definition-resource.d.ts +45 -0
  557. package/dist/models/property-definition-resource.js +198 -0
  558. package/dist/models/query-loading-resource.d.ts +4 -0
  559. package/dist/models/query-loading-resource.js +28 -0
  560. package/dist/models/query-result-resource.d.ts +9 -0
  561. package/dist/models/query-result-resource.js +34 -0
  562. package/dist/models/relation-definition-resource.d.ts +29 -0
  563. package/dist/models/relation-definition-resource.js +115 -0
  564. package/dist/models/relation-map-resource.d.ts +6 -0
  565. package/dist/models/relation-map-resource.js +16 -0
  566. package/dist/models/relation-resource.d.ts +21 -0
  567. package/dist/models/relation-resource.js +93 -0
  568. package/dist/models/resource-containers/entity-definition-resource-container.d.ts +8 -0
  569. package/dist/models/resource-containers/entity-definition-resource-container.js +2 -0
  570. package/dist/models/resource-containers/entity-resource-container.d.ts +8 -0
  571. package/dist/models/resource-containers/entity-resource-container.js +2 -0
  572. package/dist/models/resource.d.ts +4 -0
  573. package/dist/models/resource.js +26 -0
  574. package/dist/models/search/aggregation-request-resource.d.ts +16 -0
  575. package/dist/models/search/aggregation-request-resource.js +72 -0
  576. package/dist/models/search/aggregation-response-resource.d.ts +8 -0
  577. package/dist/models/search/aggregation-response-resource.js +41 -0
  578. package/dist/models/search/bucket-response-resource.d.ts +8 -0
  579. package/dist/models/search/bucket-response-resource.js +46 -0
  580. package/dist/models/search/date-interval.d.ts +10 -0
  581. package/dist/models/search/date-interval.js +14 -0
  582. package/dist/models/search/facet-response-resource.d.ts +20 -0
  583. package/dist/models/search/facet-response-resource.js +98 -0
  584. package/dist/models/search/field-filter-request-resource.d.ts +16 -0
  585. package/dist/models/search/field-filter-request-resource.js +76 -0
  586. package/dist/models/search/field-filter-response-resource.d.ts +17 -0
  587. package/dist/models/search/field-filter-response-resource.js +84 -0
  588. package/dist/models/search/field-filter-value-response-resource.d.ts +6 -0
  589. package/dist/models/search/field-filter-value-response-resource.js +31 -0
  590. package/dist/models/search/filter-operator.d.ts +86 -0
  591. package/dist/models/search/filter-operator.js +90 -0
  592. package/dist/models/search/full-text-response-resource.d.ts +4 -0
  593. package/dist/models/search/full-text-response-resource.js +27 -0
  594. package/dist/models/search/group-category.d.ts +6 -0
  595. package/dist/models/search/group-category.js +35 -0
  596. package/dist/models/search/group-config.d.ts +4 -0
  597. package/dist/models/search/group-config.js +27 -0
  598. package/dist/models/search/group-item.d.ts +10 -0
  599. package/dist/models/search/group-item.js +44 -0
  600. package/dist/models/search/grouped-view-response-resource.d.ts +15 -0
  601. package/dist/models/search/grouped-view-response-resource.js +65 -0
  602. package/dist/models/search/metric-option-request-resource.d.ts +7 -0
  603. package/dist/models/search/metric-option-request-resource.js +37 -0
  604. package/dist/models/search/metric-option-response-resource.d.ts +5 -0
  605. package/dist/models/search/metric-option-response-resource.js +31 -0
  606. package/dist/models/search/nested-relation-info.d.ts +11 -0
  607. package/dist/models/search/nested-relation-info.js +96 -0
  608. package/dist/models/search/requested-aggregation-type.d.ts +5 -0
  609. package/dist/models/search/requested-aggregation-type.js +9 -0
  610. package/dist/models/search/requested-filter-type.d.ts +6 -0
  611. package/dist/models/search/requested-filter-type.js +10 -0
  612. package/dist/models/search/search-group-request-resource.d.ts +5 -0
  613. package/dist/models/search/search-group-request-resource.js +31 -0
  614. package/dist/models/search/search-request.d.ts +41 -0
  615. package/dist/models/search/search-request.js +131 -0
  616. package/dist/models/search/search-response.d.ts +36 -0
  617. package/dist/models/search/search-response.js +123 -0
  618. package/dist/models/search/selection-pool-filter-resource.d.ts +7 -0
  619. package/dist/models/search/selection-pool-filter-resource.js +38 -0
  620. package/dist/models/search/sorting-request-resource.d.ts +5 -0
  621. package/dist/models/search/sorting-request-resource.js +32 -0
  622. package/dist/models/search/sorting-response-resource.d.ts +6 -0
  623. package/dist/models/search/sorting-response-resource.js +34 -0
  624. package/dist/models/search-document-resource.d.ts +7 -0
  625. package/dist/models/search-document-resource.js +33 -0
  626. package/dist/models/set-password-request-resource.d.ts +5 -0
  627. package/dist/models/set-password-request-resource.js +31 -0
  628. package/dist/settings/fetch-setting.d.ts +12 -0
  629. package/dist/settings/fetch-setting.js +61 -0
  630. package/dist/settings/super-user-excluded-privileges.d.ts +3 -0
  631. package/dist/settings/super-user-excluded-privileges.js +27 -0
  632. package/dist/settings/usage-rights-configuration.d.ts +24 -0
  633. package/dist/settings/usage-rights-configuration.js +90 -0
  634. package/dist/type-guards.d.ts +20 -0
  635. package/dist/type-guards.js +28 -0
  636. package/package.json +78 -0
@@ -0,0 +1,108 @@
1
+ import { MapCultureTo, Nullable } from "../../base-types";
2
+ import { IMemberGroup } from "./member-group";
3
+ import { IPropertyDefinition } from "./property-definition";
4
+ import { IRelationDefinition } from "./relation-definition";
5
+ import { RelationRole } from "./relation-role";
6
+ import IResource from "./resource";
7
+ /**
8
+ * Represents a data schema / domain model for an entity.
9
+ */
10
+ export interface IEntityDefinition extends IResource {
11
+ /**
12
+ * Gets the id of this definition.
13
+ * This is an automatically assigned unique and strictly positive number identifying the entity definition.
14
+ * Value is 0, null or undefined when the definition has not been persisted.
15
+ */
16
+ readonly id?: number;
17
+ /**
18
+ * Gets a value indicating whether the entity definition is new.
19
+ */
20
+ readonly isNew: boolean;
21
+ /**
22
+ * Gets the unique and language agnostic name of the entity definition.
23
+ * It should be handled as case sensitive.
24
+ */
25
+ name: string;
26
+ /**
27
+ * Gets the language agnostic display format for entities of this definition.
28
+ */
29
+ displayTemplate: string;
30
+ /**
31
+ * Gets a value indicating whether entities of this entity definition are taxonomy items.
32
+ * They can then be used as a search facet.
33
+ */
34
+ isTaxonomyItemDefinition: boolean;
35
+ /**
36
+ * Gets a value indicating whether entities of this entity definition can be part of the so called paths, which are technically UI breadcrumbs.
37
+ * Example use cases are taxonomy entity definitions or M Project block entity definitions.
38
+ */
39
+ isPathEnabledDefinition: boolean;
40
+ /**
41
+ * Gets a value indicating whether the items of this definition can be sorted manually (UI related).
42
+ */
43
+ isManualSortingAllowed: boolean;
44
+ /**
45
+ * Gets a value indicating whether the entity definition is owned by the system and cannot be modified or deleted by the regular users.
46
+ */
47
+ isSystemOwned: boolean;
48
+ /**
49
+ * Gets the collection of {@link IMemberGroup}s.
50
+ */
51
+ memberGroups: Array<IMemberGroup>;
52
+ /**
53
+ * Gets a collection of the culture specific definition labels.
54
+ */
55
+ labels: MapCultureTo<string>;
56
+ /**
57
+ * Get the definition of the specified property.
58
+ * @param name - The name of the property
59
+ * @returns The property definition or null.
60
+ */
61
+ getPropertyDefinition(name: string): Nullable<IPropertyDefinition>;
62
+ /**
63
+ * Generic version to get the definition of the specified property.
64
+ * @param name - The name of the property
65
+ * @returns The property definition or null.
66
+ */
67
+ getPropertyDefinition<T extends IPropertyDefinition>(name: string): Nullable<T>;
68
+ /**
69
+ * Gets all property definitions.
70
+ * @returns A list of all property definitions.
71
+ */
72
+ getPropertyDefinitions(): Array<IPropertyDefinition>;
73
+ /**
74
+ * Get the definition of the specified relation.
75
+ * @param name - Name of the relation
76
+ * @param role - Relation role
77
+ * @returns The relation definition or null.
78
+ * @throws An {@link InvalidOperationError} when no role is given and the relation is a self-relation.
79
+ */
80
+ getRelationDefinition(name: string, role?: RelationRole): Nullable<IRelationDefinition>;
81
+ /**
82
+ * Get all relation definitions.
83
+ * @returns A list of all relations definitions.
84
+ */
85
+ getRelationDefinitions(): Array<IRelationDefinition>;
86
+ }
87
+ export declare class EntityDefinition implements IEntityDefinition {
88
+ readonly id?: number;
89
+ get isNew(): boolean;
90
+ name: string;
91
+ readonly createdBy?: number;
92
+ readonly createdOn?: Date;
93
+ readonly modifiedBy?: number;
94
+ readonly modifiedOn?: Date;
95
+ displayTemplate: string;
96
+ isTaxonomyItemDefinition: boolean;
97
+ isPathEnabledDefinition: boolean;
98
+ isManualSortingAllowed: boolean;
99
+ isSystemOwned: boolean;
100
+ memberGroups: Array<IMemberGroup>;
101
+ labels: MapCultureTo<string>;
102
+ constructor(init?: Partial<EntityDefinition>);
103
+ getPropertyDefinition<T extends IPropertyDefinition>(name: string): Nullable<T>;
104
+ getPropertyDefinitions(): Array<IPropertyDefinition>;
105
+ getRelationDefinition(name: string, role?: RelationRole): Nullable<IRelationDefinition>;
106
+ getRelationDefinitions(): Array<IRelationDefinition>;
107
+ private getMemberDefinitions;
108
+ }
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
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.EntityDefinition = void 0;
16
+ const string_format_1 = __importDefault(require("string-format"));
17
+ const ta_json_1 = require("ta-json");
18
+ const error_messages_1 = __importDefault(require("../../error-messages"));
19
+ const invalid_operation_error_1 = require("../../errors/invalid-operation-error");
20
+ const guard_1 = __importDefault(require("../../guard"));
21
+ const member_group_1 = require("./member-group");
22
+ const property_definition_1 = require("./property-definition");
23
+ const relation_definition_1 = require("./relation-definition");
24
+ let EntityDefinition = class EntityDefinition {
25
+ constructor(init) {
26
+ this.isSystemOwned = false;
27
+ Object.assign(this, init);
28
+ this.memberGroups = this.memberGroups || [];
29
+ this.labels = this.labels || {};
30
+ }
31
+ get isNew() {
32
+ return !this.id;
33
+ }
34
+ getPropertyDefinition(name) {
35
+ guard_1.default.stringNotNullOrEmpty(name);
36
+ return (this.getPropertyDefinitions().find(propertyDefinition => {
37
+ return propertyDefinition.name === name;
38
+ }) || null);
39
+ }
40
+ getPropertyDefinitions() {
41
+ return this.getMemberDefinitions(property_definition_1.PropertyDefinition);
42
+ }
43
+ getRelationDefinition(name, role) {
44
+ guard_1.default.stringNotNullOrEmpty(name);
45
+ const relationDefinition = this.getRelationDefinitions().find(relationDefinition => {
46
+ return relationDefinition.name === name && (role == null || relationDefinition.role === role);
47
+ });
48
+ if ((relationDefinition === null || relationDefinition === void 0 ? void 0 : relationDefinition.associatedEntityDefinitionName) === this.name) {
49
+ const errorMessage = string_format_1.default(error_messages_1.default.NoRoleSpecifiedForSelfRelation, name);
50
+ throw new invalid_operation_error_1.InvalidOperationError(errorMessage);
51
+ }
52
+ return relationDefinition !== null && relationDefinition !== void 0 ? relationDefinition : null;
53
+ }
54
+ getRelationDefinitions() {
55
+ return this.getMemberDefinitions(relation_definition_1.RelationDefinition);
56
+ }
57
+ getMemberDefinitions(typeT) {
58
+ const members = [];
59
+ for (const group of this.memberGroups) {
60
+ for (const member of group.memberDefinitions) {
61
+ if (member instanceof typeT) {
62
+ members.push(member);
63
+ }
64
+ }
65
+ }
66
+ return members;
67
+ }
68
+ };
69
+ __decorate([
70
+ ta_json_1.JsonProperty("id"),
71
+ __metadata("design:type", Number)
72
+ ], EntityDefinition.prototype, "id", void 0);
73
+ __decorate([
74
+ ta_json_1.JsonProperty("name"),
75
+ __metadata("design:type", String)
76
+ ], EntityDefinition.prototype, "name", void 0);
77
+ __decorate([
78
+ ta_json_1.JsonProperty("created_by"),
79
+ __metadata("design:type", Number)
80
+ ], EntityDefinition.prototype, "createdBy", void 0);
81
+ __decorate([
82
+ ta_json_1.JsonProperty("created_on"),
83
+ __metadata("design:type", Date)
84
+ ], EntityDefinition.prototype, "createdOn", void 0);
85
+ __decorate([
86
+ ta_json_1.JsonProperty("modified_by"),
87
+ __metadata("design:type", Number)
88
+ ], EntityDefinition.prototype, "modifiedBy", void 0);
89
+ __decorate([
90
+ ta_json_1.JsonProperty("modified_on"),
91
+ __metadata("design:type", Date)
92
+ ], EntityDefinition.prototype, "modifiedOn", void 0);
93
+ __decorate([
94
+ ta_json_1.JsonProperty("display_template"),
95
+ __metadata("design:type", String)
96
+ ], EntityDefinition.prototype, "displayTemplate", void 0);
97
+ __decorate([
98
+ ta_json_1.JsonProperty("is_taxonomy_item_definition"),
99
+ __metadata("design:type", Boolean)
100
+ ], EntityDefinition.prototype, "isTaxonomyItemDefinition", void 0);
101
+ __decorate([
102
+ ta_json_1.JsonProperty("is_path_enabled_definition"),
103
+ __metadata("design:type", Boolean)
104
+ ], EntityDefinition.prototype, "isPathEnabledDefinition", void 0);
105
+ __decorate([
106
+ ta_json_1.JsonProperty("is_manual_sorting_allowed"),
107
+ __metadata("design:type", Boolean)
108
+ ], EntityDefinition.prototype, "isManualSortingAllowed", void 0);
109
+ __decorate([
110
+ ta_json_1.JsonProperty("is_system_owned"),
111
+ __metadata("design:type", Boolean)
112
+ ], EntityDefinition.prototype, "isSystemOwned", void 0);
113
+ __decorate([
114
+ ta_json_1.JsonProperty("member_groups"),
115
+ ta_json_1.JsonElementType(member_group_1.MemberGroup),
116
+ __metadata("design:type", Array)
117
+ ], EntityDefinition.prototype, "memberGroups", void 0);
118
+ __decorate([
119
+ ta_json_1.JsonProperty("labels"),
120
+ __metadata("design:type", Object)
121
+ ], EntityDefinition.prototype, "labels", void 0);
122
+ EntityDefinition = __decorate([
123
+ ta_json_1.JsonObject(),
124
+ __metadata("design:paramtypes", [Object])
125
+ ], EntityDefinition);
126
+ exports.EntityDefinition = EntityDefinition;
@@ -0,0 +1,237 @@
1
+ import { Nullable, NullableResultPromise } from "../../base-types";
2
+ import { IExtendedContentHubClient } from "../../clients/extended-client";
3
+ import { IPropertyLoadOption } from "../../contracts/querying/property-load-option";
4
+ import CultureInfo from "../../culture-info";
5
+ import { IDirtyTracking } from "../dirty-tracking/dirty-tracking";
6
+ import { MemberLoadOption } from "../querying/member-load-option";
7
+ import { IRelationLoadOption } from "../querying/relation-load-option";
8
+ import DataType, { PropertyValue } from "./data-type";
9
+ import { EntityBase } from "./entity-base";
10
+ import { EntityConstructionArgs } from "./entity-construction-args";
11
+ import { IEntityDefinition } from "./entity-definition";
12
+ import { IProperty } from "./property";
13
+ import { IRelation } from "./relation";
14
+ import { RelationRole } from "./relation-role";
15
+ import { IRendition } from "./rendition";
16
+ import IResource from "./resource";
17
+ /**
18
+ * Interface for an entity.
19
+ */
20
+ export interface IEntity extends IResource, IDirtyTracking {
21
+ /**
22
+ * Gets the id of the entity.
23
+ * The id is an automatically assigned, read only, unique and strictly positive number identifying the entity.
24
+ * The id is null if the entity has not been persisted yet.
25
+ */
26
+ id?: number;
27
+ /**
28
+ * Gets the identifier of the entity.
29
+ * The identifier can be set on a new entities, until it is persisted. It must be unique.
30
+ * The identifier will be auto generated when it is null when persisting.
31
+ */
32
+ identifier: Nullable<string>;
33
+ /**
34
+ * Gets a value indicating whether the entity is new (id is null).
35
+ */
36
+ isNew: boolean;
37
+ /**
38
+ * Gets the name of the {@link IEntityDefinition} that defines this entity.
39
+ */
40
+ definitionName: string;
41
+ /**
42
+ * Gets the id of the user who locked this entity or null if it hasn't been locked.
43
+ */
44
+ lockedBy: Nullable<number>;
45
+ /**
46
+ * Gets the date on which this entity was locked or null if it hasn't been locked.
47
+ */
48
+ lockedOn: Nullable<Date>;
49
+ /**
50
+ * Gets or sets a value indicating whether this entity is a top level facet.
51
+ */
52
+ isRootTaxonomyItem: boolean;
53
+ /**
54
+ * Gets or sets a value indicating whether this entity is a top level path.
55
+ */
56
+ isPathRoot: boolean;
57
+ /**
58
+ * Gets or sets a value indicating whether the entity inherits security
59
+ * from its ancestors connected via relations with
60
+ */
61
+ inheritsSecurity: boolean;
62
+ /**
63
+ * Gets or sets a value indicating whether the entity is owned by the system
64
+ * and cannot be modified or deleted by the regular users.
65
+ */
66
+ isSystemOwned: boolean;
67
+ /**
68
+ * Gets the current version of the entity.
69
+ * Version is a monotonically increasing number (from 1 up).
70
+ * Any change(s) of the entity propagated to the persistent storage will cause this number to be incremented.
71
+ */
72
+ version: number;
73
+ /**
74
+ * Gets a list of all cultures that the entity was loaded with. Never returns null.
75
+ * All {@link ICultureSensitiveProperty} properties can only contains values for these cultures.
76
+ */
77
+ cultures: ReadonlyArray<CultureInfo>;
78
+ /**
79
+ * Gets a list of all properties that are currently loaded on the entity. Never returns null.
80
+ * New properties can still be added by lazy loading them.
81
+ */
82
+ properties: ReadonlyArray<IProperty>;
83
+ /**
84
+ * Gets a list of all relations that are currently loaded on the entity. Never returns null.
85
+ * New relations can still be added by lazy loading them.
86
+ */
87
+ relations: ReadonlyArray<IRelation>;
88
+ /**
89
+ * Gets a list of all renditions for this entity. Never returns null.
90
+ */
91
+ renditions: ReadonlyArray<IRendition>;
92
+ /**
93
+ * Checks if lazy loading is possible. Lazy loading is only possible on persisted entities.
94
+ */
95
+ readonly canDoLazyLoading: boolean;
96
+ /**
97
+ * Gets property by its name.
98
+ * @param name - The name of the property
99
+ * @returns The property.
100
+ * @throws A {@link NotLoadedError} when the property is not found.
101
+ */
102
+ getProperty(name: string): Nullable<IProperty>;
103
+ getProperty<T extends IProperty>(name: string): Nullable<T>;
104
+ /**
105
+ * Gets property by its name.
106
+ * If the property is not present, it can be lazy loaded when specifying the correct load option.
107
+ * @param name - The name of the property
108
+ * @param loadOption - The option to load the members with
109
+ * @returns The property.
110
+ * @throws A {@link SchemaError} when the property is not found.
111
+ */
112
+ getPropertyAsync(name: string, loadOption: MemberLoadOption): NullableResultPromise<IProperty>;
113
+ getPropertyAsync<T extends IProperty>(name: string, loadOption: MemberLoadOption): NullableResultPromise<T>;
114
+ /**
115
+ * Gets the value of the specified culture insensitive property.
116
+ * @param name - The name of the property
117
+ * @returns The property's value.
118
+ * @throws A {@link NotLoadedError} when the property is not found.
119
+ */
120
+ getPropertyValue(name: string): Nullable<unknown>;
121
+ getPropertyValue<T extends DataType, B extends boolean = false>(name: string): PropertyValue<T, B>;
122
+ /**
123
+ * Gets the value for the specified culture of the specified culture sensitive property.
124
+ * @param name - The name of the property
125
+ * @param culture - The culture for which to get the value
126
+ * @returns The property's value.
127
+ * @throws A {@link NotLoadedError} when the property is not found.
128
+ */
129
+ getPropertyValue(name: string, culture: CultureInfo): Nullable<unknown>;
130
+ getPropertyValue<T extends DataType, B extends boolean = false>(name: string, culture: CultureInfo): PropertyValue<T, B>;
131
+ /**
132
+ * Gets the value of the specified culture insensitive property.
133
+ * If the property is not present, it can be lazy loaded when specifying the correct load option.
134
+ * @param name - The name of the property
135
+ * @param loadOption - The option to load the members with
136
+ * @returns A promise which resolves to the property's value.
137
+ * @throws A {@link SchemaError} when the property is not found.
138
+ */
139
+ getPropertyValueAsync(name: string, loadOption: MemberLoadOption): Nullable<unknown>;
140
+ getPropertyValueAsync<T extends DataType, B extends boolean = false>(name: string, loadOption: MemberLoadOption): NullableResultPromise<PropertyValue<T, B>>;
141
+ /**
142
+ * Gets the value for the specified culture of the specified culture sensitive property.
143
+ * If the property is not present, it can be lazy loaded when specifying the correct load option.
144
+ * @param name - The name of the property
145
+ * @param loadOption - The option to load the members with
146
+ * @param culture - The culture for which to get the value
147
+ * @returns A promise which resolves to the property's value.
148
+ * @throws A {@link SchemaError} when the property is not found.
149
+ */
150
+ getPropertyValueAsync(name: string, loadOption: MemberLoadOption, culture: CultureInfo): Nullable<unknown>;
151
+ getPropertyValueAsync<T extends DataType, B extends boolean = false>(name: string, loadOption: MemberLoadOption, culture: CultureInfo): NullableResultPromise<PropertyValue<T, B>>;
152
+ /**
153
+ * Sets the value of specified culture insensitive property.
154
+ * @param name - The name of the property
155
+ * @param value - The value to set
156
+ * @throws A {@link NotLoadedError} when the property is not found.
157
+ */
158
+ setPropertyValue(name: string, value: unknown): void;
159
+ setPropertyValue<T extends DataType, B extends boolean = false>(name: string, value: PropertyValue<T, B>): void;
160
+ /**
161
+ * Sets the value for the specified culture and culture sensitive property.
162
+ * @param name - The name of the property
163
+ * @param value - The value to set
164
+ * @param culture - The culture for which to set the value
165
+ * @throws A {@link NotLoadedError} when the property is not found.
166
+ */
167
+ setPropertyValue(name: string, value: unknown, culture: CultureInfo): void;
168
+ setPropertyValue<T extends DataType, B extends boolean = false>(name: string, value: PropertyValue<T, B>, culture: CultureInfo): void;
169
+ /**
170
+ * Gets a relation by name.
171
+ * @param name - The name of the relation
172
+ * @param role - The role of the relation
173
+ * @returns The relation.
174
+ * @throws A {@link NotLoadedError} when the relation is not found.
175
+ */
176
+ getRelation(name: string, role?: RelationRole): Nullable<IRelation>;
177
+ /**
178
+ * Gets a relation by name.
179
+ * If the relation is not present, it can be lazy loaded when specifying the correct load option.
180
+ * @param name - The name of the relation
181
+ * @param role - The role of the relation
182
+ * @param loadOption - The load option, defaults to LazyLoading
183
+ * @returns A promise which resolves to the relation.
184
+ * @throws A {@link SchemaError} when the relation is not found.
185
+ */
186
+ getRelationAsync(name: string, role?: RelationRole, loadOption?: MemberLoadOption): NullableResultPromise<IRelation>;
187
+ /**
188
+ * Loads the specified properties on the current entity.
189
+ * It will only load if it is actually missing properties and does not overwrite existing properties.
190
+ * Culture sensitive properties will only be loaded in the current cultures.
191
+ * Lazy loading is only possible on entities that are not new.
192
+ * @param propertyLoadOption - The properties to load
193
+ * @returns Promise which resolves to true when the properties were added.
194
+ */
195
+ loadPropertiesAsync(propertyLoadOption: IPropertyLoadOption): Promise<boolean>;
196
+ /**
197
+ * Loads the specified relations on the current entity.
198
+ * It will only load if it is actually missing relations and does not overwrite existing relations.
199
+ * Lazy loading is only possible on entities that are not new.
200
+ * @param relationLoadOption - The relations to load
201
+ * @returns Promise which resolves to true when the relations were loaded.
202
+ */
203
+ loadRelationsAsync(relationLoadOption: IRelationLoadOption): Promise<boolean>;
204
+ /**
205
+ * Loads the specified members on the current entity.
206
+ * It will only load if it is actually missing members and does not overwrite existing members.
207
+ * @param propertyLoadOption - The properties to load
208
+ * @param relationLoadOption - The relations to load
209
+ * @returns Promise which resolves to true when the members were loaded.
210
+ */
211
+ loadMembersAsync(propertyLoadOption: IPropertyLoadOption, relationLoadOption: IRelationLoadOption): Promise<boolean>;
212
+ /**
213
+ * Gets an {@link IRendition} by name.
214
+ * @param name - The name of the rendition
215
+ * @returns Rendition.
216
+ */
217
+ getRendition(name: string): Nullable<IRendition>;
218
+ /**
219
+ * Gets the {@link IEntityDefinition} of the entity.
220
+ * @returns Promise which resolves to the entity definition.
221
+ */
222
+ getEntityDefinitionAsync(): Promise<IEntityDefinition>;
223
+ /**
224
+ * Gets the permissions the current user has on this entity.
225
+ * Note: Entity should be saved at least once.
226
+ * @returns Promise which resolves to a list of permissions.
227
+ */
228
+ getPermissionsAsync(): Promise<Array<string>>;
229
+ }
230
+ export declare class Entity extends EntityBase {
231
+ _client: IExtendedContentHubClient;
232
+ private readonly _renditions;
233
+ get renditions(): Array<IRendition>;
234
+ constructor(client: IExtendedContentHubClient, args: EntityConstructionArgs);
235
+ getRendition(name: string): Nullable<IRendition>;
236
+ getPermissionsAsync(): Promise<Array<string>>;
237
+ }
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.Entity = void 0;
25
+ const ta_json_1 = require("ta-json");
26
+ const base_types_1 = require("../../base-types");
27
+ const response_handler_1 = require("../../clients/response-handler");
28
+ const error_messages_1 = __importDefault(require("../../error-messages"));
29
+ const invalid_operation_error_1 = require("../../errors/invalid-operation-error");
30
+ const guard_1 = __importDefault(require("../../guard"));
31
+ const permissions_resource_1 = require("../../models/permissions-resource");
32
+ const entity_base_1 = require("./entity-base");
33
+ const entity_construction_args_1 = require("./entity-construction-args");
34
+ let Entity = class Entity extends entity_base_1.EntityBase {
35
+ constructor(client, args) {
36
+ super(client, args);
37
+ this._renditions = new base_types_1.CaseInsensitiveStringMap();
38
+ if (args.renditions != null) {
39
+ for (const rendition of args.renditions) {
40
+ this._renditions[rendition.name] = rendition;
41
+ }
42
+ }
43
+ }
44
+ // extensionData: MapStringTo<object>;
45
+ get renditions() {
46
+ return Object.values(this._renditions);
47
+ }
48
+ getRendition(name) {
49
+ var _a, _b;
50
+ guard_1.default.stringNotNullOrEmpty(name);
51
+ const rendition = (_b = (_a = this._renditions) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : null;
52
+ return rendition;
53
+ }
54
+ getPermissionsAsync() {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ //TODO HashSet?
57
+ if (this.isNew) {
58
+ throw new invalid_operation_error_1.InvalidOperationError(error_messages_1.default.Entity.NoPermissionsOnNewEntity);
59
+ }
60
+ const link = yield this._client.linkHelper.permissionsForEntityToLinkAsync(this.id);
61
+ const response = yield this._client.raw.getAsync(link.href);
62
+ response_handler_1.ResponseHandler.handleErrors(response);
63
+ const resource = ta_json_1.TaJson.deserialize(response.content, permissions_resource_1.PermissionsResource);
64
+ return resource.permissions || [];
65
+ });
66
+ }
67
+ };
68
+ __decorate([
69
+ ta_json_1.JsonProperty("renditions"),
70
+ __metadata("design:type", base_types_1.CaseInsensitiveStringMap)
71
+ ], Entity.prototype, "_renditions", void 0);
72
+ Entity = __decorate([
73
+ ta_json_1.JsonObject(),
74
+ __metadata("design:paramtypes", [Object, entity_construction_args_1.EntityConstructionArgs])
75
+ ], Entity);
76
+ exports.Entity = Entity;
@@ -0,0 +1,14 @@
1
+ export * from "./resource";
2
+ export * from "./data-type";
3
+ export * from "./json-content-type";
4
+ export * from "./string-content-type";
5
+ export * from "./member-definition-type";
6
+ export * from "./member-definition";
7
+ export * from "./member-group";
8
+ export * from "./member-condition";
9
+ export * from "./relation-cardinality";
10
+ export * from "./relation-role";
11
+ export * from "./relation-definition";
12
+ export * from "./property-definition";
13
+ export * from "./property-definitions";
14
+ export * from "./entity-definition";
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./resource"), exports);
14
+ __exportStar(require("./data-type"), exports);
15
+ __exportStar(require("./json-content-type"), exports);
16
+ __exportStar(require("./string-content-type"), exports);
17
+ __exportStar(require("./member-definition-type"), exports);
18
+ __exportStar(require("./member-definition"), exports);
19
+ __exportStar(require("./member-group"), exports);
20
+ __exportStar(require("./member-condition"), exports);
21
+ __exportStar(require("./relation-cardinality"), exports);
22
+ __exportStar(require("./relation-role"), exports);
23
+ __exportStar(require("./relation-definition"), exports);
24
+ __exportStar(require("./property-definition"), exports);
25
+ __exportStar(require("./property-definitions"), exports);
26
+ __exportStar(require("./entity-definition"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Types of string content.
3
+ */
4
+ export declare enum JsonContentType {
5
+ /**
6
+ * Content represents renditions.
7
+ */
8
+ Renditions = 0
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonContentType = void 0;
4
+ /**
5
+ * Types of string content.
6
+ */
7
+ var JsonContentType;
8
+ (function (JsonContentType) {
9
+ /**
10
+ * Content represents renditions.
11
+ */
12
+ JsonContentType[JsonContentType["Renditions"] = 0] = "Renditions";
13
+ })(JsonContentType = exports.JsonContentType || (exports.JsonContentType = {}));
@@ -0,0 +1,4 @@
1
+ import { IEntity } from "./entity";
2
+ export declare class LazyLoadingManager {
3
+ static ensureLazyLoadingIsPossible(entity: IEntity): void;
4
+ }
@@ -0,0 +1,17 @@
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.LazyLoadingManager = void 0;
7
+ const error_messages_1 = __importDefault(require("../../error-messages"));
8
+ const guard_1 = __importDefault(require("../../guard"));
9
+ class LazyLoadingManager {
10
+ static ensureLazyLoadingIsPossible(entity) {
11
+ guard_1.default.notNullOrUndefined(entity);
12
+ if (!entity.canDoLazyLoading) {
13
+ throw error_messages_1.default.Entity.CannotLazyLoad;
14
+ }
15
+ }
16
+ }
17
+ exports.LazyLoadingManager = LazyLoadingManager;