@rvoh/dream 2.36.1 → 2.38.0

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 (254) hide show
  1. package/dist/cjs/src/db/dataTypes.js +0 -8
  2. package/dist/cjs/src/dream/QueryDriver/Base.js +17 -24
  3. package/dist/cjs/src/dream/QueryDriver/Kysely.js +22 -23
  4. package/dist/cjs/src/dream/QueryDriver/Postgres.js +113 -31
  5. package/dist/cjs/src/dream-app/index.js +5 -0
  6. package/dist/cjs/src/helpers/cli/ASTBuilder.js +11 -202
  7. package/dist/cjs/src/helpers/cli/ASTConnectionBuilder.js +97 -75
  8. package/dist/cjs/src/helpers/cli/ASTDbTypesBuilder.js +132 -0
  9. package/dist/cjs/src/helpers/cli/ASTSchemaBuilder.js +37 -81
  10. package/dist/cjs/src/helpers/cli/dbTypesNaming.js +90 -0
  11. package/dist/cjs/src/helpers/cli/tableMatchesPattern.js +21 -0
  12. package/dist/cjs/src/serializer/DreamSerializer.js +23 -0
  13. package/dist/cjs/src/serializer/ObjectSerializer.js +22 -0
  14. package/dist/cjs/src/serializer/SerializerRenderer.js +36 -54
  15. package/dist/cjs/src/serializer/builders/DreamSerializerBuilder.js +32 -10
  16. package/dist/cjs/src/serializer/builders/ObjectSerializerBuilder.js +32 -10
  17. package/dist/cjs/src/serializer/helpers/nullFlattenedSerializerKeys.js +257 -0
  18. package/dist/esm/src/db/dataTypes.js +0 -8
  19. package/dist/esm/src/dream/QueryDriver/Base.js +17 -24
  20. package/dist/esm/src/dream/QueryDriver/Kysely.js +22 -23
  21. package/dist/esm/src/dream/QueryDriver/Postgres.js +113 -31
  22. package/dist/esm/src/dream-app/index.js +5 -0
  23. package/dist/esm/src/helpers/cli/ASTBuilder.js +11 -202
  24. package/dist/esm/src/helpers/cli/ASTConnectionBuilder.js +97 -75
  25. package/dist/esm/src/helpers/cli/ASTDbTypesBuilder.js +132 -0
  26. package/dist/esm/src/helpers/cli/ASTSchemaBuilder.js +37 -81
  27. package/dist/esm/src/helpers/cli/dbTypesNaming.js +90 -0
  28. package/dist/esm/src/helpers/cli/tableMatchesPattern.js +21 -0
  29. package/dist/esm/src/serializer/DreamSerializer.js +23 -0
  30. package/dist/esm/src/serializer/ObjectSerializer.js +22 -0
  31. package/dist/esm/src/serializer/SerializerRenderer.js +36 -54
  32. package/dist/esm/src/serializer/builders/DreamSerializerBuilder.js +32 -10
  33. package/dist/esm/src/serializer/builders/ObjectSerializerBuilder.js +32 -10
  34. package/dist/esm/src/serializer/helpers/nullFlattenedSerializerKeys.js +257 -0
  35. package/dist/types/src/db/dataTypes.d.ts +0 -2
  36. package/dist/types/src/dream/QueryDriver/Base.d.ts +16 -18
  37. package/dist/types/src/dream/QueryDriver/Kysely.d.ts +0 -9
  38. package/dist/types/src/dream/QueryDriver/Postgres.d.ts +9 -9
  39. package/dist/types/src/dream-app/index.d.ts +17 -12
  40. package/dist/types/src/helpers/cli/ASTBuilder.d.ts +11 -101
  41. package/dist/types/src/helpers/cli/ASTConnectionBuilder.d.ts +40 -37
  42. package/dist/types/src/helpers/cli/ASTDbTypesBuilder.d.ts +26 -0
  43. package/dist/types/src/helpers/cli/ASTSchemaBuilder.d.ts +5 -15
  44. package/dist/types/src/helpers/cli/dbTypesNaming.d.ts +37 -0
  45. package/dist/types/src/helpers/cli/tableMatchesPattern.d.ts +15 -0
  46. package/dist/types/src/package-exports/types.d.ts +1 -1
  47. package/dist/types/src/serializer/DreamSerializer.d.ts +23 -0
  48. package/dist/types/src/serializer/ObjectSerializer.d.ts +22 -0
  49. package/dist/types/src/serializer/SerializerRenderer.d.ts +1 -13
  50. package/dist/types/src/serializer/builders/DreamSerializerBuilder.d.ts +34 -12
  51. package/dist/types/src/serializer/builders/ObjectSerializerBuilder.d.ts +34 -12
  52. package/dist/types/src/serializer/helpers/nullFlattenedSerializerKeys.d.ts +75 -0
  53. package/dist/types/src/types/db.d.ts +71 -0
  54. package/dist/types/src/types/types/db.ts +91 -0
  55. package/docs/assets/hierarchy.js +1 -1
  56. package/docs/assets/navigation.js +1 -1
  57. package/docs/assets/search.js +1 -1
  58. package/docs/classes/db.DreamMigrationHelpers.html +11 -11
  59. package/docs/classes/db.KyselyQueryDriver.html +55 -54
  60. package/docs/classes/db.PostgresQueryDriver.html +56 -56
  61. package/docs/classes/db.QueryDriverBase.html +60 -59
  62. package/docs/classes/errors.CannotSaveMissingDream.html +2 -2
  63. package/docs/classes/errors.CheckConstraintViolation.html +3 -3
  64. package/docs/classes/errors.ColumnOverflow.html +3 -3
  65. package/docs/classes/errors.CreateOrFindByFailedToCreateAndFind.html +3 -3
  66. package/docs/classes/errors.DataIncompatibleWithDatabaseField.html +3 -3
  67. package/docs/classes/errors.DataTypeColumnTypeMismatch.html +3 -3
  68. package/docs/classes/errors.DecryptionError.html +2 -2
  69. package/docs/classes/errors.DecryptionParseError.html +2 -2
  70. package/docs/classes/errors.DecryptionRotationError.html +3 -3
  71. package/docs/classes/errors.GlobalNameNotSet.html +3 -3
  72. package/docs/classes/errors.InvalidCalendarDate.html +2 -2
  73. package/docs/classes/errors.InvalidClockTime.html +2 -2
  74. package/docs/classes/errors.InvalidClockTimeTz.html +2 -2
  75. package/docs/classes/errors.InvalidDateTime.html +2 -2
  76. package/docs/classes/errors.MissingSerializersDefinition.html +3 -3
  77. package/docs/classes/errors.NonLoadedAssociation.html +3 -3
  78. package/docs/classes/errors.NotNullViolation.html +3 -3
  79. package/docs/classes/errors.RecordNotFound.html +3 -3
  80. package/docs/classes/errors.SortableScopeDidNotStabilize.html +3 -3
  81. package/docs/classes/errors.SortableScopeLockWaitTimedOut.html +3 -3
  82. package/docs/classes/errors.ValidationError.html +3 -3
  83. package/docs/classes/index.CalendarDate.html +33 -33
  84. package/docs/classes/index.ClockTime.html +32 -32
  85. package/docs/classes/index.ClockTimeTz.html +35 -35
  86. package/docs/classes/index.DateTime.html +86 -86
  87. package/docs/classes/index.Decorators.html +19 -19
  88. package/docs/classes/index.Dream.html +125 -125
  89. package/docs/classes/index.DreamApp.html +11 -11
  90. package/docs/classes/index.DreamTransaction.html +3 -3
  91. package/docs/classes/index.Env.html +5 -5
  92. package/docs/classes/index.Query.html +65 -65
  93. package/docs/classes/system.CliFileWriter.html +4 -4
  94. package/docs/classes/system.DreamBin.html +3 -3
  95. package/docs/classes/system.DreamCLI.html +7 -7
  96. package/docs/classes/system.DreamImporter.html +2 -2
  97. package/docs/classes/system.DreamLogos.html +2 -2
  98. package/docs/classes/system.DreamSerializerBuilder.html +43 -21
  99. package/docs/classes/system.ObjectSerializerBuilder.html +42 -20
  100. package/docs/classes/system.PathHelpers.html +3 -3
  101. package/docs/classes/utils.Encrypt.html +4 -4
  102. package/docs/classes/utils.Range.html +2 -2
  103. package/docs/functions/db.closeAllDbConnections.html +1 -1
  104. package/docs/functions/db.dreamDbConnections.html +1 -1
  105. package/docs/functions/db.untypedDb.html +1 -1
  106. package/docs/functions/db.validateColumn.html +1 -1
  107. package/docs/functions/db.validateTable.html +1 -1
  108. package/docs/functions/errors.pgErrorType.html +1 -1
  109. package/docs/functions/index.DreamSerializer.html +18 -1
  110. package/docs/functions/index.ObjectSerializer.html +17 -1
  111. package/docs/functions/index.ReplicaSafe.html +1 -1
  112. package/docs/functions/index.STI.html +1 -1
  113. package/docs/functions/index.SoftDelete.html +1 -1
  114. package/docs/functions/utils.camelize.html +1 -1
  115. package/docs/functions/utils.capitalize.html +1 -1
  116. package/docs/functions/utils.cloneDeepSafe.html +1 -1
  117. package/docs/functions/utils.compact.html +1 -1
  118. package/docs/functions/utils.groupBy.html +1 -1
  119. package/docs/functions/utils.hyphenize.html +1 -1
  120. package/docs/functions/utils.intersection.html +1 -1
  121. package/docs/functions/utils.isEmpty.html +1 -1
  122. package/docs/functions/utils.normalizeUnicode.html +1 -1
  123. package/docs/functions/utils.pascalize.html +1 -1
  124. package/docs/functions/utils.percent.html +1 -1
  125. package/docs/functions/utils.range.html +1 -1
  126. package/docs/functions/utils.round.html +1 -1
  127. package/docs/functions/utils.sanitizeString.html +1 -1
  128. package/docs/functions/utils.snakeify.html +1 -1
  129. package/docs/functions/utils.sort.html +1 -1
  130. package/docs/functions/utils.sortBy.html +1 -1
  131. package/docs/functions/utils.sortObjectByKey.html +1 -1
  132. package/docs/functions/utils.sortObjectByValue.html +1 -1
  133. package/docs/functions/utils.uncapitalize.html +1 -1
  134. package/docs/functions/utils.uniq.html +1 -1
  135. package/docs/hierarchy.html +1 -1
  136. package/docs/interfaces/openapi.OpenapiDescription.html +2 -2
  137. package/docs/interfaces/openapi.OpenapiSchemaProperties.html +1 -1
  138. package/docs/interfaces/openapi.OpenapiSchemaPropertiesShorthand.html +1 -1
  139. package/docs/interfaces/openapi.OpenapiTypeFieldObject.html +1 -1
  140. package/docs/interfaces/types.BelongsToStatement.html +2 -2
  141. package/docs/interfaces/types.DecoratorContext.html +2 -2
  142. package/docs/interfaces/types.DecryptCallbacks.html +2 -2
  143. package/docs/interfaces/types.DreamAppInitOptions.html +2 -2
  144. package/docs/interfaces/types.DreamAppOpts.html +2 -2
  145. package/docs/interfaces/types.DreamDbConfig.html +6 -6
  146. package/docs/interfaces/types.DurationObject.html +2 -2
  147. package/docs/interfaces/types.EncryptOptions.html +2 -2
  148. package/docs/interfaces/types.EncryptionLegacyKeyUsedEvent.html +4 -4
  149. package/docs/interfaces/types.InternalAnyTypedSerializerRendersMany.html +2 -2
  150. package/docs/interfaces/types.InternalAnyTypedSerializerRendersOne.html +2 -2
  151. package/docs/interfaces/types.IntrospectedColumn.html +17 -0
  152. package/docs/interfaces/types.IntrospectedDatabase.html +7 -0
  153. package/docs/interfaces/types.IntrospectedEnum.html +5 -0
  154. package/docs/interfaces/types.IntrospectedTable.html +11 -0
  155. package/docs/interfaces/types.SerializerRendererOpts.html +2 -2
  156. package/docs/modules/types.html +1 -1
  157. package/docs/types/openapi.CommonOpenapiSchemaObjectFields.html +1 -1
  158. package/docs/types/openapi.OpenapiAllTypes.html +1 -1
  159. package/docs/types/openapi.OpenapiFormats.html +1 -1
  160. package/docs/types/openapi.OpenapiNumberFormats.html +1 -1
  161. package/docs/types/openapi.OpenapiPrimitiveBaseTypes.html +1 -1
  162. package/docs/types/openapi.OpenapiPrimitiveTypes.html +1 -1
  163. package/docs/types/openapi.OpenapiSchemaArray.html +1 -1
  164. package/docs/types/openapi.OpenapiSchemaArrayShorthand.html +1 -1
  165. package/docs/types/openapi.OpenapiSchemaBase.html +1 -1
  166. package/docs/types/openapi.OpenapiSchemaBody.html +1 -1
  167. package/docs/types/openapi.OpenapiSchemaBodyShorthand.html +1 -1
  168. package/docs/types/openapi.OpenapiSchemaCombinatorFields.html +1 -1
  169. package/docs/types/openapi.OpenapiSchemaCommonFields.html +1 -1
  170. package/docs/types/openapi.OpenapiSchemaExpressionAllOf.html +1 -1
  171. package/docs/types/openapi.OpenapiSchemaExpressionAnyOf.html +1 -1
  172. package/docs/types/openapi.OpenapiSchemaExpressionOneOf.html +1 -1
  173. package/docs/types/openapi.OpenapiSchemaExpressionRef.html +2 -2
  174. package/docs/types/openapi.OpenapiSchemaExpressionRefSchemaShorthand.html +2 -2
  175. package/docs/types/openapi.OpenapiSchemaInteger.html +1 -1
  176. package/docs/types/openapi.OpenapiSchemaNull.html +2 -2
  177. package/docs/types/openapi.OpenapiSchemaNumber.html +1 -1
  178. package/docs/types/openapi.OpenapiSchemaObject.html +1 -1
  179. package/docs/types/openapi.OpenapiSchemaObjectAllOf.html +1 -1
  180. package/docs/types/openapi.OpenapiSchemaObjectAllOfShorthand.html +1 -1
  181. package/docs/types/openapi.OpenapiSchemaObjectBase.html +1 -1
  182. package/docs/types/openapi.OpenapiSchemaObjectBaseShorthand.html +1 -1
  183. package/docs/types/openapi.OpenapiSchemaObjectShorthand.html +1 -1
  184. package/docs/types/openapi.OpenapiSchemaPrimitiveGeneric.html +1 -1
  185. package/docs/types/openapi.OpenapiSchemaShorthandExpressionAllOf.html +1 -1
  186. package/docs/types/openapi.OpenapiSchemaShorthandExpressionAnyOf.html +1 -1
  187. package/docs/types/openapi.OpenapiSchemaShorthandExpressionOneOf.html +1 -1
  188. package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializableRef.html +2 -2
  189. package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializerRef.html +2 -2
  190. package/docs/types/openapi.OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
  191. package/docs/types/openapi.OpenapiSchemaString.html +1 -1
  192. package/docs/types/openapi.OpenapiShorthandAllTypes.html +1 -1
  193. package/docs/types/openapi.OpenapiShorthandPrimitiveBaseTypes.html +1 -1
  194. package/docs/types/openapi.OpenapiShorthandPrimitiveTypes.html +1 -1
  195. package/docs/types/openapi.OpenapiTypeField.html +1 -1
  196. package/docs/types/system.DreamAppAllowedPackageManagersEnum.html +1 -1
  197. package/docs/types/types.CalendarDateDurationUnit.html +1 -1
  198. package/docs/types/types.CalendarDateObject.html +1 -1
  199. package/docs/types/types.Camelized.html +1 -1
  200. package/docs/types/types.ClockTimeObject.html +1 -1
  201. package/docs/types/types.DbConnectionType.html +1 -1
  202. package/docs/types/types.DbTypes.html +1 -1
  203. package/docs/types/types.DreamAssociationMetadata.html +1 -1
  204. package/docs/types/types.DreamAttributes.html +1 -1
  205. package/docs/types/types.DreamClassAssociationAndStatement.html +1 -1
  206. package/docs/types/types.DreamClassColumn.html +1 -1
  207. package/docs/types/types.DreamColumn.html +1 -1
  208. package/docs/types/types.DreamColumnNames.html +1 -1
  209. package/docs/types/types.DreamLogLevel.html +1 -1
  210. package/docs/types/types.DreamLogger.html +2 -2
  211. package/docs/types/types.DreamModelSerializerType.html +1 -1
  212. package/docs/types/types.DreamOrViewModelClassSerializerKey.html +1 -1
  213. package/docs/types/types.DreamOrViewModelSerializerKey.html +1 -1
  214. package/docs/types/types.DreamParamSafeAttributes.html +1 -1
  215. package/docs/types/types.DreamParamSafeColumnNames.html +1 -1
  216. package/docs/types/types.DreamSerializable.html +1 -1
  217. package/docs/types/types.DreamSerializableArray.html +1 -1
  218. package/docs/types/types.DreamSerializerKey.html +1 -1
  219. package/docs/types/types.DreamSerializers.html +1 -1
  220. package/docs/types/types.DreamVirtualColumns.html +1 -1
  221. package/docs/types/types.DurationUnit.html +1 -1
  222. package/docs/types/types.EncryptAlgorithm.html +1 -1
  223. package/docs/types/types.HasManyStatement.html +1 -1
  224. package/docs/types/types.HasOneStatement.html +1 -1
  225. package/docs/types/types.Hyphenized.html +1 -1
  226. package/docs/types/types.IntrospectedValueType.html +5 -0
  227. package/docs/types/types.Pascalized.html +1 -1
  228. package/docs/types/types.PrimaryKeyType.html +1 -1
  229. package/docs/types/types.RoundingPrecision.html +1 -1
  230. package/docs/types/types.SerializerCasing.html +1 -1
  231. package/docs/types/types.SimpleObjectSerializerType.html +1 -1
  232. package/docs/types/types.Snakeified.html +1 -1
  233. package/docs/types/types.StrictInterface.html +1 -1
  234. package/docs/types/types.UpdateableAssociationProperties.html +1 -1
  235. package/docs/types/types.UpdateableProperties.html +1 -1
  236. package/docs/types/types.ValidationType.html +1 -1
  237. package/docs/types/types.ViewModel.html +2 -2
  238. package/docs/types/types.ViewModelClass.html +1 -1
  239. package/docs/types/types.WeekdayName.html +1 -1
  240. package/docs/types/types.WhereStatementForDream.html +1 -1
  241. package/docs/types/types.WhereStatementForDreamClass.html +1 -1
  242. package/docs/variables/index.DreamConst.html +1 -1
  243. package/docs/variables/index.ops.html +1 -1
  244. package/docs/variables/openapi.openapiPrimitiveTypes.html +1 -1
  245. package/docs/variables/openapi.openapiShorthandPrimitiveTypes.html +1 -1
  246. package/docs/variables/system.DreamAppAllowedPackageManagersEnumValues.html +1 -1
  247. package/docs/variables/system.primaryKeyTypes.html +1 -1
  248. package/package.json +6 -3
  249. package/dist/cjs/src/db/helpers/syncDbTypesFiles.js +0 -41
  250. package/dist/cjs/src/helpers/cli/ASTKyselyCodegenEnhancer.js +0 -380
  251. package/dist/esm/src/db/helpers/syncDbTypesFiles.js +0 -41
  252. package/dist/esm/src/helpers/cli/ASTKyselyCodegenEnhancer.js +0 -380
  253. package/dist/types/src/db/helpers/syncDbTypesFiles.d.ts +0 -1
  254. package/dist/types/src/helpers/cli/ASTKyselyCodegenEnhancer.d.ts +0 -94
@@ -146,8 +146,21 @@ export default class DreamSerializerBuilder<DataTypeForOpenapi extends typeof Dr
146
146
  * property bodies (`type: 'object'`, `properties`, and `required` listing the keys that
147
147
  * are always present), or `{ $serializer: SomeSerializer }` when the callback returns
148
148
  * what that serializer renders. A serializer ref with `many: true` does not type-check
149
- * here, since a list has no properties to spread. A `null` or `undefined` return adds no
150
- * keys. Attributes render in declaration order, so a key the returned object shares with
149
+ * here, since a list has no properties to spread. A `null` return, a serializer built over
150
+ * `null` or `undefined` data, or an `undefined` return without `required: false` renders as
151
+ * `null` each key the `openapi` requires: a key an object shape lists in its `required`
152
+ * array, a key a `$serializer` or `$serializable` ref's serializer declares without
153
+ * `required: false`, and each such key of an `allOf`, `anyOf` or `oneOf` member. Its
154
+ * optional keys stay absent, and an `undefined` return with `required: false` adds no keys.
155
+ * A returned plain object also renders as `null` each key its shape requires that it
156
+ * leaves out, and its optional keys it leaves out stay absent. When the `openapi` is an
157
+ * `anyOf` or `oneOf`, or a `$serializable` ref to an STI base, a present value also renders
158
+ * as `null` each key another variant requires that the rendered one does not declare, so a
159
+ * client sees the same keys whichever variant is rendered.
160
+ * Every key it adds follows the render's casing like the parent's own keys: a returned
161
+ * plain object's top-level keys and the `openapi`'s `properties` keys are cased (so
162
+ * `casing: 'snake'` renders `phoneNumber` as `phone_number`, present or `null`), while
163
+ * nested values render as returned. Attributes render in declaration order, so a key the returned object shares with
151
164
  * another attribute takes the value of whichever is declared later; under the `allOf`,
152
165
  * that value must match both schemas
153
166
  * - `required` - Set to `false` to mark the attribute as optional in the OpenAPI schema;
@@ -191,14 +204,23 @@ export default class DreamSerializerBuilder<DataTypeForOpenapi extends typeof Dr
191
204
  * declaration order, so when the parent and the association share a key (e.g., `id`),
192
205
  * whichever is declared later wins: the association's value replaces an attribute declared
193
206
  * before the `rendersOne`, and an attribute declared after it replaces the association's.
194
- * When the association is `null`, every key its serializer declares renders as `null`
195
- * (for a polymorphic `BelongsTo`, every key the serializer of any of its target classes
196
- * declares, and for an association to an STI base, every key the serializer of any of its
197
- * STI children declares), in the same order (so an `id` declared before the `rendersOne` becomes
198
- * `null`); nothing in that serializer is rendered, so its custom attribute callbacks do
199
- * not run, and a flattened `customAttribute` in it adds no keys. Psychic adds the association's OpenAPI
200
- * schema to the parent's as an `allOf` branch, so a shared key's value must match both
201
- * schemas, whichever declaration wins
207
+ * When the association is `null`, each key its serializer requires renders as `null`: an
208
+ * attribute, delegatedAttribute or customAttribute declared without `required: false`, and
209
+ * every non-flattened `rendersOne` and `rendersMany` (for a polymorphic `BelongsTo`, each
210
+ * key the serializer of any of its target classes requires, and for an association to an
211
+ * STI base, each key the serializer of any of its STI children requires), in the same order
212
+ * (so an `id` declared before the `rendersOne` becomes `null`), while a key declared with
213
+ * `required: false` stays absent. A flattened `customAttribute` in that serializer adds the
214
+ * keys its `openapi` requires: a key an object shape lists in its `required` array, a key a
215
+ * `$serializer` or `$serializable` ref's serializer declares without `required: false`, and
216
+ * each such key of an `allOf`, `anyOf` or `oneOf` member; a ref with `many: true` adds none,
217
+ * and a flattened `customAttribute` declared with `required: false` adds none. Nothing in
218
+ * that serializer is rendered, so its custom attribute callbacks do not run. When the
219
+ * association to an STI base or polymorphic `BelongsTo` is present, each key another STI
220
+ * child's or target's serializer requires that the held one's serializer does not declare
221
+ * also renders as `null`, so a client sees the same keys whichever is held. Psychic adds
222
+ * the association's OpenAPI schema to the parent's as an `allOf` branch, so a shared key's
223
+ * value must match both schemas, whichever declaration wins
202
224
  * - `optional` - When `true`, allows the association to be null/missing without causing
203
225
  * an `OpenapiResponseValidationFailure` during Psychic controller unit specs. By default,
204
226
  * `rendersOne` expects the association to be present (mirroring the `optional` option on
@@ -254,8 +276,8 @@ export default class DreamSerializerBuilder<DataTypeForOpenapi extends typeof Dr
254
276
  * If `true`, the rendered association's attributes are merged directly into
255
277
  * the parent object instead of being nested under the association key. A key
256
278
  * the parent shares with the association takes the value of whichever is
257
- * declared later, and when the association is `null`, every key its serializer
258
- * declares renders as `null`. See the `flatten` option of `rendersOne`.
279
+ * declared later, and when the association is `null`, each key its serializer
280
+ * requires renders as `null`. See the `flatten` option of `rendersOne`.
259
281
  */
260
282
  flatten?: boolean;
261
283
  /**
@@ -139,8 +139,21 @@ export default class ObjectSerializerBuilder<MaybeNullDataType extends object |
139
139
  * property bodies (`type: 'object'`, `properties`, and `required` listing the keys that
140
140
  * are always present), or `{ $serializer: SomeSerializer }` when the callback returns
141
141
  * what that serializer renders. A serializer ref with `many: true` does not type-check
142
- * here, since a list has no properties to spread. A `null` or `undefined` return adds no
143
- * keys. Attributes render in declaration order, so a key the returned object shares with
142
+ * here, since a list has no properties to spread. A `null` return, a serializer built over
143
+ * `null` or `undefined` data, or an `undefined` return without `required: false` renders as
144
+ * `null` each key the `openapi` requires: a key an object shape lists in its `required`
145
+ * array, a key a `$serializer` or `$serializable` ref's serializer declares without
146
+ * `required: false`, and each such key of an `allOf`, `anyOf` or `oneOf` member. Its
147
+ * optional keys stay absent, and an `undefined` return with `required: false` adds no keys.
148
+ * A returned plain object also renders as `null` each key its shape requires that it
149
+ * leaves out, and its optional keys it leaves out stay absent. When the `openapi` is an
150
+ * `anyOf` or `oneOf`, or a `$serializable` ref to an STI base, a present value also renders
151
+ * as `null` each key another variant requires that the rendered one does not declare, so a
152
+ * client sees the same keys whichever variant is rendered.
153
+ * Every key it adds follows the render's casing like the parent's own keys: a returned
154
+ * plain object's top-level keys and the `openapi`'s `properties` keys are cased (so
155
+ * `casing: 'snake'` renders `phoneNumber` as `phone_number`, present or `null`), while
156
+ * nested values render as returned. Attributes render in declaration order, so a key the returned object shares with
144
157
  * another attribute takes the value of whichever is declared later; under the `allOf`,
145
158
  * that value must match both schemas
146
159
  * - `required` - Set to `false` to mark the attribute as optional in the OpenAPI schema;
@@ -184,14 +197,23 @@ export default class ObjectSerializerBuilder<MaybeNullDataType extends object |
184
197
  * declaration order, so when the parent and the association share a key (e.g., `id`),
185
198
  * whichever is declared later wins: the association's value replaces an attribute declared
186
199
  * before the `rendersOne`, and an attribute declared after it replaces the association's.
187
- * When the association is `null`, every key its serializer declares renders as `null`
188
- * (for a polymorphic `BelongsTo`, every key the serializer of any of its target classes
189
- * declares, and for an association to an STI base, every key the serializer of any of its
190
- * STI children declares), in the same order (so an `id` declared before the `rendersOne` becomes
191
- * `null`); nothing in that serializer is rendered, so its custom attribute callbacks do
192
- * not run, and a flattened `customAttribute` in it adds no keys. Psychic adds the association's OpenAPI
193
- * schema to the parent's as an `allOf` branch, so a shared key's value must match both
194
- * schemas, whichever declaration wins
200
+ * When the association is `null`, each key its serializer requires renders as `null`: an
201
+ * attribute, delegatedAttribute or customAttribute declared without `required: false`, and
202
+ * every non-flattened `rendersOne` and `rendersMany` (for a polymorphic `BelongsTo`, each
203
+ * key the serializer of any of its target classes requires, and for an association to an
204
+ * STI base, each key the serializer of any of its STI children requires), in the same order
205
+ * (so an `id` declared before the `rendersOne` becomes `null`), while a key declared with
206
+ * `required: false` stays absent. A flattened `customAttribute` in that serializer adds the
207
+ * keys its `openapi` requires: a key an object shape lists in its `required` array, a key a
208
+ * `$serializer` or `$serializable` ref's serializer declares without `required: false`, and
209
+ * each such key of an `allOf`, `anyOf` or `oneOf` member; a ref with `many: true` adds none,
210
+ * and a flattened `customAttribute` declared with `required: false` adds none. Nothing in
211
+ * that serializer is rendered, so its custom attribute callbacks do not run. When the
212
+ * association to an STI base or polymorphic `BelongsTo` is present, each key another STI
213
+ * child's or target's serializer requires that the held one's serializer does not declare
214
+ * also renders as `null`, so a client sees the same keys whichever is held. Psychic adds
215
+ * the association's OpenAPI schema to the parent's as an `allOf` branch, so a shared key's
216
+ * value must match both schemas, whichever declaration wins
195
217
  * - `optional` - When `true`, allows the association to be null/missing without causing
196
218
  * an `OpenapiResponseValidationFailure` during Psychic controller unit specs. By default,
197
219
  * `rendersOne` expects the association to be present (mirroring the `optional` option on
@@ -249,8 +271,8 @@ export default class ObjectSerializerBuilder<MaybeNullDataType extends object |
249
271
  * If `true`, the rendered association's attributes are merged directly into
250
272
  * the parent object instead of being nested under the association key. A key
251
273
  * the parent shares with the association takes the value of whichever is
252
- * declared later, and when the association is `null`, every key its serializer
253
- * declares renders as `null`. See the `flatten` option of `rendersOne`.
274
+ * declared later, and when the association is `null`, each key its serializer
275
+ * requires renders as `null`. See the `flatten` option of `rendersOne`.
254
276
  */
255
277
  flatten?: boolean;
256
278
  /**
@@ -0,0 +1,75 @@
1
+ import { OpenapiSchemaBodyShorthand, OpenapiShorthandPrimitiveTypes } from '../../types/openapi.js';
2
+ import { DreamModelSerializerType, SerializerCasing, SimpleObjectSerializerType } from '../../types/serializer.js';
3
+ export interface NullFlattenedSerializerKeysOptions {
4
+ casing?: SerializerCasing;
5
+ passthroughData?: object;
6
+ }
7
+ /**
8
+ * The keys a flattened `rendersOne` adds to the parent's payload when its associated object is
9
+ * null, returned as an object with each key set to `null`, ready to spread into the parent's
10
+ * payload (`Object.keys` of it for the key names alone): each key one of `serializers` requires.
11
+ * As a property read on an empty object is `undefined`, a null value carries no key it may omit:
12
+ * an attribute, delegatedAttribute or customAttribute declared with `required: false` adds no key.
13
+ * Every key is cased per `casing`, as the renderer cases it. There are several serializers when
14
+ * the association is a polymorphic BelongsTo, one for each target class, or when the associated
15
+ * class is an STI base, one for each child, and their required keys are unioned.
16
+ *
17
+ * Each serializer is built with `undefined` data to read its declarations, as Psychic's OpenAPI
18
+ * generation and `preloadFor` build it, and nothing is rendered: no attribute callback runs and
19
+ * no association of the missing object is read. A non-flattened `rendersOne` or a `rendersMany`
20
+ * always adds its key. A flattened `rendersOne` it declares adds its own serializers' required keys
21
+ * the same way. A flattened `customAttribute` adds the keys its `openapi` requires: each key of
22
+ * its `properties` that the shape's `required` array lists, the required keys of the serializer a
23
+ * `$serializer` ref names or of every serializer a `$serializable` ref resolves to (one per child
24
+ * for an STI base), walked the same way, and the union of the keys every member of an `allOf`,
25
+ * `anyOf` or `oneOf` requires, with each key an object shape's own `required` array lists beside
26
+ * its members; one declared with `required: false` adds none. A ref with `many: true` adds none,
27
+ * since a list has no keys to spread. A serializer reached again within its own walk, as when one
28
+ * flattens itself, adds nothing, so the walk always terminates; one reached again along another
29
+ * path is walked again, so each path adds its keys and their requirements.
30
+ *
31
+ * `passthroughData` is handed to each serializer as it is built, as when rendering; outside a
32
+ * render it may be left out.
33
+ */
34
+ export declare function nullFlattenedSerializerKeys(serializers: (DreamModelSerializerType | SimpleObjectSerializerType)[], options?: NullFlattenedSerializerKeysOptions): Record<string, null>;
35
+ /**
36
+ * The keys a flattened `customAttribute` with this `openapi` adds to the parent's payload when
37
+ * its callback returns null (or `undefined` without `required: false`), or a serializer built over
38
+ * null data, each set to `null`: each key `openapi` requires, walked as `nullFlattenedSerializerKeys`
39
+ * walks a flattened `customAttribute` and cased per `casing`.
40
+ */
41
+ export declare function nullFlattenedOpenapiKeys(openapi: OpenapiSchemaBodyShorthand | OpenapiShorthandPrimitiveTypes, options?: NullFlattenedSerializerKeysOptions): Record<string, null>;
42
+ /**
43
+ * The keys a present flattened `rendersOne` adds to the parent's payload, each set to `null`,
44
+ * beside what `renderedSerializer` renders: each key one of `serializers` (every serializer the
45
+ * association may render with) requires that `renderedSerializer` does not declare at all. A key
46
+ * `renderedSerializer` declares is its own to render or, when `required: false`, to omit.
47
+ */
48
+ export declare function nullFlattenedSerializerKeysOfOtherVariants(serializers: (DreamModelSerializerType | SimpleObjectSerializerType)[], renderedSerializer: DreamModelSerializerType | SimpleObjectSerializerType, options?: NullFlattenedSerializerKeysOptions): Record<string, null>;
49
+ /**
50
+ * The keys a flattened `customAttribute` with this `openapi` adds to the parent's payload, each
51
+ * set to `null`, when it renders `renderedVariant`: each key a variant of `openapi` requires that
52
+ * `renderedVariant` does not declare. `renderedVariant` is any `openapi` shorthand: one member of
53
+ * an `anyOf` or `oneOf`, or `{ $serializer: childSerializer }` for one child of a `$serializable`
54
+ * ref to an STI base. A key requires its value when an object shape's `required` array lists it,
55
+ * whether the shape's own `properties` declare it or a member of its `allOf`, `anyOf` or `oneOf`
56
+ * does, or when a serializer declares it without `required: false`.
57
+ */
58
+ export declare function nullFlattenedOpenapiKeysOfOtherVariants(openapi: OpenapiSchemaBodyShorthand | OpenapiShorthandPrimitiveTypes, renderedVariant: OpenapiSchemaBodyShorthand | OpenapiShorthandPrimitiveTypes, options?: NullFlattenedSerializerKeysOptions): Record<string, null>;
59
+ /**
60
+ * The keys a flattened `customAttribute` with this `openapi` adds to the parent's payload, each
61
+ * set to `null`, beside the non-null `value` its callback returned, from which the rendered
62
+ * variant is read. A serializer's declarations are the rendered variant, so a `$serializable` ref
63
+ * to an STI base adds the keys of every other child, as `nullFlattenedOpenapiKeysOfOtherVariants`
64
+ * reads them; the serializer renders each of its own keys. A plain object renders only the keys
65
+ * it has, so it adds each key the rendered variant requires that the object leaves out as well as
66
+ * each key another variant requires that the rendered one does not declare. An `openapi` with one
67
+ * variant is the rendered one. Of several variants (the members of an `anyOf` or `oneOf`, or one
68
+ * `$serializer` per child of a `$serializable` ref to an STI base, a member with several variants
69
+ * of its own contributing each of them, and an `allOf` beside an `anyOf` or `oneOf` joining each
70
+ * of its variants), the rendered one is the variant that declares every key the object has; when
71
+ * several do, the first of them whose required keys the object all has, and when none is found,
72
+ * the object adds each key any variant requires. The object's top-level keys render cased per
73
+ * `casing`, so they are compared cased, and a key it has is never added.
74
+ */
75
+ export declare function nullFlattenedOpenapiKeysForValue(openapi: OpenapiSchemaBodyShorthand | OpenapiShorthandPrimitiveTypes, value: unknown, options?: NullFlattenedSerializerKeysOptions): Record<string, null>;
@@ -9,4 +9,75 @@ export type NonArrayDbTypes = (typeof postgresDatatypes)[number];
9
9
  export type DbTypes = NonArrayDbTypes | `${NonArrayDbTypes}[]`;
10
10
  export type PrimaryKeyType = (typeof primaryKeyTypes)[number];
11
11
  export type LegacyCompatiblePrimaryKeyType = PrimaryKeyType | 'uuid' | 'bigserial';
12
+ /**
13
+ * A connection's tables and enums, as a query driver's `introspectDatabase`
14
+ * reads them. `sync` writes both of a connection's types files from it:
15
+ * `types/db.ts`, which types the connection's Kysely queries, and
16
+ * `types/dream.ts`, Dream's schema.
17
+ */
18
+ export interface IntrospectedDatabase {
19
+ tables: IntrospectedTable[];
20
+ enums: IntrospectedEnum[];
21
+ }
22
+ export interface IntrospectedTable {
23
+ /**
24
+ * The table's schema, e.g. `public`, or `null` for a database without
25
+ * schemas. A table pattern that contains a `.` is matched against
26
+ * `<schema>.<name>` (see `tableIncludePattern`).
27
+ */
28
+ schema: string | null;
29
+ /**
30
+ * The table's name, e.g. `balloon_lines`.
31
+ */
32
+ name: string;
33
+ /**
34
+ * Whether the table is in the connection's default schema. Kysely queries
35
+ * name such a table alone, and any other as `<schema>.<name>`.
36
+ */
37
+ inDefaultSchema: boolean;
38
+ columns: IntrospectedColumn[];
39
+ }
40
+ export interface IntrospectedColumn {
41
+ /**
42
+ * The column's name, e.g. `created_at`.
43
+ */
44
+ name: string;
45
+ /**
46
+ * The column's database type as Dream's schema records it, e.g. `bigint`,
47
+ * `timestamp without time zone[]`, or an enum's name.
48
+ */
49
+ dbType: string;
50
+ /**
51
+ * The type of one of the column's values in `types/db.ts`, or `'enum'`
52
+ * when the values are those of `enumName`.
53
+ */
54
+ valueType: IntrospectedValueType;
55
+ /**
56
+ * The name of the enum the column's values belong to, or `null`. An enum
57
+ * outside the connection's default schema is named `<schema>.<name>`.
58
+ */
59
+ enumName: string | null;
60
+ isArray: boolean;
61
+ allowNull: boolean;
62
+ /**
63
+ * Whether an insert may leave the column out: it has a default, or the
64
+ * database generates its values.
65
+ */
66
+ hasDefault: boolean;
67
+ }
68
+ export interface IntrospectedEnum {
69
+ /**
70
+ * The enum's name, as columns' `enumName` gives it, e.g.
71
+ * `balloon_colors_enum`.
72
+ */
73
+ name: string;
74
+ values: string[];
75
+ }
76
+ /**
77
+ * The types `types/db.ts` can give one value of a column. `Int8`, `Numeric`,
78
+ * `Timestamp` (a `DateTime` or `CalendarDate`), `Json`, `Interval`, `Point`
79
+ * and `Circle` are declared in that file; `Date` and `Buffer` are
80
+ * JavaScript's.
81
+ */
82
+ export type IntrospectedValueType = 'string' | 'number' | 'boolean' | 'Int8' | 'Numeric' | 'Timestamp' | 'Date' | 'ClockTime' | 'ClockTimeTz' | 'Json' | 'Buffer' | 'Interval' | 'Point' | 'Circle' | 'enum';
12
83
  export {};
@@ -15,3 +15,94 @@ export type NonArrayDbTypes = (typeof postgresDatatypes)[number]
15
15
  export type DbTypes = NonArrayDbTypes | `${NonArrayDbTypes}[]`
16
16
  export type PrimaryKeyType = (typeof primaryKeyTypes)[number]
17
17
  export type LegacyCompatiblePrimaryKeyType = PrimaryKeyType | 'uuid' | 'bigserial'
18
+
19
+ /**
20
+ * A connection's tables and enums, as a query driver's `introspectDatabase`
21
+ * reads them. `sync` writes both of a connection's types files from it:
22
+ * `types/db.ts`, which types the connection's Kysely queries, and
23
+ * `types/dream.ts`, Dream's schema.
24
+ */
25
+ export interface IntrospectedDatabase {
26
+ tables: IntrospectedTable[]
27
+ enums: IntrospectedEnum[]
28
+ }
29
+
30
+ export interface IntrospectedTable {
31
+ /**
32
+ * The table's schema, e.g. `public`, or `null` for a database without
33
+ * schemas. A table pattern that contains a `.` is matched against
34
+ * `<schema>.<name>` (see `tableIncludePattern`).
35
+ */
36
+ schema: string | null
37
+ /**
38
+ * The table's name, e.g. `balloon_lines`.
39
+ */
40
+ name: string
41
+ /**
42
+ * Whether the table is in the connection's default schema. Kysely queries
43
+ * name such a table alone, and any other as `<schema>.<name>`.
44
+ */
45
+ inDefaultSchema: boolean
46
+ columns: IntrospectedColumn[]
47
+ }
48
+
49
+ export interface IntrospectedColumn {
50
+ /**
51
+ * The column's name, e.g. `created_at`.
52
+ */
53
+ name: string
54
+ /**
55
+ * The column's database type as Dream's schema records it, e.g. `bigint`,
56
+ * `timestamp without time zone[]`, or an enum's name.
57
+ */
58
+ dbType: string
59
+ /**
60
+ * The type of one of the column's values in `types/db.ts`, or `'enum'`
61
+ * when the values are those of `enumName`.
62
+ */
63
+ valueType: IntrospectedValueType
64
+ /**
65
+ * The name of the enum the column's values belong to, or `null`. An enum
66
+ * outside the connection's default schema is named `<schema>.<name>`.
67
+ */
68
+ enumName: string | null
69
+ isArray: boolean
70
+ allowNull: boolean
71
+ /**
72
+ * Whether an insert may leave the column out: it has a default, or the
73
+ * database generates its values.
74
+ */
75
+ hasDefault: boolean
76
+ }
77
+
78
+ export interface IntrospectedEnum {
79
+ /**
80
+ * The enum's name, as columns' `enumName` gives it, e.g.
81
+ * `balloon_colors_enum`.
82
+ */
83
+ name: string
84
+ values: string[]
85
+ }
86
+
87
+ /**
88
+ * The types `types/db.ts` can give one value of a column. `Int8`, `Numeric`,
89
+ * `Timestamp` (a `DateTime` or `CalendarDate`), `Json`, `Interval`, `Point`
90
+ * and `Circle` are declared in that file; `Date` and `Buffer` are
91
+ * JavaScript's.
92
+ */
93
+ export type IntrospectedValueType =
94
+ | 'string'
95
+ | 'number'
96
+ | 'boolean'
97
+ | 'Int8'
98
+ | 'Numeric'
99
+ | 'Timestamp'
100
+ | 'Date'
101
+ | 'ClockTime'
102
+ | 'ClockTimeTz'
103
+ | 'Json'
104
+ | 'Buffer'
105
+ | 'Interval'
106
+ | 'Point'
107
+ | 'Circle'
108
+ | 'enum'
@@ -1 +1 @@
1
- window.hierarchyData = "eJyVklFPwjAQx7/LPVf0GGxjj0JMjBE1MfpAeCjb4Rq6lrQdZiF8d1N5qYiuPLVp7t/fr9fbg9HaWSgWmE5yhohLBobWkkontLJQ7AER/aJ4Q1DAS0ummxmxI3PLLQGDjVAVFDjMGbRGQgGl5NaSva5Wg5PqQe0aCexYAQU4W135+NXxgEFZC1kZUlAsEhwtDwwSHAX0h86S7IJbe/i/6i8xwCSdeAW/Bg7P2roPQzbe4kyix8NT03QYUKc1lZupVtYZLpR7E1py/0X/ockYbezgr2iMQ34TOmjZNuppR2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