hysteria-orm 10.4.1 → 10.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.cts CHANGED
@@ -5127,7 +5127,10 @@ declare function view(statement: (query: ModelQueryBuilder<any>) => void): Class
5127
5127
  declare function column(options?: ColumnOptions): PropertyDecorator;
5128
5128
  declare namespace column {
5129
5129
  var primary: typeof primaryKeyColumn;
5130
- var date: typeof dateColumn;
5130
+ var date: typeof dateOnlyColumn;
5131
+ var datetime: typeof datetimeColumn;
5132
+ var timestamp: typeof timestampColumn;
5133
+ var time: typeof timeOnlyColumn;
5131
5134
  var boolean: typeof booleanColumn;
5132
5135
  var json: typeof jsonColumn;
5133
5136
  var uuid: typeof uuidColumn;
@@ -5196,18 +5199,57 @@ declare function asymmetric(options: Omit<AsymmetricEncryptionOptions, "prepare"
5196
5199
  */
5197
5200
  declare function booleanColumn(options?: Omit<ColumnOptions, "prepare" | "serialize">): PropertyDecorator;
5198
5201
  /**
5199
- * @description Decorator to define a date column in the model
5200
- * @description This will automatically convert the date to the correct format for the database
5201
- * @description Supports both ISO format (YYYY-MM-DD HH:mm:ss) and Unix timestamp
5202
+ * @description Decorator to define a DATE_ONLY column in the model (YYYY-MM-DD)
5203
+ * @description This will automatically convert the date to DATE_ONLY format
5202
5204
  * @description Handles timezone conversion between UTC and local time
5203
5205
  * @description Can automatically update/create timestamps
5204
5206
  * @param options Configuration options for the date column
5205
- * @param options.format The format to store dates in ('ISO' or 'TIMESTAMP')
5207
+ * @param options.timezone The timezone to use ('UTC' or 'LOCAL')
5208
+ * @param options.autoUpdate Whether to automatically update the date on record updates
5209
+ * @param options.autoCreate Whether to automatically set the date on record creation
5210
+ * @param options.prepare Optional custom prepare function that receives the pre-handled value
5211
+ * @param options.serialize Optional custom serialize function that receives the pre-handled value
5212
+ */
5213
+ declare function dateOnlyColumn(options?: Omit<DateColumnOptions, "format">): PropertyDecorator;
5214
+ /**
5215
+ * @description Decorator to define a DATETIME column in the model (YYYY-MM-DD HH:mm:ss)
5216
+ * @description This will automatically convert the date to ISO format
5217
+ * @description Handles timezone conversion between UTC and local time
5218
+ * @description Can automatically update/create timestamps
5219
+ * @param options Configuration options for the datetime column
5206
5220
  * @param options.timezone The timezone to use ('UTC' or 'LOCAL')
5207
5221
  * @param options.autoUpdate Whether to automatically update the timestamp on record updates
5208
5222
  * @param options.autoCreate Whether to automatically set the timestamp on record creation
5223
+ * @param options.prepare Optional custom prepare function that receives the pre-handled value
5224
+ * @param options.serialize Optional custom serialize function that receives the pre-handled value
5225
+ */
5226
+ declare function datetimeColumn(options?: Omit<DateColumnOptions, "format">): PropertyDecorator;
5227
+ /**
5228
+ * @description Decorator to define a TIMESTAMP column in the model (Unix timestamp)
5229
+ * @description This will automatically convert the date to Unix timestamp format
5230
+ * @description Handles timezone conversion between UTC and local time
5231
+ * @description Can automatically update/create timestamps
5232
+ * @param options Configuration options for the timestamp column
5233
+ * @param options.timezone The timezone to use ('UTC' or 'LOCAL')
5234
+ * @param options.autoUpdate Whether to automatically update the timestamp on record updates
5235
+ * @param options.autoCreate Whether to automatically set the timestamp on record creation
5236
+ * @param options.prepare Optional custom prepare function that receives the pre-handled value
5237
+ * @param options.serialize Optional custom serialize function that receives the pre-handled value
5238
+ */
5239
+ declare function timestampColumn(options?: Omit<DateColumnOptions, "format">): PropertyDecorator;
5240
+ /**
5241
+ * @description Decorator to define a TIME_ONLY column in the model (HH:mm:ss)
5242
+ * @description This will automatically convert the date to TIME_ONLY format
5243
+ * @description Handles timezone conversion between UTC and local time
5244
+ * @description Can automatically update/create timestamps
5245
+ * @param options Configuration options for the time column
5246
+ * @param options.timezone The timezone to use ('UTC' or 'LOCAL')
5247
+ * @param options.autoUpdate Whether to automatically update the time on record updates
5248
+ * @param options.autoCreate Whether to automatically set the time on record creation
5249
+ * @param options.prepare Optional custom prepare function that receives the pre-handled value
5250
+ * @param options.serialize Optional custom serialize function that receives the pre-handled value
5209
5251
  */
5210
- declare function dateColumn(options?: Omit<DateColumnOptions, "prepare" | "serialize">): PropertyDecorator;
5252
+ declare function timeOnlyColumn(options?: Omit<DateColumnOptions, "format">): PropertyDecorator;
5211
5253
  /**
5212
5254
  * @description Decorator to define a json column in the model
5213
5255
  * @description This will automatically convert the json to the correct format for the database
package/lib/index.d.ts CHANGED
@@ -5127,7 +5127,10 @@ declare function view(statement: (query: ModelQueryBuilder<any>) => void): Class
5127
5127
  declare function column(options?: ColumnOptions): PropertyDecorator;
5128
5128
  declare namespace column {
5129
5129
  var primary: typeof primaryKeyColumn;
5130
- var date: typeof dateColumn;
5130
+ var date: typeof dateOnlyColumn;
5131
+ var datetime: typeof datetimeColumn;
5132
+ var timestamp: typeof timestampColumn;
5133
+ var time: typeof timeOnlyColumn;
5131
5134
  var boolean: typeof booleanColumn;
5132
5135
  var json: typeof jsonColumn;
5133
5136
  var uuid: typeof uuidColumn;
@@ -5196,18 +5199,57 @@ declare function asymmetric(options: Omit<AsymmetricEncryptionOptions, "prepare"
5196
5199
  */
5197
5200
  declare function booleanColumn(options?: Omit<ColumnOptions, "prepare" | "serialize">): PropertyDecorator;
5198
5201
  /**
5199
- * @description Decorator to define a date column in the model
5200
- * @description This will automatically convert the date to the correct format for the database
5201
- * @description Supports both ISO format (YYYY-MM-DD HH:mm:ss) and Unix timestamp
5202
+ * @description Decorator to define a DATE_ONLY column in the model (YYYY-MM-DD)
5203
+ * @description This will automatically convert the date to DATE_ONLY format
5202
5204
  * @description Handles timezone conversion between UTC and local time
5203
5205
  * @description Can automatically update/create timestamps
5204
5206
  * @param options Configuration options for the date column
5205
- * @param options.format The format to store dates in ('ISO' or 'TIMESTAMP')
5207
+ * @param options.timezone The timezone to use ('UTC' or 'LOCAL')
5208
+ * @param options.autoUpdate Whether to automatically update the date on record updates
5209
+ * @param options.autoCreate Whether to automatically set the date on record creation
5210
+ * @param options.prepare Optional custom prepare function that receives the pre-handled value
5211
+ * @param options.serialize Optional custom serialize function that receives the pre-handled value
5212
+ */
5213
+ declare function dateOnlyColumn(options?: Omit<DateColumnOptions, "format">): PropertyDecorator;
5214
+ /**
5215
+ * @description Decorator to define a DATETIME column in the model (YYYY-MM-DD HH:mm:ss)
5216
+ * @description This will automatically convert the date to ISO format
5217
+ * @description Handles timezone conversion between UTC and local time
5218
+ * @description Can automatically update/create timestamps
5219
+ * @param options Configuration options for the datetime column
5206
5220
  * @param options.timezone The timezone to use ('UTC' or 'LOCAL')
5207
5221
  * @param options.autoUpdate Whether to automatically update the timestamp on record updates
5208
5222
  * @param options.autoCreate Whether to automatically set the timestamp on record creation
5223
+ * @param options.prepare Optional custom prepare function that receives the pre-handled value
5224
+ * @param options.serialize Optional custom serialize function that receives the pre-handled value
5225
+ */
5226
+ declare function datetimeColumn(options?: Omit<DateColumnOptions, "format">): PropertyDecorator;
5227
+ /**
5228
+ * @description Decorator to define a TIMESTAMP column in the model (Unix timestamp)
5229
+ * @description This will automatically convert the date to Unix timestamp format
5230
+ * @description Handles timezone conversion between UTC and local time
5231
+ * @description Can automatically update/create timestamps
5232
+ * @param options Configuration options for the timestamp column
5233
+ * @param options.timezone The timezone to use ('UTC' or 'LOCAL')
5234
+ * @param options.autoUpdate Whether to automatically update the timestamp on record updates
5235
+ * @param options.autoCreate Whether to automatically set the timestamp on record creation
5236
+ * @param options.prepare Optional custom prepare function that receives the pre-handled value
5237
+ * @param options.serialize Optional custom serialize function that receives the pre-handled value
5238
+ */
5239
+ declare function timestampColumn(options?: Omit<DateColumnOptions, "format">): PropertyDecorator;
5240
+ /**
5241
+ * @description Decorator to define a TIME_ONLY column in the model (HH:mm:ss)
5242
+ * @description This will automatically convert the date to TIME_ONLY format
5243
+ * @description Handles timezone conversion between UTC and local time
5244
+ * @description Can automatically update/create timestamps
5245
+ * @param options Configuration options for the time column
5246
+ * @param options.timezone The timezone to use ('UTC' or 'LOCAL')
5247
+ * @param options.autoUpdate Whether to automatically update the time on record updates
5248
+ * @param options.autoCreate Whether to automatically set the time on record creation
5249
+ * @param options.prepare Optional custom prepare function that receives the pre-handled value
5250
+ * @param options.serialize Optional custom serialize function that receives the pre-handled value
5209
5251
  */
5210
- declare function dateColumn(options?: Omit<DateColumnOptions, "prepare" | "serialize">): PropertyDecorator;
5252
+ declare function timeOnlyColumn(options?: Omit<DateColumnOptions, "format">): PropertyDecorator;
5211
5253
  /**
5212
5254
  * @description Decorator to define a json column in the model
5213
5255
  * @description This will automatically convert the json to the correct format for the database