@rvoh/dream 2.35.0 → 2.36.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 (302) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/src/Dream.js +260 -55
  3. package/dist/cjs/src/bin/index.js +13 -0
  4. package/dist/cjs/src/cli/index.js +28 -17
  5. package/dist/cjs/src/db/migration-helpers/DreamMigrationHelpers.js +23 -21
  6. package/dist/cjs/src/decorators/Decorators.js +26 -4
  7. package/dist/cjs/src/decorators/field/Encrypted.js +35 -6
  8. package/dist/cjs/src/dream/DreamClassTransactionBuilder.js +6 -6
  9. package/dist/cjs/src/dream/DreamInstanceTransactionBuilder.js +63 -27
  10. package/dist/cjs/src/dream/LeftJoinLoadBuilder.js +3 -3
  11. package/dist/cjs/src/dream/LoadBuilder.js +1 -1
  12. package/dist/cjs/src/dream/Query.js +542 -167
  13. package/dist/cjs/src/dream/QueryDriver/Base.js +72 -0
  14. package/dist/cjs/src/dream/QueryDriver/Kysely.js +216 -50
  15. package/dist/cjs/src/dream/internal/associations/assertRecognizedAssociationConditionKeys.js +48 -0
  16. package/dist/cjs/src/dream/internal/associations/associationQuery.js +4 -0
  17. package/dist/cjs/src/dream/internal/reload.js +6 -1
  18. package/dist/cjs/src/dream/internal/saveDream.js +8 -2
  19. package/dist/cjs/src/dream/internal/sqlResultToDreamInstance.js +2 -0
  20. package/dist/cjs/src/dream/internal/undestroyDream.js +1 -1
  21. package/dist/cjs/src/dream-app/index.js +38 -0
  22. package/dist/cjs/src/encrypt/InternalEncrypt.js +77 -4
  23. package/dist/cjs/src/encrypt/defaultEncryptedColumnName.js +10 -0
  24. package/dist/cjs/src/encrypt/index.js +76 -9
  25. package/dist/cjs/src/errors/DoNotSetEncryptedFieldsDirectly.js +4 -0
  26. package/dist/cjs/src/errors/associations/UnrecognizedAssociationConditionKeys.js +25 -0
  27. package/dist/cjs/src/helpers/Env.js +28 -0
  28. package/dist/cjs/src/helpers/cli/generateDreamContent.js +2 -1
  29. package/dist/cjs/src/helpers/cli/generateFactoryContent.js +1 -1
  30. package/dist/cjs/src/helpers/cli/generateMigrationContent.js +9 -9
  31. package/dist/cjs/src/helpers/cli/generateSerializerContent.js +21 -8
  32. package/dist/cjs/src/serializer/SerializerRenderer.js +65 -13
  33. package/dist/cjs/src/serializer/builders/DreamSerializerBuilder.js +54 -38
  34. package/dist/cjs/src/serializer/builders/ObjectSerializerBuilder.js +34 -14
  35. package/dist/cjs/src/serializer/helpers/serializersForAssociatedClass.js +43 -0
  36. package/dist/esm/src/Dream.js +260 -55
  37. package/dist/esm/src/bin/index.js +13 -0
  38. package/dist/esm/src/cli/index.js +28 -17
  39. package/dist/esm/src/db/migration-helpers/DreamMigrationHelpers.js +23 -21
  40. package/dist/esm/src/decorators/Decorators.js +26 -4
  41. package/dist/esm/src/decorators/field/Encrypted.js +35 -6
  42. package/dist/esm/src/dream/DreamClassTransactionBuilder.js +6 -6
  43. package/dist/esm/src/dream/DreamInstanceTransactionBuilder.js +63 -27
  44. package/dist/esm/src/dream/LeftJoinLoadBuilder.js +3 -3
  45. package/dist/esm/src/dream/LoadBuilder.js +1 -1
  46. package/dist/esm/src/dream/Query.js +542 -167
  47. package/dist/esm/src/dream/QueryDriver/Base.js +72 -0
  48. package/dist/esm/src/dream/QueryDriver/Kysely.js +216 -50
  49. package/dist/esm/src/dream/internal/associations/assertRecognizedAssociationConditionKeys.js +48 -0
  50. package/dist/esm/src/dream/internal/associations/associationQuery.js +4 -0
  51. package/dist/esm/src/dream/internal/reload.js +6 -1
  52. package/dist/esm/src/dream/internal/saveDream.js +8 -2
  53. package/dist/esm/src/dream/internal/sqlResultToDreamInstance.js +2 -0
  54. package/dist/esm/src/dream/internal/undestroyDream.js +1 -1
  55. package/dist/esm/src/dream-app/index.js +38 -0
  56. package/dist/esm/src/encrypt/InternalEncrypt.js +77 -4
  57. package/dist/esm/src/encrypt/defaultEncryptedColumnName.js +10 -0
  58. package/dist/esm/src/encrypt/index.js +76 -9
  59. package/dist/esm/src/errors/DoNotSetEncryptedFieldsDirectly.js +4 -0
  60. package/dist/esm/src/errors/associations/UnrecognizedAssociationConditionKeys.js +25 -0
  61. package/dist/esm/src/helpers/Env.js +28 -0
  62. package/dist/esm/src/helpers/cli/generateDreamContent.js +2 -1
  63. package/dist/esm/src/helpers/cli/generateFactoryContent.js +1 -1
  64. package/dist/esm/src/helpers/cli/generateMigrationContent.js +9 -9
  65. package/dist/esm/src/helpers/cli/generateSerializerContent.js +21 -8
  66. package/dist/esm/src/serializer/SerializerRenderer.js +65 -13
  67. package/dist/esm/src/serializer/builders/DreamSerializerBuilder.js +54 -38
  68. package/dist/esm/src/serializer/builders/ObjectSerializerBuilder.js +34 -14
  69. package/dist/esm/src/serializer/helpers/serializersForAssociatedClass.js +43 -0
  70. package/dist/types/src/Dream.d.ts +208 -42
  71. package/dist/types/src/bin/index.d.ts +7 -1
  72. package/dist/types/src/cli/index.d.ts +13 -0
  73. package/dist/types/src/db/migration-helpers/DreamMigrationHelpers.d.ts +2 -2
  74. package/dist/types/src/decorators/Decorators.d.ts +26 -3
  75. package/dist/types/src/decorators/field/Encrypted.d.ts +6 -1
  76. package/dist/types/src/dream/DreamClassTransactionBuilder.d.ts +9 -9
  77. package/dist/types/src/dream/DreamInstanceTransactionBuilder.d.ts +52 -25
  78. package/dist/types/src/dream/LeftJoinLoadBuilder.d.ts +4 -4
  79. package/dist/types/src/dream/LoadBuilder.d.ts +1 -1
  80. package/dist/types/src/dream/Query.d.ts +272 -33
  81. package/dist/types/src/dream/QueryDriver/Base.d.ts +63 -1
  82. package/dist/types/src/dream/QueryDriver/Kysely.d.ts +85 -1
  83. package/dist/types/src/dream/internal/associations/assertRecognizedAssociationConditionKeys.d.ts +29 -0
  84. package/dist/types/src/dream-app/index.d.ts +56 -2
  85. package/dist/types/src/encrypt/InternalEncrypt.d.ts +29 -1
  86. package/dist/types/src/encrypt/defaultEncryptedColumnName.d.ts +7 -0
  87. package/dist/types/src/encrypt/index.d.ts +75 -6
  88. package/dist/types/src/errors/associations/UnrecognizedAssociationConditionKeys.d.ts +8 -0
  89. package/dist/types/src/helpers/Env.d.ts +28 -0
  90. package/dist/types/src/package-exports/openapi.d.ts +1 -1
  91. package/dist/types/src/package-exports/types.d.ts +2 -2
  92. package/dist/types/src/serializer/SerializerRenderer.d.ts +13 -0
  93. package/dist/types/src/serializer/builders/DreamSerializerBuilder.d.ts +59 -55
  94. package/dist/types/src/serializer/builders/ObjectSerializerBuilder.d.ts +40 -19
  95. package/dist/types/src/serializer/helpers/serializersForAssociatedClass.d.ts +17 -0
  96. package/dist/types/src/types/lifecycle.d.ts +6 -0
  97. package/dist/types/src/types/openapi.d.ts +52 -29
  98. package/dist/types/src/types/serializer.d.ts +43 -2
  99. package/dist/types/src/types/types/lifecycle.ts +6 -0
  100. package/dist/types/src/types/types/openapi.ts +51 -37
  101. package/dist/types/src/types/types/serializer.ts +62 -2
  102. package/dist/types/src/types/types/variadic.ts +99 -43
  103. package/dist/types/src/types/variadic.d.ts +29 -3
  104. package/docs/assets/hierarchy.js +1 -1
  105. package/docs/assets/highlight.css +4 -11
  106. package/docs/assets/navigation.js +1 -1
  107. package/docs/assets/search.js +1 -1
  108. package/docs/classes/db.DreamMigrationHelpers.html +13 -13
  109. package/docs/classes/db.KyselyQueryDriver.html +85 -46
  110. package/docs/classes/db.PostgresQueryDriver.html +86 -47
  111. package/docs/classes/db.QueryDriverBase.html +84 -45
  112. package/docs/classes/errors.CannotSaveMissingDream.html +2 -2
  113. package/docs/classes/errors.CheckConstraintViolation.html +3 -3
  114. package/docs/classes/errors.ColumnOverflow.html +3 -3
  115. package/docs/classes/errors.CreateOrFindByFailedToCreateAndFind.html +3 -3
  116. package/docs/classes/errors.DataIncompatibleWithDatabaseField.html +3 -3
  117. package/docs/classes/errors.DataTypeColumnTypeMismatch.html +3 -3
  118. package/docs/classes/errors.DecryptionError.html +2 -2
  119. package/docs/classes/errors.DecryptionParseError.html +2 -2
  120. package/docs/classes/errors.DecryptionRotationError.html +3 -3
  121. package/docs/classes/errors.GlobalNameNotSet.html +3 -3
  122. package/docs/classes/errors.InvalidCalendarDate.html +2 -2
  123. package/docs/classes/errors.InvalidClockTime.html +2 -2
  124. package/docs/classes/errors.InvalidClockTimeTz.html +2 -2
  125. package/docs/classes/errors.InvalidDateTime.html +2 -2
  126. package/docs/classes/errors.MissingSerializersDefinition.html +3 -3
  127. package/docs/classes/errors.NonLoadedAssociation.html +3 -3
  128. package/docs/classes/errors.NotNullViolation.html +3 -3
  129. package/docs/classes/errors.RecordNotFound.html +3 -3
  130. package/docs/classes/errors.SortableScopeDidNotStabilize.html +3 -3
  131. package/docs/classes/errors.SortableScopeLockWaitTimedOut.html +3 -3
  132. package/docs/classes/errors.ValidationError.html +3 -3
  133. package/docs/classes/index.CalendarDate.html +33 -33
  134. package/docs/classes/index.ClockTime.html +32 -32
  135. package/docs/classes/index.ClockTimeTz.html +35 -35
  136. package/docs/classes/index.DateTime.html +86 -86
  137. package/docs/classes/index.Decorators.html +37 -23
  138. package/docs/classes/index.Dream.html +270 -142
  139. package/docs/classes/index.DreamApp.html +40 -10
  140. package/docs/classes/index.DreamTransaction.html +3 -3
  141. package/docs/classes/index.Env.html +16 -2
  142. package/docs/classes/index.Query.html +331 -129
  143. package/docs/classes/system.CliFileWriter.html +4 -4
  144. package/docs/classes/system.DreamBin.html +6 -2
  145. package/docs/classes/system.DreamCLI.html +7 -7
  146. package/docs/classes/system.DreamImporter.html +2 -2
  147. package/docs/classes/system.DreamLogos.html +2 -2
  148. package/docs/classes/system.DreamSerializerBuilder.html +52 -34
  149. package/docs/classes/system.ObjectSerializerBuilder.html +41 -22
  150. package/docs/classes/system.PathHelpers.html +4 -4
  151. package/docs/classes/utils.Encrypt.html +54 -10
  152. package/docs/classes/utils.Range.html +2 -2
  153. package/docs/functions/db.closeAllDbConnections.html +1 -1
  154. package/docs/functions/db.dreamDbConnections.html +1 -1
  155. package/docs/functions/db.untypedDb.html +1 -1
  156. package/docs/functions/db.validateColumn.html +1 -1
  157. package/docs/functions/db.validateTable.html +1 -1
  158. package/docs/functions/errors.pgErrorType.html +1 -1
  159. package/docs/functions/index.DreamSerializer.html +1 -1
  160. package/docs/functions/index.ObjectSerializer.html +1 -1
  161. package/docs/functions/index.ReplicaSafe.html +1 -1
  162. package/docs/functions/index.STI.html +1 -1
  163. package/docs/functions/index.SoftDelete.html +1 -1
  164. package/docs/functions/utils.camelize.html +1 -1
  165. package/docs/functions/utils.capitalize.html +1 -1
  166. package/docs/functions/utils.cloneDeepSafe.html +1 -1
  167. package/docs/functions/utils.compact.html +1 -1
  168. package/docs/functions/utils.groupBy.html +1 -1
  169. package/docs/functions/utils.hyphenize.html +1 -1
  170. package/docs/functions/utils.intersection.html +1 -1
  171. package/docs/functions/utils.isEmpty.html +1 -1
  172. package/docs/functions/utils.normalizeUnicode.html +1 -1
  173. package/docs/functions/utils.pascalize.html +1 -1
  174. package/docs/functions/utils.percent.html +1 -1
  175. package/docs/functions/utils.range.html +1 -1
  176. package/docs/functions/utils.round.html +1 -1
  177. package/docs/functions/utils.sanitizeString.html +1 -1
  178. package/docs/functions/utils.snakeify.html +1 -1
  179. package/docs/functions/utils.sort.html +1 -1
  180. package/docs/functions/utils.sortBy.html +1 -1
  181. package/docs/functions/utils.sortObjectByKey.html +1 -1
  182. package/docs/functions/utils.sortObjectByValue.html +1 -1
  183. package/docs/functions/utils.uncapitalize.html +1 -1
  184. package/docs/functions/utils.uniq.html +1 -1
  185. package/docs/hierarchy.html +1 -1
  186. package/docs/index.html +1 -1
  187. package/docs/interfaces/openapi.OpenapiDescription.html +2 -2
  188. package/docs/interfaces/openapi.OpenapiSchemaProperties.html +1 -1
  189. package/docs/interfaces/openapi.OpenapiSchemaPropertiesShorthand.html +1 -1
  190. package/docs/interfaces/openapi.OpenapiTypeFieldObject.html +1 -1
  191. package/docs/interfaces/types.BelongsToStatement.html +2 -2
  192. package/docs/interfaces/types.DecoratorContext.html +2 -2
  193. package/docs/interfaces/types.DecryptCallbacks.html +6 -0
  194. package/docs/interfaces/types.DreamAppInitOptions.html +2 -2
  195. package/docs/interfaces/types.DreamAppOpts.html +2 -2
  196. package/docs/interfaces/types.DreamDbConfig.html +6 -6
  197. package/docs/interfaces/types.DurationObject.html +2 -2
  198. package/docs/interfaces/types.EncryptOptions.html +2 -2
  199. package/docs/interfaces/types.EncryptionLegacyKeyUsedEvent.html +10 -0
  200. package/docs/interfaces/types.InternalAnyTypedSerializerRendersMany.html +2 -2
  201. package/docs/interfaces/types.InternalAnyTypedSerializerRendersOne.html +2 -2
  202. package/docs/interfaces/types.SerializerRendererOpts.html +2 -2
  203. package/docs/modules/openapi.html +1 -1
  204. package/docs/modules/types.html +1 -1
  205. package/docs/types/openapi.CommonOpenapiSchemaObjectFields.html +1 -1
  206. package/docs/types/openapi.OpenapiAllTypes.html +1 -1
  207. package/docs/types/openapi.OpenapiFormats.html +1 -1
  208. package/docs/types/openapi.OpenapiNumberFormats.html +1 -1
  209. package/docs/types/openapi.OpenapiPrimitiveBaseTypes.html +1 -1
  210. package/docs/types/openapi.OpenapiPrimitiveTypes.html +1 -1
  211. package/docs/types/openapi.OpenapiSchemaArray.html +1 -1
  212. package/docs/types/openapi.OpenapiSchemaArrayShorthand.html +1 -1
  213. package/docs/types/openapi.OpenapiSchemaBase.html +1 -1
  214. package/docs/types/openapi.OpenapiSchemaBody.html +1 -1
  215. package/docs/types/openapi.OpenapiSchemaBodyShorthand.html +1 -1
  216. package/docs/types/openapi.OpenapiSchemaCombinatorFields.html +4 -0
  217. package/docs/types/openapi.OpenapiSchemaCommonFields.html +5 -1
  218. package/docs/types/openapi.OpenapiSchemaExpressionAllOf.html +1 -2
  219. package/docs/types/openapi.OpenapiSchemaExpressionAnyOf.html +1 -2
  220. package/docs/types/openapi.OpenapiSchemaExpressionOneOf.html +1 -2
  221. package/docs/types/openapi.OpenapiSchemaExpressionRef.html +2 -2
  222. package/docs/types/openapi.OpenapiSchemaExpressionRefSchemaShorthand.html +2 -2
  223. package/docs/types/openapi.OpenapiSchemaInteger.html +1 -1
  224. package/docs/types/openapi.OpenapiSchemaNull.html +4 -2
  225. package/docs/types/openapi.OpenapiSchemaNumber.html +1 -1
  226. package/docs/types/openapi.OpenapiSchemaObject.html +1 -1
  227. package/docs/types/openapi.OpenapiSchemaObjectAllOf.html +5 -1
  228. package/docs/types/openapi.OpenapiSchemaObjectAllOfShorthand.html +2 -1
  229. package/docs/types/openapi.OpenapiSchemaObjectBase.html +1 -1
  230. package/docs/types/openapi.OpenapiSchemaObjectBaseShorthand.html +1 -1
  231. package/docs/types/openapi.OpenapiSchemaObjectShorthand.html +1 -1
  232. package/docs/types/openapi.OpenapiSchemaPrimitiveGeneric.html +1 -1
  233. package/docs/types/openapi.OpenapiSchemaShorthandExpressionAllOf.html +1 -2
  234. package/docs/types/openapi.OpenapiSchemaShorthandExpressionAnyOf.html +1 -2
  235. package/docs/types/openapi.OpenapiSchemaShorthandExpressionOneOf.html +1 -2
  236. package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializableRef.html +2 -2
  237. package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializerRef.html +2 -2
  238. package/docs/types/openapi.OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
  239. package/docs/types/openapi.OpenapiSchemaString.html +1 -1
  240. package/docs/types/openapi.OpenapiShorthandAllTypes.html +1 -1
  241. package/docs/types/openapi.OpenapiShorthandPrimitiveBaseTypes.html +1 -1
  242. package/docs/types/openapi.OpenapiShorthandPrimitiveTypes.html +1 -1
  243. package/docs/types/openapi.OpenapiTypeField.html +1 -1
  244. package/docs/types/system.DreamAppAllowedPackageManagersEnum.html +1 -1
  245. package/docs/types/types.CalendarDateDurationUnit.html +1 -1
  246. package/docs/types/types.CalendarDateObject.html +1 -1
  247. package/docs/types/types.Camelized.html +1 -1
  248. package/docs/types/types.ClockTimeObject.html +1 -1
  249. package/docs/types/types.DbConnectionType.html +1 -1
  250. package/docs/types/types.DbTypes.html +1 -1
  251. package/docs/types/types.DreamAssociationMetadata.html +1 -1
  252. package/docs/types/types.DreamAttributes.html +1 -1
  253. package/docs/types/types.DreamClassAssociationAndStatement.html +1 -1
  254. package/docs/types/types.DreamClassColumn.html +1 -1
  255. package/docs/types/types.DreamColumn.html +1 -1
  256. package/docs/types/types.DreamColumnNames.html +1 -1
  257. package/docs/types/types.DreamLogLevel.html +1 -1
  258. package/docs/types/types.DreamLogger.html +2 -2
  259. package/docs/types/types.DreamModelSerializerType.html +1 -1
  260. package/docs/types/types.DreamOrViewModelClassSerializerKey.html +1 -1
  261. package/docs/types/types.DreamOrViewModelSerializerKey.html +1 -1
  262. package/docs/types/types.DreamParamSafeAttributes.html +1 -1
  263. package/docs/types/types.DreamParamSafeColumnNames.html +1 -1
  264. package/docs/types/types.DreamSerializable.html +1 -1
  265. package/docs/types/types.DreamSerializableArray.html +1 -1
  266. package/docs/types/types.DreamSerializerKey.html +1 -1
  267. package/docs/types/types.DreamSerializers.html +1 -1
  268. package/docs/types/types.DreamVirtualColumns.html +1 -1
  269. package/docs/types/types.DurationUnit.html +1 -1
  270. package/docs/types/types.EncryptAlgorithm.html +1 -1
  271. package/docs/types/types.HasManyStatement.html +1 -1
  272. package/docs/types/types.HasOneStatement.html +1 -1
  273. package/docs/types/types.Hyphenized.html +1 -1
  274. package/docs/types/types.Pascalized.html +1 -1
  275. package/docs/types/types.PrimaryKeyType.html +1 -1
  276. package/docs/types/types.RoundingPrecision.html +1 -1
  277. package/docs/types/types.SerializerCasing.html +1 -1
  278. package/docs/types/types.SimpleObjectSerializerType.html +1 -1
  279. package/docs/types/types.Snakeified.html +1 -1
  280. package/docs/types/types.StrictInterface.html +1 -1
  281. package/docs/types/types.UpdateableAssociationProperties.html +1 -1
  282. package/docs/types/types.UpdateableProperties.html +1 -1
  283. package/docs/types/types.ValidationType.html +1 -1
  284. package/docs/types/types.ViewModel.html +2 -2
  285. package/docs/types/types.ViewModelClass.html +1 -1
  286. package/docs/types/types.WeekdayName.html +1 -1
  287. package/docs/types/types.WhereStatementForDream.html +1 -1
  288. package/docs/types/types.WhereStatementForDreamClass.html +1 -1
  289. package/docs/variables/index.DreamConst.html +1 -1
  290. package/docs/variables/index.ops.html +1 -1
  291. package/docs/variables/openapi.openapiPrimitiveTypes.html +1 -1
  292. package/docs/variables/openapi.openapiShorthandPrimitiveTypes.html +1 -1
  293. package/docs/variables/system.DreamAppAllowedPackageManagersEnumValues.html +1 -1
  294. package/docs/variables/system.primaryKeyTypes.html +1 -1
  295. package/package.json +1 -1
  296. package/dist/cjs/src/serializer/helpers/serializerForAssociatedClass.js +0 -37
  297. package/dist/esm/src/serializer/helpers/serializerForAssociatedClass.js +0 -37
  298. package/dist/types/src/serializer/helpers/serializerForAssociatedClass.d.ts +0 -9
  299. package/docs/types/openapi.OpenapiSchemaObjectAnyOf.html +0 -1
  300. package/docs/types/openapi.OpenapiSchemaObjectAnyOfShorthand.html +0 -1
  301. package/docs/types/openapi.OpenapiSchemaObjectOneOf.html +0 -1
  302. package/docs/types/openapi.OpenapiSchemaObjectOneOfShorthand.html +0 -1
@@ -32,17 +32,17 @@ export type OpenapiSchemaBase =
32
32
  | OpenapiSchemaNull
33
33
  | OpenapiSchemaExpressionRef
34
34
 
35
- export type OpenapiSchemaShorthandExpressionAnyOf = {
35
+ export type OpenapiSchemaShorthandExpressionAnyOf = OpenapiSchemaCombinatorFields<{
36
36
  anyOf: OpenapiSchemaBodyShorthand[]
37
- }
37
+ }>
38
38
 
39
- export type OpenapiSchemaShorthandExpressionOneOf = {
39
+ export type OpenapiSchemaShorthandExpressionOneOf = OpenapiSchemaCombinatorFields<{
40
40
  oneOf: OpenapiSchemaBodyShorthand[]
41
- }
41
+ }>
42
42
 
43
- export type OpenapiSchemaShorthandExpressionAllOf = {
43
+ export type OpenapiSchemaShorthandExpressionAllOf = OpenapiSchemaCombinatorFields<{
44
44
  allOf: OpenapiSchemaBodyShorthand[]
45
- }
45
+ }>
46
46
 
47
47
  export type OpenapiSchemaShorthandExpressionSerializerRef = {
48
48
  $serializer: DreamModelSerializerType | SimpleObjectSerializerType
@@ -66,21 +66,40 @@ export type OpenapiSchemaExpressionRefSchemaShorthand = {
66
66
  $schema: string
67
67
  }
68
68
 
69
- export type OpenapiSchemaExpressionAllOf = {
69
+ export type OpenapiSchemaExpressionAllOf = OpenapiSchemaCombinatorFields<{
70
70
  allOf: OpenapiSchemaBody[]
71
- }
71
+ }>
72
72
 
73
- export type OpenapiSchemaExpressionAnyOf = {
73
+ export type OpenapiSchemaExpressionAnyOf = OpenapiSchemaCombinatorFields<{
74
74
  anyOf: OpenapiSchemaBody[]
75
- }
75
+ }>
76
76
 
77
- export type OpenapiSchemaExpressionOneOf = {
77
+ export type OpenapiSchemaExpressionOneOf = OpenapiSchemaCombinatorFields<{
78
78
  oneOf: OpenapiSchemaBody[]
79
- }
79
+ }>
80
80
 
81
+ /**
82
+ * The fields of a schema that declares a `type`. `anyOf` and `oneOf` are not
83
+ * among them: they apply to every value, `null` included, so a nullable `type`
84
+ * beside one cannot admit `null`. A schema that may be null lists a
85
+ * `{ type: 'null' }` branch in its `anyOf` or `oneOf` instead.
86
+ */
81
87
  export type OpenapiSchemaCommonFields<T> = T & {
82
88
  description?: string
83
89
  summary?: string
90
+ anyOf?: never
91
+ oneOf?: never
92
+ }
93
+
94
+ /**
95
+ * The fields of a schema that is an `allOf`, `anyOf` or `oneOf`: the
96
+ * combinator and the fields that describe it, but no `type` (see
97
+ * `OpenapiSchemaCommonFields`).
98
+ */
99
+ export type OpenapiSchemaCombinatorFields<T> = T & {
100
+ description?: string
101
+ summary?: string
102
+ type?: never
84
103
  }
85
104
 
86
105
  export type OpenapiSchemaString = OpenapiSchemaCommonFields<{
@@ -108,15 +127,13 @@ export type OpenapiSchemaNumber = OpenapiSchemaCommonFields<{
108
127
 
109
128
  export type OpenapiSchemaNull = {
110
129
  type: 'null'
130
+ anyOf?: never
131
+ oneOf?: never
111
132
  }
112
133
 
113
134
  export type OpenapiNumberFormats = 'decimal' | 'double'
114
135
 
115
- export type OpenapiSchemaObject =
116
- | OpenapiSchemaObjectBase
117
- | OpenapiSchemaObjectOneOf
118
- | OpenapiSchemaObjectAnyOf
119
- | OpenapiSchemaObjectAllOf
136
+ export type OpenapiSchemaObject = OpenapiSchemaObjectBase | OpenapiSchemaObjectAllOf
120
137
 
121
138
  export type OpenapiSchemaObjectBase = CommonOpenapiSchemaObjectFields<{
122
139
  minProperties?: number
@@ -132,24 +149,23 @@ export type OpenapiSchemaObjectBase = CommonOpenapiSchemaObjectFields<{
132
149
  | OpenapiSchemaExpressionAnyOf
133
150
  | OpenapiSchemaExpressionAllOf
134
151
  | false
152
+ allOf?: never
135
153
  }>
136
154
 
137
- export type OpenapiSchemaObjectOneOf = CommonOpenapiSchemaObjectFields<{
138
- oneOf?: OpenapiSchemaBody[]
139
- }>
140
-
141
- export type OpenapiSchemaObjectAnyOf = CommonOpenapiSchemaObjectFields<{
142
- anyOf?: OpenapiSchemaBody[]
143
- }>
144
-
145
- export type OpenapiSchemaObjectAllOf = CommonOpenapiSchemaObjectFields<{
155
+ /**
156
+ * An object schema that is also an `allOf`. Its `type` cannot be nullable:
157
+ * `allOf` applies to every value, so `null` would have to match each of its
158
+ * object members. A schema that may be null is an `anyOf` or `oneOf` with a
159
+ * `{ type: 'null' }` branch.
160
+ */
161
+ export type OpenapiSchemaObjectAllOf = OpenapiSchemaCommonFields<{
162
+ type: 'object'
163
+ required?: string[]
146
164
  allOf?: OpenapiSchemaBody[]
147
165
  }>
148
166
 
149
167
  export type OpenapiSchemaObjectShorthand =
150
168
  | OpenapiSchemaObjectBaseShorthand
151
- | OpenapiSchemaObjectOneOfShorthand
152
- | OpenapiSchemaObjectAnyOfShorthand
153
169
  | OpenapiSchemaObjectAllOfShorthand
154
170
 
155
171
  export type OpenapiSchemaObjectBaseShorthand = CommonOpenapiSchemaObjectFields<{
@@ -171,17 +187,15 @@ export type OpenapiSchemaObjectBaseShorthand = CommonOpenapiSchemaObjectFields<{
171
187
  | OpenapiSchemaShorthandExpressionSerializerRef
172
188
  | OpenapiSchemaShorthandExpressionSerializableRef
173
189
  | false
190
+ allOf?: never
174
191
  }>
175
192
 
176
- export type OpenapiSchemaObjectOneOfShorthand = CommonOpenapiSchemaObjectFields<{
177
- oneOf?: OpenapiSchemaBodyShorthand[]
178
- }>
179
-
180
- export type OpenapiSchemaObjectAnyOfShorthand = CommonOpenapiSchemaObjectFields<{
181
- anyOf?: OpenapiSchemaBodyShorthand[]
182
- }>
183
-
184
- export type OpenapiSchemaObjectAllOfShorthand = CommonOpenapiSchemaObjectFields<{
193
+ /**
194
+ * The shorthand form of `OpenapiSchemaObjectAllOf`.
195
+ */
196
+ export type OpenapiSchemaObjectAllOfShorthand = OpenapiSchemaCommonFields<{
197
+ type: 'object'
198
+ required?: string[]
185
199
  allOf?: OpenapiSchemaBodyShorthand[]
186
200
  }>
187
201
 
@@ -2,7 +2,13 @@ import Dream from '../Dream.js'
2
2
  import { RoundingPrecision } from '../helpers/round.js'
3
3
  import DreamSerializerBuilder from '../serializer/builders/DreamSerializerBuilder.js'
4
4
  import ObjectSerializerBuilder from '../serializer/builders/ObjectSerializerBuilder.js'
5
- import { DreamSerializable, DreamSerializableArray, ViewModelClass } from './dream.js'
5
+ import {
6
+ DreamSerializable,
7
+ DreamSerializableArray,
8
+ DreamVirtualColumns,
9
+ NonJsonDreamColumnNames,
10
+ ViewModelClass,
11
+ } from './dream.js'
6
12
  import { OpenapiDescription, OpenapiSchemaBodyShorthand, OpenapiShorthandPrimitiveTypes } from './openapi.js'
7
13
 
8
14
  export type SerializerCasing = 'camel' | 'snake'
@@ -32,7 +38,11 @@ export interface InternalAnyTypedSerializerCustomAttribute {
32
38
  type: 'customAttribute'
33
39
  name: string
34
40
  fn: (x?: any, y?: any) => any
35
- options: Omit<NonAutomaticSerializerAttributeOptions, 'as'> & { flatten?: boolean }
41
+ options: {
42
+ openapi: CustomAttributeOpenapi
43
+ required?: false
44
+ flatten?: boolean
45
+ }
36
46
  }
37
47
 
38
48
  export interface InternalAnyRendersOneOrManyOpts {
@@ -143,6 +153,56 @@ export type NonAutomaticSerializerAttributeOptionsWithPossibleDecimalRenderOptio
143
153
  precision?: RoundingPrecision
144
154
  }
145
155
 
156
+ /**
157
+ * The options argument of `DreamSerializer#delegatedAttribute`. A Dream model's non-json
158
+ * column infers its OpenAPI shape, so its `openapi` takes only a description and the
159
+ * argument may be left out. A json/jsonb column or a non-Dream target has no shape to
160
+ * infer, so the argument is required and its `openapi` takes a full shape.
161
+ */
162
+ export type DelegatedAttributeOptionsArgs<AssociatedModelType, TargetAttributeName> =
163
+ DelegatedAttributeOptions<AssociatedModelType, TargetAttributeName> extends infer Options
164
+ ? Partial<Options> extends Options
165
+ ? [options?: Options]
166
+ : [options: Options]
167
+ : never
168
+
169
+ type DelegatedAttributeOptions<AssociatedModelType, TargetAttributeName> = AssociatedModelType extends Dream
170
+ ? TargetAttributeName extends NonJsonDreamColumnNames<AssociatedModelType> &
171
+ keyof AssociatedModelType &
172
+ 'type'
173
+ ? AutomaticSerializerAttributeOptionsForType & {
174
+ optional?: boolean
175
+ required?: false
176
+ }
177
+ : TargetAttributeName extends DreamVirtualColumns<AssociatedModelType>[number]
178
+ ? SerializerAttributeOptionsForVirtualColumn & { optional?: boolean }
179
+ : TargetAttributeName extends NonJsonDreamColumnNames<AssociatedModelType> &
180
+ keyof AssociatedModelType &
181
+ string
182
+ ? AutomaticSerializerAttributeOptions & { optional?: boolean }
183
+ : NonAutomaticSerializerAttributeOptionsWithPossibleDecimalRenderOption & {
184
+ optional?: boolean
185
+ }
186
+ : NonAutomaticSerializerAttributeOptionsWithPossibleDecimalRenderOption & { optional?: boolean }
187
+
188
+ type CustomAttributeOpenapi = OpenapiSchemaBodyShorthand | OpenapiShorthandPrimitiveTypes
189
+
190
+ /**
191
+ * The options of `customAttribute`. The callback's return value renders as is, so there is
192
+ * no `as`, `default` or `precision`. With `flatten: true`, `openapi` may be anything but a
193
+ * serializer ref with `many: true`: flattening spreads one object's properties into the
194
+ * parent, and a list has none to spread.
195
+ */
196
+ export type CustomAttributeOptions =
197
+ | { openapi: CustomAttributeOpenapi; required?: false; flatten?: false }
198
+ | { openapi: OpenapiForFlattening<CustomAttributeOpenapi>; required?: false; flatten: true }
199
+
200
+ type OpenapiForFlattening<Openapi> = Openapi extends unknown
201
+ ? 'many' extends keyof Openapi
202
+ ? Omit<Openapi, 'many'> & { many?: false }
203
+ : Openapi
204
+ : never
205
+
146
206
  export type DreamModelSerializerType = (data: any, passthroughData?: any) => DreamSerializerBuilder<any, any>
147
207
 
148
208
  export type SimpleObjectSerializerType = (
@@ -27,6 +27,46 @@ type IS_ASSOCIATION_NAME = 'association_name'
27
27
  type IS_NOT_ASSOCIATION_NAME = 'not_association_name'
28
28
  type RecursionTypes = 'load' | 'leftJoinLoad' | 'join'
29
29
 
30
+ /**
31
+ * The keys of a condition object that a chain argument does not
32
+ * accept: anything other than `and`, `andNot` and `andAny`. Association
33
+ * names, arrays and non-objects yield `never`. Index-signature keys
34
+ * (`string`, `number`) yield `never` too, since they name no key the
35
+ * checker can reject; the runtime check covers those values.
36
+ */
37
+ type StrayConditionKeys<T> = T extends string | readonly unknown[]
38
+ ? never
39
+ : T extends object
40
+ ? StrayConditionKey<keyof T>
41
+ : never
42
+ type StrayConditionKey<K> = K extends 'and' | 'andNot' | 'andAny'
43
+ ? never
44
+ : string extends K
45
+ ? never
46
+ : number extends K
47
+ ? never
48
+ : K
49
+
50
+ declare const onlyConditionKeys: unique symbol
51
+
52
+ /**
53
+ * The join variants infer their final argument as a `const LastArg` type
54
+ * parameter (it drives the joined-associations return type), so the
55
+ * argument is checked against its own inferred type and an extra key on
56
+ * an object literal escapes the excess-property check. Given the inferred
57
+ * `LastArg`, this narrows the object members of `Allowed` to a shape no
58
+ * value carries whenever `LastArg` has a key other than `and`, `andNot`
59
+ * or `andAny`: the inferred type then fails its constraint, TypeScript
60
+ * falls back to the constraint, and an object literal gets the ordinary
61
+ * excess-property error at the stray key.
62
+ */
63
+ type WithoutStrayConditionKeys<LastArg, Allowed> = [StrayConditionKeys<LastArg>] extends [never]
64
+ ? Allowed
65
+ :
66
+ | Exclude<Allowed, object>
67
+ | Extract<Allowed, readonly unknown[]>
68
+ | (Exclude<Extract<Allowed, object>, readonly unknown[]> & { [onlyConditionKeys]: never })
69
+
30
70
  /**
31
71
  * Given a union of table names and an association name, returns the
32
72
  * specific table(s) from the union that have that association defined.
@@ -82,6 +122,9 @@ export type VariadicLeftJoinLoadArgs<
82
122
  Schema,
83
123
  ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB,
84
124
  ConcreteArgs extends readonly unknown[],
125
+ // the final argument, when the caller infers it as a type parameter
126
+ // (see WithoutStrayConditionKeys)
127
+ LastArg = never,
85
128
  //
86
129
  SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]],
87
130
  // joining a polymorphic BelongsTo raises CannotJoinPolymorphicBelongsToError
@@ -93,23 +136,26 @@ export type VariadicLeftJoinLoadArgs<
93
136
  AliasedSchemaAssociation<Schema, ConcreteTableName>,
94
137
  `${PolymorphicBelongsToNames & string} as ${string}`
95
138
  >,
96
- > = VariadicCheckThenRecurse<
97
- I,
98
- DB,
99
- Schema,
100
- ConcreteTableName,
101
- ConcreteArgs,
102
- 'leftJoinLoad',
103
- // Dream configures Kysely to use camel case in Typescript land and
104
- // convert to snake case in SQL; however, Dream reference snake-cased table names.
105
- // Without camelizing, the table name of the starting model could conflict with the
106
- // snake-cased version of an association name. By camelizing the table that goes
107
- // into the UsedNamespaces, we prevent this from happeing at the type level.
108
- Camelized<ConcreteTableName>,
109
- 0,
110
- null,
111
- never,
112
- AllowedNextArgValues | Readonly<AllowedNextArgValues[]>
139
+ > = WithoutStrayConditionKeys<
140
+ LastArg,
141
+ VariadicCheckThenRecurse<
142
+ I,
143
+ DB,
144
+ Schema,
145
+ ConcreteTableName,
146
+ ConcreteArgs,
147
+ 'leftJoinLoad',
148
+ // Dream configures Kysely to use camel case in Typescript land and
149
+ // convert to snake case in SQL; however, Dream reference snake-cased table names.
150
+ // Without camelizing, the table name of the starting model could conflict with the
151
+ // snake-cased version of an association name. By camelizing the table that goes
152
+ // into the UsedNamespaces, we prevent this from happeing at the type level.
153
+ Camelized<ConcreteTableName>,
154
+ 0,
155
+ null,
156
+ never,
157
+ AllowedNextArgValues | Readonly<AllowedNextArgValues[]>
158
+ >
113
159
  >
114
160
  ///////////////////////////////
115
161
  // end:VARIADIC LEFT JOIN LOAD
@@ -123,6 +169,9 @@ export type VariadicJoinsArgs<
123
169
  Schema,
124
170
  ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB,
125
171
  ConcreteArgs extends readonly unknown[],
172
+ // the final argument, when the caller infers it as a type parameter
173
+ // (see WithoutStrayConditionKeys)
174
+ LastArg = never,
126
175
  //
127
176
  SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]],
128
177
  // joining a polymorphic BelongsTo raises CannotJoinPolymorphicBelongsToError
@@ -134,23 +183,26 @@ export type VariadicJoinsArgs<
134
183
  AliasedSchemaAssociation<Schema, ConcreteTableName>,
135
184
  `${PolymorphicBelongsToNames & string} as ${string}`
136
185
  >,
137
- > = VariadicCheckThenRecurse<
138
- I,
139
- DB,
140
- Schema,
141
- ConcreteTableName,
142
- ConcreteArgs,
143
- 'join',
144
- // Dream configures Kysely to use camel case in Typescript land and
145
- // convert to snake case in SQL; however, Dream reference snake-cased table names.
146
- // Without camelizing, the table name of the starting model could conflict with the
147
- // snake-cased version of an association name. By camelizing the table that goes
148
- // into the UsedNamespaces, we prevent this from happeing at the type level.
149
- Camelized<ConcreteTableName>,
150
- 0,
151
- null,
152
- never,
153
- AllowedNextArgValues
186
+ > = WithoutStrayConditionKeys<
187
+ LastArg,
188
+ VariadicCheckThenRecurse<
189
+ I,
190
+ DB,
191
+ Schema,
192
+ ConcreteTableName,
193
+ ConcreteArgs,
194
+ 'join',
195
+ // Dream configures Kysely to use camel case in Typescript land and
196
+ // convert to snake case in SQL; however, Dream reference snake-cased table names.
197
+ // Without camelizing, the table name of the starting model could conflict with the
198
+ // snake-cased version of an association name. By camelizing the table that goes
199
+ // into the UsedNamespaces, we prevent this from happeing at the type level.
200
+ Camelized<ConcreteTableName>,
201
+ 0,
202
+ null,
203
+ never,
204
+ AllowedNextArgValues
205
+ >
154
206
  >
155
207
  ///////////////////////////////
156
208
  // end: VARIADIC JOINS
@@ -222,15 +274,19 @@ type VariadicCheckThenRecurse<
222
274
  ConcreteTableName,
223
275
  RequiredOnClauseKeys<Schema, PreviousConcreteTableName, ConcreteAssociationName>
224
276
  >
225
- ? RecursionType extends 'join'
226
- ? VALID
227
- : IsNonOptionalBelongsToAssociation<
228
- Schema,
229
- PreviousConcreteTableName,
230
- ConcreteAssociationName
231
- > extends true
232
- ? INVALID_CONSTRAINT_ON_REQUIRED_BELONGS_TO
233
- : VALID
277
+ ? // `extends` is structural, so it accepts extra keys alongside a
278
+ // valid one; a condition accepts only and/andNot/andAny
279
+ [StrayConditionKeys<ConcreteArgs[0]>] extends [never]
280
+ ? RecursionType extends 'join'
281
+ ? VALID
282
+ : IsNonOptionalBelongsToAssociation<
283
+ Schema,
284
+ PreviousConcreteTableName,
285
+ ConcreteAssociationName
286
+ > extends true
287
+ ? INVALID_CONSTRAINT_ON_REQUIRED_BELONGS_TO
288
+ : VALID
289
+ : INVALID
234
290
  : INVALID,
235
291
  > = NthArgument extends INVALID_NON_TERMINAL_ARRAY
236
292
  ? `an array of association names is only allowed as the final argument (argument ${Inc<Depth>})`
@@ -13,6 +13,30 @@ type IS_ASSOCIATION_ALIAS = 'association_alias';
13
13
  type IS_ASSOCIATION_NAME = 'association_name';
14
14
  type IS_NOT_ASSOCIATION_NAME = 'not_association_name';
15
15
  type RecursionTypes = 'load' | 'leftJoinLoad' | 'join';
16
+ /**
17
+ * The keys of a condition object that a chain argument does not
18
+ * accept: anything other than `and`, `andNot` and `andAny`. Association
19
+ * names, arrays and non-objects yield `never`. Index-signature keys
20
+ * (`string`, `number`) yield `never` too, since they name no key the
21
+ * checker can reject; the runtime check covers those values.
22
+ */
23
+ type StrayConditionKeys<T> = T extends string | readonly unknown[] ? never : T extends object ? StrayConditionKey<keyof T> : never;
24
+ type StrayConditionKey<K> = K extends 'and' | 'andNot' | 'andAny' ? never : string extends K ? never : number extends K ? never : K;
25
+ declare const onlyConditionKeys: unique symbol;
26
+ /**
27
+ * The join variants infer their final argument as a `const LastArg` type
28
+ * parameter (it drives the joined-associations return type), so the
29
+ * argument is checked against its own inferred type and an extra key on
30
+ * an object literal escapes the excess-property check. Given the inferred
31
+ * `LastArg`, this narrows the object members of `Allowed` to a shape no
32
+ * value carries whenever `LastArg` has a key other than `and`, `andNot`
33
+ * or `andAny`: the inferred type then fails its constraint, TypeScript
34
+ * falls back to the constraint, and an object literal gets the ordinary
35
+ * excess-property error at the stray key.
36
+ */
37
+ type WithoutStrayConditionKeys<LastArg, Allowed> = [StrayConditionKeys<LastArg>] extends [never] ? Allowed : Exclude<Allowed, object> | Extract<Allowed, readonly unknown[]> | (Exclude<Extract<Allowed, object>, readonly unknown[]> & {
38
+ [onlyConditionKeys]: never;
39
+ });
16
40
  /**
17
41
  * Given a union of table names and an association name, returns the
18
42
  * specific table(s) from the union that have that association defined.
@@ -21,9 +45,11 @@ type RecursionTypes = 'load' | 'leftJoinLoad' | 'join';
21
45
  */
22
46
  type TableContainingAssociationInUnion<Schema, TableNamesUnion, AssociationName> = TableNamesUnion extends keyof Schema ? AssociationName extends keyof Schema[TableNamesUnion]['associations' & keyof Schema[TableNamesUnion]] ? TableNamesUnion : never : never;
23
47
  export type VariadicLoadArgs<I extends Dream, DB, Schema, ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, ConcreteArgs extends readonly unknown[], SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]], AllowedNextArgValues = (keyof SchemaAssociations & string) | AliasedSchemaAssociation<Schema, ConcreteTableName>> = VariadicCheckThenRecurse<I, DB, Schema, ConcreteTableName, ConcreteArgs, 'load', never, 0, null, never, AllowedNextArgValues | Readonly<AllowedNextArgValues[]>>;
24
- export type VariadicLeftJoinLoadArgs<I extends Dream, DB, Schema, ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, ConcreteArgs extends readonly unknown[], SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]], PolymorphicBelongsToNames = PolymorphicBelongsToAssociationNames<Schema, ConcreteTableName>, AllowedNextArgValues = Exclude<keyof SchemaAssociations & string, PolymorphicBelongsToNames> | Exclude<AliasedSchemaAssociation<Schema, ConcreteTableName>, `${PolymorphicBelongsToNames & string} as ${string}`>> = VariadicCheckThenRecurse<I, DB, Schema, ConcreteTableName, ConcreteArgs, 'leftJoinLoad', Camelized<ConcreteTableName>, 0, null, never, AllowedNextArgValues | Readonly<AllowedNextArgValues[]>>;
25
- export type VariadicJoinsArgs<I extends Dream, DB, Schema, ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, ConcreteArgs extends readonly unknown[], SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]], PolymorphicBelongsToNames = PolymorphicBelongsToAssociationNames<Schema, ConcreteTableName>, AllowedNextArgValues = Exclude<keyof SchemaAssociations & string, PolymorphicBelongsToNames> | Exclude<AliasedSchemaAssociation<Schema, ConcreteTableName>, `${PolymorphicBelongsToNames & string} as ${string}`>> = VariadicCheckThenRecurse<I, DB, Schema, ConcreteTableName, ConcreteArgs, 'join', Camelized<ConcreteTableName>, 0, null, never, AllowedNextArgValues>;
26
- type VariadicCheckThenRecurse<I extends Dream, DB, Schema, ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, ConcreteArgs extends readonly unknown[], RecursionType extends RecursionTypes, UsedNamespaces, Depth extends number, PreviousConcreteTableName, ConcreteAssociationName, AssociationNamesOrOnClause, LastDream extends Dream = I, SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]], AllowedNamesForNthArg = PreviousConcreteTableName extends keyof Schema ? AssociationNamesForAssociation<Schema, PreviousConcreteTableName, ConcreteAssociationName> : keyof SchemaAssociations & string, UnaliasedNthArg = ConcreteArgs[0] extends `${infer AssociationName extends string} as ${string}` ? AssociationName : ConcreteArgs[0], NthArgumentNamespace = ConcreteArgs[0] extends `${string} as ${infer Alias extends string}` ? Alias : ConcreteArgs[0], NthArgument extends VALID | INVALID | INVALID_NON_TERMINAL_ARRAY | INVALID_NAMESPACE_REUSE | INVALID_POLYMORPHIC_BELONGS_TO_JOIN | INVALID_CONSTRAINT_ON_REQUIRED_BELONGS_TO = ConcreteArgs['length'] extends 0 ? VALID : ConcreteArgs[0] extends (keyof SchemaAssociations & string) | AliasedSchemaAssociation<Schema, ConcreteTableName> | AllowedNamesForNthArg ? RecursionType extends 'load' ? VALID : NthArgumentNamespace extends UsedNamespaces ? INVALID_NAMESPACE_REUSE : IsPolymorphicBelongsToAssociation<Schema, ConcreteTableName, UnaliasedNthArg> extends true ? INVALID_POLYMORPHIC_BELONGS_TO_JOIN : VALID : ConcreteArgs[0] extends readonly unknown[] ? INVALID_NON_TERMINAL_ARRAY : ConcreteArgs[0] extends JoinAndStatements<LastDream, DB, Schema, ConcreteTableName, RequiredOnClauseKeys<Schema, PreviousConcreteTableName, ConcreteAssociationName>> ? RecursionType extends 'join' ? VALID : IsNonOptionalBelongsToAssociation<Schema, PreviousConcreteTableName, ConcreteAssociationName> extends true ? INVALID_CONSTRAINT_ON_REQUIRED_BELONGS_TO : VALID : INVALID> = NthArgument extends INVALID_NON_TERMINAL_ARRAY ? `an array of association names is only allowed as the final argument (argument ${Inc<Depth>})` : NthArgument extends INVALID_NAMESPACE_REUSE ? `association name or alias already used earlier in this chain (argument ${Inc<Depth>})` : NthArgument extends INVALID_POLYMORPHIC_BELONGS_TO_JOIN ? `cannot join a polymorphic BelongsTo association (argument ${Inc<Depth>})` : NthArgument extends INVALID_CONSTRAINT_ON_REQUIRED_BELONGS_TO ? `${CannotConstrainRequiredBelongsTo} (argument ${Inc<Depth>})` : NthArgument extends INVALID ? `invalid where clause in argument ${Inc<Depth>}` : ConcreteArgs['length'] extends 0 ? AssociationNamesOrOnClause : VariadicRecurse<I, DB, Schema, ConcreteTableName, ConcreteArgs, RecursionType, UsedNamespaces, Depth, PreviousConcreteTableName, ConcreteAssociationName, LastDream>;
48
+ export type VariadicLeftJoinLoadArgs<I extends Dream, DB, Schema, ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, ConcreteArgs extends readonly unknown[], LastArg = never, SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]], PolymorphicBelongsToNames = PolymorphicBelongsToAssociationNames<Schema, ConcreteTableName>, AllowedNextArgValues = Exclude<keyof SchemaAssociations & string, PolymorphicBelongsToNames> | Exclude<AliasedSchemaAssociation<Schema, ConcreteTableName>, `${PolymorphicBelongsToNames & string} as ${string}`>> = WithoutStrayConditionKeys<LastArg, VariadicCheckThenRecurse<I, DB, Schema, ConcreteTableName, ConcreteArgs, 'leftJoinLoad', Camelized<ConcreteTableName>, 0, null, never, AllowedNextArgValues | Readonly<AllowedNextArgValues[]>>>;
49
+ export type VariadicJoinsArgs<I extends Dream, DB, Schema, ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, ConcreteArgs extends readonly unknown[], LastArg = never, SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]], PolymorphicBelongsToNames = PolymorphicBelongsToAssociationNames<Schema, ConcreteTableName>, AllowedNextArgValues = Exclude<keyof SchemaAssociations & string, PolymorphicBelongsToNames> | Exclude<AliasedSchemaAssociation<Schema, ConcreteTableName>, `${PolymorphicBelongsToNames & string} as ${string}`>> = WithoutStrayConditionKeys<LastArg, VariadicCheckThenRecurse<I, DB, Schema, ConcreteTableName, ConcreteArgs, 'join', Camelized<ConcreteTableName>, 0, null, never, AllowedNextArgValues>>;
50
+ type VariadicCheckThenRecurse<I extends Dream, DB, Schema, ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, ConcreteArgs extends readonly unknown[], RecursionType extends RecursionTypes, UsedNamespaces, Depth extends number, PreviousConcreteTableName, ConcreteAssociationName, AssociationNamesOrOnClause, LastDream extends Dream = I, SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]], AllowedNamesForNthArg = PreviousConcreteTableName extends keyof Schema ? AssociationNamesForAssociation<Schema, PreviousConcreteTableName, ConcreteAssociationName> : keyof SchemaAssociations & string, UnaliasedNthArg = ConcreteArgs[0] extends `${infer AssociationName extends string} as ${string}` ? AssociationName : ConcreteArgs[0], NthArgumentNamespace = ConcreteArgs[0] extends `${string} as ${infer Alias extends string}` ? Alias : ConcreteArgs[0], NthArgument extends VALID | INVALID | INVALID_NON_TERMINAL_ARRAY | INVALID_NAMESPACE_REUSE | INVALID_POLYMORPHIC_BELONGS_TO_JOIN | INVALID_CONSTRAINT_ON_REQUIRED_BELONGS_TO = ConcreteArgs['length'] extends 0 ? VALID : ConcreteArgs[0] extends (keyof SchemaAssociations & string) | AliasedSchemaAssociation<Schema, ConcreteTableName> | AllowedNamesForNthArg ? RecursionType extends 'load' ? VALID : NthArgumentNamespace extends UsedNamespaces ? INVALID_NAMESPACE_REUSE : IsPolymorphicBelongsToAssociation<Schema, ConcreteTableName, UnaliasedNthArg> extends true ? INVALID_POLYMORPHIC_BELONGS_TO_JOIN : VALID : ConcreteArgs[0] extends readonly unknown[] ? INVALID_NON_TERMINAL_ARRAY : ConcreteArgs[0] extends JoinAndStatements<LastDream, DB, Schema, ConcreteTableName, RequiredOnClauseKeys<Schema, PreviousConcreteTableName, ConcreteAssociationName>> ? [
51
+ StrayConditionKeys<ConcreteArgs[0]>
52
+ ] extends [never] ? RecursionType extends 'join' ? VALID : IsNonOptionalBelongsToAssociation<Schema, PreviousConcreteTableName, ConcreteAssociationName> extends true ? INVALID_CONSTRAINT_ON_REQUIRED_BELONGS_TO : VALID : INVALID : INVALID> = NthArgument extends INVALID_NON_TERMINAL_ARRAY ? `an array of association names is only allowed as the final argument (argument ${Inc<Depth>})` : NthArgument extends INVALID_NAMESPACE_REUSE ? `association name or alias already used earlier in this chain (argument ${Inc<Depth>})` : NthArgument extends INVALID_POLYMORPHIC_BELONGS_TO_JOIN ? `cannot join a polymorphic BelongsTo association (argument ${Inc<Depth>})` : NthArgument extends INVALID_CONSTRAINT_ON_REQUIRED_BELONGS_TO ? `${CannotConstrainRequiredBelongsTo} (argument ${Inc<Depth>})` : NthArgument extends INVALID ? `invalid where clause in argument ${Inc<Depth>}` : ConcreteArgs['length'] extends 0 ? AssociationNamesOrOnClause : VariadicRecurse<I, DB, Schema, ConcreteTableName, ConcreteArgs, RecursionType, UsedNamespaces, Depth, PreviousConcreteTableName, ConcreteAssociationName, LastDream>;
27
53
  export type AliasedSchemaAssociation<Schema, ConcreteTableName extends keyof Schema, SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]]> = `${keyof SchemaAssociations & string} as ${string}`;
28
54
  type VariadicRecurse<I extends Dream, DB, Schema, ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, ConcreteArgs extends readonly unknown[], RecursionType extends RecursionTypes, UsedNamespaces, Depth extends number, PreviousConcreteTableName, ConcreteAssociationName, LastDream extends Dream, SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]], UnaliasedNthArg = ConcreteArgs[0] extends `${infer AssociationName extends string} as ${string}` ? AssociationName : ConcreteArgs[0], PolymorphicTableNamesUnion = PreviousConcreteTableName extends keyof Schema ? AssociationTableNamesForAssociation<Schema, PreviousConcreteTableName, ConcreteAssociationName> : ConcreteTableName, CrossPolymorphicTableForCurrentArg = UnaliasedNthArg extends string ? TableContainingAssociationInUnion<Schema, PolymorphicTableNamesUnion, UnaliasedNthArg> : never, EffectiveConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB = UnaliasedNthArg extends keyof SchemaAssociations & string ? ConcreteTableName : [CrossPolymorphicTableForCurrentArg] extends [never] ? ConcreteTableName : CrossPolymorphicTableForCurrentArg extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB ? CrossPolymorphicTableForCurrentArg : ConcreteTableName, EffectiveSchemaAssociations = Schema[EffectiveConcreteTableName]['associations' & keyof Schema[EffectiveConcreteTableName]], IsAssociationNameOrAlias extends boolean = UnaliasedNthArg extends keyof EffectiveSchemaAssociations & string ? true : false, NextUnaliasedAssociationName = IsAssociationNameOrAlias extends true ? UnaliasedNthArg & keyof EffectiveSchemaAssociations & string : never, NextAliasedAssociationName = IsAssociationNameOrAlias extends true ? ConcreteArgs[0] extends `${string} as ${infer AssociationAlias extends string}` ? AssociationAlias : NextUnaliasedAssociationName : ConcreteAssociationName, NextPreviousConcreteTableName = IsAssociationNameOrAlias extends true ? EffectiveConcreteTableName : PreviousConcreteTableName, NextUsedNamespaces = RecursionType extends 'load' ? never : IsAssociationNameOrAlias extends true ? UsedNamespaces | NextAliasedAssociationName : UsedNamespaces, NextTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB = IsAssociationNameOrAlias extends true ? AssociationTableName<Schema, EffectiveConcreteTableName, NextUnaliasedAssociationName> : ConcreteTableName, AllowedAssociationNames = IsAssociationNameOrAlias extends true ? AssociationNamesForAssociation<Schema, EffectiveConcreteTableName, NextUnaliasedAssociationName> : PreviousConcreteTableName extends keyof Schema ? AssociationNamesForAssociation<Schema, PreviousConcreteTableName, ConcreteAssociationName> : AssociationNamesForTable<Schema, ConcreteTableName>, // fall back to association names for table for root only
29
55
  CurrentRequiredOnClauseKeys = IsAssociationNameOrAlias extends true ? RequiredOnClauseKeys<Schema, EffectiveConcreteTableName, NextUnaliasedAssociationName> : RequiredOnClauseKeys<Schema, PreviousConcreteTableName, ConcreteAssociationName>, CurrentAssociationIsNonOptionalBelongsTo = IsAssociationNameOrAlias extends true ? IsNonOptionalBelongsToAssociation<Schema, EffectiveConcreteTableName, NextUnaliasedAssociationName> : IsNonOptionalBelongsToAssociation<Schema, PreviousConcreteTableName, ConcreteAssociationName>, NextDreamCandidate = IsAssociationNameOrAlias extends true ? LastDream extends Dream ? NextUnaliasedAssociationName extends keyof LastDream ? DreamAssociationNameToAssociatedModel<LastDream, NextUnaliasedAssociationName & keyof LastDream> : never : never : LastDream, NextDream extends Dream = [NextDreamCandidate] extends [never] ? LastDream : NextDreamCandidate extends Dream ? NextDreamCandidate : LastDream, NextPolymorphicBelongsToNames = RecursionType extends 'load' ? never : PolymorphicBelongsToAssociationNames<Schema, NextTableName>, JoinSafeAllowedAssociationNames = Exclude<AllowedAssociationNames, NextPolymorphicBelongsToNames | `${NextPolymorphicBelongsToNames & string} as ${string}`>, AllowedNextArgValues = RecursionType extends 'load' ? AllowedNextArgValuesForLoad<NextDream, DB, Schema, AllowedAssociationNames, NextTableName, CurrentRequiredOnClauseKeys, CurrentAssociationIsNonOptionalBelongsTo> : RecursionType extends 'leftJoinLoad' ? AllowedNextArgValuesForLeftJoinLoad<NextDream, DB, Schema, JoinSafeAllowedAssociationNames, NextTableName, CurrentRequiredOnClauseKeys, NextUsedNamespaces, CurrentAssociationIsNonOptionalBelongsTo> : RecursionType extends 'join' ? AllowedNextArgValuesForJoin<NextDream, DB, Schema, JoinSafeAllowedAssociationNames, NextTableName, CurrentRequiredOnClauseKeys, NextUsedNamespaces> : never> = Depth extends MAX_VARIADIC_DEPTH ? never : VariadicCheckThenRecurse<I, DB, Schema, NextTableName, ReadonlyTail<ConcreteArgs>, RecursionType, NextUsedNamespaces, Inc<Depth>, NextPreviousConcreteTableName, [
@@ -1 +1 @@
1
- window.hierarchyData = "eJyVk8FOAjEQht9lzgUpCwvboxATY0RNjB4Ih7I7uA3dlnS6mA3h3U3lsiK65dR2Mv/8X6fTAzhrPYFY8nQ8YZzzFQOHG425V9YQiANwzsNiZIUg4KVG18yd2qO7lYTAYKtMAYIPpwxqp0FAriUR0k2x7p9l90tfaWCnDBDgqegFee8UYJCXShcODYhlMhitjgySwajl/tAQ6qZVtcP/V/41BDxJpgEhrC2GZ0v+wyHFU1xQdHAE13TY7vusxHw7s4a8k8r4N2W1DE/0nzU6Zx31/5LGMCRZm8HqujJPe3QbbT9jnH8IYvzGk5bfXHp5b3Jb7aRXa43vypchtpaEdwp1EYHQWeOqiUiHnIWmMJ5OUsbT7HtGw+EM+7XZ4en2YfeoqJI+LyN5L4tj2pe1P8vC+kWt9TWjci7p8jwevwDboG8X"
1
+ window.hierarchyData = "eJyVklFPwjAQx7/LPVf0GGxjj0JMjBE1MfpAeCjb4Rq6lrQdZiF8d1N5qYiuPLVp7t/fr9fbg9HaWSgWmE5yhohLBobWkkontLJQ7AER/aJ4Q1DAS0ummxmxI3PLLQGDjVAVFDjMGbRGQgGl5NaSva5Wg5PqQe0aCexYAQU4W135+NXxgEFZC1kZUlAsEhwtDwwSHAX0h86S7IJbe/i/6i8xwCSdeAW/Bg7P2roPQzbe4kyix8NT03QYUKc1lZupVtYZLpR7E1py/0X/ockYbezgr2iMQ34TOmjZNuppR2Yt9WcM+UcghjfJA96MO36vSt1suRMrSe/C1f5sxS3dCZJVhELvHRdNRJoOmW8Kwwwzhlky/h6QDLMT7dduS8fX+92jsA13ZR3pez4c0b4sGQcec+3mrZSXjMpppI95OHwBEYFvHQ=="
@@ -19,12 +19,10 @@
19
19
  --dark-hl-8: #B5CEA8;
20
20
  --light-hl-9: #267F99;
21
21
  --dark-hl-9: #4EC9B0;
22
- --light-hl-10: #CD3131;
23
- --dark-hl-10: #F44747;
24
- --light-hl-11: #000000FF;
25
- --dark-hl-11: #D4D4D4;
26
- --light-hl-12: #EE0000;
27
- --dark-hl-12: #D7BA7D;
22
+ --light-hl-10: #000000FF;
23
+ --dark-hl-10: #D4D4D4;
24
+ --light-hl-11: #EE0000;
25
+ --dark-hl-11: #D7BA7D;
28
26
  --light-code-background: #FFFFFF;
29
27
  --dark-code-background: #1E1E1E;
30
28
  }
@@ -42,7 +40,6 @@
42
40
  --hl-9: var(--light-hl-9);
43
41
  --hl-10: var(--light-hl-10);
44
42
  --hl-11: var(--light-hl-11);
45
- --hl-12: var(--light-hl-12);
46
43
  --code-background: var(--light-code-background);
47
44
  } }
48
45
 
@@ -59,7 +56,6 @@
59
56
  --hl-9: var(--dark-hl-9);
60
57
  --hl-10: var(--dark-hl-10);
61
58
  --hl-11: var(--dark-hl-11);
62
- --hl-12: var(--dark-hl-12);
63
59
  --code-background: var(--dark-code-background);
64
60
  } }
65
61
 
@@ -76,7 +72,6 @@
76
72
  --hl-9: var(--light-hl-9);
77
73
  --hl-10: var(--light-hl-10);
78
74
  --hl-11: var(--light-hl-11);
79
- --hl-12: var(--light-hl-12);
80
75
  --code-background: var(--light-code-background);
81
76
  }
82
77
 
@@ -93,7 +88,6 @@
93
88
  --hl-9: var(--dark-hl-9);
94
89
  --hl-10: var(--dark-hl-10);
95
90
  --hl-11: var(--dark-hl-11);
96
- --hl-12: var(--dark-hl-12);
97
91
  --code-background: var(--dark-code-background);
98
92
  }
99
93
 
@@ -109,5 +103,4 @@
109
103
  .hl-9 { color: var(--hl-9); }
110
104
  .hl-10 { color: var(--hl-10); }
111
105
  .hl-11 { color: var(--hl-11); }
112
- .hl-12 { color: var(--hl-12); }
113
106
  pre, code { background: var(--code-background); }
@@ -1 +1 @@
1
- window.navigationData = "eJytm01z4zYShv+LzlPZjfOxu3OTJTtRjW05lsZzSM0BIlsS1iDAAJBnNKn89xT4IQIk0ADp3FTk288LgkQTbEC//znT8FXP3s/y3ezdrCT6OHs/K0R+YqD+le++O+qCzd7NXijPZ++v3s2yI2W5BD57//sldCmBFPf0IImmgv8KrASpOlrGiFI1zat0Pb6/+u9f7y7oD2cF7PzbCeR5KekrSC92oMKQj0LpgwQVg3p0GNaSXRMFXmRPg+EyJhTMGVvuFoJzyEx/WX26P/H6kMF6tS785x8tdm7u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