@wildo-ai/saas-models 1.0.1

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 (846) hide show
  1. package/dist/esm/__tests__/setup.d.ts +2 -0
  2. package/dist/esm/__tests__/setup.d.ts.map +1 -0
  3. package/dist/esm/__tests__/setup.js +4 -0
  4. package/dist/esm/__tests__/setup.js.map +1 -0
  5. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts +17 -0
  6. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -0
  7. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js +91 -0
  8. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -0
  9. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts +24 -0
  10. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -0
  11. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +200 -0
  12. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -0
  13. package/dist/esm/applications/applications-context.schemas.d.ts +574 -0
  14. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -0
  15. package/dist/esm/applications/applications-context.schemas.js +14 -0
  16. package/dist/esm/applications/applications-context.schemas.js.map +1 -0
  17. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts +24 -0
  18. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -0
  19. package/dist/esm/applications/applications.shared.resources-config.schemas.js +268 -0
  20. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -0
  21. package/dist/esm/applications/applications.shared.schemas.d.ts +45 -0
  22. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -0
  23. package/dist/esm/applications/applications.shared.schemas.js +48 -0
  24. package/dist/esm/applications/applications.shared.schemas.js.map +1 -0
  25. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +45 -0
  26. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -0
  27. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +160 -0
  28. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -0
  29. package/dist/esm/billing/billing-account.shared.schemas.d.ts +78 -0
  30. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -0
  31. package/dist/esm/billing/billing-account.shared.schemas.js +87 -0
  32. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -0
  33. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +43 -0
  34. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -0
  35. package/dist/esm/billing/billing-configuration.shared.schemas.js +100 -0
  36. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -0
  37. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +173 -0
  38. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -0
  39. package/dist/esm/billing/billing-enums.shared.schemas.js +199 -0
  40. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -0
  41. package/dist/esm/billing/billing-types.shared.schemas.d.ts +81 -0
  42. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -0
  43. package/dist/esm/billing/billing-types.shared.schemas.js +10 -0
  44. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -0
  45. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts +23 -0
  46. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -0
  47. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js +111 -0
  48. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -0
  49. package/dist/esm/billing/credit-pool.shared.schemas.d.ts +48 -0
  50. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -0
  51. package/dist/esm/billing/credit-pool.shared.schemas.js +52 -0
  52. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -0
  53. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts +10 -0
  54. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -0
  55. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js +86 -0
  56. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -0
  57. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts +40 -0
  58. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -0
  59. package/dist/esm/billing/invoice-ref.shared.schemas.js +43 -0
  60. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -0
  61. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts +30 -0
  62. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -0
  63. package/dist/esm/billing/price.shared.resources-config.schemas.js +58 -0
  64. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -0
  65. package/dist/esm/billing/price.shared.schemas.d.ts +50 -0
  66. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -0
  67. package/dist/esm/billing/price.shared.schemas.js +72 -0
  68. package/dist/esm/billing/price.shared.schemas.js.map +1 -0
  69. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts +67 -0
  70. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -0
  71. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +84 -0
  72. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -0
  73. package/dist/esm/billing/product-definition.shared.schemas.d.ts +111 -0
  74. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -0
  75. package/dist/esm/billing/product-definition.shared.schemas.js +97 -0
  76. package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -0
  77. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +64 -0
  78. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -0
  79. package/dist/esm/billing/product.shared.resources-config.schemas.js +73 -0
  80. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -0
  81. package/dist/esm/billing/product.shared.schemas.d.ts +77 -0
  82. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -0
  83. package/dist/esm/billing/product.shared.schemas.js +86 -0
  84. package/dist/esm/billing/product.shared.schemas.js.map +1 -0
  85. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts +40 -0
  86. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -0
  87. package/dist/esm/billing/promotions.shared.resources-config.schemas.js +105 -0
  88. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -0
  89. package/dist/esm/billing/promotions.shared.schemas.d.ts +41 -0
  90. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -0
  91. package/dist/esm/billing/promotions.shared.schemas.js +70 -0
  92. package/dist/esm/billing/promotions.shared.schemas.js.map +1 -0
  93. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts +43 -0
  94. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -0
  95. package/dist/esm/billing/referral.shared.resources-config.schemas.js +58 -0
  96. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -0
  97. package/dist/esm/billing/referral.shared.schemas.d.ts +70 -0
  98. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -0
  99. package/dist/esm/billing/referral.shared.schemas.js +75 -0
  100. package/dist/esm/billing/referral.shared.schemas.js.map +1 -0
  101. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +53 -0
  102. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -0
  103. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +182 -0
  104. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -0
  105. package/dist/esm/billing/subscription.shared.schemas.d.ts +109 -0
  106. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -0
  107. package/dist/esm/billing/subscription.shared.schemas.js +92 -0
  108. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -0
  109. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts +10 -0
  110. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -0
  111. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js +68 -0
  112. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -0
  113. package/dist/esm/billing/usage-record.shared.schemas.d.ts +52 -0
  114. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -0
  115. package/dist/esm/billing/usage-record.shared.schemas.js +49 -0
  116. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -0
  117. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts +185 -0
  118. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -0
  119. package/dist/esm/charts/aggregation-query.shared.schemas.js +200 -0
  120. package/dist/esm/charts/aggregation-query.shared.schemas.js.map +1 -0
  121. package/dist/esm/charts/aggregation.shared.definitions.d.ts +80 -0
  122. package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -0
  123. package/dist/esm/charts/aggregation.shared.definitions.js +103 -0
  124. package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -0
  125. package/dist/esm/charts/chart-definition-builder.shared.d.ts +212 -0
  126. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -0
  127. package/dist/esm/charts/chart-definition-builder.shared.js +434 -0
  128. package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -0
  129. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +43 -0
  130. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
  131. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js +133 -0
  132. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -0
  133. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +951 -0
  134. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -0
  135. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +643 -0
  136. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -0
  137. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts +69 -0
  138. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -0
  139. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +163 -0
  140. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -0
  141. package/dist/esm/compliance/compliance-framework/compliance-frameworks.shared.schemas.d.ts +37 -0
  142. package/dist/esm/compliance/compliance-framework/compliance-frameworks.shared.schemas.d.ts.map +1 -0
  143. package/dist/esm/compliance/compliance-framework/compliance-frameworks.shared.schemas.js +38 -0
  144. package/dist/esm/compliance/compliance-framework/compliance-frameworks.shared.schemas.js.map +1 -0
  145. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +8 -0
  146. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -0
  147. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js +7 -0
  148. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +1 -0
  149. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +85 -0
  150. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -0
  151. package/dist/esm/compliance/privacy/privacy.shared.schemas.js +60 -0
  152. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -0
  153. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +15 -0
  154. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -0
  155. package/dist/esm/compliance/privacy/redaction.shared.schemas.js +16 -0
  156. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -0
  157. package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts +2 -0
  158. package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -0
  159. package/dist/esm/compliance/privacy/sharing.shared.schemas.js +1 -0
  160. package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -0
  161. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +166 -0
  162. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -0
  163. package/dist/esm/config/analytics-value-moments.shared.schemas.js +215 -0
  164. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -0
  165. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +472 -0
  166. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -0
  167. package/dist/esm/config/app-configuration-shared.shared.schemas.js +219 -0
  168. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -0
  169. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +28 -0
  170. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -0
  171. package/dist/esm/config/auth-config-resolution.shared.utils.js +211 -0
  172. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -0
  173. package/dist/esm/config/configuration-validation.shared.schemas.d.ts +38 -0
  174. package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -0
  175. package/dist/esm/config/configuration-validation.shared.schemas.js +48 -0
  176. package/dist/esm/config/configuration-validation.shared.schemas.js.map +1 -0
  177. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +402 -0
  178. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -0
  179. package/dist/esm/config/entity-identity-config.shared.schemas.js +228 -0
  180. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -0
  181. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +1612 -0
  182. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -0
  183. package/dist/esm/config/frontend/chart-definition.shared.schemas.js +998 -0
  184. package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -0
  185. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +684 -0
  186. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -0
  187. package/dist/esm/config/frontend/navigation.shared.schemas.js +678 -0
  188. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -0
  189. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts +618 -0
  190. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -0
  191. package/dist/esm/config/frontend/onboarding.shared.schemas.js +391 -0
  192. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -0
  193. package/dist/esm/config/postgresql.shared.schemas.d.ts +29 -0
  194. package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -0
  195. package/dist/esm/config/postgresql.shared.schemas.js +37 -0
  196. package/dist/esm/config/postgresql.shared.schemas.js.map +1 -0
  197. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts +50 -0
  198. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -0
  199. package/dist/esm/crdt/crdt-merge.shared.utils.js +120 -0
  200. package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -0
  201. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +230 -0
  202. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -0
  203. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +248 -0
  204. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -0
  205. package/dist/esm/errors/errors.shared.definitions.d.ts +27 -0
  206. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -0
  207. package/dist/esm/errors/errors.shared.definitions.js +287 -0
  208. package/dist/esm/errors/errors.shared.definitions.js.map +1 -0
  209. package/dist/esm/errors/errors.shared.schemas.d.ts +424 -0
  210. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -0
  211. package/dist/esm/errors/errors.shared.schemas.js +375 -0
  212. package/dist/esm/errors/errors.shared.schemas.js.map +1 -0
  213. package/dist/esm/errors/errors.shared.utils.d.ts +15 -0
  214. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -0
  215. package/dist/esm/errors/errors.shared.utils.js +23 -0
  216. package/dist/esm/errors/errors.shared.utils.js.map +1 -0
  217. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts +248 -0
  218. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -0
  219. package/dist/esm/external-providers/external-providers.shared.schemas.js +70 -0
  220. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -0
  221. package/dist/esm/external-providers/feature-bindings-policy.shared.schemas.d.ts +27 -0
  222. package/dist/esm/external-providers/feature-bindings-policy.shared.schemas.d.ts.map +1 -0
  223. package/dist/esm/external-providers/feature-bindings-policy.shared.schemas.js +35 -0
  224. package/dist/esm/external-providers/feature-bindings-policy.shared.schemas.js.map +1 -0
  225. package/dist/esm/external-providers/feature-mapping.shared.schemas.d.ts +80 -0
  226. package/dist/esm/external-providers/feature-mapping.shared.schemas.d.ts.map +1 -0
  227. package/dist/esm/external-providers/feature-mapping.shared.schemas.js +159 -0
  228. package/dist/esm/external-providers/feature-mapping.shared.schemas.js.map +1 -0
  229. package/dist/esm/external-providers/wildo-features.shared.schemas.d.ts +102 -0
  230. package/dist/esm/external-providers/wildo-features.shared.schemas.d.ts.map +1 -0
  231. package/dist/esm/external-providers/wildo-features.shared.schemas.js +124 -0
  232. package/dist/esm/external-providers/wildo-features.shared.schemas.js.map +1 -0
  233. package/dist/esm/features/core-feature-definitions.shared.d.ts +19 -0
  234. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -0
  235. package/dist/esm/features/core-feature-definitions.shared.js +69 -0
  236. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -0
  237. package/dist/esm/features/feature-builders.shared.d.ts +90 -0
  238. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -0
  239. package/dist/esm/features/feature-builders.shared.js +107 -0
  240. package/dist/esm/features/feature-builders.shared.js.map +1 -0
  241. package/dist/esm/features/feature-definition.shared.schemas.d.ts +239 -0
  242. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -0
  243. package/dist/esm/features/feature-definition.shared.schemas.js +280 -0
  244. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -0
  245. package/dist/esm/features/feature-registry.shared.d.ts +117 -0
  246. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -0
  247. package/dist/esm/features/feature-registry.shared.js +176 -0
  248. package/dist/esm/features/feature-registry.shared.js.map +1 -0
  249. package/dist/esm/features/feature-resolution.shared.schemas.d.ts +54 -0
  250. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -0
  251. package/dist/esm/features/feature-resolution.shared.schemas.js +7 -0
  252. package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -0
  253. package/dist/esm/features/platform-capability-definitions.shared.d.ts +50 -0
  254. package/dist/esm/features/platform-capability-definitions.shared.d.ts.map +1 -0
  255. package/dist/esm/features/platform-capability-definitions.shared.js +30 -0
  256. package/dist/esm/features/platform-capability-definitions.shared.js.map +1 -0
  257. package/dist/esm/features/scope-features.shared.schemas.d.ts +45 -0
  258. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -0
  259. package/dist/esm/features/scope-features.shared.schemas.js +50 -0
  260. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -0
  261. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +21 -0
  262. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -0
  263. package/dist/esm/features/user-features.shared.resources-config.schemas.js +65 -0
  264. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -0
  265. package/dist/esm/files/files.shared.resources-config.schemas.d.ts +69 -0
  266. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -0
  267. package/dist/esm/files/files.shared.resources-config.schemas.js +103 -0
  268. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -0
  269. package/dist/esm/files/files.shared.schemas.d.ts +122 -0
  270. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -0
  271. package/dist/esm/files/files.shared.schemas.js +234 -0
  272. package/dist/esm/files/files.shared.schemas.js.map +1 -0
  273. package/dist/esm/files/files.shared.utils.d.ts +46 -0
  274. package/dist/esm/files/files.shared.utils.d.ts.map +1 -0
  275. package/dist/esm/files/files.shared.utils.js +74 -0
  276. package/dist/esm/files/files.shared.utils.js.map +1 -0
  277. package/dist/esm/flows-actors/actors.shared.schemas.d.ts +847 -0
  278. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -0
  279. package/dist/esm/flows-actors/actors.shared.schemas.js +71 -0
  280. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -0
  281. package/dist/esm/flows-actors/agents-context.shared.schemas.d.ts +181 -0
  282. package/dist/esm/flows-actors/agents-context.shared.schemas.d.ts.map +1 -0
  283. package/dist/esm/flows-actors/agents-context.shared.schemas.js +116 -0
  284. package/dist/esm/flows-actors/agents-context.shared.schemas.js.map +1 -0
  285. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +181 -0
  286. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -0
  287. package/dist/esm/flows-actors/agents.shared.schemas.js +226 -0
  288. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -0
  289. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +229 -0
  290. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +1 -0
  291. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js +319 -0
  292. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js.map +1 -0
  293. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts +236 -0
  294. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +1 -0
  295. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js +212 -0
  296. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js.map +1 -0
  297. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +276 -0
  298. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -0
  299. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +206 -0
  300. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -0
  301. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts +243 -0
  302. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -0
  303. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js +88 -0
  304. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -0
  305. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts +61 -0
  306. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -0
  307. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js +54 -0
  308. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -0
  309. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +122 -0
  310. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -0
  311. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +76 -0
  312. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -0
  313. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +224 -0
  314. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -0
  315. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +76 -0
  316. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -0
  317. package/dist/esm/flows-actors/flows.shared.schemas.d.ts +306 -0
  318. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -0
  319. package/dist/esm/flows-actors/flows.shared.schemas.js +148 -0
  320. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -0
  321. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts +60 -0
  322. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -0
  323. package/dist/esm/flows-actors/prompt-ir.shared.schemas.js +95 -0
  324. package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -0
  325. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +700 -0
  326. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -0
  327. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js +164 -0
  328. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -0
  329. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts +2 -0
  330. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts.map +1 -0
  331. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js +1 -0
  332. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js.map +1 -0
  333. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts +4 -0
  334. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -0
  335. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js +5 -0
  336. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -0
  337. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts +287 -0
  338. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -0
  339. package/dist/esm/guidance/guidance-flow.shared.schemas.js +105 -0
  340. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -0
  341. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts +43 -0
  342. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -0
  343. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js +139 -0
  344. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -0
  345. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts +53 -0
  346. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -0
  347. package/dist/esm/guidance/guidance-state.shared.schemas.js +40 -0
  348. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -0
  349. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts +89 -0
  350. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -0
  351. package/dist/esm/guidance/lifecycle-config.shared.schemas.js +80 -0
  352. package/dist/esm/guidance/lifecycle-config.shared.schemas.js.map +1 -0
  353. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts +47 -0
  354. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -0
  355. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js +135 -0
  356. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -0
  357. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts +110 -0
  358. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -0
  359. package/dist/esm/guidance/lifecycle-state.shared.schemas.js +184 -0
  360. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -0
  361. package/dist/esm/guidance/milestone-builders.shared.d.ts +49 -0
  362. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -0
  363. package/dist/esm/guidance/milestone-builders.shared.js +47 -0
  364. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -0
  365. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts +106 -0
  366. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -0
  367. package/dist/esm/guidance/milestone-definition.shared.schemas.js +45 -0
  368. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -0
  369. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +37 -0
  370. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -0
  371. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js +135 -0
  372. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -0
  373. package/dist/esm/guidance/progression-state.shared.schemas.d.ts +38 -0
  374. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -0
  375. package/dist/esm/guidance/progression-state.shared.schemas.js +38 -0
  376. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -0
  377. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts +26 -0
  378. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -0
  379. package/dist/esm/i18n/labelling.dto.shared.schemas.js +23 -0
  380. package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -0
  381. package/dist/esm/index.d.ts +201 -0
  382. package/dist/esm/index.d.ts.map +1 -0
  383. package/dist/esm/index.js +227 -0
  384. package/dist/esm/index.js.map +1 -0
  385. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts +128 -0
  386. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -0
  387. package/dist/esm/monitoring/monitoring.shared.schemas.js +112 -0
  388. package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -0
  389. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts +139 -0
  390. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -0
  391. package/dist/esm/notifications/email/email-context.shared.schemas.js +290 -0
  392. package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -0
  393. package/dist/esm/notifications/email/email-header-footer-template.shared.resources-config.schemas.d.ts +39 -0
  394. package/dist/esm/notifications/email/email-header-footer-template.shared.resources-config.schemas.d.ts.map +1 -0
  395. package/dist/esm/notifications/email/email-header-footer-template.shared.resources-config.schemas.js +113 -0
  396. package/dist/esm/notifications/email/email-header-footer-template.shared.resources-config.schemas.js.map +1 -0
  397. package/dist/esm/notifications/email/email-header-footer-template.shared.schemas.d.ts +63 -0
  398. package/dist/esm/notifications/email/email-header-footer-template.shared.schemas.d.ts.map +1 -0
  399. package/dist/esm/notifications/email/email-header-footer-template.shared.schemas.js +110 -0
  400. package/dist/esm/notifications/email/email-header-footer-template.shared.schemas.js.map +1 -0
  401. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +85 -0
  402. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -0
  403. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js +328 -0
  404. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -0
  405. package/dist/esm/notifications/email/email-template.shared.resources-config.schemas.d.ts +62 -0
  406. package/dist/esm/notifications/email/email-template.shared.resources-config.schemas.d.ts.map +1 -0
  407. package/dist/esm/notifications/email/email-template.shared.resources-config.schemas.js +112 -0
  408. package/dist/esm/notifications/email/email-template.shared.resources-config.schemas.js.map +1 -0
  409. package/dist/esm/notifications/email/email-template.shared.schemas.d.ts +162 -0
  410. package/dist/esm/notifications/email/email-template.shared.schemas.d.ts.map +1 -0
  411. package/dist/esm/notifications/email/email-template.shared.schemas.js +189 -0
  412. package/dist/esm/notifications/email/email-template.shared.schemas.js.map +1 -0
  413. package/dist/esm/notifications/notification-badges.core.definitions.d.ts +3 -0
  414. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -0
  415. package/dist/esm/notifications/notification-badges.core.definitions.js +13 -0
  416. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -0
  417. package/dist/esm/notifications/notification-badges.schemas.d.ts +75 -0
  418. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -0
  419. package/dist/esm/notifications/notification-badges.schemas.js +52 -0
  420. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -0
  421. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts +22 -0
  422. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -0
  423. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js +79 -0
  424. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -0
  425. package/dist/esm/notifications/notifications.shared.schemas.d.ts +583 -0
  426. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -0
  427. package/dist/esm/notifications/notifications.shared.schemas.js +196 -0
  428. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -0
  429. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +27 -0
  430. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -0
  431. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +162 -0
  432. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -0
  433. package/dist/esm/organizations/organization-features.shared.schemas.d.ts +23 -0
  434. package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -0
  435. package/dist/esm/organizations/organization-features.shared.schemas.js +25 -0
  436. package/dist/esm/organizations/organization-features.shared.schemas.js.map +1 -0
  437. package/dist/esm/organizations/organization-member-invitations.shared.resources-config.schemas.d.ts +37 -0
  438. package/dist/esm/organizations/organization-member-invitations.shared.resources-config.schemas.d.ts.map +1 -0
  439. package/dist/esm/organizations/organization-member-invitations.shared.resources-config.schemas.js +207 -0
  440. package/dist/esm/organizations/organization-member-invitations.shared.resources-config.schemas.js.map +1 -0
  441. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +35 -0
  442. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -0
  443. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +278 -0
  444. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -0
  445. package/dist/esm/organizations/organization-members.shared.schemas.d.ts +59 -0
  446. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -0
  447. package/dist/esm/organizations/organization-members.shared.schemas.js +56 -0
  448. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -0
  449. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts +29 -0
  450. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -0
  451. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js +68 -0
  452. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js.map +1 -0
  453. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts +26 -0
  454. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -0
  455. package/dist/esm/organizations/organization-notifications.shared.schemas.js +28 -0
  456. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -0
  457. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts +29 -0
  458. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -0
  459. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js +70 -0
  460. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js.map +1 -0
  461. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +34 -0
  462. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -0
  463. package/dist/esm/organizations/organization-preferences.shared.schemas.js +30 -0
  464. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -0
  465. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts +52 -0
  466. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -0
  467. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js +97 -0
  468. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js.map +1 -0
  469. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +73 -0
  470. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -0
  471. package/dist/esm/organizations/organization-profile.shared.schemas.js +71 -0
  472. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -0
  473. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts +30 -0
  474. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -0
  475. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +196 -0
  476. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -0
  477. package/dist/esm/organizations/organization-units.shared.schemas.d.ts +53 -0
  478. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -0
  479. package/dist/esm/organizations/organization-units.shared.schemas.js +58 -0
  480. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -0
  481. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +27 -0
  482. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -0
  483. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +214 -0
  484. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -0
  485. package/dist/esm/organizations/organizations.shared.schemas.d.ts +138 -0
  486. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -0
  487. package/dist/esm/organizations/organizations.shared.schemas.js +58 -0
  488. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -0
  489. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +64 -0
  490. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -0
  491. package/dist/esm/queue/jobs.shared.resources-config.schemas.js +290 -0
  492. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -0
  493. package/dist/esm/queue/jobs.shared.schemas.d.ts +337 -0
  494. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -0
  495. package/dist/esm/queue/jobs.shared.schemas.js +367 -0
  496. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -0
  497. package/dist/esm/queue/jobs.shared.utils.d.ts +253 -0
  498. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -0
  499. package/dist/esm/queue/jobs.shared.utils.js +446 -0
  500. package/dist/esm/queue/jobs.shared.utils.js.map +1 -0
  501. package/dist/esm/queue/queues.shared.schemas.d.ts +203 -0
  502. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -0
  503. package/dist/esm/queue/queues.shared.schemas.js +300 -0
  504. package/dist/esm/queue/queues.shared.schemas.js.map +1 -0
  505. package/dist/esm/queue/queues.shared.utils.d.ts +122 -0
  506. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -0
  507. package/dist/esm/queue/queues.shared.utils.js +212 -0
  508. package/dist/esm/queue/queues.shared.utils.js.map +1 -0
  509. package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts +13 -0
  510. package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -0
  511. package/dist/esm/queue/rabbitmq-queue-args.shared.js +13 -0
  512. package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -0
  513. package/dist/esm/requests/header-keys.shared.d.ts +52 -0
  514. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -0
  515. package/dist/esm/requests/header-keys.shared.js +67 -0
  516. package/dist/esm/requests/header-keys.shared.js.map +1 -0
  517. package/dist/esm/requests/http-requests.shared.d.ts +37 -0
  518. package/dist/esm/requests/http-requests.shared.d.ts.map +1 -0
  519. package/dist/esm/requests/http-requests.shared.js +40 -0
  520. package/dist/esm/requests/http-requests.shared.js.map +1 -0
  521. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +80 -0
  522. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -0
  523. package/dist/esm/requests/manual-controllers-routes-urls.js +172 -0
  524. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -0
  525. package/dist/esm/requests/rate-limits.shared.schemas.d.ts +44 -0
  526. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -0
  527. package/dist/esm/requests/rate-limits.shared.schemas.js +38 -0
  528. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -0
  529. package/dist/esm/requests/websocket.shared.schemas.d.ts +1113 -0
  530. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -0
  531. package/dist/esm/requests/websocket.shared.schemas.js +682 -0
  532. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -0
  533. package/dist/esm/resources/child-operations.shared.schemas.d.ts +236 -0
  534. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -0
  535. package/dist/esm/resources/child-operations.shared.schemas.js +280 -0
  536. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -0
  537. package/dist/esm/resources/context-policy.shared.schemas.d.ts +159 -0
  538. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -0
  539. package/dist/esm/resources/context-policy.shared.schemas.js +69 -0
  540. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -0
  541. package/dist/esm/resources/relationship-display.shared.schemas.d.ts +1487 -0
  542. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -0
  543. package/dist/esm/resources/relationship-display.shared.schemas.js +383 -0
  544. package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -0
  545. package/dist/esm/resources/resources-config.shared.factory.d.ts +31 -0
  546. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -0
  547. package/dist/esm/resources/resources-config.shared.factory.js +1536 -0
  548. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -0
  549. package/dist/esm/resources/resources-config.shared.schemas.d.ts +767 -0
  550. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -0
  551. package/dist/esm/resources/resources-config.shared.schemas.js +127 -0
  552. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -0
  553. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts +6 -0
  554. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -0
  555. package/dist/esm/resources/resources-registry.shared.core.definitions.js +691 -0
  556. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -0
  557. package/dist/esm/resources/resources-relationships.shared.factory.d.ts +155 -0
  558. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -0
  559. package/dist/esm/resources/resources-relationships.shared.factory.js +256 -0
  560. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -0
  561. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts +254 -0
  562. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -0
  563. package/dist/esm/resources/resources-serialization.shared.schemas.js +53 -0
  564. package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -0
  565. package/dist/esm/resources/resources.shared.core.definitions.d.ts +142 -0
  566. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -0
  567. package/dist/esm/resources/resources.shared.core.definitions.js +290 -0
  568. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -0
  569. package/dist/esm/resources/resources.shared.schemas.d.ts +1302 -0
  570. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -0
  571. package/dist/esm/resources/resources.shared.schemas.js +717 -0
  572. package/dist/esm/resources/resources.shared.schemas.js.map +1 -0
  573. package/dist/esm/resources/resources.shared.utils.d.ts +364 -0
  574. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -0
  575. package/dist/esm/resources/resources.shared.utils.js +752 -0
  576. package/dist/esm/resources/resources.shared.utils.js.map +1 -0
  577. package/dist/esm/resources/testing/SchemaDecoratorTestUtils.d.ts +91 -0
  578. package/dist/esm/resources/testing/SchemaDecoratorTestUtils.d.ts.map +1 -0
  579. package/dist/esm/resources/testing/SchemaDecoratorTestUtils.js +325 -0
  580. package/dist/esm/resources/testing/SchemaDecoratorTestUtils.js.map +1 -0
  581. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts +79 -0
  582. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -0
  583. package/dist/esm/resources/utils/repository-dto-builder.utils.js +157 -0
  584. package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -0
  585. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts +47 -0
  586. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -0
  587. package/dist/esm/resources/utils/resource-operation-type-guards.utils.js +46 -0
  588. package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -0
  589. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts +130 -0
  590. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -0
  591. package/dist/esm/resources/utils/resource-polymorphism.factory.js +133 -0
  592. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -0
  593. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts +122 -0
  594. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -0
  595. package/dist/esm/resources/utils/resource-polymorphism.relationships.js +131 -0
  596. package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -0
  597. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts +128 -0
  598. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -0
  599. package/dist/esm/resources/utils/resource-polymorphism.schemas.js +267 -0
  600. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -0
  601. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts +120 -0
  602. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -0
  603. package/dist/esm/resources/utils/resource-polymorphism.utils.js +122 -0
  604. package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -0
  605. package/dist/esm/resources/utils/resource-subtree.utils.d.ts +26 -0
  606. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -0
  607. package/dist/esm/resources/utils/resource-subtree.utils.js +75 -0
  608. package/dist/esm/resources/utils/resource-subtree.utils.js.map +1 -0
  609. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts +29 -0
  610. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -0
  611. package/dist/esm/resources/utils/resources-config-context-needs.utils.js +47 -0
  612. package/dist/esm/resources/utils/resources-config-context-needs.utils.js.map +1 -0
  613. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts +149 -0
  614. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -0
  615. package/dist/esm/resources/utils/resources-config-naming.utils.js +391 -0
  616. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -0
  617. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +381 -0
  618. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -0
  619. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +2180 -0
  620. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -0
  621. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts +65 -0
  622. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -0
  623. package/dist/esm/resources/utils/resources-config-operations.path.utils.js +250 -0
  624. package/dist/esm/resources/utils/resources-config-operations.path.utils.js.map +1 -0
  625. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts +258 -0
  626. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -0
  627. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js +693 -0
  628. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -0
  629. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts +40 -0
  630. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -0
  631. package/dist/esm/resources/utils/resources-config-operations.utils.js +78 -0
  632. package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -0
  633. package/dist/esm/resources/utils/resources-serialization.utils.d.ts +75 -0
  634. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -0
  635. package/dist/esm/resources/utils/resources-serialization.utils.js +92 -0
  636. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -0
  637. package/dist/esm/resources/utils/resources-summary.utils.d.ts +81 -0
  638. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -0
  639. package/dist/esm/resources/utils/resources-summary.utils.js +183 -0
  640. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -0
  641. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts +97 -0
  642. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -0
  643. package/dist/esm/resources/utils/schema-family-builder.utils.js +202 -0
  644. package/dist/esm/resources/utils/schema-family-builder.utils.js.map +1 -0
  645. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts +26 -0
  646. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -0
  647. package/dist/esm/resources/utils/schema-type-inference.utils.js +10 -0
  648. package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -0
  649. package/dist/esm/resources/utils/schema-type-utils.d.ts +56 -0
  650. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -0
  651. package/dist/esm/resources/utils/schema-type-utils.js +81 -0
  652. package/dist/esm/resources/utils/schema-type-utils.js.map +1 -0
  653. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts +49 -0
  654. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -0
  655. package/dist/esm/resources/utils/schema-variant-resolver.utils.js +99 -0
  656. package/dist/esm/resources/utils/schema-variant-resolver.utils.js.map +1 -0
  657. package/dist/esm/runtime/companion-artifact-placement.shared.definitions.d.ts +31 -0
  658. package/dist/esm/runtime/companion-artifact-placement.shared.definitions.d.ts.map +1 -0
  659. package/dist/esm/runtime/companion-artifact-placement.shared.definitions.js +8 -0
  660. package/dist/esm/runtime/companion-artifact-placement.shared.definitions.js.map +1 -0
  661. package/dist/esm/runtime/domain-module.shared.definitions.d.ts +43 -0
  662. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -0
  663. package/dist/esm/runtime/domain-module.shared.definitions.js +77 -0
  664. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -0
  665. package/dist/esm/runtime/execution-context.shared.schemas.d.ts +77 -0
  666. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -0
  667. package/dist/esm/runtime/execution-context.shared.schemas.js +87 -0
  668. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -0
  669. package/dist/esm/runtime/runtime.shared.schemas.d.ts +19 -0
  670. package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -0
  671. package/dist/esm/runtime/runtime.shared.schemas.js +20 -0
  672. package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -0
  673. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +37 -0
  674. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -0
  675. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +235 -0
  676. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -0
  677. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +37 -0
  678. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -0
  679. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +364 -0
  680. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -0
  681. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts +113 -0
  682. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -0
  683. package/dist/esm/security/api-keys/api-keys.shared.schemas.js +65 -0
  684. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -0
  685. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +623 -0
  686. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -0
  687. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +421 -0
  688. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -0
  689. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +140 -0
  690. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -0
  691. package/dist/esm/security/authentications/authentication.shared.schemas.js +195 -0
  692. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -0
  693. package/dist/esm/security/authentications/authentication.shared.utils.d.ts +67 -0
  694. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -0
  695. package/dist/esm/security/authentications/authentication.shared.utils.js +126 -0
  696. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -0
  697. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts +146 -0
  698. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -0
  699. package/dist/esm/security/authentications/consumable-token.shared.schemas.js +59 -0
  700. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -0
  701. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts +39 -0
  702. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -0
  703. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js +42 -0
  704. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -0
  705. package/dist/esm/security/authentications/policy/auth-policy.shared.resources-config.schemas.d.ts +10 -0
  706. package/dist/esm/security/authentications/policy/auth-policy.shared.resources-config.schemas.d.ts.map +1 -0
  707. package/dist/esm/security/authentications/policy/auth-policy.shared.resources-config.schemas.js +52 -0
  708. package/dist/esm/security/authentications/policy/auth-policy.shared.resources-config.schemas.js.map +1 -0
  709. package/dist/esm/security/authentications/policy/auth-policy.shared.schemas.d.ts +52 -0
  710. package/dist/esm/security/authentications/policy/auth-policy.shared.schemas.d.ts.map +1 -0
  711. package/dist/esm/security/authentications/policy/auth-policy.shared.schemas.js +40 -0
  712. package/dist/esm/security/authentications/policy/auth-policy.shared.schemas.js.map +1 -0
  713. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +85 -0
  714. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -0
  715. package/dist/esm/security/authentications/registration.shared.dto.schemas.js +90 -0
  716. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -0
  717. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts +17 -0
  718. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -0
  719. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js +90 -0
  720. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -0
  721. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +51 -0
  722. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -0
  723. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +38 -0
  724. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -0
  725. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts +25 -0
  726. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -0
  727. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js +127 -0
  728. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -0
  729. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts +36 -0
  730. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -0
  731. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js +33 -0
  732. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -0
  733. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts +21 -0
  734. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -0
  735. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js +123 -0
  736. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -0
  737. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts +49 -0
  738. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -0
  739. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js +37 -0
  740. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js.map +1 -0
  741. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts +17 -0
  742. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -0
  743. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js +90 -0
  744. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -0
  745. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts +125 -0
  746. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -0
  747. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +76 -0
  748. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -0
  749. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +25 -0
  750. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -0
  751. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +111 -0
  752. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -0
  753. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +160 -0
  754. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -0
  755. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +113 -0
  756. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -0
  757. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts +22 -0
  758. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -0
  759. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js +123 -0
  760. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -0
  761. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +274 -0
  762. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -0
  763. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +143 -0
  764. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -0
  765. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts +10 -0
  766. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -0
  767. package/dist/esm/security/authorizations/roles.shared.defaults.js +76 -0
  768. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -0
  769. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +43 -0
  770. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -0
  771. package/dist/esm/security/authorizations/roles.shared.schemas.js +58 -0
  772. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -0
  773. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts +6 -0
  774. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -0
  775. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js +7 -0
  776. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -0
  777. package/dist/esm/testing/resource-config-builders.d.ts +33 -0
  778. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -0
  779. package/dist/esm/testing/resource-config-builders.js +240 -0
  780. package/dist/esm/testing/resource-config-builders.js.map +1 -0
  781. package/dist/esm/testing/schema-decorator-utils.d.ts +91 -0
  782. package/dist/esm/testing/schema-decorator-utils.d.ts.map +1 -0
  783. package/dist/esm/testing/schema-decorator-utils.js +325 -0
  784. package/dist/esm/testing/schema-decorator-utils.js.map +1 -0
  785. package/dist/esm/testing.d.ts +6 -0
  786. package/dist/esm/testing.d.ts.map +1 -0
  787. package/dist/esm/testing.js +6 -0
  788. package/dist/esm/testing.js.map +1 -0
  789. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +27 -0
  790. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -0
  791. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js +79 -0
  792. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -0
  793. package/dist/esm/users/anonymous-users.shared.schema.d.ts +28 -0
  794. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -0
  795. package/dist/esm/users/anonymous-users.shared.schema.js +21 -0
  796. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -0
  797. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts +23 -0
  798. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -0
  799. package/dist/esm/users/inbound-contacts.shared.schemas.js +15 -0
  800. package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -0
  801. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts +41 -0
  802. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -0
  803. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js +81 -0
  804. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -0
  805. package/dist/esm/users/user-credentials.shared.schemas.d.ts +63 -0
  806. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -0
  807. package/dist/esm/users/user-credentials.shared.schemas.js +62 -0
  808. package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -0
  809. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts +29 -0
  810. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -0
  811. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js +82 -0
  812. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -0
  813. package/dist/esm/users/user-identity-links.shared.schemas.d.ts +37 -0
  814. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -0
  815. package/dist/esm/users/user-identity-links.shared.schemas.js +50 -0
  816. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -0
  817. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +70 -0
  818. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -0
  819. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js +278 -0
  820. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -0
  821. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts +29 -0
  822. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -0
  823. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js +246 -0
  824. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -0
  825. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +71 -0
  826. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -0
  827. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js +253 -0
  828. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -0
  829. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts +31 -0
  830. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -0
  831. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js +195 -0
  832. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -0
  833. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts +32 -0
  834. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -0
  835. package/dist/esm/users/user-self.shared.resources-config.schemas.js +232 -0
  836. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -0
  837. package/dist/esm/users/users.shared.resources-config.schemas.d.ts +34 -0
  838. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -0
  839. package/dist/esm/users/users.shared.resources-config.schemas.js +414 -0
  840. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -0
  841. package/dist/esm/users/users.shared.schemas.d.ts +199 -0
  842. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -0
  843. package/dist/esm/users/users.shared.schemas.js +84 -0
  844. package/dist/esm/users/users.shared.schemas.js.map +1 -0
  845. package/dist/tsconfig.build.tsbuildinfo +1 -0
  846. package/package.json +199 -0
@@ -0,0 +1,1536 @@
1
+ /**
2
+ * Operations Shared Schemas
3
+ *
4
+ * Reusable operation schemas for bulk actions and common operations
5
+ */
6
+ import { ExpiresInDurationSchema, getZodObjectShape, getZodType, isBackendOnlyField, isDiscriminatorField, isExcludedFromCreate, isExcludedFromUpdate, isSummaryField, isVirtualField, unwrapSchema } from '@wildo-ai/zod-decorators';
7
+ import { z } from 'zod';
8
+ import { ErrorType } from '../errors/errors.shared.schemas.js';
9
+ import { HttpMethod } from '../requests/http-requests.shared.js';
10
+ import { ConsumableToken_ConsumptionMode, TokenAuthenticationPolicy } from '../security/authentications/consumable-token.shared.schemas.js';
11
+ import { OPERATION_VARIANT_KEY, Resouces_BulkOperationBaseSchema, Resouces_Filter_BaseSchema, Resouces_Filter_DateRangeSchema, Resouces_PaginationRequestSchema, Resouces_PaginationResponseMetadataSchema, SortOrder } from './resources-config.shared.schemas.js';
12
+ import { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from './resources.shared.core.definitions.js';
13
+ import { PRIMARY_SCOPE_FIELD_IDENTIFIERS, PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE, ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceOperation_ServiceRuntimeMode, ResourceParentResourceRequirement, ResourcePrimaryScope, ResourceRelationshipBulkAction, ResourceRelationshipBulkActionResultSchema, ResourceRelationshipBulkClearOperationRequestSchema, ResourceRelationshipBulkCreateOperationRequestSchema, ResourceRelationshipBulkLinkOperationRequestSchema, ResourceRelationshipBulkReplaceOperationRequestSchema, ResourceRelationshipBulkSetOperationRequestSchema, ResourceRelationshipBulkUnlinkOperationRequestSchema, ResourceRelationshipAccessScopeStrategy, ResourceRelationshipCardinality, ResourceTranspositionPolicy } from './resources.shared.schemas.js';
14
+ import { createResourcesRelationship } from './resources-relationships.shared.factory.js';
15
+ import { Resources_SharedUtils } from './resources.shared.utils.js';
16
+ import { ResourcesConfigOperationsDtosBuilderUtils } from './utils/resources-config-operations.dtos-builder.utils.js';
17
+ import { ResourcesSummaryUtils } from './utils/resources-summary.utils.js';
18
+ // --------------------------------
19
+ // Error Helpers
20
+ // --------------------------------
21
+ /**
22
+ * Creates a configuration error with ErrorType.CONFIGURATION
23
+ * Used for resource configuration validation errors at build time
24
+ */
25
+ function createConfigurationError(message) {
26
+ const error = new Error(message);
27
+ error.type = ErrorType.CONFIGURATION;
28
+ return error;
29
+ }
30
+ /**
31
+ * Creates a validation error with ErrorType.VALIDATION
32
+ * Used for runtime data validation errors
33
+ */
34
+ function createValidationError(message) {
35
+ const error = new Error(message);
36
+ error.type = ErrorType.VALIDATION;
37
+ return error;
38
+ }
39
+ function createGeneratedRelationshipBulkOperations(operations, relevantRelationships, resourceIdentifier, allResourceFieldIdentifiers) {
40
+ const baseBulkUpdateOperations = operations.filter((operation) => operation.variantType === ResourceOperationVariantType.API_CALL
41
+ && operation.operationIdentifier === CoreResourceOperation.UPDATE
42
+ && operation.isBulkOperation === true);
43
+ if (baseBulkUpdateOperations.length > 1) {
44
+ throw createConfigurationError(`[${resourceIdentifier}] generated bulk relationship operations require exactly one API bulk UPDATE base operation, but found ${baseBulkUpdateOperations.length}`);
45
+ }
46
+ const [baseBulkUpdateOperation] = baseBulkUpdateOperations;
47
+ if (!baseBulkUpdateOperation) {
48
+ return [];
49
+ }
50
+ const generatedOperations = [];
51
+ const knownOperationIdentifiers = new Set(operations.map((operation) => String(operation.operationIdentifier)));
52
+ for (const relationship of relevantRelationships) {
53
+ const relationshipField = Resources_SharedUtils.resolveRelationshipObjectIdentityForResource(relationship, resourceIdentifier, allResourceFieldIdentifiers).objectFieldName;
54
+ const allowedActions = Resources_SharedUtils.resolveAllowedBulkRelationshipActionsForResource(relationship, resourceIdentifier);
55
+ for (const action of allowedActions) {
56
+ const operationIdentifier = Resources_SharedUtils.buildRelationshipBulkOperationIdentifier(action, relationshipField);
57
+ if (knownOperationIdentifiers.has(operationIdentifier)) {
58
+ throw createConfigurationError(`[${resourceIdentifier}] generated bulk relationship operation "${operationIdentifier}" collides with an existing operation identifier`);
59
+ }
60
+ knownOperationIdentifiers.add(operationIdentifier);
61
+ const requestDto = (() => {
62
+ switch (action) {
63
+ case ResourceRelationshipBulkAction.SET:
64
+ return ResourceRelationshipBulkSetOperationRequestSchema;
65
+ case ResourceRelationshipBulkAction.CLEAR:
66
+ return ResourceRelationshipBulkClearOperationRequestSchema;
67
+ case ResourceRelationshipBulkAction.CREATE:
68
+ return ResourceRelationshipBulkCreateOperationRequestSchema;
69
+ case ResourceRelationshipBulkAction.LINK:
70
+ return ResourceRelationshipBulkLinkOperationRequestSchema;
71
+ case ResourceRelationshipBulkAction.UNLINK:
72
+ return ResourceRelationshipBulkUnlinkOperationRequestSchema;
73
+ case ResourceRelationshipBulkAction.REPLACE:
74
+ return ResourceRelationshipBulkReplaceOperationRequestSchema;
75
+ }
76
+ })();
77
+ generatedOperations.push({
78
+ ...baseBulkUpdateOperation,
79
+ operationIdentifier,
80
+ isDefault: false,
81
+ isOperationDefault: false,
82
+ isBulkOperation: true,
83
+ resourceOperationLike: CoreResourceOperation.UPDATE_MANY,
84
+ requestDto,
85
+ responseDto: ResourceRelationshipBulkActionResultSchema,
86
+ hasCustomResponseDto: true,
87
+ basicPrefixOperation: undefined,
88
+ notificationBadgeOperations: [],
89
+ userNotifications: [],
90
+ m2mNotifications: [],
91
+ tokenGeneration: undefined,
92
+ tokenRevocation: undefined,
93
+ });
94
+ }
95
+ }
96
+ return generatedOperations;
97
+ }
98
+ export function reconcileGeneratedRelationshipBulkOperations(resourceConfigurations, allResourceRelationships, allResourceFieldIdentifiers) {
99
+ for (const [resourceType, resourceConfiguration] of Object.entries(resourceConfigurations)) {
100
+ if (!Array.isArray(resourceConfiguration.operations)) {
101
+ continue;
102
+ }
103
+ const currentResourceType = resourceType;
104
+ const nonGeneratedOperations = resourceConfiguration.operations.filter((operation) => !Resources_SharedUtils.parseRelationshipBulkOperationIdentifier(String(operation.operationIdentifier)));
105
+ const relevantRelationships = allResourceRelationships.filter((relationship) => relationship.resourceType1 === currentResourceType
106
+ || relationship.resourceType2 === currentResourceType);
107
+ resourceConfiguration.operations = [
108
+ ...nonGeneratedOperations,
109
+ ...createGeneratedRelationshipBulkOperations(nonGeneratedOperations, relevantRelationships, currentResourceType, allResourceFieldIdentifiers),
110
+ ];
111
+ }
112
+ }
113
+ // --------------------------------
114
+ // Token Config Validation
115
+ // --------------------------------
116
+ /**
117
+ * Validates tokenGeneration configuration at build time.
118
+ * Catches common mistakes before the app starts.
119
+ */
120
+ function validateTokenGenerationConfig(config, resourceIdentifier, operationIdentifier) {
121
+ const prefix = `[${resourceIdentifier}.${operationIdentifier}] tokenGeneration`;
122
+ // BOUNDED_REUSE requires maxUses
123
+ if (config.consumptionMode === ConsumableToken_ConsumptionMode.BOUNDED_REUSE) {
124
+ if (config.maxUses == null || config.maxUses < 1) {
125
+ throw createConfigurationError(`${prefix}: consumptionMode is BOUNDED_REUSE but maxUses is ${config.maxUses ?? 'missing'}. ` +
126
+ `BOUNDED_REUSE tokens must specify maxUses >= 1.`);
127
+ }
128
+ }
129
+ // maxUses should NOT be set for non-BOUNDED_REUSE modes (likely a mistake)
130
+ if (config.consumptionMode !== ConsumableToken_ConsumptionMode.BOUNDED_REUSE && config.maxUses != null) {
131
+ throw createConfigurationError(`${prefix}: maxUses is set (${config.maxUses}) but consumptionMode is ${config.consumptionMode}. ` +
132
+ `maxUses is only valid for BOUNDED_REUSE tokens. Remove maxUses or change consumptionMode.`);
133
+ }
134
+ // tokenType is required
135
+ if (!config.tokenType) {
136
+ throw createConfigurationError(`${prefix}: tokenType is required.`);
137
+ }
138
+ // expiresIn is required
139
+ if (config.expiresIn == null) {
140
+ throw createConfigurationError(`${prefix}: expiresIn is required (static value or derived function).`);
141
+ }
142
+ // If expiresIn is static, validate shape (minutes, hours, days only; value >= 1)
143
+ if (typeof config.expiresIn !== 'function') {
144
+ const result = ExpiresInDurationSchema.safeParse(config.expiresIn);
145
+ if (!result.success) {
146
+ const msg = result.error.issues.map((i) => i.message).join('; ');
147
+ throw createConfigurationError(`${prefix}: expiresIn validation failed: ${msg}`);
148
+ }
149
+ }
150
+ // W7.3b: createsOneOffSession requires consumeAt
151
+ if (config.createsOneOffSession && !config.consumeAt) {
152
+ throw createConfigurationError(`${prefix}: createsOneOffSession is true but consumeAt is missing. ` +
153
+ `Specify 'EXCHANGE' or 'TARGET_OPERATION'.`);
154
+ }
155
+ // W7.3b: consumeAt without createsOneOffSession is a mistake
156
+ if (config.consumeAt && !config.createsOneOffSession) {
157
+ throw createConfigurationError(`${prefix}: consumeAt is set ('${config.consumeAt}') but createsOneOffSession is not true. ` +
158
+ `consumeAt only applies to one-off session tokens.`);
159
+ }
160
+ }
161
+ /**
162
+ * Validates tokenRevocation configuration at build time.
163
+ */
164
+ function validateTokenRevocationConfig(config, resourceIdentifier, operationIdentifier) {
165
+ const prefix = `[${resourceIdentifier}.${operationIdentifier}] tokenRevocation`;
166
+ if (!config.tokenTypes || config.tokenTypes.length === 0) {
167
+ throw createConfigurationError(`${prefix}: tokenTypes must be a non-empty array of token types to revoke.`);
168
+ }
169
+ }
170
+ // --------------------------------
171
+ // Required Features Normalization
172
+ // --------------------------------
173
+ /**
174
+ * Normalizes requiredFeatures input to the full form.
175
+ * - undefined → undefined (no features required)
176
+ * - string[] → { features: [...], mode: 'OR' } (shorthand)
177
+ * - full config → passed through as-is
178
+ */
179
+ function normalizeRequiredFeatures(input) {
180
+ if (input === undefined)
181
+ return undefined;
182
+ if (Array.isArray(input)) {
183
+ // Shorthand: string[] → { features: [...], mode: 'OR' }
184
+ return { features: input, mode: 'OR' };
185
+ }
186
+ return input;
187
+ }
188
+ // --------------------------------
189
+ // DTO Auto-Derivation Utilities
190
+ // --------------------------------
191
+ /**
192
+ * Fields always excluded from create/update DTOs (system-managed)
193
+ * These are hardcoded because they are universal across all resources.
194
+ */
195
+ const SYSTEM_MANAGED_FIELDS = ['_id', 'createdAt', 'updatedAt', 'deletedAt', '_version_db_doc'];
196
+ // PRIMARY_SCOPE_FIELD_IDENTIFIERS and getPrimaryScopeFieldIdentifier imported from resources.shared.schemas
197
+ /**
198
+ * Build a CREATE request DTO from the main schema using decorators.
199
+ *
200
+ * Excludes:
201
+ * - System-managed fields (_id, createdAt, updatedAt, etc.)
202
+ * - Virtual fields (computed, not stored)
203
+ * - Fields with excludeFromCreate decorator
204
+ *
205
+ * NOTE: Backend-only fields (isBackendOnly) are NOT excluded from CREATE DTOs.
206
+ * The isBackendOnly decorator controls RESPONSE filtering (what is returned to clients),
207
+ * not REQUEST filtering (what can be set during creation). Backend operations need to
208
+ * set fields like passwordHash, apiKey, etc. directly during resource creation.
209
+ *
210
+ * @param mainSchema - The main resource schema
211
+ * @param customExclusions - Additional fields to exclude
212
+ * @returns A new schema with only creatable fields
213
+ */
214
+ function buildCreateRequestDto(mainSchema, customExclusions) {
215
+ try {
216
+ const shape = getZodObjectShape(mainSchema);
217
+ const createShape = {};
218
+ for (const [fieldName, fieldSchema] of Object.entries(shape)) {
219
+ const typedSchema = fieldSchema;
220
+ // Exclude system-managed fields
221
+ if (SYSTEM_MANAGED_FIELDS.includes(fieldName))
222
+ continue;
223
+ // Exclude primary scope field identifiers (auto-populated from context)
224
+ if (PRIMARY_SCOPE_FIELD_IDENTIFIERS.includes(fieldName))
225
+ continue;
226
+ // Exclude virtual fields (computed, not stored)
227
+ if (isVirtualField(typedSchema))
228
+ continue;
229
+ // Exclude explicitly marked fields
230
+ if (isExcludedFromCreate(typedSchema))
231
+ continue;
232
+ // NOTE: Backend-only fields are NOT excluded here.
233
+ // isBackendOnly controls response filtering, not request filtering.
234
+ // Backend operations need to set fields like passwordHash directly.
235
+ // Exclude non-discriminator literals (fixed values auto-populated by backend)
236
+ // Discriminator literals are kept for variant selection
237
+ const unwrapped = unwrapSchema(typedSchema);
238
+ if (getZodType(unwrapped) === 'literal' && !isDiscriminatorField(typedSchema))
239
+ continue;
240
+ // Exclude custom exclusions
241
+ if (customExclusions?.includes(fieldName))
242
+ continue;
243
+ createShape[fieldName] = fieldSchema;
244
+ }
245
+ return z.object(createShape);
246
+ }
247
+ catch {
248
+ // If schema is not an object, return as-is
249
+ return mainSchema;
250
+ }
251
+ }
252
+ /**
253
+ * Build an UPDATE request DTO from the main schema using decorators.
254
+ *
255
+ * Excludes:
256
+ * - System-managed fields (_id, createdAt, updatedAt, etc.)
257
+ * - Virtual fields (computed, not stored)
258
+ * - Fields with excludeFromUpdate decorator
259
+ *
260
+ * NOTE: Backend-only fields (isBackendOnly) are NOT excluded from UPDATE DTOs.
261
+ * The isBackendOnly decorator controls RESPONSE filtering (what is returned to clients),
262
+ * not REQUEST filtering (what can be set during updates). Backend operations may need
263
+ * to update fields like passwordHash, apiKey, etc. directly.
264
+ *
265
+ * All remaining fields are made optional for PATCH-style updates.
266
+ *
267
+ * @param mainSchema - The main resource schema
268
+ * @param customExclusions - Additional fields to exclude
269
+ * @returns A new partial schema with only updatable fields
270
+ */
271
+ function buildUpdateRequestDto(mainSchema, customExclusions) {
272
+ try {
273
+ const shape = getZodObjectShape(mainSchema);
274
+ const updateShape = {};
275
+ for (const [fieldName, fieldSchema] of Object.entries(shape)) {
276
+ const typedSchema = fieldSchema;
277
+ // Exclude system-managed fields
278
+ if (SYSTEM_MANAGED_FIELDS.includes(fieldName))
279
+ continue;
280
+ // Exclude primary scope field identifiers (immutable, context-derived)
281
+ if (PRIMARY_SCOPE_FIELD_IDENTIFIERS.includes(fieldName))
282
+ continue;
283
+ // Exclude virtual fields (computed, not stored)
284
+ if (isVirtualField(typedSchema))
285
+ continue;
286
+ // Exclude explicitly marked fields
287
+ if (isExcludedFromUpdate(typedSchema))
288
+ continue;
289
+ // NOTE: Backend-only fields are NOT excluded here.
290
+ // isBackendOnly controls response filtering, not request filtering.
291
+ // Backend operations may need to update fields like passwordHash.
292
+ // Exclude ALL literal fields (immutable after creation)
293
+ const unwrapped = unwrapSchema(typedSchema);
294
+ if (getZodType(unwrapped) === 'literal')
295
+ continue;
296
+ // Exclude custom exclusions
297
+ if (customExclusions?.includes(fieldName))
298
+ continue;
299
+ // Make field optional for PATCH-style update
300
+ updateShape[fieldName] = fieldSchema.optional();
301
+ }
302
+ return z.object(updateShape);
303
+ }
304
+ catch {
305
+ // If schema is not an object, return as-is
306
+ return mainSchema;
307
+ }
308
+ }
309
+ /**
310
+ * Derives the appropriate request DTO based on operation type.
311
+ *
312
+ * - CREATE: Uses buildCreateRequestDto (excludes excludeFromCreate fields)
313
+ * - UPDATE: Uses buildUpdateRequestDto (excludes excludeFromUpdate fields, all partial)
314
+ * - Other operations: Returns mainSchema as-is
315
+ *
316
+ * @param operation - The operation identifier
317
+ * @param mainSchema - The main resource schema
318
+ * @param providedDto - Explicitly provided DTO (takes precedence)
319
+ * @returns The appropriate request DTO schema
320
+ */
321
+ export function deriveRequestDto(operation, mainSchema, providedDto) {
322
+ // If explicit DTO is provided, use it (for custom operations)
323
+ if (providedDto !== undefined) {
324
+ return providedDto;
325
+ }
326
+ // Auto-derive based on operation type
327
+ switch (operation) {
328
+ case CoreResourceOperation.CREATE:
329
+ return buildCreateRequestDto(mainSchema);
330
+ case CoreResourceOperation.UPDATE:
331
+ return buildUpdateRequestDto(mainSchema);
332
+ case CoreResourceOperation.READ:
333
+ case CoreResourceOperation.DELETE:
334
+ // READ and DELETE don't need request bodies (just URL params)
335
+ return z.object({});
336
+ default:
337
+ // For custom operations without explicit DTO, return empty object
338
+ // (custom operations should provide their own requestDto)
339
+ return z.object({});
340
+ }
341
+ }
342
+ // --------------------------------
343
+ // Decorator Combination Validation
344
+ // --------------------------------
345
+ /**
346
+ * Validates that decorated fields don't have invalid decorator combinations.
347
+ *
348
+ * Invalid combinations:
349
+ * - isSummaryField + isBackendOnly: Backend-only fields can't be in summaries
350
+ * - isDiscriminator + excludeFromCreate: Discriminator is required for create operations
351
+ *
352
+ * @param mainSchema - The main schema to validate
353
+ * @param resourceIdentifier - Resource name for error messages
354
+ * @throws Error if invalid decorator combinations are found
355
+ */
356
+ function validateDecoratorCombinations(mainSchema, resourceIdentifier) {
357
+ const issues = [];
358
+ try {
359
+ const shape = getZodObjectShape(mainSchema);
360
+ for (const [fieldName, fieldSchema] of Object.entries(shape)) {
361
+ const typedSchema = fieldSchema;
362
+ // Check: isSummaryField + isBackendOnly is invalid
363
+ if (isSummaryField(typedSchema) && isBackendOnlyField(typedSchema)) {
364
+ issues.push(`Field '${fieldName}' has both isSummaryField and isBackendOnly decorators. ` +
365
+ `Backend-only fields cannot be included in summary responses.`);
366
+ }
367
+ // Check: isDiscriminator + excludeFromCreate is invalid
368
+ if (isDiscriminatorField(typedSchema) && isExcludedFromCreate(typedSchema)) {
369
+ issues.push(`Field '${fieldName}' has both isDiscriminator and excludeFromCreate decorators. ` +
370
+ `Discriminator fields must be present in create requests to determine the variant type.`);
371
+ }
372
+ // Check: isDiscriminator + excludeFromUpdate is a warning (logged but not an error)
373
+ // Discriminators are typically immutable, so this might be intentional
374
+ }
375
+ }
376
+ catch {
377
+ // Schema may not be an object, skip validation
378
+ return;
379
+ }
380
+ if (issues.length > 0) {
381
+ throw createConfigurationError(`Resource '${resourceIdentifier}' has invalid decorator combinations:\n` +
382
+ issues.map(issue => ` - ${issue}`).join('\n'));
383
+ }
384
+ }
385
+ // --------------------------------
386
+ // Helper Functions
387
+ // --------------------------------
388
+ /**
389
+ * Transforms and categorizes resource relationships into parent/child/self buckets.
390
+ *
391
+ * ## Flat Categorization (No Separate Conditional Bucket)
392
+ *
393
+ * ALL relationships — including those with `discriminator` or `condition` — are placed
394
+ * into the same three buckets (parentRelationships, childRelationships, selfRelationships).
395
+ * Conditional relationships carry their filter inline on the relationship object itself,
396
+ * so runtime consumers evaluate conditions when actual parent data is available:
397
+ *
398
+ * - **ResourceContextBackendService**: Checks discriminator/condition in `fetchChildResourcesWithPolicy`
399
+ * against the parentResource BEFORE querying children.
400
+ * - **ServicesRegistryHandler**: Uses `filterRelationshipsByParent()` at 4 points
401
+ * (nested CREATE, READ, UPDATE, lifecycle DELETE) to filter active child relationships.
402
+ * - **ContainerNested** (frontend): Evaluates discriminator/condition against parentData
403
+ * with try-catch safety to prevent React tree crashes.
404
+ *
405
+ * Previously, a separate `inheritanceSchemaRelationships` bucket existed but was never
406
+ * consumed at runtime, making the conditional system non-functional. That bucket has
407
+ * been removed in favor of this flat, inline approach.
408
+ *
409
+ * ## M:N Relationship Decomposition
410
+ *
411
+ * Many-to-many relationships are decomposed into synthetic 1:N relationships:
412
+ * - **Junction table**: Gets two parent relationships (one from each entity side),
413
+ * with OPTIONAL_CONTEXT. These do NOT carry discriminator/condition (the junction
414
+ * table itself doesn't need condition awareness — it's the entity sides that do).
415
+ * - **Entity sides**: Each gets a child relationship to the junction table.
416
+ * These DO carry the original `discriminator` and `condition` from the M:N declaration,
417
+ * ensuring conditional M:N relationships work correctly.
418
+ *
419
+ * Important: this decomposition is an internal compilation step, not a second
420
+ * developer-facing configuration surface. Developers declare one M:N
421
+ * association with `jointResourceType`; the factory derives the synthetic
422
+ * junction-facing edges needed by DTO builders, URL generation, and runtime
423
+ * services.
424
+ *
425
+ * ## Relationship Direction Convention
426
+ *
427
+ * - `resourceType1` = parent, `resourceType2` = child
428
+ * - `foreignKeyField` lives on the child (resourceType2) and points to the parent
429
+ * - Example: USERS → USER_PROFILES with foreignKeyField: 'userId'
430
+ * means userId is a field on USER_PROFILES pointing to USERS
431
+ *
432
+ * @param resourceRelationships - All relationships from the registry
433
+ * @param resourceIdentifier - The resource type being processed
434
+ * @returns Categorized relationships + set of available parent resource types
435
+ */
436
+ function transformResourceRelationships(resourceRelationships, resourceIdentifier) {
437
+ // Categorize ALL relationships (including those with discriminator) into parent/child/self.
438
+ // Relationships with a discriminator carry their filter inline on the relationship object itself,
439
+ // so runtime consumers (ResourceContext, ContainerNested, services-registry-handler) evaluate
440
+ // the discriminator at read/write time — no separate bucket is needed.
441
+ //
442
+ // Parent relationships are defined as: parent → child (resourceType1 → resourceType2)
443
+ // When processing a resource, we look for relationships where we are the child (resourceType2)
444
+ //
445
+ // The foreignKeyField in these relationships specifies the FK field on the CHILD (resourceType2)
446
+ // that points to the parent. This is the standard pattern for parent-child relationships.
447
+ // Example: USERS → USER_PROFILES with foreignKeyField: 'userId'
448
+ // - userId field is on USER_PROFILES, pointing to USERS
449
+ // - USERS is the parent of USER_PROFILES
450
+ //
451
+ // NOTE: FK reference relationships (like TODOS → USERS with assignedToUserId)
452
+ // where resourceType1 has a FK field pointing to resourceType2 are handled separately
453
+ // at URL generation time, not here.
454
+ // See: resources-config-operations.urls-builder.utils.ts:generateSyntheticFKParents()
455
+ // F-8 fix: Filter out disabled relationships at the source.
456
+ // All downstream consumers (ResourceContext, ServicesRegistryHandler, ContainerNested,
457
+ // DTO builder) receive these categorized arrays, so filtering here prevents disabled
458
+ // relationships from being processed anywhere in the pipeline.
459
+ const activeRelationships = resourceRelationships.filter(rel => !rel.isDisabled);
460
+ const isManyToMany = (rel) => rel.cardinality1 === ResourceRelationshipCardinality.MANY &&
461
+ rel.cardinality2 === ResourceRelationshipCardinality.MANY &&
462
+ rel.jointResourceType;
463
+ const processedResourceRelationships = {
464
+ // Filter out M:N relationships — they're peer relationships via a junction table,
465
+ // transformed into synthetic 1:N relationships in the M:N processing section below.
466
+ parentRelationships: activeRelationships.filter(rel => rel.resourceType2 === resourceIdentifier &&
467
+ rel.resourceType1 !== resourceIdentifier &&
468
+ !isManyToMany(rel)),
469
+ childRelationships: activeRelationships.filter(rel => rel.resourceType1 === resourceIdentifier &&
470
+ rel.resourceType2 !== resourceIdentifier &&
471
+ !isManyToMany(rel)),
472
+ // Self-referencing 1:N/1:1 relationships (tree/graph structures).
473
+ // M:N self-refs are excluded — they're handled entirely through M:N decomposition
474
+ // (synthetic junction-table relationships go into parent/child buckets).
475
+ selfRelationships: activeRelationships.filter(rel => rel.resourceType1 === resourceIdentifier && rel.resourceType2 === resourceIdentifier &&
476
+ !isManyToMany(rel)),
477
+ };
478
+ // ========================================
479
+ // PROCESS MANY-TO-MANY JOINT RESOURCE RELATIONSHIPS
480
+ // ========================================
481
+ const compileSyntheticRelationship = (relationshipDeclaration) => Resources_SharedUtils.compileRelationshipDeclaration(relationshipDeclaration);
482
+ // Find many-to-many relationships with joint resource types (from ALL active relationships,
483
+ // including those with discriminators — a conditional M:N is still an M:N)
484
+ const manyToManyRelationships = activeRelationships.filter(rel => rel.cardinality1 === ResourceRelationshipCardinality.MANY &&
485
+ rel.cardinality2 === ResourceRelationshipCardinality.MANY &&
486
+ rel.jointResourceType);
487
+ // Additional relationships to add based on many-to-many joint resource logic
488
+ const additionalRelationships = [];
489
+ manyToManyRelationships.forEach(m2mRel => {
490
+ Resources_SharedUtils.assertSupportedManyToManySyntheticExpansion(m2mRel);
491
+ const { resourceType1: entity1Type, resourceType2: entity2Type, jointResourceType, foreignKeyField } = m2mRel;
492
+ if (resourceIdentifier === jointResourceType) {
493
+ // ========================================
494
+ // JUNCTION TABLE: Current resource IS the joint resource
495
+ // ========================================
496
+ // For many-to-many, the junction table can be accessed from BOTH sides:
497
+ // - /organizations/{orgId}/organization-members
498
+ // - /users/{userId}/organization-members
499
+ // Both parents use OPTIONAL_CONTEXT so each generates independent URL paths
500
+ //
501
+ // NOTE: Junction table parent relationships do NOT carry discriminator/condition
502
+ // from the original M:N. The junction table itself doesn't need condition awareness —
503
+ // it's the entity→junction direction that carries conditions, because the entity
504
+ // is the "parent" whose data is evaluated. The junction table looks UP to both
505
+ // entities as parents, and parent traversal intentionally skips discriminator checks
506
+ // (see fetchParentResourcesWithPolicy in ResourceContextBackendService).
507
+ // Relationship: entity1 → joint resource (entity1 is a parent of junction table)
508
+ const relationFromEntity1 = compileSyntheticRelationship({
509
+ cardinality1: ResourceRelationshipCardinality.ONE, // One entity1
510
+ cardinality2: ResourceRelationshipCardinality.MANY, // Many joint records
511
+ resourceType1: entity1Type, // entity1 (e.g., ORGANIZATIONS)
512
+ resourceType2: resourceIdentifier, // joint resource (e.g., ORGANIZATION_MEMBERS)
513
+ jointResourceType,
514
+ nature: m2mRel.resolvedSemantics.nature,
515
+ parentResourceRequirement: ResourceParentResourceRequirement.OPTIONAL,
516
+ accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.OPTIONAL_CONTEXT,
517
+ isPrimaryScope: false,
518
+ isDisabled: m2mRel.isDisabled || false,
519
+ allowCycle: false,
520
+ // Preserve context policy and childOperations from original relationship
521
+ contextPolicy: m2mRel.contextPolicy,
522
+ read: m2mRel.read,
523
+ childOperations: m2mRel.childOperations,
524
+ foreignKeyField: m2mRel.foreignKeyField,
525
+ });
526
+ additionalRelationships.push(relationFromEntity1);
527
+ // Relationship: entity2 → joint resource (entity2 is ALSO a parent of junction table)
528
+ const relationFromEntity2 = compileSyntheticRelationship({
529
+ cardinality1: ResourceRelationshipCardinality.ONE, // One entity2
530
+ cardinality2: ResourceRelationshipCardinality.MANY, // Many joint records
531
+ resourceType1: entity2Type, // entity2 (e.g., USERS)
532
+ resourceType2: resourceIdentifier, // joint resource (e.g., ORGANIZATION_MEMBERS)
533
+ jointResourceType,
534
+ nature: m2mRel.resolvedSemantics.nature,
535
+ parentResourceRequirement: ResourceParentResourceRequirement.OPTIONAL,
536
+ accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.OPTIONAL_CONTEXT, // Both sides are optional
537
+ isPrimaryScope: false,
538
+ isDisabled: m2mRel.isDisabled || false,
539
+ allowCycle: false,
540
+ // Preserve context policy and childOperations from original relationship
541
+ contextPolicy: m2mRel.contextPolicy,
542
+ read: m2mRel.read,
543
+ childOperations: m2mRel.childOperations,
544
+ // For M:N self-referencing, foreignKeyField distinguishes source/target in junction table
545
+ foreignKeyField: foreignKeyField,
546
+ });
547
+ additionalRelationships.push(relationFromEntity2);
548
+ }
549
+ else if (resourceIdentifier === entity1Type) {
550
+ // ========================================
551
+ // ENTITY1: Current resource is the first entity in the relationship
552
+ // ========================================
553
+ // Entity1 has junction table as child (for child relationships).
554
+ // The synthetic entity→junction relationship DOES carry discriminator/condition
555
+ // from the original M:N declaration (lines below). This ensures that conditional
556
+ // M:N relationships (e.g., "users have projects only when role=DEVELOPER") are
557
+ // correctly gated at runtime when looking DOWN from entity1 to the junction.
558
+ if (!jointResourceType)
559
+ throw createConfigurationError(`Many-to-many relationship between ${entity1Type} and ${entity2Type} must have a jointResourceType`);
560
+ const relationToJoint = compileSyntheticRelationship({
561
+ cardinality1: ResourceRelationshipCardinality.ONE, // One entity
562
+ cardinality2: ResourceRelationshipCardinality.MANY, // Many joint records
563
+ resourceType1: resourceIdentifier, // current entity
564
+ resourceType2: jointResourceType, // joint resource
565
+ jointResourceType,
566
+ nature: m2mRel.resolvedSemantics.nature,
567
+ parentResourceRequirement: ResourceParentResourceRequirement.OPTIONAL,
568
+ accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.OPTIONAL_CONTEXT,
569
+ isPrimaryScope: false,
570
+ isDisabled: m2mRel.isDisabled || false,
571
+ allowCycle: m2mRel.allowCycle || false,
572
+ contextPolicy: m2mRel.contextPolicy,
573
+ read: m2mRel.read,
574
+ childOperations: m2mRel.childOperations,
575
+ foreignKeyField: m2mRel.foreignKeyField,
576
+ discriminator: m2mRel.discriminator,
577
+ condition: m2mRel.condition,
578
+ display: m2mRel.display,
579
+ });
580
+ additionalRelationships.push(relationToJoint);
581
+ }
582
+ else if (resourceIdentifier === entity2Type) {
583
+ // ========================================
584
+ // ENTITY2: Current resource is the second entity in the relationship
585
+ // ========================================
586
+ // Entity2 also has junction table as child (for child relationships).
587
+ // Same as Entity1: carries discriminator/condition from the M:N declaration
588
+ // to enable conditional gating when looking DOWN from entity2 to the junction.
589
+ if (!jointResourceType)
590
+ throw createConfigurationError(`Many-to-many relationship between ${entity1Type} and ${entity2Type} must have a jointResourceType`);
591
+ const relationToJoint = compileSyntheticRelationship({
592
+ cardinality1: ResourceRelationshipCardinality.ONE, // One entity
593
+ cardinality2: ResourceRelationshipCardinality.MANY, // Many joint records
594
+ resourceType1: resourceIdentifier, // current entity
595
+ resourceType2: jointResourceType, // joint resource
596
+ jointResourceType,
597
+ nature: m2mRel.resolvedSemantics.nature,
598
+ parentResourceRequirement: ResourceParentResourceRequirement.OPTIONAL,
599
+ accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.OPTIONAL_CONTEXT,
600
+ isPrimaryScope: false,
601
+ isDisabled: m2mRel.isDisabled || false,
602
+ allowCycle: m2mRel.allowCycle || false,
603
+ contextPolicy: m2mRel.contextPolicy,
604
+ read: m2mRel.read,
605
+ childOperations: m2mRel.childOperations,
606
+ foreignKeyField: foreignKeyField,
607
+ discriminator: m2mRel.discriminator,
608
+ condition: m2mRel.condition,
609
+ display: m2mRel.display,
610
+ });
611
+ additionalRelationships.push(relationToJoint);
612
+ }
613
+ });
614
+ // Add the additional relationships to the appropriate categories
615
+ additionalRelationships.forEach(rel => {
616
+ if (rel.resourceType2 === resourceIdentifier && rel.resourceType1 !== resourceIdentifier) {
617
+ processedResourceRelationships.parentRelationships.push(rel);
618
+ }
619
+ else if (rel.resourceType1 === resourceIdentifier && rel.resourceType2 !== resourceIdentifier) {
620
+ processedResourceRelationships.childRelationships.push(rel);
621
+ }
622
+ else if (rel.resourceType1 === resourceIdentifier && rel.resourceType2 === resourceIdentifier) {
623
+ processedResourceRelationships.selfRelationships.push(rel);
624
+ }
625
+ });
626
+ // Create set of available parent resource types for validation.
627
+ // Includes selfRelationships because a self-ref acts as its own parent (tree roots).
628
+ const availableParentResourceTypes = new Set([
629
+ ...processedResourceRelationships.parentRelationships.map(rel => rel.resourceType1),
630
+ ...processedResourceRelationships.selfRelationships.map(rel => rel.resourceType1),
631
+ ]);
632
+ return {
633
+ processedResourceRelationships,
634
+ availableParentResourceTypes
635
+ };
636
+ }
637
+ /**
638
+ * Processes parent resource access scope strategy overrides for an operation.
639
+ *
640
+ * Creates a shallow copy of the relationship buckets with overridden `accessScopeStrategy`
641
+ * values for specific parent resource types. This allows per-operation customization of
642
+ * how parent resources are resolved in URL paths (e.g., making an optional parent
643
+ * mandatory for a specific operation).
644
+ *
645
+ * The returned object has exactly three fields: `parentRelationships`, `childRelationships`,
646
+ * `selfRelationships`. There is no `inheritanceSchemaRelationships` field — that structure
647
+ * was removed as part of the relationship condition refactor.
648
+ *
649
+ * @param resourceRelationships - The base relationship buckets (from transformResourceRelationships)
650
+ * @param availableParentResourceTypes - Set of valid parent resource types for validation
651
+ * @param parentResourceAccessScopeStrategyOverrides - Overrides to apply
652
+ * @param operationIdentifier - The operation name (for error messages)
653
+ * @returns A new ResourceConfiguration_ResourceRelationships with overrides applied
654
+ */
655
+ function processParentResourceAccessScopeStrategyOverrides(resourceRelationships, availableParentResourceTypes, parentResourceAccessScopeStrategyOverrides, operationIdentifier) {
656
+ if (!parentResourceAccessScopeStrategyOverrides || parentResourceAccessScopeStrategyOverrides.length === 0) {
657
+ return resourceRelationships;
658
+ }
659
+ // Validate that all override resources exist in parent relationships
660
+ for (const override of parentResourceAccessScopeStrategyOverrides) {
661
+ if (!availableParentResourceTypes.has(override.resourceType)) {
662
+ throw createConfigurationError(`Operation '${operationIdentifier}' has access scope strategy override for parent resource '${override.resourceType}' but it's not available in parent relationships`);
663
+ }
664
+ }
665
+ // Create a map for quick lookup of overrides
666
+ const overrideMap = new Map();
667
+ parentResourceAccessScopeStrategyOverrides.forEach(override => {
668
+ overrideMap.set(override.resourceType, override.accessScopeStrategy);
669
+ });
670
+ const applyOverride = (rel) => {
671
+ const overrideStrategy = overrideMap.get(rel.resourceType1);
672
+ return overrideStrategy !== undefined ? { ...rel, accessScopeStrategy: overrideStrategy } : rel;
673
+ };
674
+ const updatedResourceRelationships = {
675
+ parentRelationships: resourceRelationships.parentRelationships.map(applyOverride),
676
+ childRelationships: [...resourceRelationships.childRelationships],
677
+ // Self-refs act as their own parent — scope strategy overrides must apply.
678
+ selfRelationships: resourceRelationships.selfRelationships.map(applyOverride),
679
+ };
680
+ return updatedResourceRelationships;
681
+ }
682
+ /**
683
+ * Processes user notifications by adding primaryScope and auto-generating identifiers
684
+ * Format: ${resourceIdentifier}_${operationIdentifier}_${target}_${customNotificationRef?}_${userRoles.join("_")}_${level}
685
+ *
686
+ * Validates that when there are 2+ notifications with the same target in the same operation,
687
+ * each one must have a unique customNotificationRef to distinguish them.
688
+ */
689
+ function processUserNotifications(userNotifications, resourceIdentifier, operationIdentifier, resourcePrimaryScope) {
690
+ // ========================================
691
+ // VALIDATE DUPLICATE TARGET NOTIFICATIONS
692
+ // ========================================
693
+ // Group notifications by target+channel to find duplicates
694
+ const notificationsByTargetChannel = new Map();
695
+ userNotifications.forEach(n => {
696
+ const key = `${n.target}_${n.channel}`;
697
+ if (!notificationsByTargetChannel.has(key)) {
698
+ notificationsByTargetChannel.set(key, []);
699
+ }
700
+ notificationsByTargetChannel.get(key).push(n);
701
+ });
702
+ // Validate customNotificationRef for groups with 2+ notifications
703
+ for (const [targetChannel, notifications] of notificationsByTargetChannel.entries()) {
704
+ if (notifications.length >= 2) {
705
+ // Check that all have customNotificationRef
706
+ const missingRefs = notifications.filter(n => !n.customNotificationRef);
707
+ if (missingRefs.length > 0) {
708
+ throw createConfigurationError(`Operation '${resourceIdentifier}_${operationIdentifier}' has ${notifications.length} notifications with target_channel '${targetChannel}'. ` +
709
+ `When there are 2+ notifications with the same target, each must have a unique 'customNotificationRef' to distinguish them. ` +
710
+ `${missingRefs.length} notification(s) are missing customNotificationRef.`);
711
+ }
712
+ // Check that all customNotificationRefs are unique
713
+ const refs = notifications.map(n => n.customNotificationRef);
714
+ const uniqueRefs = new Set(refs);
715
+ if (uniqueRefs.size !== refs.length) {
716
+ throw createConfigurationError(`Operation '${resourceIdentifier}_${operationIdentifier}' has duplicate customNotificationRef values for target_channel '${targetChannel}'. ` +
717
+ `Each notification with the same target must have a unique customNotificationRef. ` +
718
+ `Found refs: [${refs.join(', ')}]`);
719
+ }
720
+ }
721
+ }
722
+ // ========================================
723
+ // GENERATE IDENTIFIERS
724
+ // ========================================
725
+ return userNotifications.map(notification => {
726
+ // Auto-generate identifier: ${resourceIdentifier}_${current_operation}_${target}_${customNotificationRef?}_${userRoles.join("_")}_${level}
727
+ const identifierParts = [
728
+ resourceIdentifier,
729
+ operationIdentifier,
730
+ notification.target
731
+ ];
732
+ // Add customNotificationRef if present (for disambiguation)
733
+ if (notification.customNotificationRef) {
734
+ identifierParts.push(notification.customNotificationRef);
735
+ }
736
+ // Add userRoles if present
737
+ if (notification.userRoles && notification.userRoles.length > 0) {
738
+ identifierParts.push(notification.userRoles.join("_"));
739
+ }
740
+ // Add level if present
741
+ if (notification.level) {
742
+ identifierParts.push(notification.level);
743
+ }
744
+ const autoGeneratedIdentifier = identifierParts.join("_");
745
+ return {
746
+ ...notification,
747
+ identifier: autoGeneratedIdentifier,
748
+ primaryScope: resourcePrimaryScope
749
+ };
750
+ });
751
+ }
752
+ /**
753
+ * Processes M2M notifications by auto-generating identifiers
754
+ * Format: ${resourceIdentifier}_${operationIdentifier}_${channel}
755
+ */
756
+ function processM2MNotifications(m2mNotifications, resourceIdentifier, operationIdentifier) {
757
+ return m2mNotifications.map(notification => {
758
+ // Auto-generate identifier: ${resourceIdentifier}_${current_operation}_${channel}
759
+ const autoGeneratedIdentifier = [
760
+ resourceIdentifier,
761
+ operationIdentifier,
762
+ notification.channel
763
+ ].join("_");
764
+ return {
765
+ ...notification,
766
+ identifier: autoGeneratedIdentifier
767
+ };
768
+ });
769
+ }
770
+ // --------------------------------
771
+ // Resources Pagination Response
772
+ // --------------------------------
773
+ function createResourcePaginatedResponseSchema(params) {
774
+ const { dataSchema, validateArrayConstraints = true, maxResultsPerPageLimit = 50 } = params;
775
+ // Comprehensive parameter validation
776
+ if (!dataSchema) {
777
+ throw createConfigurationError('Data schema is required and cannot be null or undefined');
778
+ }
779
+ // Use duck typing instead of instanceof to avoid version conflicts
780
+ if (typeof dataSchema !== 'object' ||
781
+ typeof dataSchema.parse !== 'function' ||
782
+ typeof dataSchema.safeParse !== 'function' ||
783
+ !dataSchema._def) {
784
+ throw createConfigurationError(`Data schema must be a valid Zod schema type. Got: ${typeof dataSchema}, constructor: ${dataSchema?.constructor?.name}`);
785
+ }
786
+ if (validateArrayConstraints) {
787
+ if (typeof maxResultsPerPageLimit !== 'number' || maxResultsPerPageLimit < 0) {
788
+ throw createConfigurationError('Max results per page limit must be a non-negative number');
789
+ }
790
+ }
791
+ // Create strongly typed array schema with optional constraints
792
+ const createDataArraySchema = (schema) => {
793
+ let arraySchema = z.array(schema);
794
+ if (validateArrayConstraints) {
795
+ if (maxResultsPerPageLimit > 0) {
796
+ arraySchema = arraySchema.max(maxResultsPerPageLimit, `Data array cannot contain more than ${maxResultsPerPageLimit} items`);
797
+ }
798
+ }
799
+ return arraySchema;
800
+ };
801
+ // Runtime validation with comprehensive error messages
802
+ const validatePaginatedResponse = (input) => {
803
+ // Validate root structure
804
+ if (!input || typeof input !== 'object') {
805
+ throw createValidationError('Paginated response must be an object');
806
+ }
807
+ // Validate data field existence
808
+ if (!('data' in input)) {
809
+ throw createValidationError('Paginated response must have a "data" field');
810
+ }
811
+ // Validate data is an array
812
+ if (!Array.isArray(input.data)) {
813
+ throw createValidationError('Data field must be an array');
814
+ }
815
+ // Validate array constraints if enabled
816
+ if (validateArrayConstraints) {
817
+ if (input.data.length > maxResultsPerPageLimit) {
818
+ throw createValidationError(`Data array cannot contain more than ${maxResultsPerPageLimit} items, got ${input.data.length}`);
819
+ }
820
+ }
821
+ // Validate pagination field existence
822
+ if (!('pagination' in input)) {
823
+ throw createValidationError('Paginated response must have a "pagination" field');
824
+ }
825
+ // Validate pagination structure
826
+ if (!input.pagination || typeof input.pagination !== 'object') {
827
+ throw createValidationError('Pagination field must be an object');
828
+ }
829
+ // Validate required pagination fields
830
+ const requiredPaginationFields = ['page', 'limit', 'total', 'totalPages'];
831
+ for (const field of requiredPaginationFields) {
832
+ if (!(field in input.pagination)) {
833
+ throw createValidationError(`Pagination must have a "${field}" field`);
834
+ }
835
+ if (typeof input.pagination[field] !== 'number') {
836
+ throw createValidationError(`Pagination "${field}" must be a number`);
837
+ }
838
+ if (input.pagination[field] < 0) {
839
+ throw createValidationError(`Pagination "${field}" must be non-negative`);
840
+ }
841
+ }
842
+ // Validate pagination logic
843
+ if (input.pagination.page > input.pagination.totalPages && input.pagination.totalPages > 0) {
844
+ throw createValidationError('Current page cannot exceed total pages');
845
+ }
846
+ if (input.pagination.limit <= 0) {
847
+ throw createValidationError('Pagination limit must be positive');
848
+ }
849
+ return true;
850
+ };
851
+ // Create the result schema with comprehensive validation
852
+ const resultSchema = z.object({
853
+ data: createDataArraySchema(dataSchema),
854
+ pagination: Resouces_PaginationResponseMetadataSchema
855
+ }).refine(validatePaginatedResponse, {
856
+ message: "Invalid paginated response structure"
857
+ });
858
+ return resultSchema;
859
+ }
860
+ // --------------------------------
861
+ // Resource Search Query Request
862
+ // --------------------------------
863
+ function createResourceSearchQueryRequestSchema(params) {
864
+ const { filterFields, allowedSortFields = [], pagination = true } = params;
865
+ // Validate input parameters
866
+ if (filterFields !== undefined && typeof filterFields !== 'object') {
867
+ throw createConfigurationError('Filter fields must be an object');
868
+ }
869
+ if (allowedSortFields && !Array.isArray(allowedSortFields)) {
870
+ throw createConfigurationError('Allowed sort fields must be an array');
871
+ }
872
+ if (allowedSortFields && allowedSortFields.length > 0 && !allowedSortFields.every(field => typeof field === 'string' && field.length > 0)) {
873
+ throw createConfigurationError('All sort fields must be non-empty strings');
874
+ }
875
+ // Strongly typed filter schema creation
876
+ const createFilterSchema = (fields) => {
877
+ const processedFields = {};
878
+ Object.entries(fields).forEach(([key, schema]) => {
879
+ // Type-safe schema processing based on schema type
880
+ if (schema instanceof z.ZodDate) {
881
+ processedFields[key] = Resouces_Filter_DateRangeSchema.optional();
882
+ }
883
+ else if (schema instanceof z.ZodString) {
884
+ processedFields[key] = schema.optional();
885
+ }
886
+ else if (schema instanceof z.ZodNumber) {
887
+ processedFields[key] = schema.optional();
888
+ }
889
+ else if (schema instanceof z.ZodBoolean) {
890
+ processedFields[key] = schema.optional();
891
+ }
892
+ else if (schema instanceof z.ZodEnum) {
893
+ processedFields[key] = schema.optional();
894
+ }
895
+ else {
896
+ // Fallback for other primitive types
897
+ processedFields[key] = schema.optional();
898
+ }
899
+ });
900
+ return Resouces_Filter_BaseSchema.extend(processedFields);
901
+ };
902
+ // Strongly typed sorting schema creation
903
+ const createSortingSchema = (fields) => {
904
+ const sortingFields = {};
905
+ fields.forEach(field => {
906
+ sortingFields[field] = z.object({
907
+ field: z.literal(field),
908
+ order: z.enum(SortOrder).default(SortOrder.ASC),
909
+ priority: z.number().min(0).default(0)
910
+ }).optional();
911
+ });
912
+ return z.object(sortingFields).optional();
913
+ };
914
+ // Build the schema dynamically based on parameters
915
+ const schemaConfig = {};
916
+ // Add pagination if enabled
917
+ if (pagination) {
918
+ schemaConfig.pagination = Resouces_PaginationRequestSchema.optional();
919
+ }
920
+ // Add sorting if allowed fields are provided
921
+ if (allowedSortFields && allowedSortFields.length > 0) {
922
+ schemaConfig.sorting = createSortingSchema(allowedSortFields);
923
+ }
924
+ // Add filtering based on filter fields
925
+ if (filterFields !== undefined && Object.keys(filterFields).length > 0) {
926
+ schemaConfig.filters = createFilterSchema(filterFields).optional();
927
+ }
928
+ else {
929
+ schemaConfig.filters = Resouces_Filter_BaseSchema.optional();
930
+ }
931
+ // Create the final schema with validation
932
+ const resultSchema = z.object(schemaConfig);
933
+ return resultSchema;
934
+ }
935
+ // Helper function to determine HTTP verb based on operation
936
+ function getDefaultHttpVerbForOperation(operation) {
937
+ switch (operation) {
938
+ case CoreResourceOperation.READ:
939
+ case CoreResourceOperation.LIST:
940
+ return HttpMethod.GET;
941
+ case CoreResourceOperation.CREATE:
942
+ return HttpMethod.POST;
943
+ case CoreResourceOperation.UPDATE:
944
+ return HttpMethod.PUT;
945
+ case CoreResourceOperation.DELETE:
946
+ return HttpMethod.DELETE;
947
+ default:
948
+ return HttpMethod.POST; // Default for unknown operations
949
+ }
950
+ }
951
+ /**
952
+ * Determines if an operation variant should be marked as the default operation within its variantType group
953
+ * Handles the complex logic for single vs multiple variants and explicit defaults
954
+ *
955
+ * Rules:
956
+ * 1. If only one variant exists in the group, it becomes default regardless of isDefault value
957
+ * 2. If multiple variants exist in the group and one has isDefault=true, that one becomes default
958
+ * 3. If multiple variants exist in the group and none have isDefault=true, the first one becomes default
959
+ * 4. isDefault=false explicitly excludes an variant from being default
960
+ */
961
+ function determineOperationVariantDefault(variantsOfSameType, currentVariant) {
962
+ // Rule 1: Single variant of this type is always default
963
+ if (variantsOfSameType.length === 1) {
964
+ return true;
965
+ }
966
+ // Rule 2: Find explicit isDefault=true within this variant type group
967
+ const explicitDefaultVariant = variantsOfSameType.find(variant => variant.isDefault === true);
968
+ // If we found an explicit default, check if current variant is it
969
+ if (explicitDefaultVariant) {
970
+ return currentVariant === explicitDefaultVariant;
971
+ }
972
+ // Rule 3: No explicit isDefault=true found, use first variant that doesn't have isDefault=false
973
+ const firstNonFalseVariant = variantsOfSameType.find(variant => variant.isDefault !== false);
974
+ if (firstNonFalseVariant) {
975
+ return currentVariant === firstNonFalseVariant;
976
+ }
977
+ // Fallback: if all variants have isDefault=false, first one becomes default anyway
978
+ return currentVariant === variantsOfSameType[0];
979
+ }
980
+ const RESERVED_OPERATION_VARIANT_KEYS = new Set(['isDefault', 'noVariantKey']);
981
+ // --------------------------------
982
+ // Resources Shared Configuration
983
+ // --------------------------------
984
+ /**
985
+ * Creates a resource configuration from builder parameters.
986
+ * NOTE: TDatabaseSchema has been removed. Backend-only fields are now marked with
987
+ * the isBackendOnly decorator in mainSchema and are stripped at the service layer.
988
+ */
989
+ export function createResourceConfiguration_Initialization(params) {
990
+ const { mainSchema, resourceIdentifier, resourceFieldIdentifier, resourceRelationships, inheritenceSchemaDefinition, isSystemResource = false, isAnonymizable = false, transpositionPolicy, persistenceAdapter, coreOperations, customOperation, operationsConfiguration, } = params;
991
+ const normalizedResourceRelationships = Resources_SharedUtils.ensureCompiledRelationships(resourceRelationships);
992
+ // ========================================
993
+ // VALIDATE DECORATOR COMBINATIONS
994
+ // ========================================
995
+ // Validate that mainSchema doesn't have invalid decorator combinations
996
+ validateDecoratorCombinations(mainSchema, resourceIdentifier);
997
+ // ========================================
998
+ // DERIVE RESOURCE PRIMARY SCOPE
999
+ // ========================================
1000
+ // Find relationships involving this specific resource (as parent or child)
1001
+ const relevantRelationships = normalizedResourceRelationships.filter(rel => rel.resourceType1 === resourceIdentifier || rel.resourceType2 === resourceIdentifier);
1002
+ // Find the resource relationship with isPrimaryScope=true for this resource
1003
+ const primaryScopeRelationship = relevantRelationships.find(rel => rel.isPrimaryScope === true);
1004
+ let resourcePrimaryScope;
1005
+ if (primaryScopeRelationship?.primaryScope) {
1006
+ resourcePrimaryScope = primaryScopeRelationship.primaryScope;
1007
+ }
1008
+ else {
1009
+ // Check if this resource IS itself a primary scope anchor
1010
+ // (e.g., USERS, ORGANIZATIONS, APPLICATION, ANONYMOUS_USERS)
1011
+ const selfScopeEntry = Object.entries(PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE).find(([, coreType]) => coreType === resourceIdentifier);
1012
+ if (selfScopeEntry) {
1013
+ resourcePrimaryScope = selfScopeEntry[0];
1014
+ }
1015
+ else {
1016
+ resourcePrimaryScope = ResourcePrimaryScope.ORGANIZATIONS;
1017
+ }
1018
+ }
1019
+ // ========================================
1020
+ // isAnonymizable VALIDATION & ENRICHMENT (W7.3a)
1021
+ // ========================================
1022
+ let effectiveMainSchema = mainSchema;
1023
+ let effectiveResourceRelationships = normalizedResourceRelationships;
1024
+ if (isAnonymizable) {
1025
+ if (resourcePrimaryScope !== ResourcePrimaryScope.USER_SELF) {
1026
+ throw createConfigurationError(`[${resourceIdentifier}] isAnonymizable: true requires primaryScope USER_SELF, got ${resourcePrimaryScope}.`);
1027
+ }
1028
+ try {
1029
+ const shape = getZodObjectShape(mainSchema);
1030
+ const userIdField = shape['userId'];
1031
+ if (!userIdField) {
1032
+ throw createConfigurationError(`[${resourceIdentifier}] isAnonymizable: true requires a 'userId' field in mainSchema.`);
1033
+ }
1034
+ const nullResult = userIdField.safeParse(null);
1035
+ if (!nullResult.success) {
1036
+ throw createConfigurationError(`[${resourceIdentifier}] isAnonymizable: true requires 'userId' field to accept null ` +
1037
+ `(anonymous records have no userId). Use z.string().nullable().`);
1038
+ }
1039
+ }
1040
+ catch (e) {
1041
+ if (e?.type === ErrorType.CONFIGURATION)
1042
+ throw e;
1043
+ throw createConfigurationError(`[${resourceIdentifier}] isAnonymizable: true but mainSchema is not a ZodObject (cannot validate userId field).`);
1044
+ }
1045
+ if (!coreOperations.includes(CoreResourceOperation.LIST)) {
1046
+ throw createConfigurationError(`[${resourceIdentifier}] isAnonymizable: true requires LIST in coreOperations (needed for transposition lookup).`);
1047
+ }
1048
+ if (!coreOperations.includes(CoreResourceOperation.UPDATE_MANY)) {
1049
+ throw createConfigurationError(`[${resourceIdentifier}] isAnonymizable: true requires UPDATE_MANY in coreOperations (needed for transposition batch update).`);
1050
+ }
1051
+ effectiveMainSchema = mainSchema.extend({
1052
+ anonymousUserId: z.string().optional().nullable().isDBIndexed()
1053
+ });
1054
+ const anonymousRelationship = createResourcesRelationship(CoreResourceType.ANONYMOUS_USERS, resourceIdentifier, ResourceRelationshipCardinality.ONE, primaryScopeRelationship.cardinality2, {
1055
+ accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.STANDALONE,
1056
+ foreignKeyField: 'anonymousUserId',
1057
+ parentResourceRequirement: ResourceParentResourceRequirement.OPTIONAL,
1058
+ nature: primaryScopeRelationship.resolvedSemantics.nature,
1059
+ read: primaryScopeRelationship.read,
1060
+ contextPolicy: { enabled: false },
1061
+ childOperations: primaryScopeRelationship.childOperations?.lifecycle
1062
+ ? { lifecycle: primaryScopeRelationship.childOperations.lifecycle }
1063
+ : undefined,
1064
+ });
1065
+ effectiveResourceRelationships = [...normalizedResourceRelationships, anonymousRelationship];
1066
+ }
1067
+ // ========================================
1068
+ // TRANSFORM RESOURCE RELATIONSHIPS
1069
+ // ========================================
1070
+ const { processedResourceRelationships, availableParentResourceTypes } = transformResourceRelationships(effectiveResourceRelationships, resourceIdentifier);
1071
+ // ========================================
1072
+ // DERIVE SUMMARY SCHEMA FROM isSummaryField DECORATORS
1073
+ // ========================================
1074
+ // Auto-derive summary schema for LIST/SEARCH operations from isSummaryField decorators
1075
+ // This replaces manual responseSummaryDto definitions
1076
+ // Must be computed BEFORE operations loop so LIST operations can use it
1077
+ const derivedSummarySchema = inheritenceSchemaDefinition
1078
+ ? ResourcesSummaryUtils.deriveSummarySchemaForDiscriminatedUnion(effectiveMainSchema, inheritenceSchemaDefinition)
1079
+ : ResourcesSummaryUtils.deriveSummarySchema(effectiveMainSchema);
1080
+ // ========================================
1081
+ // FLATTEN OPERATIONS AND SEARCHABLE CONFIGURATIONS
1082
+ // ========================================
1083
+ const operations = [];
1084
+ // Extract autoVariants config (default all true)
1085
+ const autoVariants = params.autoVariants || {};
1086
+ const autoVariantsRead = autoVariants.read || {};
1087
+ const autoVariantsList = autoVariants.list || {};
1088
+ const enableReadSummary = autoVariantsRead.enableSummary !== false; // default true
1089
+ const enableReadContext = autoVariantsRead.enableContext !== false; // default true
1090
+ const enableListSummary = autoVariantsList.enableSummary !== false; // default true
1091
+ const enableListContext = autoVariantsList.enableContext !== false; // default true
1092
+ // Process operation configurations
1093
+ for (const [operation, config] of Object.entries(operationsConfiguration)) {
1094
+ // Validate isDefault logic by grouping variants by their variantType
1095
+ const variantsByType = new Map();
1096
+ // Group variants by their type
1097
+ config.variants.forEach(variant => {
1098
+ if (!variantsByType.has(variant.variantType)) {
1099
+ variantsByType.set(variant.variantType, []);
1100
+ }
1101
+ variantsByType.get(variant.variantType).push(variant);
1102
+ });
1103
+ // Validate each variant type group
1104
+ for (const [variantType, variantsGroup] of variantsByType.entries()) {
1105
+ if (variantsGroup.length > 1) {
1106
+ const explicitDefaults = variantsGroup.filter((variant) => variant.isDefault === true);
1107
+ if (explicitDefaults.length === 0) {
1108
+ throw createConfigurationError(`Operation '${operation}' with multiple ${variantType} variants must have at least one with isDefault=true`);
1109
+ }
1110
+ if (explicitDefaults.length > 1) {
1111
+ throw createConfigurationError(`Operation '${operation}' with multiple ${variantType} variants cannot declare more than one with isDefault=true`);
1112
+ }
1113
+ }
1114
+ if (variantType === ResourceOperationVariantType.API_CALL) {
1115
+ const seenVariantKeys = new Set();
1116
+ let seenNonDefaultWithoutVariantKey = false;
1117
+ for (const variant of variantsGroup) {
1118
+ if (variant.variantKey && RESERVED_OPERATION_VARIANT_KEYS.has(variant.variantKey)) {
1119
+ throw createConfigurationError(`Operation '${operation}' cannot use reserved variantKey '${variant.variantKey}'`);
1120
+ }
1121
+ const willBeDefault = determineOperationVariantDefault(variantsGroup, variant);
1122
+ if (willBeDefault) {
1123
+ continue;
1124
+ }
1125
+ if (!variant.variantKey) {
1126
+ if (seenNonDefaultWithoutVariantKey) {
1127
+ throw createConfigurationError(`Operation '${operation}' cannot declare more than one non-default ${variantType} variant without a variantKey`);
1128
+ }
1129
+ seenNonDefaultWithoutVariantKey = true;
1130
+ continue;
1131
+ }
1132
+ if (seenVariantKeys.has(variant.variantKey)) {
1133
+ throw createConfigurationError(`Operation '${operation}' cannot declare duplicate variantKey '${variant.variantKey}' within ${variantType} variants`);
1134
+ }
1135
+ seenVariantKeys.add(variant.variantKey);
1136
+ }
1137
+ }
1138
+ }
1139
+ // Process parent resource access scope strategy overrides for this operation
1140
+ const operationResourceRelationships = processParentResourceAccessScopeStrategyOverrides(processedResourceRelationships, availableParentResourceTypes, config.parentResourceAccessScopeStrategyOverrides || [], operation);
1141
+ // Process user notifications using helper function
1142
+ const userNotifications = processUserNotifications(config.userNotifications || [], resourceIdentifier, operation, resourcePrimaryScope);
1143
+ // Process m2mNotifications using helper function
1144
+ const m2mNotifications = processM2MNotifications(config.m2mNotifications || [], resourceIdentifier, operation);
1145
+ // Process each variant to create flattened operations
1146
+ config.variants.forEach((variantParams, variantIndex) => {
1147
+ // Note: Cascading delete is now handled via childOperations.lifecycle.onParentDelete on relationships
1148
+ // No longer processed at operation variant level
1149
+ // Determine if this variant is the default within its type group
1150
+ const variantsOfSameType = variantsByType.get(variantParams.variantType) || [];
1151
+ const isOperationDefault = determineOperationVariantDefault(variantsOfSameType, variantParams);
1152
+ // Determine effective operation for DTO derivation
1153
+ // For custom operations, use resourceOperationLike if it maps to CREATE or UPDATE
1154
+ const isCustomOperation = !coreOperations.includes(operation);
1155
+ const effectiveOperationForDto = isCustomOperation
1156
+ ? (variantParams.resourceOperationLike || operation)
1157
+ : operation;
1158
+ // Auto-derive requestDto from decorators if not explicitly provided
1159
+ const derivedRequestDto = deriveRequestDto(effectiveOperationForDto, effectiveMainSchema, variantParams.requestDto);
1160
+ // Auto-derive responseDto based on operation type
1161
+ // - LIST: use derivedSummarySchema (only isSummaryField fields)
1162
+ // - READ/CREATE/UPDATE: use effectiveMainSchema (full object)
1163
+ // - DELETE: returns just the deleted ID (handled elsewhere)
1164
+ // - customResponseDto overrides if provided
1165
+ const deriveResponseDto = () => {
1166
+ if (variantParams.customResponseDto) {
1167
+ return variantParams.customResponseDto;
1168
+ }
1169
+ if (operation === CoreResourceOperation.LIST) {
1170
+ return derivedSummarySchema;
1171
+ }
1172
+ if (operation === CoreResourceOperation.SEARCH
1173
+ || variantParams.resourceOperationLike === CoreResourceOperation.SEARCH) {
1174
+ return derivedSummarySchema;
1175
+ }
1176
+ return effectiveMainSchema;
1177
+ };
1178
+ // Derive the responseDto for this operation (temporary, will be replaced by buildAllOperationDtos)
1179
+ const operationResponseDto = deriveResponseDto();
1180
+ // Create base operation fields shared by all operation types
1181
+ // Note: DTOs (requestDto, responseDto, summaryDto, contextDto, internalDto, repositoryDto)
1182
+ // will be pre-computed by buildAllOperationDtos() after all operations are created.
1183
+ // We set temporary DTOs here for type compatibility, but they will be replaced.
1184
+ const baseOperationFields = {
1185
+ isDisabled: params.isDisabled ?? false,
1186
+ mainSchema: effectiveMainSchema,
1187
+ resourcePrimaryScope,
1188
+ resourceIdentifier,
1189
+ resourceFieldIdentifier,
1190
+ resourceRelationships: operationResourceRelationships,
1191
+ isSystemResource,
1192
+ operationIdentifier: operation,
1193
+ isOperationDefault,
1194
+ serviceRuntimeMode: config.serviceRuntimeMode || ResourceOperation_ServiceRuntimeMode.INLINE,
1195
+ requestDto: derivedRequestDto, // Temporary - will be replaced by buildAllOperationDtos
1196
+ responseDto: operationResponseDto, // Temporary - will be replaced by buildAllOperationDtos
1197
+ hasCustomResponseDto: !!variantParams.customResponseDto,
1198
+ notificationBadgeOperations: config.notificationBadgeOperations || [],
1199
+ userNotifications,
1200
+ m2mNotifications,
1201
+ // Fields from ResourceConfiguration_OperationVariant_Base
1202
+ variantType: variantParams.variantType,
1203
+ resourceOperationLike: variantParams.resourceOperationLike,
1204
+ requiredFeatures: normalizeRequiredFeatures(variantParams.requiredFeatures),
1205
+ riskLevel: variantParams.riskLevel || ResourceOperationRiskLevel.LOW,
1206
+ roles: variantParams.roles,
1207
+ customServiceImplementationModes: variantParams.customServiceImplementationModes || [],
1208
+ basicPrefixOperation: variantParams.basicPrefixOperation
1209
+ };
1210
+ if (variantParams.variantType === ResourceOperationVariantType.API_CALL) {
1211
+ const apiCallParams = variantParams;
1212
+ // Determine if this is a custom operation and get the operation to check
1213
+ const isCustomOperation = !coreOperations.includes(operation);
1214
+ const operationToCheck = isCustomOperation ? apiCallParams.resourceOperationLike : operation;
1215
+ // Validate bulk operation business rules - check against the relevant operation
1216
+ const haveBulkOperation = apiCallParams.haveBulkOperation || false;
1217
+ if (haveBulkOperation && (operationToCheck === CoreResourceOperation.READ || operationToCheck === CoreResourceOperation.LIST)) {
1218
+ throw createConfigurationError(`Operation '${operation}' cannot have bulk operations (read and list are not bulkable)`);
1219
+ }
1220
+ // Determine HTTP verb - for custom operations, use resourceOperationLike
1221
+ let httpVerb;
1222
+ if (isCustomOperation) {
1223
+ // For custom operations, resourceOperationLike is mandatory and we use its HTTP verb
1224
+ if (!apiCallParams.resourceOperationLike) {
1225
+ throw createConfigurationError(`Operation '${operation}' is a custom operation and must specify resourceOperationLike`);
1226
+ }
1227
+ httpVerb = getDefaultHttpVerbForOperation(apiCallParams.resourceOperationLike);
1228
+ }
1229
+ else {
1230
+ // For core operations, use the operation itself
1231
+ httpVerb = getDefaultHttpVerbForOperation(operation);
1232
+ }
1233
+ // ── Build-time validation for token configs ──
1234
+ if (apiCallParams.tokenGeneration) {
1235
+ validateTokenGenerationConfig(apiCallParams.tokenGeneration, resourceIdentifier, operation);
1236
+ }
1237
+ if (apiCallParams.tokenRevocation) {
1238
+ validateTokenRevocationConfig(apiCallParams.tokenRevocation, resourceIdentifier, operation);
1239
+ }
1240
+ // Create API_CALL operation fields
1241
+ const apiCallOperationFields = {
1242
+ ...baseOperationFields,
1243
+ httpVerb,
1244
+ isApiKeyAccessDisabled: apiCallParams.isApiKeyAccessDisabled || false,
1245
+ isBulkOperation: false, // Normal operation
1246
+ tokenAuthentication: apiCallParams.tokenAuthentication,
1247
+ tokenGeneration: apiCallParams.tokenGeneration,
1248
+ tokenRevocation: apiCallParams.tokenRevocation,
1249
+ enabledCondition: apiCallParams.enabledCondition,
1250
+ isDefault: apiCallParams.isDefault,
1251
+ variantKey: apiCallParams.variantKey
1252
+ };
1253
+ // ── Collection-view enrichment ──────────────────────────────────
1254
+ // When an operation is SEARCH-like or LIST-like (by identity or resourceOperationLike),
1255
+ // extract collection-view fields from the variant params and compute derived schemas.
1256
+ const isSearchLike = operation === CoreResourceOperation.SEARCH
1257
+ || variantParams.resourceOperationLike === CoreResourceOperation.SEARCH;
1258
+ const isListLike = operation === CoreResourceOperation.LIST
1259
+ || variantParams.resourceOperationLike === CoreResourceOperation.LIST;
1260
+ if (isSearchLike) {
1261
+ const pageSize = variantParams.pageSize ?? 20;
1262
+ const displayMode = variantParams.displayMode ?? 'cards';
1263
+ const isSearchable = variantParams.isSearchable !== false;
1264
+ const searchableFields = variantParams.searchableFields || [];
1265
+ const searchableOptions = variantParams.searchableOptions || { caseSensitive: false, fullMatchOnly: false };
1266
+ const rawFilterFields = variantParams.filterFields || {};
1267
+ const sortFields = variantParams.sortFields || [];
1268
+ const maxPaginatedResultPerPageLimit = variantParams.maxPaginatedResultPerPageLimit || 50;
1269
+ const filterFields = {};
1270
+ Object.entries(rawFilterFields).forEach(([key, value]) => {
1271
+ if (typeof value !== 'function') {
1272
+ filterFields[key] = value;
1273
+ }
1274
+ });
1275
+ const searchQueryRequestSchema = createResourceSearchQueryRequestSchema({
1276
+ filterFields,
1277
+ allowedSortFields: sortFields,
1278
+ pagination: true
1279
+ });
1280
+ const paginatedResponseSchema = createResourcePaginatedResponseSchema({
1281
+ dataSchema: derivedSummarySchema,
1282
+ validateArrayConstraints: true,
1283
+ maxResultsPerPageLimit: maxPaginatedResultPerPageLimit
1284
+ });
1285
+ Object.assign(apiCallOperationFields, {
1286
+ pageSize,
1287
+ displayMode,
1288
+ isSearchable,
1289
+ searchableFields,
1290
+ searchableOptions,
1291
+ filterFields: rawFilterFields,
1292
+ sortFields,
1293
+ maxPaginatedResultPerPageLimit,
1294
+ searchQueryRequestSchema,
1295
+ responseDto: paginatedResponseSchema,
1296
+ hasCustomResponseDto: false,
1297
+ });
1298
+ }
1299
+ if (isListLike) {
1300
+ const listEnrichment = {
1301
+ pageSize: variantParams.pageSize ?? 20,
1302
+ displayMode: variantParams.displayMode ?? 'cards',
1303
+ searchEnabled: variantParams.searchEnabled ?? true,
1304
+ filtersEnabled: variantParams.filtersEnabled ?? true,
1305
+ };
1306
+ if (variantParams.filterFields !== undefined) {
1307
+ listEnrichment.filterFields = variantParams.filterFields;
1308
+ }
1309
+ if (variantParams.sortFields !== undefined) {
1310
+ listEnrichment.sortFields = variantParams.sortFields;
1311
+ }
1312
+ Object.assign(apiCallOperationFields, listEnrichment);
1313
+ }
1314
+ // ── End collection-view enrichment ──────────────────────────────
1315
+ // Add normal operation
1316
+ operations.push(apiCallOperationFields);
1317
+ // Add bulk operation if enabled
1318
+ if (haveBulkOperation) {
1319
+ const bulkDto = (() => {
1320
+ if (operationToCheck === CoreResourceOperation.CREATE) {
1321
+ return apiCallOperationFields.requestDto && apiCallOperationFields.requestDto !== z.object({})
1322
+ ? z.object({
1323
+ data: z.array(apiCallOperationFields.requestDto)
1324
+ })
1325
+ : z.object({
1326
+ data: z.array(z.object({}))
1327
+ });
1328
+ }
1329
+ if (apiCallOperationFields.requestDto instanceof z.ZodObject) {
1330
+ return Resouces_BulkOperationBaseSchema.extend(getZodObjectShape(apiCallOperationFields.requestDto));
1331
+ }
1332
+ return apiCallOperationFields.requestDto && apiCallOperationFields.requestDto !== z.object({})
1333
+ ? Resouces_BulkOperationBaseSchema.and(apiCallOperationFields.requestDto)
1334
+ : Resouces_BulkOperationBaseSchema;
1335
+ })();
1336
+ const bulkOperationFields = {
1337
+ ...apiCallOperationFields,
1338
+ isBulkOperation: true,
1339
+ isOperationDefault: false, // Bulk operations are never default
1340
+ requestDto: bulkDto
1341
+ };
1342
+ operations.push(bulkOperationFields);
1343
+ }
1344
+ }
1345
+ else {
1346
+ // Handle other variant types (CronJob, BatchJob, InternalCall, RepositoryOnly)
1347
+ const { variantType, ...specificFields } = variantParams; // Extract variantType and get rest
1348
+ const nonApiCallOperation = {
1349
+ ...baseOperationFields,
1350
+ ...specificFields
1351
+ };
1352
+ operations.push(nonApiCallOperation);
1353
+ }
1354
+ });
1355
+ // ========================================
1356
+ // PROCESS AUTO-VARIANTS FOR READ AND LIST
1357
+ // ========================================
1358
+ // Only process auto-variants for READ and LIST core operations
1359
+ if (operation === CoreResourceOperation.READ || operation === CoreResourceOperation.LIST) {
1360
+ // Reuse the flattened default API operation so auto-variants inherit the same
1361
+ // resolved default identity as the rest of the resource config.
1362
+ const defaultApiCallVariant = [...operations].reverse().find((candidate) => (candidate.operationIdentifier === operation
1363
+ && candidate.variantType === ResourceOperationVariantType.API_CALL
1364
+ && candidate.isOperationDefault === true
1365
+ && !('isBulkOperation' in candidate && candidate.isBulkOperation === true)));
1366
+ if (!defaultApiCallVariant) {
1367
+ // Skip auto-variants if no default variant exists
1368
+ continue;
1369
+ }
1370
+ // Check which variants already exist
1371
+ const existingVariantKeys = new Set(operations
1372
+ .filter((candidate) => (candidate.operationIdentifier === operation
1373
+ && candidate.variantType === ResourceOperationVariantType.API_CALL
1374
+ && candidate.variantKey
1375
+ && !('isBulkOperation' in candidate && candidate.isBulkOperation === true)))
1376
+ .map((candidate) => candidate.variantKey));
1377
+ // Helper to create auto-variant operation
1378
+ // Note: DTOs will be pre-computed by buildAllOperationDtos() after all operations are created.
1379
+ // We set temporary DTOs here for type compatibility, but they will be replaced.
1380
+ const createAutoVariantOperation = (variantKey, responseDto, isDefault) => {
1381
+ const baseOperationFields = {
1382
+ isDisabled: params.isDisabled ?? false,
1383
+ mainSchema: effectiveMainSchema,
1384
+ resourcePrimaryScope,
1385
+ resourceIdentifier,
1386
+ resourceFieldIdentifier,
1387
+ resourceRelationships: operationResourceRelationships,
1388
+ isSystemResource,
1389
+ operationIdentifier: operation,
1390
+ isOperationDefault: false, // Auto-variants are never operation default
1391
+ serviceRuntimeMode: config.serviceRuntimeMode || ResourceOperation_ServiceRuntimeMode.INLINE,
1392
+ requestDto: defaultApiCallVariant.requestDto || deriveRequestDto(operation, effectiveMainSchema, undefined), // Temporary - will be replaced by buildAllOperationDtos
1393
+ responseDto, // Temporary - will be replaced by buildAllOperationDtos
1394
+ notificationBadgeOperations: config.notificationBadgeOperations || [],
1395
+ userNotifications,
1396
+ m2mNotifications,
1397
+ variantType: ResourceOperationVariantType.API_CALL,
1398
+ resourceOperationLike: defaultApiCallVariant.resourceOperationLike,
1399
+ requiredFeatures: normalizeRequiredFeatures(defaultApiCallVariant.requiredFeatures),
1400
+ riskLevel: defaultApiCallVariant.riskLevel || ResourceOperationRiskLevel.LOW,
1401
+ roles: defaultApiCallVariant.roles, // Inherit roles from default variant
1402
+ customServiceImplementationModes: defaultApiCallVariant.customServiceImplementationModes || [],
1403
+ basicPrefixOperation: defaultApiCallVariant.basicPrefixOperation,
1404
+ httpVerb: getDefaultHttpVerbForOperation(operation),
1405
+ isApiKeyAccessDisabled: defaultApiCallVariant.isApiKeyAccessDisabled || false,
1406
+ isBulkOperation: false,
1407
+ tokenAuthentication: defaultApiCallVariant.tokenAuthentication,
1408
+ tokenGeneration: defaultApiCallVariant.tokenGeneration,
1409
+ tokenRevocation: defaultApiCallVariant.tokenRevocation,
1410
+ enabledCondition: defaultApiCallVariant.enabledCondition,
1411
+ isDefault: isDefault,
1412
+ variantKey: variantKey
1413
+ };
1414
+ // ── Build-time validation for auto-variant token configs ──
1415
+ if (defaultApiCallVariant.tokenGeneration) {
1416
+ validateTokenGenerationConfig(defaultApiCallVariant.tokenGeneration, resourceIdentifier, `${operation}.${variantKey}`);
1417
+ }
1418
+ if (defaultApiCallVariant.tokenRevocation) {
1419
+ validateTokenRevocationConfig(defaultApiCallVariant.tokenRevocation, resourceIdentifier, `${operation}.${variantKey}`);
1420
+ }
1421
+ return baseOperationFields;
1422
+ };
1423
+ // Generate READ.summary variant
1424
+ if (operation === CoreResourceOperation.READ && enableReadSummary && !existingVariantKeys.has(OPERATION_VARIANT_KEY.SUMMARY)) {
1425
+ const summaryResponseDto = derivedSummarySchema;
1426
+ operations.push(createAutoVariantOperation(OPERATION_VARIANT_KEY.SUMMARY, summaryResponseDto, false));
1427
+ }
1428
+ // Generate READ.context variant
1429
+ if (operation === CoreResourceOperation.READ && enableReadContext && !existingVariantKeys.has(OPERATION_VARIANT_KEY.CONTEXT)) {
1430
+ const contextResponseDto = effectiveMainSchema; // Full schema for context
1431
+ operations.push(createAutoVariantOperation(OPERATION_VARIANT_KEY.CONTEXT, contextResponseDto, false));
1432
+ }
1433
+ // Generate LIST.summary variant
1434
+ if (operation === CoreResourceOperation.LIST && enableListSummary && !existingVariantKeys.has(OPERATION_VARIANT_KEY.SUMMARY)) {
1435
+ // For LIST operations, wrap summary schema in pagination structure using shared schema
1436
+ const summaryResponseDto = z.object({
1437
+ data: z.array(derivedSummarySchema),
1438
+ pagination: Resouces_PaginationResponseMetadataSchema
1439
+ });
1440
+ operations.push(createAutoVariantOperation(OPERATION_VARIANT_KEY.SUMMARY, summaryResponseDto, false));
1441
+ }
1442
+ // Generate LIST.context variant
1443
+ if (operation === CoreResourceOperation.LIST && enableListContext && !existingVariantKeys.has(OPERATION_VARIANT_KEY.CONTEXT)) {
1444
+ // For LIST operations, wrap context schema in pagination structure using shared schema
1445
+ const contextResponseDto = z.object({
1446
+ data: z.array(effectiveMainSchema),
1447
+ pagination: Resouces_PaginationResponseMetadataSchema
1448
+ });
1449
+ operations.push(createAutoVariantOperation(OPERATION_VARIANT_KEY.CONTEXT, contextResponseDto, false));
1450
+ }
1451
+ }
1452
+ }
1453
+ // ========================================
1454
+ // CROSS-OPERATION TOKEN VALIDATION (E1)
1455
+ // ========================================
1456
+ // Detect invalid pairing: tokenGeneration with consumeAt:EXCHANGE + tokenAuthentication with ADDITIVE policy
1457
+ // When token is consumed at exchange, no consumable token value is carried into the session,
1458
+ // so ADDITIVE operations that require the token will silently fail.
1459
+ const generatedTokenTypes = new Map();
1460
+ const additiveTokenTypes = new Set();
1461
+ for (const op of operations) {
1462
+ if ('tokenGeneration' in op && op.tokenGeneration?.createsOneOffSession && op.tokenGeneration.consumeAt) {
1463
+ generatedTokenTypes.set(op.tokenGeneration.tokenType, op.tokenGeneration.consumeAt);
1464
+ }
1465
+ if ('tokenAuthentication' in op && op.tokenAuthentication?.policy === TokenAuthenticationPolicy.ADDITIVE) {
1466
+ for (const t of op.tokenAuthentication.types) {
1467
+ additiveTokenTypes.add(t);
1468
+ }
1469
+ }
1470
+ }
1471
+ for (const [tokenType, consumeAt] of generatedTokenTypes) {
1472
+ if (consumeAt === 'EXCHANGE' && additiveTokenTypes.has(tokenType)) {
1473
+ throw createConfigurationError(`[${resourceIdentifier}] tokenType '${tokenType}': consumeAt is 'EXCHANGE' but another operation ` +
1474
+ `uses this tokenType with ADDITIVE policy. EXCHANGE consumes the token before the session starts, ` +
1475
+ `so no token value will be available for ADDITIVE operations. Use 'TARGET_OPERATION' instead.`);
1476
+ }
1477
+ }
1478
+ // ========================================
1479
+ // BUILD FINAL RESULT
1480
+ // ========================================
1481
+ // Build the final resource configuration to pass to buildAllOperationDtos
1482
+ // W7.3a: Warn if isAnonymizable but no operation has APP_ANONYMOUS role
1483
+ if (isAnonymizable) {
1484
+ const hasAnonymousRole = operations.some(op => op.roles.includes('APP_ANONYMOUS'));
1485
+ if (!hasAnonymousRole) {
1486
+ console.warn(`[${resourceIdentifier}] isAnonymizable: true but no operation has APP_ANONYMOUS in roles. ` +
1487
+ `Anonymous users won't be able to access any operation on this resource.`);
1488
+ }
1489
+ }
1490
+ operations.push(...createGeneratedRelationshipBulkOperations(operations, relevantRelationships, resourceIdentifier, {
1491
+ ...coreResourceShared_FieldIdentifier,
1492
+ [resourceIdentifier]: resourceFieldIdentifier,
1493
+ }));
1494
+ const resourceConfig = {
1495
+ isDisabled: params.isDisabled ?? false,
1496
+ resourcePrimaryScope,
1497
+ resourceIdentifier,
1498
+ resourceFieldIdentifier,
1499
+ coreOperations,
1500
+ customOperation,
1501
+ mainSchema: effectiveMainSchema,
1502
+ resourceRelationships: processedResourceRelationships,
1503
+ inheritenceSchemaDefinition,
1504
+ persistenceAdapter,
1505
+ isSystemResource,
1506
+ isAnonymizable,
1507
+ transpositionPolicy: isAnonymizable
1508
+ ? (transpositionPolicy ?? ResourceTranspositionPolicy.ADD)
1509
+ : ResourceTranspositionPolicy.ADD,
1510
+ operations: operations // Temporary - will be replaced
1511
+ };
1512
+ // Pre-compute all DTOs for each operation using buildAllOperationDtos
1513
+ // Note: Registry is empty for now - it's mainly used for cross-references in nested DTOs
1514
+ // If needed, the registry can be passed as a parameter to the factory function
1515
+ const resourceRegistry = new Map();
1516
+ const operationsWithDtos = operations.map(operation => ResourcesConfigOperationsDtosBuilderUtils.buildAllOperationDtos(operation, resourceConfig, resourceRegistry));
1517
+ return {
1518
+ isDisabled: params.isDisabled ?? false,
1519
+ resourcePrimaryScope,
1520
+ resourceIdentifier,
1521
+ resourceFieldIdentifier,
1522
+ coreOperations,
1523
+ customOperation,
1524
+ mainSchema: effectiveMainSchema,
1525
+ resourceRelationships: processedResourceRelationships,
1526
+ inheritenceSchemaDefinition,
1527
+ persistenceAdapter,
1528
+ isSystemResource,
1529
+ isAnonymizable,
1530
+ transpositionPolicy: isAnonymizable
1531
+ ? (transpositionPolicy ?? ResourceTranspositionPolicy.ADD)
1532
+ : ResourceTranspositionPolicy.ADD,
1533
+ operations: operationsWithDtos
1534
+ };
1535
+ }
1536
+ //# sourceMappingURL=resources-config.shared.factory.js.map